Commit c48f71f6 authored by huyuchen's avatar huyuchen

huych-合同自动化代码提交

parent 81b294c0
...@@ -418,12 +418,26 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -418,12 +418,26 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
@Override @Override
public Boolean checkContractPreIsExit(EmpProjectStatusVo vo) { public Boolean checkContractPreIsExit(EmpProjectStatusVo vo) {
return baseMapper.selectCount(Wrappers.<TEmployeeContractPre>query().lambda() TEmployeeContractPre contractPre = baseMapper.selectOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getEmpIdcard, vo.getEmpIdcard()) .eq(TEmployeeContractPre::getEmpIdcard, vo.getEmpIdcard())
.eq(TEmployeeContractPre::getDeptNo, vo.getDeptNo()) .eq(TEmployeeContractPre::getDeptNo, vo.getDeptNo())
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.NINE_STRING)
.ne(TEmployeeContractPre::getProcessStatus, CommonConstants.TEN_STRING) .ne(TEmployeeContractPre::getProcessStatus, CommonConstants.TEN_STRING)
.last(CommonConstants.LAST_ONE_SQL)) > 0; .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractPre)) {
//如果是已完结判断合同申请数据在不在用
if (CommonConstants.NINE_STRING.equals(contractPre.getProcessStatus())) {
TEmployeeContractInfo contractInfo = contractInfoService.getOne(Wrappers.<TEmployeeContractInfo>query()
.lambda().eq(TEmployeeContractInfo::getId, contractPre.getContractId())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.eq(TEmployeeContractInfo::getInUse, CommonConstants.ZERO_STRING)
.last(CommonConstants.LAST_ONE_SQL));
return Common.isNotNull(contractInfo);
} else {
return true;
}
} else {
return false;
}
} }
//发送企业微信待办 //发送企业微信待办
......
...@@ -1104,7 +1104,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1104,7 +1104,10 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
insuranceDaprUtil.saveInsurancePreInfo(preVo); insuranceDaprUtil.saveInsurancePreInfo(preVo);
} }
TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos(); TEmployeeContractPreVo employeeContractPreVo = preVo.getEmployeeContractPreVos();
if (preVo.getServerItem().contains("合同") && Common.isNotNull(employeeContractPreVo)) { if (preVo.getServerItem().contains("合同") && null != preVo.getEmployeeContractPreVos() &&
((Common.isNotNull(preVo.getEmployeeContractPreVos().getContractFlag()) &&
CommonConstants.ONE_STRING.equals(preVo.getEmployeeContractPreVos().getContractFlag())) ||
Common.isEmpty(preVo.getEmployeeContractPreVos().getContractFlag()))) {
//生成合同待购买数据 //生成合同待购买数据
initContractPreInfo(registrationNow, employeeContractPreVo, user, domainR.getData()); initContractPreInfo(registrationNow, employeeContractPreVo, user, domainR.getData());
} }
......
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