Commit ee8f5fa6 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent d23d1c7b
...@@ -386,9 +386,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -386,9 +386,8 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
BeanCopyUtils.copyProperties(preVo,preVoTemp); BeanCopyUtils.copyProperties(preVo,preVoTemp);
alert = alertMap.get(contract.getId()); alert = alertMap.get(contract.getId());
temp = confirmMap.get(contract.getId()); temp = confirmMap.get(contract.getId());
checkVo = check(preMap, scheme, rule, alert, temp, preVoTemp, contract); checkVo = check(preMap, scheme, rule, alert, preVoTemp, contract);
if (null != checkVo){ if (null != checkVo){
// 修复 NPE 问题
if (null != temp ) { if (null != temp ) {
temp.setDeptNo(null != alert?alert.getProjectNo():""); temp.setDeptNo(null != alert?alert.getProjectNo():"");
temp.setDeptName(null != alert?alert.getProject():""); temp.setDeptName(null != alert?alert.getProject():"");
...@@ -445,28 +444,22 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon ...@@ -445,28 +444,22 @@ public class TEmployeeContractPreNewServiceImpl extends ServiceImpl<TEmployeeCon
private TEmployeeAutoRegistCheckVo check(Map<String, String> preMap, TAutoContractScheme scheme, private TEmployeeAutoRegistCheckVo check(Map<String, String> preMap, TAutoContractScheme scheme,
TAutoContractRuleInfo rule, TAutoContractRuleInfo rule,
TEmpContractAlert alert, TEmpContractAlert alert,
ContractAlertConfirmResVo temp,
TEmployeeContractPreNewVo preVoTemp, TEmployeeContractPreNewVo preVoTemp,
TEmployeeContractInfo contract) { TEmployeeContractInfo contract) {
TEmployeeContractPreNew preNew; TEmployeeContractPreNew preNew;
String preId; String preId;
TEmployeeAutoRegistCheckVo checkVo; String initError;
String innitError;
TEmployeeContractPreNew pre;
if (null == alert){ if (null == alert){
return buildErrorCheckVo(contract, preVoTemp, EmployeeConstants.ERROR_NO_ALERT_FOUND); return buildErrorCheckVo(contract, preVoTemp, EmployeeConstants.ERROR_NO_ALERT_FOUND);
} }
pre = new TEmployeeContractPreNew();
BeanCopyUtils.copyProperties(preVoTemp,pre);
preId = preMap.get(contract.getId()); preId = preMap.get(contract.getId());
if (Common.isNotNull(preId)){ if (Common.isNotNull(preId)){
return buildErrorCheckVo(contract, preVoTemp, EmployeeConstants.ERROR_DUPLICATE_CONFIRM); return buildErrorCheckVo(contract, preVoTemp, EmployeeConstants.ERROR_DUPLICATE_CONFIRM);
} }
//初始化数据 //初始化数据
innitError = initDateInfo(preVoTemp, contract); initError = initDateInfo(preVoTemp, contract);
if (Common.isNotNull(innitError)){ if (Common.isNotNull(initError)){
return buildErrorCheckVo(contract, preVoTemp, innitError); return buildErrorCheckVo(contract, preVoTemp, initError);
} }
//判断两个合同时间是否重合 //判断两个合同时间是否重合
......
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