社保福利台账进度条优化

This commit is contained in:
Harryxzy 2024-12-10 11:00:05 +08:00
parent 89ca47d65e
commit 1715b58bad
1 changed files with 39 additions and 5 deletions

View File

@ -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());