From 16cf63018f42913f57a548b6599db8e6d4d04438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Mon, 19 Jun 2023 09:54:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E6=96=B0=E6=A0=B8=E7=AE=97=E6=88=96?= =?UTF-8?q?=E8=80=85=E5=9B=9E=E7=AE=97=E6=97=B6=E5=88=A0=E9=99=A4=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/SalaryAcctRecordServiceImpl.java | 12 ++++++++++++ .../impl/SalaryAcctResultServiceImpl.java | 16 ---------------- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java index 434b74638..190f9a842 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctRecordServiceImpl.java @@ -18,6 +18,8 @@ import com.engine.salary.enums.salarysob.IncomeCategoryEnum; import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.salaryacct.SalaryAcctRecordMapper; import com.engine.salary.mapper.salarybill.SalarySendMapper; +import com.engine.salary.report.service.SalaryStatisticsReportService; +import com.engine.salary.report.service.impl.SalaryStatisticsReportServiceImpl; import com.engine.salary.service.*; import com.engine.salary.sys.enums.TaxDeclarationFunctionEnum; import com.engine.salary.sys.service.SalarySysConfService; @@ -96,6 +98,10 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe return ServiceUtil.getService(SalaryAcctReportServiceImpl.class, user); } + private SalaryStatisticsReportService getSalaryStatisticsReportService(User user) { + return ServiceUtil.getService(SalaryStatisticsReportServiceImpl.class, user); + } + @Override public SalaryAcctRecordPO getById(Long id) { @@ -551,6 +557,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe // 生成工资单 getSalarySendService(user).generateSalaryBill(salaryAcctRecordId); + //删除报表缓存 + getSalaryStatisticsReportService(user).removeReportCache(); + // 记录日志 // String targetName = getLogTargetNameById(salaryAcctRecordId); @@ -675,6 +684,9 @@ public class SalaryAcctRecordServiceImpl extends Service implements SalaryAcctRe salaryAcctRecordPO.setStatus(SalaryAcctRecordStatusEnum.NOT_ARCHIVED.getValue()); salaryAcctRecordPO.setUpdateTime(new Date()); getSalaryAcctRecordMapper().updateIgnoreNull(salaryAcctRecordPO); + + //删除报表缓存 + getSalaryStatisticsReportService(user).removeReportCache(); } diff --git a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java index b23942d95..19831f17c 100644 --- a/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SalaryAcctResultServiceImpl.java @@ -590,8 +590,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe getSalaryAcctReportService(user).batchSave(salaryAcctResultReportPOS); } - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); // 存储薪资核算结果数据来源日志 salaryAcctResultPOS = getSalaryAcctRecordService(user).listBySalaryAcctEmpId(saveParam.getSalaryAcctEmpId()); @@ -648,8 +646,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe List> partition = Lists.partition(list, 100); partition.forEach(getSalaryAcctResultMapper()::batchInsert); - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); } } @@ -657,26 +653,17 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe @Override public void deleteBySalaryAcctEmployeeIds(Collection salaryAcctEmployeeIds) { getSalaryAcctResultMapper().deleteBySalaryAcctEmpIds(salaryAcctEmployeeIds); - - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); } @Override public void deleteByAcctEmployeeIdsAndSalaryItemIds(Collection salaryAcctEmployeeIds, Collection salaryItemIds) { getSalaryAcctResultMapper().deleteByAcctEmpIdsAndSalaryItemIds(salaryAcctEmployeeIds, salaryItemIds); - - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); } @Override public void deleteBySalaryAcctRecordIds(Collection salaryAcctRecordIds) { getSalaryAcctResultMapper().deleteBySalaryAcctRecordIds(salaryAcctRecordIds); - - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); } @Override @@ -997,9 +984,6 @@ public class SalaryAcctResultServiceImpl extends Service implements SalaryAcctRe for (List subSalaryAcctResultValues : partition) { getSalaryAcctResultMapper().batchUpdateOriginResultValue(subSalaryAcctResultValues); } - - //删除报表缓存 - getSalaryStatisticsReportService(user).removeReportCache(); } private Set canLockSalaryItemIds(Long salarySobId) {