1.给浪潮添加岗位申请、录用接口
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.alibaba.excel.util.StringUtils;
|
||||
import com.ruoyi.cms.domain.Job;
|
||||
import com.ruoyi.cms.domain.JobApply;
|
||||
import com.ruoyi.cms.domain.vo.CandidateVO;
|
||||
@@ -99,16 +100,66 @@ public class JobApplyController extends BaseController {
|
||||
@PutMapping("/applyAgree")
|
||||
public AjaxResult applyAgree(@RequestBody JobApply jobApply)
|
||||
{
|
||||
if(jobApply.getJobId()==null){
|
||||
return AjaxResult.error("岗位id为空");
|
||||
}
|
||||
if(jobApply.getUserId()==null){
|
||||
return AjaxResult.error("用户id为空!");
|
||||
if(jobApply.getId()==null){
|
||||
return AjaxResult.error("参数id为空");
|
||||
}
|
||||
jobApply.setHire(StringUtil.HIRE_LY);
|
||||
jobApply.setHireSource(StringUtil.HIRE_SOURCE_SYSTEM);
|
||||
return success(iJobApplyService.updateJobApply(jobApply));
|
||||
}
|
||||
|
||||
@Log(title = "岗位", businessType = BusinessType.INSERT)
|
||||
@ApiOperation("招聘会-岗位申请")
|
||||
@PostMapping("/zphApply")
|
||||
public AjaxResult zphApply(@RequestBody JobApply jobApply)
|
||||
{
|
||||
if(jobApply.getJobId()==null){
|
||||
return AjaxResult.error("岗位id为空");
|
||||
}
|
||||
String idCard = jobApply.getIdCard();
|
||||
if(StringUtils.isBlank(idCard)){
|
||||
return AjaxResult.error("身份证为空!");
|
||||
}
|
||||
if (!idCard.matches(StringUtil.SFZ_VALID_REGEX)) {
|
||||
return AjaxResult.error("身份证格式不正确");
|
||||
}
|
||||
AppUser appUser=appUserService.selectAppuserByIdcard(idCard);
|
||||
if(appUser==null){
|
||||
return AjaxResult.error("在系统库中未查询到当前用户信息!");
|
||||
}
|
||||
jobApply.setUserId(appUser.getUserId());
|
||||
JobApply parm=new JobApply();
|
||||
parm.setJobId(jobApply.getJobId());
|
||||
parm.setUserId(appUser.getUserId());
|
||||
List<JobApply> applies=iJobApplyService.selectJobApplyList(parm);
|
||||
if(applies!=null&&applies.size()>0){
|
||||
return AjaxResult.error("当前用户,已申请过该岗位,请勿重复申请!");
|
||||
}
|
||||
return success(iJobApplyService.applyComJob(jobApply));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "岗位", businessType = BusinessType.INSERT)
|
||||
@ApiOperation("招聘会-岗位录用")
|
||||
@PostMapping("/zphApplyAgree")
|
||||
public AjaxResult zphApplyAgree(@RequestBody JobApply jobApply)
|
||||
{
|
||||
if(jobApply.getJobId()==null){
|
||||
return AjaxResult.error("岗位id为空");
|
||||
}
|
||||
String idCard = jobApply.getIdCard();
|
||||
if(StringUtils.isBlank(idCard)){
|
||||
return AjaxResult.error("身份证为空!");
|
||||
}
|
||||
if (!idCard.matches(StringUtil.SFZ_VALID_REGEX)) {
|
||||
return AjaxResult.error("身份证格式不正确");
|
||||
}
|
||||
AppUser appUser=appUserService.selectAppuserByIdcard(idCard);
|
||||
if(appUser==null){
|
||||
return AjaxResult.error("在系统库中未查询到当前用户信息!");
|
||||
}
|
||||
jobApply.setUserId(appUser.getUserId());
|
||||
jobApply.setHire(StringUtil.HIRE_LY);
|
||||
jobApply.setHireSource(StringUtil.HIRE_SOURCE_ZPH);
|
||||
return success(iJobApplyService.updateJobZphApply(jobApply));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user