|
@@ -1,8 +1,10 @@
|
|
|
package com.jpsoft.employment.modules.base.controller;
|
|
package com.jpsoft.employment.modules.base.controller;
|
|
|
|
|
|
|
|
import com.github.pagehelper.Page;
|
|
import com.github.pagehelper.Page;
|
|
|
|
|
+import com.jpsoft.employment.modules.base.entity.JobInformationInfo;
|
|
|
import com.jpsoft.employment.modules.base.entity.PersonInfo;
|
|
import com.jpsoft.employment.modules.base.entity.PersonInfo;
|
|
|
import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
|
|
import com.jpsoft.employment.modules.base.entity.RecruitInformationInfo;
|
|
|
|
|
+import com.jpsoft.employment.modules.base.service.JobInformationInfoService;
|
|
|
import com.jpsoft.employment.modules.base.service.PersonInfoService;
|
|
import com.jpsoft.employment.modules.base.service.PersonInfoService;
|
|
|
import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
|
|
import com.jpsoft.employment.modules.base.service.RecruitInformationInfoService;
|
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
import com.jpsoft.employment.modules.common.dto.MessageResult;
|
|
@@ -10,6 +12,7 @@ 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.base.entity.RecruitPersonRelation;
|
|
import com.jpsoft.employment.modules.base.entity.RecruitPersonRelation;
|
|
|
import com.jpsoft.employment.modules.base.service.RecruitPersonRelationService;
|
|
import com.jpsoft.employment.modules.base.service.RecruitPersonRelationService;
|
|
|
|
|
+import com.jpsoft.employment.modules.sys.service.DataDictionaryService;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
@@ -32,6 +35,12 @@ public class RecruitPersonRelationController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private PersonInfoService personInfoService;
|
|
private PersonInfoService personInfoService;
|
|
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private JobInformationInfoService jobInformationInfoService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@ApiOperation(value = "创建空记录")
|
|
@ApiOperation(value = "创建空记录")
|
|
|
@GetMapping("create")
|
|
@GetMapping("create")
|
|
@@ -245,4 +254,75 @@ public class RecruitPersonRelationController {
|
|
|
|
|
|
|
|
return msgResult;
|
|
return msgResult;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @ApiOperation(value="获取信息")
|
|
|
|
|
+ @GetMapping("jobInformationDetail/{id}")
|
|
|
|
|
+ public MessageResult<JobInformationInfo> jobInformationDetail(@PathVariable("id") String id,@RequestAttribute String subject){
|
|
|
|
|
+ MessageResult<JobInformationInfo> msgResult = new MessageResult<>();
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ RecruitPersonRelation recruitPersonRelation = recruitPersonRelationService.get(id);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ JobInformationInfo jobInformationInfo = jobInformationInfoService.get(recruitPersonRelation.getJobInformationId());
|
|
|
|
|
+
|
|
|
|
|
+ if (jobInformationInfo != null) {
|
|
|
|
|
+ //修改是否读取状态
|
|
|
|
|
+ if(recruitPersonRelation.getIsRead()==null||!recruitPersonRelation.getIsRead()){
|
|
|
|
|
+ recruitPersonRelation.setIsRead(true);
|
|
|
|
|
+ recruitPersonRelation.setUpdateBy(subject);
|
|
|
|
|
+ recruitPersonRelation.setUpdateTime(new Date());
|
|
|
|
|
+ recruitPersonRelationService.update(recruitPersonRelation);
|
|
|
|
|
+
|
|
|
|
|
+ jobInformationInfo.setIsReadStatus(true);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());
|
|
|
|
|
+ if(personInfo!=null){
|
|
|
|
|
+ jobInformationInfo.setPersonName(personInfo.getRealName());
|
|
|
|
|
+ jobInformationInfo.setPersonPhone(personInfo.getPhone());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String intendedIndustriesN = dataDictionaryService.findNameByCatalogNameAndValue("意向行业",jobInformationInfo.getIntendedIndustries());
|
|
|
|
|
+ if(StringUtils.isNotEmpty(intendedIndustriesN)){
|
|
|
|
|
+ jobInformationInfo.setIntendedIndustriesN(intendedIndustriesN);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String methodN = dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod());
|
|
|
|
|
+ if(StringUtils.isNotEmpty(methodN)){
|
|
|
|
|
+ jobInformationInfo.setMethodN(methodN);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ String workExperienceN = dataDictionaryService.findNameByCatalogNameAndValue("工作经验",jobInformationInfo.getWorkExperience());
|
|
|
|
|
+ if(StringUtils.isNotEmpty(workExperienceN)){
|
|
|
|
|
+ jobInformationInfo.setWorkExperienceN(workExperienceN);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ String educationN = dataDictionaryService.findNameByCatalogNameAndValue("学历",jobInformationInfo.getEducation());
|
|
|
|
|
+ if(StringUtils.isNotEmpty(educationN)){
|
|
|
|
|
+ jobInformationInfo.setEducationN(educationN);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ jobInformationInfo.setIsRead(true);
|
|
|
|
|
+
|
|
|
|
|
+ msgResult.setResult(true);
|
|
|
|
|
+ msgResult.setData(jobInformationInfo);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ msgResult.setResult(false);
|
|
|
|
|
+ msgResult.setMessage("数据库不存在该记录!");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ catch(Exception ex){
|
|
|
|
|
+ logger.error(ex.getMessage(),ex);
|
|
|
|
|
+
|
|
|
|
|
+ msgResult.setResult(false);
|
|
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return msgResult;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|