Commit 6a6abf74 by 284718418@qq.com

1。招聘管理-修改BUG1459

parent c3ec673e
......@@ -238,6 +238,7 @@ public class ZpglController {
ZpglRcxxDto zpglRcxxDto = new ZpglRcxxDto();
zpglRcxxDto.setId(zpglRcxx.getId());
zpglRcxxDto.setStatus(addygdaDto.getStatus());
zpglRcxxDto.setZpglZwxxId(zpglRcxx.getZpglZwxxId());
QyzxEmpLogin login = new LambdaQueryChainWrapper<QyzxEmpLogin>(qyzxEmpLoginMapper)
.eq(!StrUtil.hasBlank(phone), QyzxEmpLogin::getPhone, phone).one();
......@@ -345,13 +346,13 @@ public class ZpglController {
}
/**
* 招聘-已淘汰,人才库
* 招聘-已淘汰
*
* @param
* @return
*/
@GetMapping(value = "/recruit/fail")
@ApiOperation(value = "5.招聘-已淘汰,人才库列表", httpMethod = "GET", notes = "招聘-已淘汰,人才库列表")
@ApiOperation(value = "5.招聘-已淘汰列表", httpMethod = "GET", notes = "招聘-已淘汰列表")
@ApiOperationSupport(order = 5)
public Result<Object> recruitFail(@CurrentUser UserBean userBean, BaseQuery baseQuery,
@ApiParam("搜索关键字") @RequestParam(required = false) String query,
......@@ -403,25 +404,6 @@ public class ZpglController {
}
/**
* 招聘-逻辑删除人才信息
*
* @param
* @return
*/
@PostMapping(value = "/edit/{id}")
@ApiOperation(value = "5.招聘-删除人才信息", httpMethod = "GET", notes = "删除人才信息")
@ApiOperationSupport(order = 5)
public Result<Object> edit(@CurrentUser UserBean userBean, @PathVariable Integer id) {
try {
return ZpglRcxx.builder().id(id).deleteFlag(1).userId(userBean.getEmpNum()).build().updateById() ? ResultUtil.success("操作成功") : ResultUtil.error("操作失败");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-删除人才信息失败");
}
}
/**
* 招聘-移入/出人才库
*
* @param
......@@ -432,7 +414,7 @@ public class ZpglController {
@ApiOperationSupport(order = 6)
public Result<Object> remove(@CurrentUser UserBean userBean, @PathVariable Integer id, @PathVariable Integer ifrck) {
try {
return ZpglRcxx.builder().id(id).ifrck(ifrck).userId(userBean.getEmpNum()).build().updateById() ? ResultUtil.success("操作成功") : ResultUtil.error("操作失败");
return ZpglRcxx.builder().id(id).ifrck(ifrck).ifrckTime(new Date()).userId(userBean.getEmpNum()).build().updateById() ? ResultUtil.success("操作成功") : ResultUtil.error("操作失败");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-删除人才信息失败");
......@@ -635,6 +617,82 @@ public class ZpglController {
}
}
/**
* 招聘-逻辑删除人才信息
*
* @param
* @return
*/
@PostMapping(value = "/edit/{id}")
@ApiOperation(value = "12.招聘-删除人才信息", httpMethod = "GET", notes = "删除人才信息")
@ApiOperationSupport(order = 12)
public Result<Object> edit(@CurrentUser UserBean userBean, @PathVariable Integer id) {
try {
return ZpglRcxx.builder().id(id).deleteFlag(1).userId(userBean.getEmpNum()).build().updateById() ? ResultUtil.success("操作成功") : ResultUtil.error("操作失败");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-删除人才信息失败");
}
}
/**
* 招聘-人才库
*
* @param
* @return
*/
@GetMapping(value = "/recruit/envelope")
@ApiOperation(value = "13.招聘-人才库列表", httpMethod = "GET", notes = "招聘-人才库列表")
@ApiOperationSupport(order = 13)
public Result<Object> envelope(@CurrentUser UserBean userBean, BaseQuery baseQuery,
@ApiParam("搜索关键字") @RequestParam(required = false) String query,
@ApiParam("职位ID") @RequestParam(required = false) Integer zpglZwxxId,
@ApiParam("状态") @RequestParam(required = false) Integer status,
@ApiParam("排序") @RequestParam(required = false) Integer orderBy) {
try {
Page<ZpglRcxx> page = new Page<ZpglRcxx>(baseQuery.getPageNum(), baseQuery.getPageSize());
QueryWrapper<ZpglRcxx> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("org_code", userBean.getOrgCode()).eq("delete_flag", 0);
if (!StringUtils.isEmpty(zpglZwxxId) && zpglZwxxId > 0) {
queryWrapper.eq("zpgl_zwxx_id", zpglZwxxId);
}
if (!StringUtils.isEmpty(query)) {
queryWrapper.and(qw -> qw.like("name", query).or().eq("mobile", query).or().eq("mail", query));
}
queryWrapper.eq("ifrck", 1);
if (!StringUtils.isEmpty(orderBy)) {
// 排序 1最近跟进时间 2最近入库时间 3最早入库时间
if (orderBy.intValue() == 1) {
queryWrapper.orderByDesc("update_time");
} else if (orderBy.intValue() == 2) {
queryWrapper.orderByDesc("ifrck_time");
} else if (orderBy.intValue() == 3) {
queryWrapper.orderByAsc("ifrck_time");
}
}else {
queryWrapper.orderByDesc("update_time");
}
IPage<ZpglRcxx> zpglRcxxPage = ZpglRcxx.builder().build().selectPage(page, queryWrapper);
List<ZpglRcxx> zpglRcxxs = page.getRecords();
for (ZpglRcxx entity : zpglRcxxs) {
if(!StringUtils.isEmpty(entity.getZpglFailId()) && entity.getZpglFailId()>0){
ZpglFail fail = ZpglFail.builder().id(entity.getZpglFailId()).build().selectById();
entity.setFailCause(fail.getFailCause());
}
}
zpglRcxxPage.getCurrent();
zpglRcxxPage.getPages();
zpglRcxxPage.getTotal();
zpglRcxxPage.getSize();
return ResultUtil.data(zpglRcxxPage, zpglRcxxs, "搜索成功");
} catch (Exception e) {
e.printStackTrace();
throw new CustomException("招聘-已淘汰,人才库列表失败");
}
}
/**
* 获取统计数据
......
......@@ -356,13 +356,17 @@ public class ZpglServiceImpl implements ZpglService {
ZpglWxgzptEmpRcxx zpglWxgzptEmpRcxx = ZpglWxgzptEmpRcxx.builder().build().selectOne(
new QueryWrapper<ZpglWxgzptEmpRcxx>().select("id","zpgl_rcxx_id").lambda().eq(ZpglWxgzptEmpRcxx::getMobile,zpglRcxx.getMobile())
);
if(!StringUtils.isEmpty(zpglWxgzptEmpRcxx) && (StringUtils.isEmpty(zpglWxgzptEmpRcxx.getZpglRcxxId()) || zpglWxgzptEmpRcxx.getZpglRcxxId() <= 0)){
zpglWxgzptEmpRcxx.setOrgCode(userBean.getOrgCode());
zpglWxgzptEmpRcxx.setZpglRcxxId(zpglRcxx.getId());
zpglWxgzptEmpRcxx.setYgglMainEmpId(userId);
if(!StringUtils.isEmpty(zpglWxgzptEmpRcxx) && (StringUtils.isEmpty(zpglWxgzptEmpRcxx.getZpglRcxxId()) || zpglWxgzptEmpRcxx.getZpglRcxxId() <= 0)){
zpglWxgzptEmpRcxx.updateById();
}
if(StringUtils.isEmpty(zpglWxgzptEmpRcxx)){
zpglWxgzptEmpRcxx = new ZpglWxgzptEmpRcxx();
zpglWxgzptEmpRcxx.setOrgCode(userBean.getOrgCode());
zpglWxgzptEmpRcxx.setZpglRcxxId(zpglRcxx.getId());
zpglWxgzptEmpRcxx.setYgglMainEmpId(userId);
zpglWxgzptEmpRcxx.setMobile(zpglRcxx.getMobile());
zpglWxgzptEmpRcxx.insert();
}
......@@ -560,7 +564,7 @@ public class ZpglServiceImpl implements ZpglService {
}
if (!StringUtils.isEmpty(reumeSdkResult.getWork_year_norm())) {
if(reumeSdkResult.getWork_year_norm().indexOf(".") != -1){
zpglRcxx.setWorkyears(Integer.parseInt(reumeSdkResult.getWork_year_norm().split(".")[0])+1);
zpglRcxx.setWorkyears(Integer.parseInt(reumeSdkResult.getWork_year_norm().substring(0,reumeSdkResult.getWork_year_norm().lastIndexOf(".")))+1);
}else {
zpglRcxx.setWorkyears(Integer.parseInt(reumeSdkResult.getWork_year_norm()));
}
......@@ -682,7 +686,7 @@ public class ZpglServiceImpl implements ZpglService {
* @return
*/
private Integer getEducation(String str) {
Integer education = null;
Integer education = 0;
if (StringUtils.isEmpty(str)) {
return education;
}
......@@ -700,9 +704,9 @@ public class ZpglServiceImpl implements ZpglService {
education = 5;
} else if (str.indexOf("本科") != -1) {
education = 6;
} else if (str.indexOf("硕士研究生") != -1) {
} else if (str.indexOf("硕士研究生") != -1 || str.indexOf("硕士") != -1) {
education = 7;
} else if (str.indexOf("博士研究生") != -1) {
} else if (str.indexOf("博士研究生") != -1 || str.indexOf("博士") != -1) {
education = 8;
}
return education;
......
......@@ -96,7 +96,6 @@ public class ZpglRcxxEntryDto implements Serializable{
@ApiModelProperty(value="工作地点id",example="0")
private Integer zpglGzddId;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="职级id",example="0")
private Integer zpglZjId;
......
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