package com.engine.salary.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.TypeReference; import com.cloudstore.eccom.constant.WeaBoolAttr; import com.cloudstore.eccom.pc.table.WeaTableColumn; import com.engine.common.util.ServiceUtil; import com.engine.core.impl.Service; import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO; import com.engine.salary.entity.siaccount.po.InsuranceAccountInspectPO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesAccountPO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesFundSchemePO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesOtherSchemePO; import com.engine.salary.entity.siarchives.po.InsuranceArchivesSocialSchemePO; import com.engine.salary.entity.sicategory.po.ICategoryPO; import com.engine.salary.enums.siaccount.PaymentStatusEnum; import com.engine.salary.enums.sicategory.WelfareTypeEnum; import com.engine.salary.mapper.sicategory.ICategoryMapper; import com.engine.salary.service.ColumnBuildService; import com.engine.salary.service.SIArchivesService; import com.engine.salary.util.SalaryI18nUtil; import com.engine.salary.util.db.MapperProxyFactory; import org.apache.commons.lang3.StringUtils; import weaver.hrm.User; import java.util.*; import java.util.stream.Collectors; /** * @Author weaver_cl * @Description: * @Date 2022/4/12 * @Version V1.0 **/ public class ColumnBuildServiceImpl extends Service implements ColumnBuildService { // private SIArchivesBiz siArchivesBiz = new SIArchivesBiz(); private ICategoryMapper getICategoryMapper() { return MapperProxyFactory.getProxy(ICategoryMapper.class); } public SIArchivesService getSIArchivesService(User user) { return ServiceUtil.getService(SIArchivesServiceImpl.class, user); } @Override public List buildCommonColumnsWithStyle(List pos, Long employeeId, String tenantKey, Integer paymentStatus) { List list = new ArrayList<>(); Map categoryIdNameMap = getICategoryMapper().listAll().stream().collect(Collectors.toMap(ICategoryPO -> String.valueOf(ICategoryPO.getId()), ICategoryPO::getInsuranceName)); Map> columns = buildPaymentTitle(pos, categoryIdNameMap, employeeId, tenantKey); Map> personColumns = buildPersonalTitle(pos, categoryIdNameMap, employeeId, tenantKey); Map> comColumns = buildComTitle(pos, categoryIdNameMap, employeeId, tenantKey); WeaTableColumn weaTableNameColumn = new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName"); weaTableNameColumn.setFixed("left"); WeaTableColumn idColumn = new WeaTableColumn("150px", "id", "id"); idColumn.setIsPrimarykey(WeaBoolAttr.TRUE); idColumn.setDisplay(WeaBoolAttr.FALSE); list.add(idColumn); WeaTableColumn employeeIdColumn = new WeaTableColumn("150px", "人员信息表的主键id", "employeeId"); employeeIdColumn.setDisplay(WeaBoolAttr.FALSE); list.add(employeeIdColumn); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86185, "部门"), "department")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86186, "手机号"), "mobile")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 1933, "工号"), "workcode")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "员工状态"), "employeeStatus")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86187, "证件号码"), "idNo")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100377, "数据来源"), "sourceFrom")); if (paymentStatus.equals(PaymentStatusEnum.REPAIR.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth")); } else if (paymentStatus.equals(PaymentStatusEnum.RECESSION.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "退差月份"), "supplementaryMonth")); } list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91325, "个税扣缴义务人"), "socialPayOrg")); if (!paymentStatus.equals(PaymentStatusEnum.BALANCE.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91324, "社保账号"), "socialAccount")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"), "socialSchemeName")); } //组装社保基数 columns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); if (!paymentStatus.equals(PaymentStatusEnum.BALANCE.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91486, "公积金账号"), "fundAccount")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91485, "公积金方案名称"), "fundSchemeName")); } //组装公积金基数 columns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); if (!paymentStatus.equals(PaymentStatusEnum.BALANCE.getValue())) { list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91487, "补充公积金账号"), "supplementFundAccount")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel(91496, "其他福利方案名称"), "otherSchemeName")); } columns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); personColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100388, "社保个人合计") + "", "socialPerSum")); personColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100390, "公积金个人合计") + "", "fundPerSum")); personColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100392, "其他福利个人合计") + "", "otherPerSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100393, "个人合计") + "", "perSum")); comColumns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100394, "社保单位合计") + "", "socialComSum")); comColumns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100395, "公积金单位合计") + "", "fundComSum")); comColumns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100396, "其他福利单位合计") + "", "otherComSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100397, "单位合计") + "", "comSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100398, "社保合计") + "", "socialSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100399, "公积金合计") + "", "fundSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 100400, "其他福利合计") + "", "otherSum")); list.add(new WeaTableColumn("150px","" + SalaryI18nUtil.getI18nLabel( 93278, "合计") + "", "total")); return list; } private Map> buildPaymentTitle(List pos, Map categoryIdNameMap, Long employeeId, String tenantKey) { // boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase(); boolean welBaseDiffSign = getSIArchivesService(user).isDiffWelBase(); Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); Set socailComIds = new HashSet<>(); Set fundComIds = new HashSet<>(); Set otherComIds = new HashSet<>(); Map> result = new HashMap<>(); pos.stream().forEach(item -> { if (StringUtils.isNotBlank(item.getSocialPaymentBaseString()) || StringUtils.isNotBlank(item.getSocialPaymentComBaseString())) { Map socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap().getClass()); if(socialJson!=null){ socialJson.forEach((k, v) -> { socailIds.add(k); }); } //如果需要区分个人和公司福利基数 if (welBaseDiffSign) { Map socialComJson = JSON.parseObject(item.getSocialPaymentComBaseString(), new TypeReference>() { }); if (socialComJson != null) { socialComJson.forEach((k, v) -> socailComIds.add(k)); } } } if (StringUtils.isNotBlank(item.getFundPaymentBaseString()) || StringUtils.isNotBlank(item.getFundPaymentComBaseString())) { Map fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap().getClass()); if(fundJson!=null){ fundJson.forEach((k, v) -> { fundIds.add(k); }); } //如果需要区分个人和公司福利基数 if (welBaseDiffSign) { Map fundComJson = JSON.parseObject(item.getFundPaymentComBaseString(), new TypeReference>() { }); if (fundComJson != null) { fundComJson.forEach((k, v) -> fundComIds.add(k)); } } } if (StringUtils.isNotBlank(item.getOtherPaymentBaseString()) || StringUtils.isNotBlank(item.getOtherPaymentComBaseString())) { Map otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap().getClass()); if(otherJson!=null){ otherJson.forEach((k, v) -> { otherIds.add(k); }); } //如果需要区分个人和公司福利基数 if (welBaseDiffSign) { Map otherComJson = JSON.parseObject(item.getOtherPaymentComBaseString(), new TypeReference>() { }); if (otherComJson != null) { otherComJson.forEach((k, v) -> otherComIds.add(k)); } } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); Map socialComColumns = new HashMap<>(); Map fundComColumns = new HashMap<>(); Map otherComColumns = new HashMap<>(); if (welBaseDiffSign) { socailIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "socialPerBase"); } }); fundIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "fundPerBase"); } }); otherIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "个人"), social + "otherPerBase"); } }); socailComIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "socialComBase"); } }); fundComIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "fundComBase"); } }); otherComIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherComColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数") + SalaryI18nUtil.getI18nLabel( 0, "单位"), social + "otherComBase"); } }); } else { socailIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel(0, "申报基数"), social + "socialBase"); } }); fundIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "fundBase"); } }); otherIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 0, "申报基数"), social + "otherBase"); } }); } // map根据value排序 LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); if (welBaseDiffSign) { LinkedHashMap socialComMapWithAscKey = socialComColumns.entrySet().stream() .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap fundComMapWithAscKey = fundComColumns.entrySet().stream() .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap otherComMapWithAscKey = otherComColumns.entrySet().stream() .sorted(Map.Entry.comparingByKey()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); socialColumnsWithAscValue.putAll(socialComMapWithAscKey); fundColumnsWithAscValue.putAll(fundComMapWithAscKey); otherColumnsWithAscValue.putAll(otherComMapWithAscKey); } result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } private Map> buildPersonalTitle(List pos, Map categoryIdNameMap, Long employeeId, String tenantKey) { Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); Map> result = new HashMap<>(); pos.stream().forEach(item -> { if (StringUtils.isNotBlank(item.getSocialPerJson())) { Map socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap().getClass()); if(socialJson!=null){ socialJson.forEach((k, v) -> { socailIds.add(k); }); } } if (StringUtils.isNotBlank(item.getFundPerJson())) { Map fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap().getClass()); if(fundJson!=null){ fundJson.forEach((k, v) -> { fundIds.add(k); }); } } if (StringUtils.isNotBlank(item.getOtherPerJson())) { Map otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap().getClass()); if(otherJson!=null){ otherJson.forEach((k, v) -> { otherIds.add(k); }); } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); socailIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"), social + "socialPer"); } }); fundIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"), social + "fundPer"); } }); otherIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 87159, "个人"), social + "otherPer"); } }); // map根据value排序 LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } private Map> buildComTitle(List pos, Map categoryIdNameMap, Long employeeId, String tenantKey) { Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); Map> result = new HashMap<>(); pos.stream().forEach(item -> { if (StringUtils.isNotBlank(item.getSocialComJson())) { Map socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap().getClass()); if(socialJson!=null){ socialJson.forEach((k, v) -> { socailIds.add(k); }); } } if (StringUtils.isNotBlank(item.getFundComJson())) { Map fundJson = JSON.parseObject(item.getFundComJson(), new HashMap().getClass()); if(fundJson!=null){ fundJson.forEach((k, v) -> { fundIds.add(k); }); } } if (StringUtils.isNotBlank(item.getOtherComJson())) { Map otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap().getClass()); if(otherJson!=null){ otherJson.forEach((k, v) -> { otherIds.add(k); }); } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); socailIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"), social + "socialCom"); } }); fundIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"), social + "fundCom"); } }); otherIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100289, "单位"), social + "otherCom"); } }); // map根据value排序 LinkedHashMap socialColumnsWithAscValue = socialColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap fundColumnsWithAscValue = fundColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); LinkedHashMap otherColumnsWithAscValue = otherColumns.entrySet().stream() .sorted(Map.Entry.comparingByValue()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue, LinkedHashMap::new)); result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumnsWithAscValue); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumnsWithAscValue); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumnsWithAscValue); return result; } @Override public List buildCommonColumns(List pos) { return null; } @Override public List buildInspectColumns(List pos, Long paymentOrganization) { List list = new ArrayList<>(); List employeeIds = pos.stream().map(InsuranceAccountInspectPO::getEmployeeId).collect(Collectors.toList()); // Map insuranceArchivesAccountPOMap = siArchivesBiz.buildBatchAccount(employeeIds, paymentOrganization); Map insuranceArchivesAccountPOMap = getSIArchivesService(user).buildBatchAccount(employeeIds, paymentOrganization); Map categoryIdNameMap = getICategoryMapper().listAll().stream().collect(Collectors.toMap(ICategoryPO -> String.valueOf(ICategoryPO.getId()), ICategoryPO::getInsuranceName)); Map> columns = buildInspectTableTitle(new ArrayList<>(insuranceArchivesAccountPOMap.values()), categoryIdNameMap); WeaTableColumn weaTableNameColumn = new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName"); weaTableNameColumn.setFixed("left"); WeaTableColumn idColumn = new WeaTableColumn("150px", "id", "id"); idColumn.setIsPrimarykey(WeaBoolAttr.TRUE); idColumn.setDisplay(WeaBoolAttr.FALSE); list.add(idColumn); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 86185, "部门"), "department")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86186, "手机号"), "mobile")); list.add(new WeaTableColumn("150px", SalaryI18nUtil.getI18nLabel(86187, "员工状态"), "employeeStatus")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100544, "缴纳情况"), "supplementaryMonth")); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91323, "社保方案名称"), "socialSchemeName")); //组装社保基数 columns.get(WelfareTypeEnum.SOCIAL_SECURITY.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91485, "公积金方案名称"), "fundSchemeName")); //组装公积金基数 columns.get(WelfareTypeEnum.ACCUMULATION_FUND.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91496, "其他福利方案名称"), "otherSchemeName")); columns.get(WelfareTypeEnum.OTHER.getValue()).forEach((k, v) -> { list.add(new WeaTableColumn("150px",k, v)); }); return list; } private Map> buildInspectTableTitle(List pos, Map categoryIdNameMap ) { Set socailIds = new HashSet<>(); Set fundIds = new HashSet<>(); Set otherIds = new HashSet<>(); Map> result = new HashMap<>(); pos.stream().forEach(item -> { InsuranceArchivesSocialSchemePO social = item.getSocial(); if (social != null && StringUtils.isNotBlank(social.getSocialPaymentBaseString())) { Map socialJson = JSON.parseObject(social.getSocialPaymentBaseString(), new HashMap().getClass()); if(socialJson!=null){ socialJson.forEach((k, v) -> { socailIds.add(k); }); } } InsuranceArchivesFundSchemePO fund = item.getFund(); if (fund != null && StringUtils.isNotBlank(fund.getFundPaymentBaseString())) { Map fundJson = JSON.parseObject(fund.getFundPaymentBaseString(), new HashMap().getClass()); if(fundJson!=null){ fundJson.forEach((k, v) -> { fundIds.add(k); }); } } InsuranceArchivesOtherSchemePO other = item.getOther(); if (other != null && StringUtils.isNotBlank(other.getOtherPaymentBaseString())) { Map otherJson = JSON.parseObject(other.getOtherPaymentBaseString(), new HashMap().getClass()); if(otherJson!=null){ otherJson.forEach((k, v) -> { otherIds.add(k); }); } } }); Map socialColumns = new HashMap<>(); Map fundColumns = new HashMap<>(); Map otherColumns = new HashMap<>(); socailIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { socialColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "socialBase"); } }); fundIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { fundColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "fundBase"); } }); otherIds.stream().forEach(social -> { if (categoryIdNameMap.containsKey(social)) { otherColumns.put(categoryIdNameMap.get(social) + SalaryI18nUtil.getI18nLabel( 100293, "申报基数"), social + "otherBase"); } }); result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns); result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns); result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns); return result; } @Override public List buildCompensationColumns() { List list = new ArrayList<>(); WeaTableColumn weaTableNameColumn = new WeaTableColumn("300px",SalaryI18nUtil.getI18nLabel( 87000, "调差对象"), "target"); weaTableNameColumn.setFixed("left"); list.add(weaTableNameColumn); list.add(new WeaTableColumn("100px",SalaryI18nUtil.getI18nLabel( 87001, "统计调差福利"), "welfareType")); list.add(new WeaTableColumn("200px",SalaryI18nUtil.getI18nLabel( 87001, "统计调差福利类型(单位)"), "categoryType")); list.add(new WeaTableColumn("200px",SalaryI18nUtil.getI18nLabel( 87002, "国家核算金额(单位)"), "countryTotal")); list.add(new WeaTableColumn("200px",SalaryI18nUtil.getI18nLabel( 87003, "公司核算金额(单位)"), "companyTotal")); list.add(new WeaTableColumn("100px",SalaryI18nUtil.getI18nLabel( 87004, "应调差金额"), "adjustmentTotal")); list.add(new WeaTableColumn("200px",SalaryI18nUtil.getI18nLabel( 87005, "调差到(单位)"), "adjustTo")); return list; } }