Commit 79a6ae70 authored by wangzb's avatar wangzb

feature-wzb:bug修复

parent 90b9ea08
......@@ -246,12 +246,17 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
}
}
}
TEmployeeContractInfo contractInfo;
if (!EmployeeConstants.SITUATION_SEVEN.equals(tEmployeeContractInfo.getSituation()) && !EmployeeConstants.SITUATION_SIX.equals(tEmployeeContractInfo.getSituation())) {
if (CommonConstants.TWO_STRING.equals(tEmployeeContractInfo.getContractType()) || CommonConstants.ZERO_STRING.equals(tEmployeeContractInfo.getContractType())) {
TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, tEmployeeContractInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getContractStart, tEmployeeContractInfo.getContractStart())
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.and(obj -> obj.eq(TEmployeeContractInfo::getContractType, CommonConstants.TWO_STRING)
.or()
.eq(TEmployeeContractInfo::getContractType, CommonConstants.ZERO_STRING)
)
.and(obj -> obj.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.ONE_INT)
.or()
.eq(TEmployeeContractInfo::getAuditStatus, CommonConstants.TWO_INT)
......@@ -261,8 +266,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (contractInfo != null) {
return R.failed("该员工已存在相同起始日期的合同,禁止重复添加");
}
}
TEmployeeContractInfo contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
} else {
contractInfo = this.getOne(Wrappers.<TEmployeeContractInfo>query().lambda()
.eq(TEmployeeContractInfo::getEmpIdcard, tEmployeeContractInfo.getEmpIdcard())
.eq(TEmployeeContractInfo::getContractStart, tEmployeeContractInfo.getContractStart())
.eq(TEmployeeContractInfo::getContractEnd, tEmployeeContractInfo.getContractEnd())
......@@ -276,7 +281,7 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
if (contractInfo != null) {
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