This commit is contained in:
parent
6f1b6940a2
commit
7cfbd97316
|
@ -223,6 +223,13 @@ public class PersonnelController extends BaseController {
|
|||
return personnelService.updatePersonnelRetire(id);
|
||||
}
|
||||
|
||||
@GetMapping("handlingResignationEvents")
|
||||
@ApiOperation(value = "处理离职事件")
|
||||
@ApiImplicitParam(name = "id", value = "人员id")
|
||||
public AjaxResult handlingResignationEvents(String id) {
|
||||
return personnelService.handlingResignationEvents(id);
|
||||
}
|
||||
|
||||
@GetMapping("retirementList")
|
||||
@ApiOperation(value = "退休名单")
|
||||
@ApiImplicitParams({
|
||||
|
|
|
@ -62,5 +62,8 @@ public class PersonnelDto {
|
|||
@ApiModelProperty(value = "退休状态")
|
||||
private String retireState;
|
||||
|
||||
@ApiModelProperty(value = "是否办理离职")
|
||||
private Boolean whetherIsQuit;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -168,9 +168,10 @@ public class Personnel extends BaseEntity {
|
|||
@ApiModelProperty(value = "数据状态:0:历史数据 ,1:暂存数据,2:当前数据")
|
||||
private String state;
|
||||
|
||||
@ApiModelProperty(value = "是否退休列表")
|
||||
@ApiModelProperty(value = "是否办理退休")
|
||||
private Boolean isInfo;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "是否办理离职")
|
||||
private Boolean whetherIsQuit;
|
||||
|
||||
}
|
||||
|
|
|
@ -76,5 +76,7 @@ public interface IPersonnelService {
|
|||
AjaxResult updatePersonnelRetire(String id);
|
||||
|
||||
AjaxResult retirementList(Page page, String userName, String presentDept, String personnelType, String workState, String orderBy, String column);
|
||||
|
||||
AjaxResult handlingResignationEvents(String id);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,10 +6,7 @@ import cn.hutool.core.collection.CollectionUtil;
|
|||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.DesensitizedUtil;
|
||||
import cn.hutool.core.util.IdcardUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.*;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
@ -949,6 +946,9 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
if (!"退休".equals(personnel.getWorkState())) {
|
||||
return AjaxResult.fail("该人员未办理退休变更,请先办理退休变更!");
|
||||
}
|
||||
if (BooleanUtil.isTrue(personnel.getIsInfo())) {
|
||||
return AjaxResult.fail("请勿重复办理!");
|
||||
}
|
||||
personnel.setIsInfo(true);
|
||||
boolean b = updateById(personnel);
|
||||
CompanyName companyName = companyNameMapper.selectById(personnel.getCompanyName());
|
||||
|
@ -957,6 +957,25 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
return b ? AjaxResult.ok().msg("处理成功!") : AjaxResult.fail("处理失败!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult handlingResignationEvents(String id) {
|
||||
Personnel personnel = getById(id);
|
||||
if (!"离职".equals(personnel.getWorkState())) {
|
||||
return AjaxResult.fail("该人员未办理离职变更,请先办理离职变更!");
|
||||
}
|
||||
if (BooleanUtil.isTrue(personnel.getWhetherIsQuit())) {
|
||||
return AjaxResult.fail("请勿重复办理!");
|
||||
}
|
||||
personnel.setWhetherIsQuit(true);
|
||||
personnel.setPersonnelType("指标外");
|
||||
personnel.setResignationTime(LocalDate.now());
|
||||
boolean b = updateById(personnel);
|
||||
CompanyName companyName = companyNameMapper.selectById(personnel.getCompanyName());
|
||||
companyName.setResidualNumber(companyName.getResidualNumber() + 1);
|
||||
companyNameMapper.updateById(companyName);
|
||||
return b ? AjaxResult.ok().msg("处理成功!") : AjaxResult.fail("处理失败!");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult retirementList(Page page, String userName, String presentDept, String personnelType, String workState, String orderBy, String column) {
|
||||
QueryWrapper<Personnel> wrapper = new QueryWrapper<>();
|
||||
|
|
Loading…
Reference in New Issue