Commit 743e4894 by 284718418@qq.com

招聘管理-人才详情逻辑代码

parent 8bc513a9
...@@ -47,6 +47,12 @@ public class ZpglMslcLog extends Model<ZpglMslcLog> { ...@@ -47,6 +47,12 @@ public class ZpglMslcLog extends Model<ZpglMslcLog> {
*/ */
@ApiModelProperty(value = "人才信息ID") @ApiModelProperty(value = "人才信息ID")
private Integer zpglRcxxId; private Integer zpglRcxxId;
/**
* 类型,1状态变更,2面试,3Offer,4讨论,5其他
*/
@ApiModelProperty(value = "类型,1状态变更,2面试,3Offer,4讨论,5其他")
private Integer zpglRcxxStatus;
/** /**
* 详细内容 * 详细内容
*/ */
......
...@@ -408,17 +408,17 @@ public class ZpglController { ...@@ -408,17 +408,17 @@ public class ZpglController {
} }
/** /**
* 招聘-移出人才库 * 招聘-移入/出人才库
* *
* @param * @param
* @return * @return
*/ */
@PostMapping(value = "/remove/{id}") @PostMapping(value = "/remove/{id}/{ifrck}")
@ApiOperation(value = "6.招聘-移出人才库", httpMethod = "GET", notes = "招聘-移出人才库") @ApiOperation(value = "6.招聘-移入/出人才库", httpMethod = "GET", notes = "招聘-移入/出人才库")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
public Result<Object> remove(@CurrentUser UserBean userBean, @PathVariable Integer id) { public Result<Object> remove(@CurrentUser UserBean userBean, @PathVariable Integer id, @PathVariable Integer ifrck) {
try { try {
return ZpglRcxx.builder().id(id).ifrck(0).userId(userBean.getEmpNum()).build().updateById()?ResultUtil.success("操作成功"):ResultUtil.error("操作失败"); return ZpglRcxx.builder().id(id).ifrck(ifrck).userId(userBean.getEmpNum()).build().updateById()?ResultUtil.success("操作成功"):ResultUtil.error("操作失败");
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new CustomException("招聘-删除人才信息失败"); throw new CustomException("招聘-删除人才信息失败");
......
package cn.timer.api.controller.zpgl;
import cn.timer.api.bean.zpgl.ZpglMslcLog;
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.dto.zpgl.ZpglMslcLogDto;
import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.transaction.Transactional;
import java.util.List;
/**
* 招聘管理
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-08 15:14:40
*/
@Api(tags = "招聘管理")
@Transactional(rollbackOn = Exception.class)
@RestController
@RequestMapping(value = "/zpgl", produces = {"application/json"})
@Slf4j
public class ZpglMslcController {
/**
* 招聘-招聘中
*
* @param
* @return
*/
@GetMapping(value = "/mslc_list")
@ApiOperation(value = "1.招聘管理面试流程记录", httpMethod = "GET", notes = "招聘管理面试流程记录")
@ApiOperationSupport(order = 1)
public Result<Object> mslcList(@CurrentUser UserBean userBean,
@ApiParam("人才信息ID") @RequestParam(required = false) Integer zpglRcxxId,
@ApiParam("状态") @RequestParam(required = false) Integer zpglRcxxStatus) {
try {
QueryWrapper<ZpglMslcLog> queryWrapper = new QueryWrapper<ZpglMslcLog>();
queryWrapper.lambda().eq(ZpglMslcLog::getZpglRcxxId,zpglRcxxId);
// 0全部类型,1状态变更,2面试,3Offer,4讨论,5其他
// JxglEnumInterface.MslcLogStatus
if(zpglRcxxStatus>0){
queryWrapper.lambda().eq(ZpglMslcLog::getZpglRcxxStatus,zpglRcxxStatus);
}
queryWrapper.lambda().orderByDesc(ZpglMslcLog::getCreateTime);
List<ZpglMslcLog> zpglMslcLogs = ZpglMslcLog.builder().build().selectList(queryWrapper);
return ResultUtil.data(zpglMslcLogs, "搜索成功");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-招聘列表失败");
}
}
/**
* 招聘-添加讨论
*
* @param
* @return
*/
@PostMapping(value = "/mslc/save")
@ApiOperation(value = "2.招聘-添加讨论", httpMethod = "POST", notes = "招聘-添加讨论")
@ApiOperationSupport(order = 2)
public Result<Object> save(@CurrentUser UserBean userBean, @RequestBody @Validated ZpglMslcLogDto zpglMslcLogDto) {
try {
ZpglMslcLog zpglMslcLog = ZpglMslcLog.builder().build();
BeanUtils.copyProperties(zpglMslcLogDto, zpglMslcLog);
zpglMslcLog.setUserId(userBean.getEmpNum());
zpglMslcLog.setUserName(userBean.getQyzxEmpLogin().getUsername());
zpglMslcLog.setDetail(userBean.getQyzxEmpLogin().getUsername()+" "+zpglMslcLogDto.getDetail());
zpglMslcLog.setZpglRcxxStatus(JxglEnumInterface.MslcLogStatus.DISCUSS.getType());
return zpglMslcLog.insert() ? ResultUtil.data(zpglMslcLog) : ResultUtil.error();
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-添加讨论");
}
}
}
...@@ -60,19 +60,24 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -60,19 +60,24 @@ public class ZpglServiceImpl implements ZpglService {
zpglRcxx.setIfrckTime(new Date()); zpglRcxx.setIfrckTime(new Date());
} }
String detail = ""; String detail = "";
// 类型,1状态变更,2面试,3Offer,4讨论,5其他
int zpglRcxxStatus = 0;
switch (zpglRcxxDto.getStatus()) { switch (zpglRcxxDto.getStatus()) {
case 1: case 1:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.CHANGEING.getType();
//待初筛 填充字段 //待初筛 填充字段
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTERING, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTERING, new String[]{
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
break; break;
case 2: case 2:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.CHANGEING.getType();
//初筛通过 填充字段 //初筛通过 填充字段
zpglRcxx.setIfrck(zpglRcxxDto.getIfrck()); zpglRcxx.setIfrck(zpglRcxxDto.getIfrck());
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTER_PASS, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.FILTER_PASS, new String[]{
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
break; break;
case 3: case 3:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.INTERVIEW.getType();
//安排面试 填充字段 //安排面试 填充字段
zpglRcxx.setInterviewNum(zpglRcxxDto.getInterviewNum()); zpglRcxx.setInterviewNum(zpglRcxxDto.getInterviewNum());
zpglRcxx.setInterviewWay(zpglRcxxDto.getInterviewWay()); zpglRcxx.setInterviewWay(zpglRcxxDto.getInterviewWay());
...@@ -87,19 +92,22 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -87,19 +92,22 @@ public class ZpglServiceImpl implements ZpglService {
ygglMainEmp.getName()}); ygglMainEmp.getName()});
break; break;
case 4: case 4:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.INTERVIEW.getType();
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEWED, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEWED, new String[]{
userBean.getQyzxEmpLogin().getUsername(), zpglRcxxDto.getInterviewNum().toString()}); userBean.getQyzxEmpLogin().getUsername(), zpglRcxxDto.getInterviewNum().toString()});
break; break;
case 5: case 5:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.INTERVIEW.getType();
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEW_PASS, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.INTERVIEW_PASS, new String[]{
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
break; break;
case 6: case 6:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.INTERVIEW.getType();
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.EMPLOY, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.EMPLOY, new String[]{
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
break; break;
case 7: case 7:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.OFFER.getType();
//发送offer 填充字段 //发送offer 填充字段
zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId()); zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId());
zpglRcxx.setJobType(zpglRcxxDto.getJobType()); zpglRcxx.setJobType(zpglRcxxDto.getJobType());
...@@ -109,6 +117,7 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -109,6 +117,7 @@ public class ZpglServiceImpl implements ZpglService {
//发送offer //发送offer
break; break;
case 8: case 8:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.OTHER.getType();
//待入职 填充字段 //待入职 填充字段
zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId()); zpglRcxx.setBmgwId(zpglRcxxDto.getBmgwId());
zpglRcxx.setJobType(zpglRcxxDto.getJobType()); zpglRcxx.setJobType(zpglRcxxDto.getJobType());
...@@ -124,9 +133,11 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -124,9 +133,11 @@ public class ZpglServiceImpl implements ZpglService {
String messageTemplate = ZpglMessageTemplate.ENTRYING; String messageTemplate = ZpglMessageTemplate.ENTRYING;
if (!StringUtils.isEmpty(zpglFail)) { if (!StringUtils.isEmpty(zpglFail)) {
if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.INTERVIEW_PASS.getType())) { if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.INTERVIEW_PASS.getType())) {
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.OTHER.getType();
messageTemplate = ZpglMessageTemplate.INTERVIEWED_ENTRYING; messageTemplate = ZpglMessageTemplate.INTERVIEWED_ENTRYING;
} }
if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.OFFER.getType())) { if (zpglFail.getZpglRcxxStatus().equals(JxglEnumInterface.ResumeStatus.OFFER.getType())) {
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.OTHER.getType();
messageTemplate = ZpglMessageTemplate.OFFER_ENTRYING; messageTemplate = ZpglMessageTemplate.OFFER_ENTRYING;
} }
detail = ZpglMessageTemplate.print(messageTemplate, new String[]{ detail = ZpglMessageTemplate.print(messageTemplate, new String[]{
...@@ -134,6 +145,7 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -134,6 +145,7 @@ public class ZpglServiceImpl implements ZpglService {
} }
break; break;
case 10: case 10:
zpglRcxxStatus = JxglEnumInterface.MslcLogStatus.OTHER.getType();
//确认入职 //确认入职
detail = ZpglMessageTemplate.print(ZpglMessageTemplate.ENTRY, new String[]{ detail = ZpglMessageTemplate.print(ZpglMessageTemplate.ENTRY, new String[]{
userBean.getQyzxEmpLogin().getUsername()}); userBean.getQyzxEmpLogin().getUsername()});
...@@ -141,6 +153,7 @@ public class ZpglServiceImpl implements ZpglService { ...@@ -141,6 +153,7 @@ public class ZpglServiceImpl implements ZpglService {
default: default:
break; break;
} }
zpglMslcLog.setZpglRcxxStatus(zpglRcxxStatus);
zpglMslcLog.setDetail(detail); zpglMslcLog.setDetail(detail);
count = zpglRcxx.updateById(); count = zpglRcxx.updateById();
zpglMslcLogService.addZpglMslcLog(zpglMslcLog); zpglMslcLogService.addZpglMslcLog(zpglMslcLog);
......
package cn.timer.api.dto.zpgl;
import cn.timer.api.config.exception.ValidationMsg;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 招聘管理面试流程记录
*
* @author wuqingjun
* @email 284718418@qq.com
* @date 2022-03-08 15:14:40
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ZpglMslcLogDto implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 人才信息ID
*/
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "人才信息ID")
private Integer zpglRcxxId;
/**
* 类型,1状态变更,2面试,3Offer,4讨论,5其他
*/
@ApiModelProperty(value = "类型,1状态变更,2面试,3Offer,4讨论,5其他")
private Integer zpglRcxxStatus;
/**
* 详细内容
*/
@NotBlank(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value = "详细内容")
private String detail;
}
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
<resultMap type="cn.timer.api.bean.zpgl.ZpglMslcLog" id="zpglMslcLogMap"> <resultMap type="cn.timer.api.bean.zpgl.ZpglMslcLog" id="zpglMslcLogMap">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="zpglRcxxId" column="zpgl_rcxx_id"/> <result property="zpglRcxxId" column="zpgl_rcxx_id"/>
<result property="zpglRcxxStatus" column="zpgl_rcxx_status"/>
<result property="detail" column="detail"/> <result property="detail" column="detail"/>
<result property="userId" column="user_id"/> <result property="userId" column="user_id"/>
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
......
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