diff --git a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java index c6e6b40a3..7234e4bbb 100644 --- a/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java +++ b/src/com/engine/salary/entity/siaccount/bo/InsuranceComparisonResultBO.java @@ -1,9 +1,6 @@ package com.engine.salary.entity.siaccount.bo; import com.alibaba.fastjson.JSON; -import com.engine.salary.entity.salaryacct.po.ExcelAcctResultPO; -import com.engine.salary.entity.salaryacct.po.SalaryAcctResultPO; -import com.engine.salary.entity.salarysob.dto.SalarySobEmpFieldDTO; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.entity.siexport.po.AccountExportPO; import com.engine.salary.entity.siexport.po.ExcelAccountExportPO; @@ -18,7 +15,10 @@ import com.engine.salary.util.page.Column; import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; @@ -170,7 +170,7 @@ public class InsuranceComparisonResultBO { * */ public static List> buildComparisonTableData(List accountExportPOS, List excelAccountExportPOS - , Map schemeIdNameMap, boolean welBaseDiffSign) { + , Map schemeIdNameMap, boolean welBaseDiffSign, Set insuranceBaseSet) { Map> excelResultMap = SalaryEntityUtil.group2Map(excelAccountExportPOS, ExcelAccountExportPO::getEmployeeId); // Map> acctResultMap = SalaryEntityUtil.group2Map(accountExportPOS, AccountExportPO::getWorkcode); @@ -222,38 +222,38 @@ public class InsuranceComparisonResultBO { } if (welBaseDiffSign) { //社保基数-个人,socialPaymentBaseString - welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1); + welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "PerBase", 1, insuranceBaseSet); //公积金基数-个人,fundPaymentBaseString - welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2); + welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "PerBase", 2, insuranceBaseSet); //其他福利基数-个人,otherPaymentBaseString - welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3); + welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "PerBase", 3, insuranceBaseSet); //社保基数-公司,socialPaymentComBaseString - welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1); + welfareElementCompare(map, accountExportPO.getSocialPaymentComBaseString(), excelAccountExportPO.getSocialPaymentComBaseString(), "ComBase", 1, insuranceBaseSet); //公积金基数-公司,fundPaymentComBaseString - welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2); + welfareElementCompare(map, accountExportPO.getFundPaymentComBaseString(), excelAccountExportPO.getFundPaymentComBaseString(), "ComBase", 2, insuranceBaseSet); //其他福利基数-公司,otherPaymentComBaseString - welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3); + welfareElementCompare(map, accountExportPO.getOtherPaymentComBaseString(), excelAccountExportPO.getOtherPaymentComBaseString(), "ComBase", 3, insuranceBaseSet); } else { //社保基数,socialPaymentBaseString - welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1); + welfareElementCompare(map, accountExportPO.getSocialPaymentBaseString(), excelAccountExportPO.getSocialPaymentBaseString(), "Base", 1, insuranceBaseSet); //公积金基数,fundPaymentBaseString - welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2); + welfareElementCompare(map, accountExportPO.getFundPaymentBaseString(), excelAccountExportPO.getFundPaymentBaseString(), "Base", 2, insuranceBaseSet); //其他福利基数,otherPaymentBaseString - welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3); + welfareElementCompare(map, accountExportPO.getOtherPaymentBaseString(), excelAccountExportPO.getOtherPaymentBaseString(), "Base", 3, insuranceBaseSet); } //社保个人socialPerJson - welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1); + welfareElementCompare(map, accountExportPO.getSocialPerJson(), excelAccountExportPO.getSocialPerJson(), "Per", 1, null); //公积金个人fundPerJson - welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2); + welfareElementCompare(map, accountExportPO.getFundPerJson(), excelAccountExportPO.getFundPerJson(), "Per", 2, null); //其他个人otherPerJson - welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3); + welfareElementCompare(map, accountExportPO.getOtherPerJson(), excelAccountExportPO.getOtherPerJson(), "Per", 3, null); //社保单位socialComJson - welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1); + welfareElementCompare(map, accountExportPO.getSocialComJson(), excelAccountExportPO.getSocialComJson(), "Com", 1, null); //公积金单位fundComJson - welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2); + welfareElementCompare(map, accountExportPO.getFundComJson(), excelAccountExportPO.getFundComJson(), "Com", 2, null); //其他单位otherComJson - welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3); + welfareElementCompare(map, accountExportPO.getOtherComJson(), excelAccountExportPO.getOtherComJson(), "Com", 3, null); //各种合计 welfareSumCompare(map, accountExportPO, excelAccountExportPO); @@ -263,9 +263,12 @@ public class InsuranceComparisonResultBO { return resultList; } - private static Map welfareElementCompare(Map map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType) { + private static Map welfareElementCompare(Map map, String accountJson, String excelAccountJson, String welfareStand, Integer welfareType, Set insuranceBaseSet) { List listAll = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll(); List accountWelfareList = listAll.stream().filter(e -> e.getWelfareType().equals(welfareType)).collect(Collectors.toList()); + if (insuranceBaseSet != null) { + accountWelfareList = accountWelfareList.stream().filter(e -> insuranceBaseSet.contains(e.getId())).collect(Collectors.toList()); + } String baseTypeInfo = welfareType.equals(1) ? "social" : (welfareType.equals(2) ? "fund" : "other"); diff --git a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java index 39d4116b7..c8a3ea2d6 100644 --- a/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIAComparisonResultServiceImpl.java @@ -214,7 +214,7 @@ public class SIAComparisonResultServiceImpl extends Service implements SIACompar List weaTableColumns = InsuranceComparisonResultBO.buildTableColumns4ComparisonResult(insuranceBaseSet, insurancePerPaySet, insuranceComPaySet, welBaseDiffSign); //4-通过线上线下两份数据获得对比结果 Map schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap(); - List> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign); + List> resultMapList = InsuranceComparisonResultBO.buildComparisonTableData(accountExportPOS, excelAccountExportPOS, schemeIdNameMap, welBaseDiffSign, insuranceBaseSet); // 系统值和线下值一致的人员 if (queryParam.isOnlyDiffEmployee()) { diff --git a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java index a6c4cb5d8..276a39af7 100644 --- a/src/com/engine/salary/service/impl/SICompensationServiceImpl.java +++ b/src/com/engine/salary/service/impl/SICompensationServiceImpl.java @@ -1,7 +1,6 @@ package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; -import com.alipay.oceanbase.jdbc.StringUtils; import com.cloudstore.eccom.pc.table.WeaTable; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; @@ -41,6 +40,7 @@ import com.engine.salary.util.db.MapperProxyFactory; import com.engine.salary.util.page.Column; import com.google.common.collect.Lists; import com.engine.salary.util.db.IdGenerator; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import weaver.hrm.User;