Commit 01827f52 authored by hongguangwu's avatar hongguangwu

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

parent 764555aa
......@@ -144,7 +144,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
lastBase.setApplyEndDate(DateUtil.addDayByDate(sysBaseSetInfo.getApplyStartDate(), -1));
this.updateById(lastBase);
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo);
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo, null);
return R.ok();
}
......@@ -208,7 +208,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
return R.failed("对应户、地市、有效期的基数配置已存在!");
}
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo);
this.saveOrUpdateBaseAndFundPro(sysBaseSetInfo, old);
// 记录变更日志
tSocialLogService.saveModificationRecord(CommonConstants.ONE_INT, old.getId(), old, sysBaseSetInfo);
return R.ok();
......@@ -221,7 +221,7 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
* @Date: 2022/7/12 14:33
* @return: void
**/
private void saveOrUpdateBaseAndFundPro(SysBaseSetInfo sysBaseSetInfo) {
private void saveOrUpdateBaseAndFundPro(SysBaseSetInfo sysBaseSetInfo, SysBaseSetInfo old) {
if (Common.isNotNull(sysBaseSetInfo.getId())) {
baseMapper.updateById(sysBaseSetInfo);
} else {
......@@ -233,6 +233,9 @@ public class SysBaseSetInfoServiceImpl extends ServiceImpl<SysBaseSetInfoMapper,
//tForecastLibraryService.updateForecastLibaryBySysBase(sysBaseSetInfo)
}
List<SysPayProportion> payProportionList = sysBaseSetInfo.getFundProList();
if (old != null && Common.isNotNull(old.getFundProList())) {
sysPayProportionService.removeBatchByIds(old.getFundProList());
}
if (Common.isNotNull(payProportionList)) {
for (SysPayProportion payProportion : payProportionList) {
if (Common.isNotNull(payProportion.getId())) {
......
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