From 8be3ababa93ef4c37d9c84eb89ba4bb99e08d0c0 Mon Sep 17 00:00:00 2001 From: Harryxzy <822365880@qq.com> Date: Wed, 15 Oct 2025 17:52:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B1=87=E9=80=9A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIAccountServiceImpl.java | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java index ef2605ec4..5a445cfd1 100644 --- a/src/com/engine/salary/service/impl/SIAccountServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAccountServiceImpl.java @@ -7927,8 +7927,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { List changeDetail = new ArrayList<>(); // 过滤出本月社保、公积金、其他方案发生变化的台账明细 - Map lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId()); - Set thisMonthKey = SalaryEntityUtil.convert2Map(insuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId()).keySet(); + // Map lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId()); + Map lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getEmployeeId().toString()); + + Set thisMonthKey = SalaryEntityUtil.convert2Map(insuranceAccountDetailPOS, po -> po.getEmployeeId().toString()).keySet(); // 获取本月减少的key List lessKey = lastMonthDetailMap.keySet().stream().filter(key -> !thisMonthKey.contains(key)).collect(Collectors.toList()); for (String key : lessKey) { @@ -7938,7 +7940,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { } for (InsuranceAccountDetailPO thisMonthPO : insuranceAccountDetailPOS) { - InsuranceAccountDetailPO lastMonthPO = lastMonthDetailMap.get(thisMonthPO.getPaymentOrganization() + "_split" + thisMonthPO.getEmployeeId()); + InsuranceAccountDetailPO lastMonthPO = lastMonthDetailMap.get(thisMonthPO.getEmployeeId().toString()); if (lastMonthPO == null) { thisMonthPO.setChangeReason("新增"); changeDetail.add(thisMonthPO); @@ -7947,19 +7949,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { try { socialEqual = (thisMonthPO.getSocialSchemeId() == null && lastMonthPO.getSocialSchemeId() == null) ? true : thisMonthPO.getSocialSchemeId().equals(lastMonthPO.getSocialSchemeId()); - fundEqual = (thisMonthPO.getFundSchemeId() == null && lastMonthPO.getFundSchemeId() == null) ? true : - thisMonthPO.getFundSchemeId().equals(lastMonthPO.getFundSchemeId()); - otherEqual = (thisMonthPO.getOtherSchemeId() == null && lastMonthPO.getOtherSchemeId() == null) ? true : - thisMonthPO.getOtherSchemeId().equals(lastMonthPO.getOtherSchemeId()); + // fundEqual = (thisMonthPO.getFundSchemeId() == null && lastMonthPO.getFundSchemeId() == null) ? true : + // thisMonthPO.getFundSchemeId().equals(lastMonthPO.getFundSchemeId()); + // otherEqual = (thisMonthPO.getOtherSchemeId() == null && lastMonthPO.getOtherSchemeId() == null) ? true : + // thisMonthPO.getOtherSchemeId().equals(lastMonthPO.getOtherSchemeId()); + fundEqual = true; + otherEqual = true; } catch (Exception e) { socialEqual = false; - fundEqual = false; - otherEqual = false; + // fundEqual = false; + // otherEqual = false; } - if (socialEqual && fundEqual && otherEqual) { + // if (socialEqual && fundEqual && otherEqual) { + if (socialEqual) { // 方案全相等不处理 } else { + thisMonthPO.setChangeReason("新增"); changeDetail.add(thisMonthPO); + lastMonthPO = lastMonthDetailMap.get(thisMonthPO.getEmployeeId().toString()); + lastMonthPO.setChangeReason("减少"); + changeDetail.add(lastMonthPO); } } } @@ -7986,7 +7995,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService { //动态列组装 List weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(changeDetailList, Long.valueOf(user.getUID()), SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, PaymentStatusEnum.COMMON.getValue()); List columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList()); - columns.add(0, new Column("类型", "changeReason", "changeReason")); + columns.add(2, new Column("类型", "changeReason", "changeReason")); pageInfos.setColumns(columns); return pageInfos; }