From 0f50520aa97a1e3f75371573f0d38ff7e27f4ad7 Mon Sep 17 00:00:00 2001 From: sy Date: Thu, 24 Nov 2022 09:31:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=8F=B0=E8=B4=A6=EF=BC=8C=E6=8A=BD=E5=8F=96bill=5Fba?= =?UTF-8?q?tch=E8=A1=A8=E4=B8=AD=E7=BB=9F=E8=AE=A1=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/service/SIAccountService.java | 5 +++ .../service/impl/SIAccountServiceImpl.java | 39 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/com/engine/salary/service/SIAccountService.java b/src/com/engine/salary/service/SIAccountService.java index e7e61f8e6..611333b8c 100644 --- a/src/com/engine/salary/service/SIAccountService.java +++ b/src/com/engine/salary/service/SIAccountService.java @@ -238,5 +238,10 @@ public interface SIAccountService { */ Map importExcelInsuranceDetail(ExcelInsuranceImportParam excelInsuranceImportParam); + /** + * 刷新_bill_batch表中的统计信息 + */ + void refreshBillBatch(Long paymentOrganization, String billMonth); + } diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 2a96f1802..32f4a1d87 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -2125,5 +2125,44 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { return excelInsuranceDetailPO; } + /** + * 刷新_bill_batch表中的统计信息 + */ + @Override + public void refreshBillBatch(Long paymentOrganization, String billMonth) { + ExecutorService taskExecutor = Executors.newCachedThreadPool(); + taskExecutor.execute(() -> { + + if (paymentOrganization != null && billMonth != null) { + InsuranceAccountDetailParam refreshParam =new InsuranceAccountDetailParam(); + refreshParam.setBillMonth(billMonth); + refreshParam.setPaymentOrganization(paymentOrganization.toString()); + PageInfo pageInfos = overView(refreshParam); + TaxAgentPO taxAgentPo = getTaxAgentMapper().getById(paymentOrganization); + if (taxAgentPo != null) { + List viewListDTOList = pageInfos.getList(); + viewListDTOList.stream().filter(f -> f.getPayOrg().equals(taxAgentPo.getName())).collect(Collectors.toList()); + InsuranceAccountBatchPO batchPO = getInsuranceAccountBatchMapper().getByBillMonth(billMonth, paymentOrganization); + batchPO = SiAccountEncrypt.decryptInsuranceAccountBatch(batchPO); + //更新 + if (viewListDTOList.size() > 0 && batchPO != null) { + InsuranceAccountViewListDTO viewListDTO = viewListDTOList.get(0); + batchPO.setSocialNum(viewListDTO.getSocialNum()); + batchPO.setFundNum(viewListDTO.getFundNum()); + batchPO.setOtherNum(viewListDTO.getOtherNum()); + + batchPO.setSocialPay(viewListDTO.getSocialPaySum().replace(",", "")); + batchPO.setFundPay(viewListDTO.getFundPaySum().replace(",", "")); + batchPO.setOtherPay(viewListDTO.getOtherPaySum().replace(",", "")); + + batchPO.setUpdateTime(new Date()); + batchPO = SiAccountEncrypt.encryptInsuranceAccountBatch(batchPO); + getInsuranceAccountBatchMapper().updateById(batchPO); + } + } + + } + }); + } }