|
@@ -4,8 +4,10 @@ import com.github.pagehelper.Page;
|
|
import com.google.gson.JsonObject;
|
|
import com.google.gson.JsonObject;
|
|
import com.jpsoft.employment.modules.base.entity.City;
|
|
import com.jpsoft.employment.modules.base.entity.City;
|
|
import com.jpsoft.employment.modules.base.entity.Company;
|
|
import com.jpsoft.employment.modules.base.entity.Company;
|
|
|
|
+import com.jpsoft.employment.modules.base.entity.MessageNotice;
|
|
import com.jpsoft.employment.modules.base.service.CityService;
|
|
import com.jpsoft.employment.modules.base.service.CityService;
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
import com.jpsoft.employment.modules.base.service.CompanyService;
|
|
|
|
+import com.jpsoft.employment.modules.base.service.MessageNoticeService;
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.common.utils.PojoUtils;
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
import com.jpsoft.employment.modules.common.dto.Sort;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
@@ -50,9 +52,10 @@ public class RecruitmentController {
|
|
private UserService userService;
|
|
private UserService userService;
|
|
@Autowired
|
|
@Autowired
|
|
private WorkCategoryService workCategoryService;
|
|
private WorkCategoryService workCategoryService;
|
|
-
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private CityService cityService;
|
|
private CityService cityService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private MessageNoticeService messageNoticeService;
|
|
|
|
|
|
@ApiOperation(value="创建空记录")
|
|
@ApiOperation(value="创建空记录")
|
|
@GetMapping("create")
|
|
@GetMapping("create")
|
|
@@ -146,7 +149,7 @@ public class RecruitmentController {
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="获取信息")
|
|
|
|
|
|
+ @ApiOperation(value="HR企业信息维护-获取信息")
|
|
@GetMapping("edit/{id}")
|
|
@GetMapping("edit/{id}")
|
|
public MessageResult<Recruitment> edit(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
public MessageResult<Recruitment> edit(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
MessageResult<Recruitment> msgResult = new MessageResult<>();
|
|
MessageResult<Recruitment> msgResult = new MessageResult<>();
|
|
@@ -735,14 +738,14 @@ public class RecruitmentController {
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="更新用户")
|
|
|
|
|
|
+ @ApiOperation(value="审批")
|
|
@PostMapping("checked")
|
|
@PostMapping("checked")
|
|
- public MessageResult<Recruitment> checked(String id, String approveId, @RequestAttribute String subject){
|
|
|
|
|
|
+ public MessageResult<Recruitment> checked(String id, String approveId, String approveStatus, @RequestAttribute String subject){
|
|
MessageResult<Recruitment> msgResult = new MessageResult<>();
|
|
MessageResult<Recruitment> msgResult = new MessageResult<>();
|
|
|
|
|
|
try {
|
|
try {
|
|
Recruitment recruitment = recruitmentService.get(id);
|
|
Recruitment recruitment = recruitmentService.get(id);
|
|
- recruitment.setApproveStatus("3");
|
|
|
|
|
|
+ recruitment.setApproveStatus(approveStatus);
|
|
recruitment.setUpdateBy(subject);
|
|
recruitment.setUpdateBy(subject);
|
|
recruitment.setUpdateTime(new Date());
|
|
recruitment.setUpdateTime(new Date());
|
|
|
|
|
|
@@ -750,11 +753,27 @@ public class RecruitmentController {
|
|
|
|
|
|
if (affectCount > 0) {
|
|
if (affectCount > 0) {
|
|
RecruitmentApprove recruitmentApprove = recruitmentApproveService.get(approveId);
|
|
RecruitmentApprove recruitmentApprove = recruitmentApproveService.get(approveId);
|
|
- recruitmentApprove.setApproveStatus("3");
|
|
|
|
|
|
+ recruitmentApprove.setApproveStatus(approveStatus);
|
|
recruitmentApprove.setApprovePersonId(subject);
|
|
recruitmentApprove.setApprovePersonId(subject);
|
|
recruitmentApprove.setApproveTime(new Date());
|
|
recruitmentApprove.setApproveTime(new Date());
|
|
recruitmentApproveService.update(recruitmentApprove);
|
|
recruitmentApproveService.update(recruitmentApprove);
|
|
|
|
|
|
|
|
+ if(approveStatus.equals("4")){
|
|
|
|
+ MessageNotice messageNotice = new MessageNotice();
|
|
|
|
+ messageNotice.setId(UUID.randomUUID().toString());
|
|
|
|
+ messageNotice.setTitle("岗位信息审核");
|
|
|
|
+ messageNotice.setContent("经过核对,数据存疑,请查实后再次提交审核。");
|
|
|
|
+ messageNotice.setRecipientId(recruitmentApprove.getCreateBy());
|
|
|
|
+ messageNotice.setStatus(true);
|
|
|
|
+ messageNotice.setDelFlag(false);
|
|
|
|
+ messageNotice.setCreateBy(subject);
|
|
|
|
+ messageNotice.setCreateTime(new Date());
|
|
|
|
+ messageNotice.setClassify("1");
|
|
|
|
+ messageNotice.setType("1");
|
|
|
|
+ messageNotice.setIsNeedAgree(false);
|
|
|
|
+ messageNoticeService.insert(messageNotice);
|
|
|
|
+ }
|
|
|
|
+
|
|
msgResult.setResult(true);
|
|
msgResult.setResult(true);
|
|
msgResult.setData(recruitment);
|
|
msgResult.setData(recruitment);
|
|
} else {
|
|
} else {
|
|
@@ -771,4 +790,106 @@ public class RecruitmentController {
|
|
|
|
|
|
return msgResult;
|
|
return msgResult;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value="获取信息")
|
|
|
|
+ @GetMapping("editD/{id}")
|
|
|
|
+ public MessageResult<Recruitment> editD(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
|
+ MessageResult<Recruitment> msgResult = new MessageResult<>();
|
|
|
|
+
|
|
|
|
+ try {
|
|
|
|
+ Recruitment recruitment = recruitmentService.get(id);
|
|
|
|
+ Company company = companyService.get(recruitment.getCompanyId());
|
|
|
|
+
|
|
|
|
+ recruitment.setCompanyName(company.getName());
|
|
|
|
+ recruitment.setCompanyLogo(company.getLogo());
|
|
|
|
+
|
|
|
|
+ recruitment.setCompanyIndustryN(dataDictionaryService.getName(company.getIndustry()));
|
|
|
|
+ recruitment.setCompanyScaleN(dataDictionaryService.getName(company.getScale()));
|
|
|
|
+ recruitment.setWorkYearName(dataDictionaryService.getName(recruitment.getWorkYear()));
|
|
|
|
+ recruitment.setEducationName(dataDictionaryService.getName(recruitment.getEducation()));
|
|
|
|
+ recruitment.setWageTypeName(dataDictionaryService.getName(recruitment.getWageType()));
|
|
|
|
+
|
|
|
|
+ if (recruitment != null) {
|
|
|
|
+ if(StringUtils.isNotEmpty(recruitment.getWelfare())) {
|
|
|
|
+ String welfare = recruitment.getWelfare();
|
|
|
|
+
|
|
|
|
+ List<String> tagList = new ArrayList<>();
|
|
|
|
+
|
|
|
|
+ JSONObject jsonObject = JSONObject.fromObject(welfare);
|
|
|
|
+ if(jsonObject!=null&&jsonObject.size()>0){
|
|
|
|
+
|
|
|
|
+ String checkboxGroup1="";
|
|
|
|
+ String dynamicTags="";
|
|
|
|
+
|
|
|
|
+ if(jsonObject.get("checkboxGroup1")!=null){
|
|
|
|
+ checkboxGroup1 = jsonObject.get("checkboxGroup1").toString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(jsonObject.get("dynamicTags")!=null){
|
|
|
|
+ dynamicTags = jsonObject.get("dynamicTags").toString();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(checkboxGroup1)){
|
|
|
|
+ recruitment.setCheckboxGroup1(checkboxGroup1);
|
|
|
|
+
|
|
|
|
+ String[] checkboxGroupArray = checkboxGroup1.split(",");
|
|
|
|
+ for (String dicId:checkboxGroupArray) {
|
|
|
|
+ DataDictionary dataDictionary = dataDictionaryService.get(dicId);
|
|
|
|
+ if(dataDictionary!=null){
|
|
|
|
+ tagList.add(dataDictionary.getName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(dynamicTags)){
|
|
|
|
+ recruitment.setDynamicTags(dynamicTags);
|
|
|
|
+ String[] dynamicTagArray = dynamicTags.split(",");
|
|
|
|
+ for (String name:dynamicTagArray) {
|
|
|
|
+ tagList.add(name);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ recruitment.setTagList(tagList);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ recruitment.setCompanyName(company.getName());
|
|
|
|
+ recruitment.setCompanyLogo(company.getLogo());
|
|
|
|
+ recruitment.setIsCertification(company.getIsCertification());
|
|
|
|
+ recruitment.setCompanyScaleN(dataDictionaryService.getName(company.getScale()));
|
|
|
|
+ recruitment.setCompanyIndustryN(dataDictionaryService.getName(company.getIndustry()));
|
|
|
|
+
|
|
|
|
+ recruitment.setWorkYearName(dataDictionaryService.getName(recruitment.getWorkYear()));
|
|
|
|
+ recruitment.setEducationName(dataDictionaryService.getName(recruitment.getEducation()));
|
|
|
|
+ recruitment.setWageTypeName(dataDictionaryService.getName(recruitment.getWageType()));
|
|
|
|
+
|
|
|
|
+ WorkCategory workCategory = workCategoryService.get(recruitment.getPosition());
|
|
|
|
+ if(workCategory!=null){
|
|
|
|
+ recruitment.setPositionName(workCategory.getName());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(StringUtils.isNotEmpty(recruitment.getPositionSex())){
|
|
|
|
+ recruitment.setPositionSexN(dataDictionaryService.findNameByCatalogNameAndValue("性别",recruitment.getPositionSex()));
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ recruitment.setPositionSexN("男女不限");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ msgResult.setResult(true);
|
|
|
|
+ msgResult.setData(recruitment);
|
|
|
|
+ } else {
|
|
|
|
+ msgResult.setResult(false);
|
|
|
|
+ msgResult.setMessage("数据库不存在该记录!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ catch(Exception ex){
|
|
|
|
+ logger.error(ex.getMessage(),ex);
|
|
|
|
+
|
|
|
|
+ msgResult.setResult(false);
|
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return msgResult;
|
|
|
|
+ }
|
|
}
|
|
}
|