Commit 6b7927bb authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.7.9' into MVP1.7.9

parents b8714678 cd7efe6f
......@@ -162,11 +162,8 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
}
List<TEmployeeInsurancePre> saveOrUpdateList = new ArrayList<>();
if (newList != null && !newList.isEmpty()) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、商险信息";
} else {
diffTitle = "商险信息";
}
// 是否修改了商险
boolean isModifyInsurance = false;
TEmployeeInsurancePre oldInsurance;
String differenceInsuranceKey;
TEmployeePreLogDetail detailInsuranceLog;
......@@ -175,11 +172,13 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
if (Common.isNotNull(newInsurance.getModelType())) {
// 1:新增
if (CommonConstants.ONE_STRING.equals(newInsurance.getModelType())) {
saveOrUpdateList.add(newInsurance);
detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(newInsurance.getModelType());
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
this.setLogBaseInfo(empPreId, null, newInsurance, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
} else if (CommonConstants.TWO_STRING.equals(newInsurance.getModelType())) {
......@@ -191,11 +190,14 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
} else {
saveOrUpdateList.add(newInsurance);
}
detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(CommonConstants.TWO_STRING);
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
this.setLogBaseInfo(empPreId, oldInsurance, newInsurance, user, differenceInsuranceKey, logId, detailInsuranceLog);
detailList.add(detailInsuranceLog);
if (Common.isNotNull(differenceInsuranceKey) || oldInsurance == null) {
detailInsuranceLog = new TEmployeePreLogDetail();
detailInsuranceLog.setModelType(CommonConstants.TWO_STRING);
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
this.setLogBaseInfo(empPreId, oldInsurance, newInsurance, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
}
} else {
saveOrUpdateList.add(newInsurance);
// 2:修改无老ID
......@@ -203,6 +205,7 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailInsuranceLog.setModelType(CommonConstants.ONE_STRING);
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
this.setLogBaseInfo(empPreId, null, newInsurance, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
}
} else if (CommonConstants.THREE_STRING.equals(newInsurance.getModelType())) {
......@@ -211,13 +214,23 @@ public class TEmployeePreLogServiceImpl extends ServiceImpl<TEmployeePreLogMappe
detailInsuranceLog.setModelType(newInsurance.getModelType());
detailInsuranceLog.setType(CommonConstants.TWO_STRING);
this.setLogBaseInfo(empPreId, newInsurance, null, user, differenceInsuranceKey, logId, detailInsuranceLog);
isModifyInsurance = true;
detailList.add(detailInsuranceLog);
}
} else {
// 没有调整的
isModifyInsurance = true;
saveOrUpdateList.add(newInsurance);
}
}
// 如果变更了
if (isModifyInsurance) {
if (Common.isNotNull(diffTitle)) {
diffTitle += "、商险信息";
} else {
diffTitle = "商险信息";
}
}
}
// 有修改,则加日志
if (Common.isNotNull(diffTitle)) {
......
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