Commit 94046792 authored by fangxinjiang's avatar fangxinjiang

入离职导入限制-fxj

parent 06c3d217
......@@ -801,7 +801,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
@Override
public Boolean checkContractPreIsExit(EmpProjectStatusVo vo) {
TEmployeeContractPre contractPre = baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
/*TEmployeeContractPre contractPre = baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getEmpIdcard, vo.getEmpIdcard())
.eq(TEmployeeContractPre::getDeptNo, vo.getDeptNo())
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.TEN_STRING)
......@@ -823,16 +823,16 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
}
} else {
return false;
}
}*/
// 新逻辑 v1.7.23 按身份证+项目查询合同:如果找到审核通过的可用的合同就不允许进入。
/*TEmployeeContractInfo contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
TEmployeeContractInfo contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getEmpIdcard, vo.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo,vo.getDeptNo())
.eq(TEmployeeContractInfo::getAuditStatus,CommonConstants.TWO_STRING)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
return Common.isNotNull(contractInfo);*/
return Common.isNotNull(contractInfo);
}
//发送企业微信待办
......
......@@ -2152,24 +2152,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
if (Common.isEmpty(checkRes) || checkRes.getCode() != CommonConstants.SUCCESS){
return checkRes.getMsg();
}
EmployeeRegistration exit = null;
//该人员入职/离职数据已登记,请勿重复操作
if (CommonConstants.TWO_STRING.equals(registration.getFeedbackType())){
exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL));
} else {
// v1.7.23 新增:已处理 也要拒绝入职
exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, Stream.of("0","1").collect(Collectors.toList()))
.last(CommonConstants.LAST_ONE_SQL));
}
EmployeeRegistration exit = baseMapper.selectOne(Wrappers.<EmployeeRegistration>query().lambda()
.eq(EmployeeRegistration::getEmpIdcard, registration.getEmpIdcard())
.eq(EmployeeRegistration::getDeptNo, registration.getDeptNo())
.eq(EmployeeRegistration::getFeedbackType, registration.getFeedbackType())
.in(EmployeeRegistration::getProcessStatus, CommonConstants.processStatus)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(exit)) {
return RegistConstants.REGIST_SAME_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