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