Commit 0cb205b2 authored by huyuchen's avatar huyuchen

huych-商险自动化逻辑调整

parent 7f7c9dfb
......@@ -246,25 +246,26 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
// 是否修改了商险
boolean isModifyInsurance = false;
TEmployeeInsurancePre oldInsurance;
String differenceInsuranceKey;
TEmployeePreLogDetail detailInsuranceLog;
if (Common.isEmpty(isBuyOld) || (Common.isNotNull(isBuyOld) && !isBuyOld.equals(isBuyNew))) {
//单独记录是否已购买商险的变更记录
differenceInsuranceKey = "insuranceIsBuy";
detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(CommonConstants.TWO_STRING);
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
Map<String, Object> old = new HashMap<>();
old.put("insuranceIsBuy", isBuyOld);
Map<String, Object> simNew = new HashMap<>();
simNew.put("insuranceIsBuy", isBuyNew);
this.setLogBaseInfo(empPreId, old, simNew, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
}
String differenceInsuranceKey;
//如果服务类型包含商险处理商险明细数据
newInfo.setId(empPreId);
if (Common.isNotNull(newInfo.getServerItem()) && newInfo.getServerItem().contains("商险")) {
//是否已购买商险单独加日志
if (Common.isEmpty(isBuyOld) || (Common.isNotNull(isBuyOld) && !isBuyOld.equals(isBuyNew))) {
//单独记录是否已购买商险的变更记录
differenceInsuranceKey = "insuranceIsBuy";
detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(CommonConstants.TWO_STRING);
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
Map<String, Object> old = new HashMap<>();
old.put("insuranceIsBuy", isBuyOld);
Map<String, Object> simNew = new HashMap<>();
simNew.put("insuranceIsBuy", isBuyNew);
this.setLogBaseInfo(empPreId, old, simNew, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
}
if (!newInfo.getExitInsuranceInfoList().isEmpty()) {
newInfo.getExitInsuranceInfoList().forEach(insurancePreVo -> insurancePreVo.setRegisterId(empPreId));
}
......
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