|
@@ -85,6 +85,7 @@ public class RecruitApiController {
|
|
|
searchParams.put("settlementMethod",type);
|
|
|
}
|
|
|
|
|
|
+ searchParams.put("status","1");
|
|
|
Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
|
|
|
recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
@@ -157,6 +158,7 @@ public class RecruitApiController {
|
|
|
searchParams.put("salaryForm",salaryForm);
|
|
|
}
|
|
|
|
|
|
+ searchParams.put("status","1");
|
|
|
Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
|
|
|
recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
@@ -183,6 +185,7 @@ public class RecruitApiController {
|
|
|
searchParams.put("workExp",workExp);
|
|
|
}
|
|
|
|
|
|
+ searchParams.put("status","1");
|
|
|
Page<JobInformationInfo> page = jobInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for (JobInformationInfo jobInformationInfo:page) {
|
|
|
PersonInfo personInfo = personInfoService.get(jobInformationInfo.getPersonId());
|
|
@@ -190,26 +193,11 @@ public class RecruitApiController {
|
|
|
jobInformationInfo.setPersonName(personInfo.getRealName());
|
|
|
}
|
|
|
|
|
|
- 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);
|
|
|
- }
|
|
|
-
|
|
|
+ jobInformationInfo.setIntendedIndustriesN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",jobInformationInfo.getIntendedIndustries()));
|
|
|
+ jobInformationInfo.setMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod()));
|
|
|
+ jobInformationInfo.setWorkExperienceN(dataDictionaryService.findNameByCatalogNameAndValue("工作经验",jobInformationInfo.getWorkExperience()));
|
|
|
+ jobInformationInfo.setEducationN(dataDictionaryService.findNameByCatalogNameAndValue("学历",jobInformationInfo.getEducation()));
|
|
|
|
|
|
- String educationN = dataDictionaryService.findNameByCatalogNameAndValue("学历",jobInformationInfo.getEducation());
|
|
|
- if(StringUtils.isNotEmpty(educationN)){
|
|
|
- jobInformationInfo.setEducationN(educationN);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
messageResult.setData(PojoUtils.pageWrapper(page));
|
|
@@ -264,6 +252,7 @@ public class RecruitApiController {
|
|
|
searchParams.put("workExp",workExp);
|
|
|
}
|
|
|
|
|
|
+ searchParams.put("status","1");
|
|
|
Page<RecruitInformationInfo> page = recruitInformationInfoService.pageSearchMobile(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(RecruitInformationInfo recruitInformationInfo : page.getResult()){
|
|
|
recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
@@ -378,7 +367,7 @@ public class RecruitApiController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="招聘信息详细(免登陆")
|
|
|
+ @ApiOperation(value="招聘信息详细(公开接口")
|
|
|
@RequestMapping(value = "recruitDetail",method = RequestMethod.POST)
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "recruitId", value = "招聘信息ID", required = false, paramType = "form"),
|
|
@@ -388,19 +377,36 @@ public class RecruitApiController {
|
|
|
HttpServletRequest request){
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
try {
|
|
|
- String subject = (String)request.getAttribute("subject");
|
|
|
+ String subject = "";
|
|
|
+
|
|
|
+ String token = request.getHeader("Authorization");
|
|
|
+
|
|
|
+ if (org.springframework.util.StringUtils.isEmpty(token)){
|
|
|
+ token = (String)request.getSession().getAttribute("token");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (org.springframework.util.StringUtils.isEmpty(token)) {
|
|
|
+ token = request.getParameter("token");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (org.apache.commons.lang3.StringUtils.isNotEmpty(token)){
|
|
|
+ subject = JwtUtil.decodeToken(jwtSecret,token);
|
|
|
+ }
|
|
|
|
|
|
Boolean isJoin = false;
|
|
|
|
|
|
Map<String,Object> returnMap = new HashMap<>();
|
|
|
RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(recruitId);
|
|
|
+ if(recruitInformationInfo == null){
|
|
|
+ throw new Exception("未找到信息");
|
|
|
+ }
|
|
|
|
|
|
int BrowseNumber = 0;
|
|
|
if(recruitInformationInfo.getBrowseNumber() != null){
|
|
|
BrowseNumber = recruitInformationInfo.getBrowseNumber();
|
|
|
-
|
|
|
}
|
|
|
- recruitInformationInfo.setBrowseNumber(BrowseNumber++);
|
|
|
+ BrowseNumber++;
|
|
|
+ recruitInformationInfo.setBrowseNumber(BrowseNumber);
|
|
|
recruitInformationInfoService.update(recruitInformationInfo);
|
|
|
|
|
|
|
|
@@ -417,6 +423,11 @@ public class RecruitApiController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ recruitInformationInfo.setIndustryN(dataDictionaryService.findNameByCatalogNameAndValue("意向行业",recruitInformationInfo.getIndustry()));
|
|
|
+ recruitInformationInfo.setSettlementMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",recruitInformationInfo.getSettlementMethod()));
|
|
|
+ recruitInformationInfo.setSalaryFormN(dataDictionaryService.findNameByCatalogNameAndValue("薪资形式",recruitInformationInfo.getSalaryForm()));
|
|
|
+
|
|
|
+
|
|
|
|
|
|
returnMap.put("recruitInformationInfo",recruitInformationInfo);
|
|
|
returnMap.put("enterpriseInfo",enterpriseInfo);
|
|
@@ -485,7 +496,7 @@ public class RecruitApiController {
|
|
|
shareWorksInfo.setContent(content);
|
|
|
shareWorksInfo.setAuthor(personInfo.getRealName());
|
|
|
|
|
|
- shareWorksInfoService.update(shareWorksInfo);
|
|
|
+ shareWorksInfoService.insert(shareWorksInfo);
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|
|
@@ -518,8 +529,14 @@ public class RecruitApiController {
|
|
|
}
|
|
|
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+ if(StringUtils.isEmpty(personInfo.getEnterpriseId())){
|
|
|
+ personInfo.setEnterpriseId("wufachakan");
|
|
|
+ }
|
|
|
searchParams.put("enterpriseId",personInfo.getEnterpriseId());
|
|
|
|
|
|
+ searchParams.put("status",status);
|
|
|
+
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("a.create_time","desc"));
|
|
|
|
|
@@ -668,6 +685,9 @@ public class RecruitApiController {
|
|
|
JobInformationInfo jobInformationInfo = jobInformationInfoService.get(jobEnterpriseRelation.getJobInformationId());
|
|
|
jobInformationInfo.setMethodN(dataDictionaryService.findNameByCatalogNameAndValue("结算方式",jobInformationInfo.getMethod()));
|
|
|
jobEnterpriseRelation.setJobInformationInfo(jobInformationInfo);
|
|
|
+
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(jobEnterpriseRelation.getRecruitInformationId());
|
|
|
+ jobEnterpriseRelation.setRecruitInformationInfo(recruitInformationInfo);
|
|
|
}
|
|
|
msgResult.setResult(true);
|
|
|
msgResult.setData(PojoUtils.pageWrapper(page));
|
|
@@ -764,4 +784,63 @@ public class RecruitApiController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation(value="邀请工人(企业邀请简历")
|
|
|
+ @RequestMapping(value = "inviteJob",method = RequestMethod.POST)
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "jobId", value = "简历ID", required = false, paramType = "form"),
|
|
|
+ @ApiImplicitParam(name = "recruitId", value = "岗位ID", required = false, paramType = "form"),
|
|
|
+ })
|
|
|
+ public MessageResult<Map> inviteJob(
|
|
|
+ @RequestParam(value="jobId",defaultValue="") String jobId,
|
|
|
+ @RequestParam(value="recruitId",defaultValue="") String recruitId,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ try {
|
|
|
+
|
|
|
+ PersonInfo personInfo = personInfoService.get(subject);
|
|
|
+ if (personInfo == null) {
|
|
|
+ throw new Exception("未登录");
|
|
|
+ }
|
|
|
+
|
|
|
+ RecruitInformationInfo recruitInformationInfo = recruitInformationInfoService.get(recruitId);
|
|
|
+ if(recruitInformationInfo == null){
|
|
|
+ throw new Exception("未找到岗位信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ JobInformationInfo jobInformationInfo = jobInformationInfoService.get(jobId);
|
|
|
+ if(jobInformationInfo == null){
|
|
|
+ throw new Exception("未找到简历信息");
|
|
|
+ }
|
|
|
+
|
|
|
+ JobEnterpriseRelation jobEnterpriseRelation = jobEnterpriseRelationService.findByEnterpriseIdAndJobInformationId(recruitInformationInfo.getEnterpriseId(),jobId);
|
|
|
+ if(jobEnterpriseRelation == null){
|
|
|
+ jobEnterpriseRelation = new JobEnterpriseRelation();
|
|
|
+ jobEnterpriseRelation.setId(UUID.randomUUID().toString());
|
|
|
+ jobEnterpriseRelation.setCreateBy(subject);
|
|
|
+ jobEnterpriseRelation.setCreateTime(new Date());
|
|
|
+ jobEnterpriseRelation.setDelFlag(false);
|
|
|
+
|
|
|
+ jobEnterpriseRelation.setEnterpriseId(recruitInformationInfo.getEnterpriseId());
|
|
|
+ jobEnterpriseRelation.setJobInformationId(jobId);
|
|
|
+ jobEnterpriseRelation.setRecruitInformationId(recruitId);
|
|
|
+ int count = jobEnterpriseRelationService.insert(jobEnterpriseRelation);
|
|
|
+ if(count > 0){
|
|
|
+ msgResult.setResult(true);
|
|
|
+ }else{
|
|
|
+ msgResult.setResult(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ }else{
|
|
|
+ throw new Exception("已经邀请");
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ msgResult.setResult(false);
|
|
|
+ msgResult.setMessage(e.getMessage());
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|