|
|
@@ -1,7 +1,10 @@
|
|
|
package com.jpsoft.employment.modules.job.controller;
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
+import com.jpsoft.employment.modules.base.entity.City;
|
|
|
import com.jpsoft.employment.modules.base.entity.Company;
|
|
|
+import com.jpsoft.employment.modules.base.service.CityService;
|
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
|
@@ -44,6 +47,9 @@ public class RecruitmentController {
|
|
|
@Autowired
|
|
|
private WorkCategoryService workCategoryService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private CityService cityService;
|
|
|
+
|
|
|
@ApiOperation(value="创建空记录")
|
|
|
@GetMapping("create")
|
|
|
public MessageResult<Recruitment> create(){
|
|
|
@@ -88,8 +94,16 @@ public class RecruitmentController {
|
|
|
recruitment.setReadingTimes(0);
|
|
|
recruitment.setCollectionTimes(0);
|
|
|
recruitment.setDeliveryTimes(0);
|
|
|
+ String zone = "";
|
|
|
if(company!=null){
|
|
|
- recruitment.setArea(company.getArea());
|
|
|
+ if(StringUtils.isNotEmpty(company.getArea())){
|
|
|
+ JSONObject jsonObject = JSONObject.fromObject(company.getArea());
|
|
|
+ if(jsonObject!=null&&jsonObject.size()>0){
|
|
|
+ zone = jsonObject.get("zone").toString();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ recruitment.setArea(zone);
|
|
|
}
|
|
|
|
|
|
//是否面议
|
|
|
@@ -111,7 +125,7 @@ public class RecruitmentController {
|
|
|
jsonObject.put("dynamicTags",recruitment.getDynamicTags());
|
|
|
}
|
|
|
|
|
|
- if(jsonObject!=null){
|
|
|
+ if(jsonObject!=null && jsonObject.size()!=0){
|
|
|
recruitment.setWelfare(jsonObject.toString());
|
|
|
}
|
|
|
|
|
|
@@ -536,6 +550,17 @@ public class RecruitmentController {
|
|
|
if(workCategory!=null){
|
|
|
recruitment.setPositionName(workCategory.getName());
|
|
|
}
|
|
|
+
|
|
|
+ String area = "";
|
|
|
+
|
|
|
+ if(StringUtils.isNotEmpty(recruitment.getArea())){
|
|
|
+
|
|
|
+ City zoneItem = cityService.get(Integer.parseInt(recruitment.getArea()));
|
|
|
+
|
|
|
+ area = zoneItem.getCityName();
|
|
|
+ }
|
|
|
+
|
|
|
+ recruitment.setArea(area);
|
|
|
}
|
|
|
|
|
|
|