Commit 66b804e8 authored by huyuchen's avatar huyuchen

huych-合同自动化代码提交

parent 08e94eaa
...@@ -662,6 +662,20 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -662,6 +662,20 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
.eq(TEmployeeContractPre::getRegisterId,employeeRegistrationPre.getId()) .eq(TEmployeeContractPre::getRegisterId,employeeRegistrationPre.getId())
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
//1.9.12合同自动化校验逻辑 //1.9.12合同自动化校验逻辑
//根据身份证号码和项目编号查询合同
boolean flag = contractInfoMapper.selectCount(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, employeeRegistrationPre.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, employeeRegistrationPre.getDeptNo())
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)) > 0;
if (employeeRegistrationPre.getServerItem().contains("合同") && Common.isEmpty(employeeRegistrationPre.getEmployeeContractPre()) && !flag) {
return R.failed("未找到流程中或者在用的合同!");
}
if (employeeRegistrationPre.getServerItem().contains("合同") && null != employeeRegistrationPre.getEmployeeContractPre()) { if (employeeRegistrationPre.getServerItem().contains("合同") && null != employeeRegistrationPre.getEmployeeContractPre()) {
TEmployeeContractPre employeeContractPreVo = employeeRegistrationPre.getEmployeeContractPre(); TEmployeeContractPre employeeContractPreVo = employeeRegistrationPre.getEmployeeContractPre();
if (Common.isNotNull(employeeContractPreVo.getId())) { if (Common.isNotNull(employeeContractPreVo.getId())) {
...@@ -676,21 +690,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi ...@@ -676,21 +690,6 @@ public class EmployeeRegistrationPreServiceImpl extends ServiceImpl<EmployeeRegi
return R.failed("流程中的合同待签订数据不可修改!"); return R.failed("流程中的合同待签订数据不可修改!");
} }
} }
//根据身份证号码和项目编号查询合同
boolean flag = contractInfoMapper.selectCount(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, employeeRegistrationPre.getEmpIdcard())
.eq(TEmployeeContractInfo::getDeptNo, employeeRegistrationPre.getDeptNo())
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
)
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)) > 0;
//是否已签署为是需要判断合同是否在用或者流程中
if (CommonConstants.ZERO_STRING.equals(employeeContractPreVo.getContractFlag()) && !flag) {
return R.failed("未找到流程中或者在用的合同!");
}
//是否已签署为否需要判断是否在用或者流程中的合同 //是否已签署为否需要判断是否在用或者流程中的合同
if ((CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag()) || Common.isEmpty(employeeContractPreVo.getContractFlag())) && flag) { if ((CommonConstants.ONE_STRING.equals(employeeContractPreVo.getContractFlag()) || Common.isEmpty(employeeContractPreVo.getContractFlag())) && flag) {
return R.failed("该项目下存在在途/有效的合同数据,请“是否已签署合同”是否调整为“是”"); return R.failed("该项目下存在在途/有效的合同数据,请“是否已签署合同”是否调整为“是”");
......
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