Commit 17c7e1a9 authored by zhaji's avatar zhaji

"feature-zhaJi:新增变更项目,减员导入重复数据校验"

parent 6b327532
...@@ -2892,7 +2892,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -2892,7 +2892,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
} }
param.setId(one.getId()); param.setId(one.getId());
param.setReduceHandleStatus(one.getReduceHandleStatus()); param.setReduceHandleStatus(one.getReduceHandleStatus());
boolean b = successList.stream().anyMatch(
u -> u.getEmpName().equals(param.getEmpName())
&& u.getEmpIdcardNo().equals(param.getEmpIdcardNo())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())
&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyEnd().equals(param.getPolicyEnd())
);
if(b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
continue;
}
successList.add(param); successList.add(param);
} }
map.put("successList",successList); map.put("successList",successList);
map.put("errorList",errorList); map.put("errorList",errorList);
...@@ -3349,6 +3363,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap ...@@ -3349,6 +3363,21 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
param.setOldSettleType(insuranceDetail.getSettleType()); param.setOldSettleType(insuranceDetail.getSettleType());
param.setDefaultSettleId(insuranceDetail.getDefaultSettleId()); param.setDefaultSettleId(insuranceDetail.getDefaultSettleId());
param.setId(insuranceDetail.getId()); param.setId(insuranceDetail.getId());
boolean b = successList.stream().anyMatch(
u -> u.getEmpName().equals(param.getEmpName())
&& u.getEmpIdCardNo().equals(param.getEmpIdCardNo())
&& u.getOldDeptNo().equals(param.getOldDeptNo())
&& u.getInsuranceCompanyName().equals(param.getInsuranceCompanyName())
&& u.getInsuranceTypeName().equals(param.getInsuranceTypeName())
&& u.getPolicyStart().equals(param.getPolicyStart())
&& u.getPolicyEnd().equals(param.getPolicyEnd())
&& u.getBuyStandard().equals(param.getBuyStandard())
);
if(b){
param.setErrorMessage(InsurancesConstants.DUPLICATE_DATA_ERROR);
errorList.add(param);
continue;
}
successList.add(param); successList.add(param);
} }
map.put("errorList",errorList); map.put("errorList",errorList);
......
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