薪酬系统-福利台账,抽取bill_batch表中统计数据刷新方法
This commit is contained in:
parent
aa7a3ced01
commit
0f50520aa9
|
|
@ -238,5 +238,10 @@ public interface SIAccountService {
|
|||
*/
|
||||
Map<String, Object> importExcelInsuranceDetail(ExcelInsuranceImportParam excelInsuranceImportParam);
|
||||
|
||||
/**
|
||||
* 刷新_bill_batch表中的统计信息
|
||||
*/
|
||||
void refreshBillBatch(Long paymentOrganization, String billMonth);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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<InsuranceAccountViewListDTO> pageInfos = overView(refreshParam);
|
||||
TaxAgentPO taxAgentPo = getTaxAgentMapper().getById(paymentOrganization);
|
||||
if (taxAgentPo != null) {
|
||||
List<InsuranceAccountViewListDTO> 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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue