Commit c7a90977 authored by hongguangwu's avatar hongguangwu

MVP1.5-薪资导入优化(社保基数)

parent 01827f52
......@@ -233,18 +233,27 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//tForecastLibraryService.updateForecastLibaryBySysBase(sysBaseSetInfo)
}
List<SysPayProportion> payProportionList = sysBaseSetInfo.getFundProList();
Map<String, SysPayProportion> oldFundMap = new HashMap<>();
if (old != null && Common.isNotNull(old.getFundProList())) {
sysPayProportionService.removeBatchByIds(old.getFundProList());
for (SysPayProportion payProportion : payProportionList) {
oldFundMap.put(payProportion.getId(), payProportion);
}
}
if (Common.isNotNull(payProportionList)) {
for (SysPayProportion payProportion : payProportionList) {
if (Common.isNotNull(payProportion.getId())) {
sysPayProportionService.updateById(payProportion);
oldFundMap.remove(payProportion.getId());
} else {
payProportion.setSysBaseSetId(sysBaseSetInfo.getId());
sysPayProportionService.save(payProportion);
}
}
if (!oldFundMap.isEmpty()) {
for (SysPayProportion fund : oldFundMap.values()) {
sysPayProportionService.removeById(fund);
}
}
}
}
......
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