From 1715b58badfb4b3d2510af5ef9980b842ea5ba07 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 10 Dec 2024 11:00:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A4=BE=E4=BF=9D=E7=A6=8F=E5=88=A9=E5=8F=B0?= =?UTF-8?q?=E8=B4=A6=E8=BF=9B=E5=BA=A6=E6=9D=A1=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIAccountServiceImpl.java | 44 ++++++++++++++++--- 1 file changed, 39 insertions(+), 5 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index 83a8b57f3..75ca5f92d 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -650,6 +650,23 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { AccountParam accountParam = new AccountParam(); accountParam.setBillMonth(param.getBillMonth()); accountParam.setIds(collect); + + //福利核算进度 + ProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization()); + if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.isStatus() && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) { + return; + } + // 初始化进度 + ProgressDTO initProgress = new ProgressDTO() + .setTitle(SalaryI18nUtil.getI18nLabel(0, "核算中")) + .setTitleLabelId(97515L) + .setTotalQuantity(2000) + .setCalculatedQuantity(NumberUtils.INTEGER_ZERO) + .setProgress(BigDecimal.ZERO) + .setStatus(true) + .setMessage(StringUtils.EMPTY); + getSalaryAcctProgressService(user).initProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization(), initProgress); + siAccounting(accountParam); } @@ -4891,6 +4908,23 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { // AccountParam selectParam = new AccountParam(); // selectParam.setBillMonth(param.getBillMonth()); // selectParam.setPaymentOrganization(param.getPaymentOrganization()); + + //福利核算进度 + ProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization()); + if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.isStatus() && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) { + return String.valueOf(user.getUID()); + } + // 初始化进度 + ProgressDTO initProgress = new ProgressDTO() + .setTitle(SalaryI18nUtil.getI18nLabel(0, "核算中")) + .setTitleLabelId(97515L) + .setTotalQuantity(2000) + .setCalculatedQuantity(NumberUtils.INTEGER_ZERO) + .setProgress(BigDecimal.ZERO) + .setStatus(true) + .setMessage(StringUtils.EMPTY); + getSalaryAcctProgressService(user).initProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization(), initProgress); + ExecutorService taskExecutor = Executors.newCachedThreadPool(); taskExecutor.execute(() -> { siAccounting(param); @@ -4914,11 +4948,11 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { public void siAccounting(AccountParam param) { - //福利核算进度 - ProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization()); - if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.isStatus() && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) { - return; - } + // //福利核算进度 + // ProgressDTO salaryAcctProgressDTO = getSalaryAcctProgressService(user).getProgress(SalaryCacheKey.ACCT_PROGRESS + param.getBillMonth() + "_" + param.getPaymentOrganization()); + // if (salaryAcctProgressDTO != null && salaryAcctProgressDTO.isStatus() && salaryAcctProgressDTO.getProgress().compareTo(BigDecimal.ONE) < 0) { + // return; + // } log.info("开始核算,当前操作人为:{}", user.getLastname()); log.info("核算时间:{}, 核算月份:{}, 个税扣缴义务人:{}, 是否首次核算:{}", new Date(), param.getBillMonth(), param.getPaymentOrganization(), param.isFlag());