Commit 4443db14 by 284718418@qq.com

招聘管理业务代码

parent 4f584887
......@@ -41,9 +41,9 @@ public class ZpglFail extends Model<ZpglFail> {
@ApiModelProperty(value = "编号")
private Integer id;
/**
* 状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰
* 状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰 10已入职
*/
@ApiModelProperty(value = "状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰")
@ApiModelProperty(value = "状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰 10已入职")
private Integer zpglRcxxStatus;
/**
* 淘汰原因
......
......@@ -96,6 +96,21 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
@ApiModelProperty(value = "籍贯")
private String nativePlace;
/**
* 部门岗位ID
*/
@ApiModelProperty(value = "部门岗位ID")
private Integer bmgwId;
/**
* 工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘
*/
@ApiModelProperty(value = "工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘")
private Integer jobType;
/**
* 预计入职日期
*/
@ApiModelProperty(value = "预计入职日期")
private Date yjrzTime;
/**
* 省名
*/
@ApiModelProperty(value = "省名")
......@@ -215,9 +230,9 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
@ApiModelProperty(value = "备注")
private String remarks;
/**
* 性别 1:男2:女
* 性别 0:男1:女
*/
@ApiModelProperty(value = "性别 1:男2:女")
@ApiModelProperty(value = "性别 0:男1:女")
private Integer sex;
/**
* 出生日期
......@@ -250,9 +265,9 @@ public class ZpglRcxx extends Model<ZpglRcxx> {
@ApiModelProperty(value = "标签")
private String label;
/**
* 状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰
* 状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰 10已入职
*/
@ApiModelProperty(value = "状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰")
@ApiModelProperty(value = "状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰 10已入职")
private Integer status;
/**
* 对应淘汰原因字典ID
......
......@@ -306,7 +306,7 @@ public interface JxglEnumInterface {
}
/**
* 招聘管理-人才信息:状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰
* 招聘管理-人才信息:状态 1:待初筛 2:初筛通过 3:已安排面试 4:已面试 5:面试通过 6:拟录用 7:已发Offer 8:待入职 9已淘汰 10已入职
*/
@Getter
enum ResumeStatus implements JxglEnumInterface {
......@@ -314,7 +314,7 @@ public interface JxglEnumInterface {
FILTER_PASS(2, "初筛通过"), INTERVIEW(3, "已安排面试"),
INTERVIEWED(4, "已面试"), INTERVIEW_PASS(5, "面试通过"),
EMPLOY(6, "拟录用"), OFFER(7, "已发Offer"),
ENTRYING(8, "待入职"), PASS_OUT(9, "9已淘汰");
ENTRYING(8, "待入职"), PASS_OUT(9, "9已淘汰"),ENTRY(10, "已入职");
private Integer type;
......
......@@ -11,6 +11,7 @@ import cn.timer.api.bean.zpgl.ZpglZwxx;
import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean;
import cn.timer.api.config.enuminterface.JxglEnumInterface;
import cn.timer.api.config.exception.CustomException;
import cn.timer.api.controller.zpgl.sevice.ZpglMslcLogService;
import cn.timer.api.dao.zpgl.ZpglMslcLogMapper;
import cn.timer.api.dto.zpgl.ZpglRcxxDto;
......@@ -31,10 +32,12 @@ import org.springframework.web.bind.annotation.*;
import javax.transaction.Transactional;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 招聘管理
*
......@@ -62,38 +65,39 @@ public class ZpglController {
@GetMapping(value = "/recruit")
@ApiOperation(value = "1.招聘列表", httpMethod = "GET", notes = "招聘列表")
@ApiOperationSupport(order = 1)
public Result<Object> recruit(@CurrentUser UserBean userBean,BaseQuery baseQuery,
public Result<Object> recruit(@CurrentUser UserBean userBean, BaseQuery baseQuery,
@ApiParam("搜索关键字") @RequestParam(required = false) String query,
@ApiParam("职位ID") @RequestParam(required = false) Integer zpglZwxxId,
@ApiParam("状态") @RequestParam(required = false) Integer status) {
Page<ZpglRcxx> page = new Page<ZpglRcxx>(baseQuery.getPageNum(), baseQuery.getPageSize());
QueryWrapper<ZpglRcxx> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ZpglRcxx :: getOrgCode, userBean.getOrgCode());
queryWrapper.lambda().eq(ZpglRcxx::getOrgCode, userBean.getOrgCode());
if (!StringUtils.isEmpty(zpglZwxxId) && zpglZwxxId > 0) {
queryWrapper.lambda().eq(ZpglRcxx :: getZpglZwxxId, zpglZwxxId);
queryWrapper.lambda().eq(ZpglRcxx::getZpglZwxxId, zpglZwxxId);
}
if (!StringUtils.isEmpty(query)) {
queryWrapper.lambda().and(qw -> qw.like(ZpglRcxx ::getName, query).or().eq(ZpglRcxx ::getMobile, query).or().eq(ZpglRcxx ::getMail, query));
queryWrapper.lambda().and(qw -> qw.like(ZpglRcxx::getName, query).or().eq(ZpglRcxx::getMobile, query).or().eq(ZpglRcxx::getMail, query));
}
queryWrapper.lambda().eq(ZpglRcxx ::getStatus, status);
queryWrapper.lambda().eq(ZpglRcxx::getStatus, status);
IPage<ZpglRcxx> ygglMainEmpPage = ZpglRcxx.builder().build().selectPage(page, queryWrapper);
List<ZpglRcxx> zpglRcxxs = page.getRecords();
ygglMainEmpPage.getCurrent();
ygglMainEmpPage.getPages();
ygglMainEmpPage.getTotal();
ygglMainEmpPage.getSize();
Map<String,Object> map = new HashMap<>(2);
map.put("zpglRcxxs",zpglRcxxs);
map.put("FILTERING",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.FILTERING.getType())));
map.put("FILTER_PASS",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.FILTER_PASS.getType())));
map.put("INTERVIEW",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEW.getType())));
map.put("INTERVIEWED",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEWED.getType())));
map.put("INTERVIEW_PASS",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEW_PASS.getType())));
map.put("EMPLOY",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.EMPLOY.getType())));
map.put("OFFER",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.OFFER.getType())));
map.put("ENTRYING",ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.ENTRYING.getType())));
Map<String, Object> map = new HashMap<>(2);
map.put("zpglRcxxs", zpglRcxxs);
map.put("FILTERING", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.FILTERING.getType())));
map.put("FILTER_PASS", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.FILTER_PASS.getType())));
map.put("INTERVIEW", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEW.getType())));
map.put("INTERVIEWED", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEWED.getType())));
map.put("INTERVIEW_PASS", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.INTERVIEW_PASS.getType())));
map.put("EMPLOY", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.EMPLOY.getType())));
map.put("OFFER", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.OFFER.getType())));
map.put("ENTRYING", ZpglRcxx.builder().build().selectCount(new QueryWrapper<ZpglRcxx>().lambda().eq(ZpglRcxx::getStatus, JxglEnumInterface.ResumeStatus.ENTRYING.getType())));
return ResultUtil.data(ygglMainEmpPage, map, "搜索成功");
}
/**
* 招聘-招聘中
*
......@@ -105,10 +109,11 @@ public class ZpglController {
@ApiOperationSupport(order = 2)
public Result<Object> zwxx(@CurrentUser UserBean userBean) {
QueryWrapper<ZpglZwxx> queryWrapper = new QueryWrapper<>();
queryWrapper.lambda().eq(ZpglZwxx::getOrgCode,userBean.getOrgCode());
queryWrapper.lambda().eq(ZpglZwxx::getOrgCode, userBean.getOrgCode());
List<ZpglZwxx> zpglZwxxs = ZpglZwxx.builder().build().selectList(queryWrapper);
return ResultUtil.data(zpglZwxxs, "查询成功");
}
/**
* 招聘-变更状态
*
......@@ -119,53 +124,95 @@ public class ZpglController {
@ApiOperation(value = "3.招聘-变更状态", httpMethod = "POST", notes = "招聘-变更状态")
@ApiOperationSupport(order = 3)
public Result<Object> operation(@CurrentUser UserBean userBean, @RequestBody ZpglRcxxDto zpglRcxxDto) {
try {
ZpglRcxx zpglRcxx = ZpglRcxx.builder().id(zpglRcxxDto.getId()).status(zpglRcxxDto.getStatus()).build();
ZpglMslcLog zpglMslcLog = new ZpglMslcLog();
zpglMslcLog.setZpglRcxxId(zpglRcxxDto.getId());
zpglMslcLog.setUserId(userBean.getEmpNum());
zpglMslcLog.setUserName(userBean.getQyzxEmpLogin().getUsername());
String detail = "";
switch (zpglRcxxDto.getStatus()) {
case 2:
//初筛通过 填充字段
zpglRcxx.setIfrck(zpglRcxxDto.getIfrck());
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTER_PASS, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
break;
case 3:
//安排面试 填充字段
zpglRcxx.setInterviewNum(zpglRcxxDto.getInterviewNum());
zpglRcxx.setInterviewWay(zpglRcxxDto.getInterviewWay());
zpglRcxx.setInterviewerId(zpglRcxxDto.getInterviewerId());
zpglRcxx.setInterviewTime(zpglRcxxDto.getInterviewTime());
zpglRcxx.setNoticeWay(zpglRcxxDto.getNoticeWay());
YgglMainEmp ygglMainEmp = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().select("name").lambda().eq(YgglMainEmp::getEmpNum, zpglRcxxDto.getInterviewerId()));
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEW, new String[]{
userBean.getQyzxEmpLogin().getUsername(),
zpglRcxxDto.getInterviewNum().toString(),
new SimpleDateFormat("yyyy-MM-dd' 'HH:mm:ss").format(zpglRcxxDto.getInterviewTime()),
ygglMainEmp.getName()});
break;
case 4:
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEWED, new String[]{
userBean.getQyzxEmpLogin().getUsername(), zpglRcxxDto.getInterviewNum().toString()});
break;
case 5:
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEW_PASS, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
break;
case 6:
ZpglRcxx.builder().id(zpglRcxxDto.getId())
.status(zpglRcxxDto.getStatus())
.ifrck(zpglRcxxDto.getIfrck())
.zpglFailId(zpglRcxxDto.getZpglFailId())
.remarks(zpglRcxxDto.getRemarks()).build().updateById();
ZpglMslcLog zpglMslcLog = new ZpglMslcLog();
zpglMslcLog.setZpglRcxxId(zpglRcxxDto.getId());
zpglMslcLog.setUserId(userBean.getEmpNum());
zpglMslcLog.setUserName(userBean.getQyzxEmpLogin().getUsername());
String detail="";
switch (zpglRcxxDto.getStatus()) {
case 2:
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTER_PASS, new String[] {
userBean.getQyzxEmpLogin().getUsername()});
break;
case 3:
detail = "2";
break;
case 4:
detail = "4";
break;
case 5:
detail = "5";
break;
case 6:
detail = "6";
break;
case 7:
detail = "7";
break;
case 8:
detail = "8";
break;
case 9:
ZpglFail zpglFail = ZpglFail.builder().id(zpglRcxxDto.getZpglFailId()).build().selectById();
if(!StringUtils.isEmpty(zpglFail)){
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.ENTRYING, new String[] {
userBean.getQyzxEmpLogin().getUsername(),zpglFail.getFailCause(),zpglRcxxDto.getRemarks()});
}
break;
default:
break;
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.EMPLOY, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
break;
case 7:
//发送offer 填充字段
zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId());
zpglRcxx.setJobType(zpglRcxxDto.getJobType());
zpglRcxx.setYjrzTime(zpglRcxxDto.getYjrzTime());
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.OFFER, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
//发送offer
break;
case 8:
//待入职 填充字段
zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId());
zpglRcxx.setJobType(zpglRcxxDto.getJobType());
zpglRcxx.setYjrzTime(zpglRcxxDto.getYjrzTime());
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.WAIT, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
break;
case 9:
//淘汰 填充字段
zpglRcxx.setZpglFailId(zpglRcxxDto.getZpglFailId());
zpglRcxx.setRemarks(zpglRcxxDto.getRemarks());
ZpglFail zpglFail = ZpglFail.builder().id(zpglRcxxDto.getZpglFailId()).build().selectById();
String messageTemplate = ZpglMessageTemplate.ENTRYING;
if (!StringUtils.isEmpty(zpglFail)) {
if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.INTERVIEW_PASS.getType())) {
messageTemplate = ZpglMessageTemplate.INTERVIEWED_ENTRYING;
}
if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.OFFER.getType())) {
messageTemplate = ZpglMessageTemplate.OFFER_ENTRYING;
}
detail = ZpglMessageTemplate.print(messageTemplate, new String[]{
userBean.getQyzxEmpLogin().getUsername(), zpglFail.getFailCause(), zpglRcxxDto.getRemarks()});
}
break;
case 10:
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.ENTRY, new String[]{
userBean.getQyzxEmpLogin().getUsername()});
break;
default:
break;
}
zpglMslcLog.setDetail(detail);
zpglRcxx.updateById();
zpglMslcLogService.saveZpglMslcLog(zpglMslcLog);
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-变更状态失败");
}
zpglMslcLog.setDetail(detail);
zpglMslcLogService.saveZpglMslcLog(zpglMslcLog);
return ResultUtil.success();
}
......
......@@ -11,6 +11,7 @@ import lombok.NoArgsConstructor;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
......@@ -54,4 +55,48 @@ public class ZpglRcxxDto implements Serializable{
@ApiModelProperty(value = "附加操作:0无,1加入人才库")
private Integer ifrck;
/**
* 面试轮次 12345
*/
@ApiModelProperty(value = "面试轮次 12345")
private Integer interviewNum;
/**
* 面试方式 1:现场面试 2:电话面试 3:视屏面试
*/
@ApiModelProperty(value = "面试方式 1:现场面试 2:电话面试 3:视屏面试")
private Integer interviewWay;
/**
* 面试官id
*/
@ApiModelProperty(value = "面试官id")
private Integer interviewerId;
/**
* 面试时间
*/
@ApiModelProperty(value = "面试时间")
private Date interviewTime;
/**
* 通知方式 1:全部 2:短信 3:邮件 4.微信公众号
*/
@ApiModelProperty(value = "通知方式 1:全部 2:短信 3:邮件 4.微信公众号")
private Integer noticeWay;
/**
* 部门岗位ID
*/
@ApiModelProperty(value = "部门岗位ID")
private Integer bmgwId;
/**
* 工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘
*/
@ApiModelProperty(value = "工作性质 0全职、1实习、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘")
private Integer jobType;
/**
* 预计入职日期
*/
@ApiModelProperty(value = "预计入职日期")
private Date yjrzTime;
}
......@@ -8,16 +8,19 @@ package cn.timer.api.utils;
*/
public class ZpglMessageTemplate {
public static final String NOTYET_SHIPPEDORDER_MSG = "亲草优选:贵司 {0} 店铺,已有 {1} 笔订单超过48小时未发货(具体明细请登陆商家后台查看),为避免店铺权重下滑请即刻安排发货,谢谢!";
public static final String FILTERING = "";
public static final String FILTER_PASS ="{0} 将候选人状态从[待初筛]更改为[初筛通过].";
public static final String INTERVIEW ="{0} 为候选人安排了现场面试.面试轮次:第{1}轮,面试时间{2},面试官:{3},面试地址:{4}";
public static final String INTERVIEWED ="";
public static final String INTERVIEW_PASS ="";
public static final String EMPLOY ="";
public static final String OFFER ="";
public static final String ENTRYING ="{0}将候选人状态从[待初筛]更改为[初筛淘汰], 淘汰原因:{1},备注:{2}";
//,面试地址:{4}
public static final String INTERVIEW ="{0} 为候选人安排了现场面试.面试轮次:第{1}轮,面试时间{2},面试官:{3}";
public static final String INTERVIEWED ="{0} 将候选人状态从[已安排面试]更改为[已面试].面试轮次:第{1}轮.";
public static final String INTERVIEW_PASS ="{0} 将候选人移动到[面试通过].";
public static final String EMPLOY ="{0} 将候选人状态从[面试通过]更改为[拟录用].";
public static final String OFFER ="{0} 给候选人发送了Offer.";
public static final String ENTRYING ="{0} 将候选人状态从[待初筛]更改为[初筛淘汰], 淘汰原因:{1},备注:{2}";
public static final String WAIT ="{0} 将候选人添加到待入职.";
public static final String ENTRY ="{0} 为候选人办理了入职.";
public static final String INTERVIEWED_ENTRYING ="{0} 将候选人状态从[已面试]更改为[面试淘汰], 淘汰原因:{1},备注:{2}";
public static final String OFFER_ENTRYING ="{0} 将候选人状态从[已发Offer]更改为[录用淘汰], 淘汰原因:{1},备注:{2}";
public static String print(String template, String[] values) {
if (null == values || values.length == 0) {
......@@ -32,8 +35,6 @@ public class ZpglMessageTemplate {
return msg;
}
public static void main(String[] args) {
/*System.out.println(SmsMessageTemplate.print(BLANK_OBJ_MSG,
new String[] { "name" }));*/
System.out.println(ZpglMessageTemplate.print(FILTER_PASS, new String[] {
"wuqingjun", "types" }));
}
......
......@@ -17,6 +17,9 @@
<result property="face" column="face"/>
<result property="nationClassId" column="nation_class_id"/>
<result property="nativePlace" column="native_place"/>
<result property="bmgwId" column="bmgw_id"/>
<result property="jobType" column="job_type"/>
<result property="yjrzTime" column="yjrz_time"/>
<result property="provinceId" column="province_id"/>
<result property="province" column="province"/>
<result property="districtId" column="district_id"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment