薪酬系统-福利台账,核算相关方法梳理和优化

This commit is contained in:
sy 2024-01-19 11:35:11 +08:00
parent 29e5c27ffb
commit f236b8e655
5 changed files with 918 additions and 39 deletions

View File

@ -314,5 +314,7 @@ public interface SIAccountService {
boolean checkBalance(InsuranceAccountDetailPO po);
boolean checkBalancePayInsurance(InsuranceAccountDetailPO po);
List<InsuranceAccountViewListDTO> buildRecords(List<InsuranceAccountDetailPO> list, Map<Long, TaxAgentPO> paymentMap);
}

File diff suppressed because it is too large Load Diff

View File

@ -5,7 +5,6 @@ import com.alibaba.fastjson.TypeReference;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.salary.biz.SIAccountBiz;
import com.engine.salary.biz.SIArchivesBiz;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
@ -68,7 +67,7 @@ public class SIExportServiceImpl extends Service implements SIExportService {
private EncryptUtil encryptUtil = new EncryptUtil();
private SIAccountBiz siAccountBiz = new SIAccountBiz();
// private SIAccountBiz siAccountBiz = new SIAccountBiz();
private SIArchivesBiz siArchivesBiz = new SIArchivesBiz();
@ -117,7 +116,8 @@ public class SIExportServiceImpl extends Service implements SIExportService {
List<TaxAgentPO> paymentList =getTaxAgentMapper().listAll();
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel(100341, "该租户无扣缴义务人"));
Map<Long, TaxAgentPO> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgentPO::getId, Function.identity()));
List<InsuranceAccountViewListDTO> insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap);
// List<InsuranceAccountViewListDTO> insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap);
List<InsuranceAccountViewListDTO> insuranceAccountViewListDTOS = getSIAccountService(user).buildRecords(insuranceAccountDetailPOS, paymentMap);
List<List<Object>> excelSheetData = new ArrayList<>();
// 1.工作簿名称

View File

@ -77,7 +77,6 @@ public class AutoSiAccountAndFileJob extends BaseCronJob {
user.setLastname("sysadmin");
Calendar accountTime= Calendar.getInstance();
// prevMonth.setTimeInMillis(System.currentTimeMillis());
accountTime.set(Calendar.MONTH, accountTime.get(Calendar.MONTH) + Integer.parseInt(diffToCurrentMonth));
SimpleDateFormat s=new SimpleDateFormat("yyyy-MM");

View File

@ -2,7 +2,6 @@ package com.engine.salary.web;
import cn.hutool.core.util.BooleanUtil;
import com.engine.common.util.ServiceUtil;
import com.engine.salary.biz.SIAccountBiz;
import com.engine.salary.entity.siaccount.param.InspectAccountParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO;
import com.engine.salary.entity.siarchives.param.InsuranceArchivesListParam;
@ -85,8 +84,9 @@ public class SIExportController {
@QueryParam("ids")List<Long> ids,@QueryParam("billMonth") String billMonth) {
InspectAccountParam param = InspectAccountParam.builder().ids(ids).billMonth(billMonth).build();
User user = HrmUserVarify.getUser(request, response);
SIAccountBiz siAccountBiz = new SIAccountBiz();
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth());
// SIAccountBiz siAccountBiz = new SIAccountBiz();
// List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth());
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = getService(user).allInspects(param.getIds(), param.getBillMonth());
InsuranceArchivesListParam req = new InsuranceArchivesListParam();
req.setEmployeeIds(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getEmployeeId).distinct().collect(Collectors.toList()));
XSSFWorkbook workbook = getSIExportWrapper(user).export(req);
@ -236,12 +236,13 @@ public class SIExportController {
@Produces(MediaType.APPLICATION_OCTET_STREAM)
public Response exportTemplate(@Context HttpServletRequest request, @Context HttpServletResponse response) {
InsuranceArchivesListParam param = buildParam(request);
SIAccountBiz siAccountBiz = new SIAccountBiz();
User user = HrmUserVarify.getUser(request, response);
// SIAccountBiz siAccountBiz = new SIAccountBiz();
if (param.getInspectAll() != null && param.getInspectAll()) {
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth());
// List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = siAccountBiz.allInspects(param.getIds(), param.getBillMonth());
List<InsuranceAccountInspectPO> insuranceAccountInspectPOS = getService(user).allInspects(param.getIds(), param.getBillMonth());
param.setEmployeeIds(insuranceAccountInspectPOS.stream().map(InsuranceAccountInspectPO::getEmployeeId).distinct().collect(Collectors.toList()));
}
User user = HrmUserVarify.getUser(request, response);
XSSFWorkbook workbook = getSIImportWrapper(user).exportTemplate(param);
String time = LocalDate.now().toString();
String fileName = "";