汇通调整

This commit is contained in:
Harryxzy 2025-10-15 17:52:16 +08:00
parent 422681e448
commit 8be3ababa9
1 changed files with 20 additions and 11 deletions

View File

@ -7927,8 +7927,10 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
List<InsuranceAccountDetailPO> changeDetail = new ArrayList<>(); List<InsuranceAccountDetailPO> changeDetail = new ArrayList<>();
// 过滤出本月社保公积金其他方案发生变化的台账明细 // 过滤出本月社保公积金其他方案发生变化的台账明细
Map<String, InsuranceAccountDetailPO> lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId()); // Map<String, InsuranceAccountDetailPO> lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId());
Set<String> thisMonthKey = SalaryEntityUtil.convert2Map(insuranceAccountDetailPOS, po -> po.getPaymentOrganization() + "_split" + po.getEmployeeId()).keySet(); Map<String, InsuranceAccountDetailPO> lastMonthDetailMap = SalaryEntityUtil.convert2Map(lastInsuranceAccountDetailPOS, po -> po.getEmployeeId().toString());
Set<String> thisMonthKey = SalaryEntityUtil.convert2Map(insuranceAccountDetailPOS, po -> po.getEmployeeId().toString()).keySet();
// 获取本月减少的key // 获取本月减少的key
List<String> lessKey = lastMonthDetailMap.keySet().stream().filter(key -> !thisMonthKey.contains(key)).collect(Collectors.toList()); List<String> lessKey = lastMonthDetailMap.keySet().stream().filter(key -> !thisMonthKey.contains(key)).collect(Collectors.toList());
for (String key : lessKey) { for (String key : lessKey) {
@ -7938,7 +7940,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
} }
for (InsuranceAccountDetailPO thisMonthPO : insuranceAccountDetailPOS) { for (InsuranceAccountDetailPO thisMonthPO : insuranceAccountDetailPOS) {
InsuranceAccountDetailPO lastMonthPO = lastMonthDetailMap.get(thisMonthPO.getPaymentOrganization() + "_split" + thisMonthPO.getEmployeeId()); InsuranceAccountDetailPO lastMonthPO = lastMonthDetailMap.get(thisMonthPO.getEmployeeId().toString());
if (lastMonthPO == null) { if (lastMonthPO == null) {
thisMonthPO.setChangeReason("新增"); thisMonthPO.setChangeReason("新增");
changeDetail.add(thisMonthPO); changeDetail.add(thisMonthPO);
@ -7947,19 +7949,26 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
try { try {
socialEqual = (thisMonthPO.getSocialSchemeId() == null && lastMonthPO.getSocialSchemeId() == null) ? true : socialEqual = (thisMonthPO.getSocialSchemeId() == null && lastMonthPO.getSocialSchemeId() == null) ? true :
thisMonthPO.getSocialSchemeId().equals(lastMonthPO.getSocialSchemeId()); thisMonthPO.getSocialSchemeId().equals(lastMonthPO.getSocialSchemeId());
fundEqual = (thisMonthPO.getFundSchemeId() == null && lastMonthPO.getFundSchemeId() == null) ? true : // fundEqual = (thisMonthPO.getFundSchemeId() == null && lastMonthPO.getFundSchemeId() == null) ? true :
thisMonthPO.getFundSchemeId().equals(lastMonthPO.getFundSchemeId()); // thisMonthPO.getFundSchemeId().equals(lastMonthPO.getFundSchemeId());
otherEqual = (thisMonthPO.getOtherSchemeId() == null && lastMonthPO.getOtherSchemeId() == null) ? true : // otherEqual = (thisMonthPO.getOtherSchemeId() == null && lastMonthPO.getOtherSchemeId() == null) ? true :
thisMonthPO.getOtherSchemeId().equals(lastMonthPO.getOtherSchemeId()); // thisMonthPO.getOtherSchemeId().equals(lastMonthPO.getOtherSchemeId());
fundEqual = true;
otherEqual = true;
} catch (Exception e) { } catch (Exception e) {
socialEqual = false; socialEqual = false;
fundEqual = false; // fundEqual = false;
otherEqual = false; // otherEqual = false;
} }
if (socialEqual && fundEqual && otherEqual) { // if (socialEqual && fundEqual && otherEqual) {
if (socialEqual) {
// 方案全相等不处理 // 方案全相等不处理
} else { } else {
thisMonthPO.setChangeReason("新增");
changeDetail.add(thisMonthPO); 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> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(changeDetailList, Long.valueOf(user.getUID()), SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, PaymentStatusEnum.COMMON.getValue()); List<WeaTableColumn> weaTableColumn = getColumnBuildService(user).buildCommonColumnsWithStyle(changeDetailList, Long.valueOf(user.getUID()), SalaryDefaultTenantConstant.DEFAULT_TENANT_KEY, PaymentStatusEnum.COMMON.getValue());
List<Column> columns = weaTableColumn.stream().map(v -> new Column(v.getText(), v.getColumn(), v.getColumn())).collect(Collectors.toList()); List<Column> 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); pageInfos.setColumns(columns);
return pageInfos; return pageInfos;
} }