Commit 189b8b73 authored by fangxinjiang's avatar fangxinjiang

入职离职导入调整-fxj

parent 097f316a
...@@ -19,6 +19,8 @@ public class RegistConstants { ...@@ -19,6 +19,8 @@ public class RegistConstants {
public static final String EMP_PROJECT_EXIT_CHECK = "未找到该人员对应的在项信息!"; public static final String EMP_PROJECT_EXIT_CHECK = "未找到该人员对应的在项信息!";
public static final String EMP_PROJECT_IS_EXIT_CHECK = "该人员存在在项的项目档案!";
public static final String EMP_CONTRACT_EXIT_CHECK = "已存在流程中的合同待签订数据!"; public static final String EMP_CONTRACT_EXIT_CHECK = "已存在流程中的合同待签订数据!";
public static final String CONFIRM_SUBMIT = "确认接收"; public static final String CONFIRM_SUBMIT = "确认接收";
......
...@@ -2156,22 +2156,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -2156,22 +2156,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo()) .eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType()) .eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.orderByDesc(EmployeeRegistration::getCreateTime)
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus) .in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(exit)) { if (Common.isNotNull(exit)) {
return RegistConstants.REGIST_SAME_CHECK; return RegistConstants.REGIST_SAME_CHECK;
} }
//针对入职的判断是否存在流程中的合同待签订数据 //针对入职的判断
if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) { if (CommonConstants.ONE_STRING.equals(registration.getFeedbackType())) {
int nowDay = Integer.parseInt(DateUtil.getThisDay()); int nowDay = Integer.parseInt(DateUtil.getThisDay());
if (Common.isNot16Age(registration.getEmpIdcard(), nowDay)) { if (Common.isNot16Age(registration.getEmpIdcard(), nowDay)) {
return CommonConstants.UNDER_16_ERROR; return CommonConstants.UNDER_16_ERROR;
} }
//针对入职的判断是否存在在项项目档案
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(registration.getEmpIdcard()); vo.setEmpIdcard(registration.getEmpIdcard());
vo.setDeptNo(registration.getDeptNo()); vo.setDeptNo(registration.getDeptNo());
if (Boolean.TRUE.equals(checkContractPreIsExit(vo))) { EmpProjectStatusVo exitProject = getEmpProjectStatus(vo);
return RegistConstants.EMP_CONTRACT_EXIT_CHECK; if (!Common.isEmpty(exitProject)) {
return RegistConstants.EMP_PROJECT_IS_EXIT_CHECK;
} }
} }
//针对离职的判断人员项目档案状态是否正常 //针对离职的判断人员项目档案状态是否正常
...@@ -3187,33 +3190,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -3187,33 +3190,25 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
} }
//该人员入职/离职数据已登记,请勿重复操作 //该人员入职/离职数据已登记,请勿重复操作
if (CommonConstants.TWO_STRING.equals(insert.getFeedbackType())){
exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda() exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, insert.getEmpIdcard()) .eq(EmployeeRegistration::getEmpIdcard, insert.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, insert.getDeptNo()) .eq(EmployeeRegistration::getDeptNo, insert.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, insert.getFeedbackType()) .eq(EmployeeRegistration::getFeedbackType, insert.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus) .in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.orderByDesc(EmployeeRegistration::getCreateTime)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
} else {
// v1.7.23 新增:已处理 也要拒绝入职
exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, insert.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, insert.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, insert.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, Stream.of("0","1").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
}
if (Common.isNotNull(exit)) { if (Common.isNotNull(exit)) {
errorList.add(RegistConstants.REGIST_SAME_CHECK); errorList.add(RegistConstants.REGIST_SAME_CHECK);
} }
//针对入职的判断是否存在流程中的合同待签订数据 //针对入职的判断是否存在在项项目档案
if (CommonConstants.ONE_STRING.equals(insert.getFeedbackType())) { if (CommonConstants.ONE_STRING.equals(insert.getFeedbackType())) {
EmpProjectStatusVo vo = new EmpProjectStatusVo(); EmpProjectStatusVo vo = new EmpProjectStatusVo();
vo.setEmpIdcard(insert.getEmpIdcard()); vo.setEmpIdcard(insert.getEmpIdcard());
vo.setDeptNo(insert.getDeptNo()); vo.setDeptNo(insert.getDeptNo());
if (Boolean.TRUE.equals(checkContractPreIsExit(vo))) { EmpProjectStatusVo exitProject = getEmpProjectStatus(vo);
errorList.add(RegistConstants.EMP_CONTRACT_EXIT_CHECK); if (!Common.isEmpty(exitProject)) {
errorList.add(RegistConstants.EMP_PROJECT_IS_EXIT_CHECK);
} }
} }
......
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