From 1b7735230167c363bdec49f3304ffb4b222a94ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 27 Feb 2025 10:29:11 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=84=E7=90=86=E5=86=B2=E7=AA=81?= =?UTF-8?q?=EF=BC=8C=E7=A6=81=E7=94=A8map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../salary/entity/salaryacct/bo/CalculateFormulaVarBO.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java index 806ceadd6..cd66dd76c 100644 --- a/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java +++ b/src/com/engine/salary/entity/salaryacct/bo/CalculateFormulaVarBO.java @@ -282,7 +282,7 @@ public class CalculateFormulaVarBO { } private void handleVariableArchiveData(SalaryAcctCalculateBO salaryAcctCalculateBO, Map> resultMap) { - Map> variableArchiveMap = SalaryEntityUtil.convert2Map(variableArchiveList, map -> map.getOrDefault("taxAgentId", "").toString() + "-" + map.getOrDefault("employeeId", "").toString()); + Map> variableArchiveMap = SalaryEntityUtil.convert2Map(variableArchiveList, map -> map.getOrDefault("taxAgentIds", "").toString() + "-" + map.getOrDefault("employeeId", "").toString()); // 填充到返回结果集中 for (SalaryAcctEmployeePO salaryAcctEmployeePO : salaryAcctCalculateBO.getSalaryAcctEmployeePOS()) { List formulaVarValues = resultMap.computeIfAbsent(salaryAcctEmployeePO.getEmployeeId() + "_" + salaryAcctEmployeePO.getTaxAgentId(), From 7382345dd5b0b3b5ba64d155d8d7805bf7528ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 27 Feb 2025 15:47:59 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E5=B7=AE?= =?UTF-8?q?=E4=BA=BA=E5=91=98=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIRecessionServiceImpl.java | 40 ++++++++++++------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java index e620c082e..29d56344d 100644 --- a/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRecessionServiceImpl.java @@ -4,8 +4,8 @@ import com.alibaba.fastjson.JSON; import com.api.formmode.mybatis.util.SqlProxyHandle; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; -import com.engine.salary.config.SalaryElogConfig; import com.engine.hrmelog.entity.dto.LoggerContext; +import com.engine.salary.config.SalaryElogConfig; import com.engine.salary.encrypt.EncryptUtil; import com.engine.salary.entity.datacollection.DataCollectionEmployee; import com.engine.salary.entity.hrm.dto.HrmInfoDTO; @@ -14,9 +14,10 @@ import com.engine.salary.entity.siaccount.param.InsuranceAccountDetailParam; import com.engine.salary.entity.siaccount.param.RecessionParam; import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; -import com.engine.salary.entity.taxagent.dto.TaxAgentEmployeeDTO; +import com.engine.salary.entity.siarchives.po.InsuranceArchivesBaseInfoPO; import com.engine.salary.entity.taxagent.po.TaxAgentPO; import com.engine.salary.enums.OperateTypeEnum; +import com.engine.salary.enums.auth.AuthFilterTypeEnum; import com.engine.salary.enums.siaccount.BillStatusEnum; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.siaccount.ProjectTypeEnum; @@ -25,11 +26,14 @@ import com.engine.salary.exception.SalaryRunTimeException; import com.engine.salary.mapper.datacollection.EmployMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper; import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper; +import com.engine.salary.mapper.siarchives.InsuranceBaseInfoMapper; import com.engine.salary.mapper.taxagent.TaxAgentMapper; import com.engine.salary.service.SIAccountService; import com.engine.salary.service.SIRecessionService; import com.engine.salary.service.SalaryEmployeeService; import com.engine.salary.service.TaxAgentService; +import com.engine.salary.service.auth.AuthService; +import com.engine.salary.service.auth.AuthServiceImpl; import com.engine.salary.util.SalaryAssert; import com.engine.salary.util.SalaryEntityUtil; import com.engine.salary.util.SalaryI18nUtil; @@ -69,6 +73,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic private SIAccountService getSIAccountService(User user) { return ServiceUtil.getService(SIAccountServiceImpl.class, user); } + private InsuranceAccountBatchMapper getInsuranceAccountBatchMapper() { return MapperProxyFactory.getProxy(InsuranceAccountBatchMapper.class); } @@ -81,6 +86,14 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic return ServiceUtil.getService(SalaryEmployeeServiceImpl.class, user); } + private InsuranceBaseInfoMapper getInsuranceBaseInfoMapper() { + return MapperProxyFactory.getProxy(InsuranceBaseInfoMapper.class); + } + + public AuthService getAuthService(User user) { + return ServiceUtil.getService(AuthServiceImpl.class, user); + } + @Override public void save(RecessionParam param, Long employeeId) { @@ -102,11 +115,11 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic partitionEmpIds.forEach(p -> { detailPOS.addAll( getInsuranceAccountDetailMapper().list(InsuranceAccountDetailParam.builder() - .paymentStatus(PaymentStatusEnum.COMMON.getValue()) - .recessionMonthList(param.getRecessionMonthList()) - .employeeIds(p) - .paymentOrganization(param.getPaymentOrganization()) - .build()) + .paymentStatus(PaymentStatusEnum.COMMON.getValue()) + .recessionMonthList(param.getRecessionMonthList()) + .employeeIds(p) + .paymentOrganization(param.getPaymentOrganization()) + .build()) ); }); @@ -208,7 +221,6 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic } - private void recessionBaseBuild(RecessionParam param, InsuranceAccountDetailPO temp, InsuranceAccountDetailPO insuranceAccountDetailPO, DataCollectionEmployee employee) { InsuranceAccountBatchPO insuranceAccountBatchPO = getInsuranceAccountBatchMapper().getByBillMonth(param.getBillMonth(), Long.valueOf(param.getPaymentOrganization())); temp.setPaymentStatus(PaymentStatusEnum.RECESSION.getValue()); @@ -253,6 +265,7 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic temp.setFundPaymentComBaseString(insuranceAccountDetailPO.getFundPaymentComBaseString()); temp.setOtherPaymentComBaseString(insuranceAccountDetailPO.getOtherPaymentComBaseString()); } + private void recessionSocial(RecessionParam param, InsuranceAccountDetailPO temp, InsuranceAccountDetailPO insuranceAccountDetailPO) { //退差社保个人缴费 String socialPerJson = insuranceAccountDetailPO.getSocialPerJson(); @@ -396,15 +409,12 @@ public class SIRecessionServiceImpl extends Service implements SIRecessionServic @Override public PageInfo getEmployeeListByTaxAgent(HrmQueryParam param) { - // 当前登录人员 - Long currentEmployeeId = (long) user.getUID(); - - List taxAgentEmployeeDTOS = getTaxAgentService(user).listTaxAgentAndEmployee(currentEmployeeId); - Set employeeIds = SalaryEntityUtil.properties(taxAgentEmployeeDTOS, TaxAgentEmployeeDTO::getEmployeeId); - List empIds = new ArrayList(employeeIds); + List list = getInsuranceBaseInfoMapper().listAll(); + list = getAuthService(user).auth(list, AuthFilterTypeEnum.ADMIN_DATA, InsuranceArchivesBaseInfoPO.class); + List employeeIds = SalaryEntityUtil.properties(list, InsuranceArchivesBaseInfoPO::getEmployeeId, Collectors.toList()); List resultData = new ArrayList<>(); if (employeeIds.size() > 0) { - List> partition = Lists.partition(empIds, 1000); + List> partition = Lists.partition(employeeIds, 1000); partition.forEach(p -> { param.setIds(p); resultData.addAll(getEmployMapper().listHrmInfoByIdAndName(param)); From cb38a3fa9b201ebeefa937ec53a136974b08c9cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Thu, 27 Feb 2025 17:44:23 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=B5=AE=E5=8A=A8=E8=96=AA=E8=B5=84?= =?UTF-8?q?=E6=9D=83=E9=99=90=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../engine/salary/service/impl/VariableArchiveServiceImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/engine/salary/service/impl/VariableArchiveServiceImpl.java b/src/com/engine/salary/service/impl/VariableArchiveServiceImpl.java index ce3544cb6..d06b252f1 100644 --- a/src/com/engine/salary/service/impl/VariableArchiveServiceImpl.java +++ b/src/com/engine/salary/service/impl/VariableArchiveServiceImpl.java @@ -175,6 +175,7 @@ public class VariableArchiveServiceImpl extends Service implements VariableArchi map.put("idNo", e.getIdNo()); map.put("companystartdate", e.getCompanystartdate()); map.put("dismissdate", e.getDismissdate()); + map.put("opts", e.getOpts()); // 浮动薪资项目动态 Optional> optionalItem = variableArchiveItemData.stream().filter(f -> f.get("variableArchiveId").toString().equals(e.getId().toString())).findFirst();