weaver-hrm-salary/src/com/engine/salary/service/impl/SIExportServiceImpl.java

477 lines
26 KiB
Java
Raw Normal View History

2022-04-18 20:24:43 +08:00
package com.engine.salary.service.impl;
import com.alibaba.fastjson.JSON;
import com.cloudstore.eccom.pc.table.WeaTableColumn;
import com.engine.core.impl.Service;
import com.engine.salary.biz.SIAccountBiz;
import com.engine.salary.entity.siaccount.dto.InsuranceAccountViewListDTO;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
import com.engine.salary.entity.sicategory.po.ICategoryPO;
import com.engine.salary.entity.siexport.param.InsuranceExportParam;
import com.engine.salary.entity.siexport.po.AccountExportPO;
import com.engine.salary.entity.taxrate.TaxAgent;
import com.engine.salary.enums.siaccount.BillStatusEnum;
import com.engine.salary.enums.siaccount.PaymentStatusEnum;
import com.engine.salary.enums.siaccount.ResourceFromEnum;
import com.engine.salary.enums.sicategory.DataTypeEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.mapper.InsuranceExportMapper;
import com.engine.salary.mapper.TaxAgentMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
import com.engine.salary.mapper.sicategory.ICategoryMapper;
import com.engine.salary.service.SIExportService;
import com.engine.salary.service.SISchemeService;
import com.engine.salary.util.SalaryAssert;
import com.engine.salary.util.SalaryEnumUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import com.engine.salary.util.excel.ExcelUtil;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import weaver.hrm.User;
import com.engine.common.util.ServiceUtil;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
2022-04-21 15:04:35 +08:00
import static com.engine.salary.enums.UserStatusEnum.getDefaultLabelByValue;
2022-04-18 20:24:43 +08:00
/**
* @Author weaver_cl
* @Description: TODO
* @Date 2022/4/18
* @Version V1.0
**/
public class SIExportServiceImpl extends Service implements SIExportService {
private SIAccountBiz siAccountBiz = new SIAccountBiz();
private SISchemeService getSISchemeService(User user) {
return ServiceUtil.getService(SISchemeServiceImpl.class,user);
}
@Override
public XSSFWorkbook exportOverView(InsuranceExportParam queryParam) {
List<InsuranceAccountDetailPO> insuranceAccountDetailPOS = MapperProxyFactory.getProxy(InsuranceAccountDetailMapper.class).selectList(queryParam.getBillMonth());
//获取扣缴义务人信息
List<TaxAgent> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel( 100341, "该租户无扣缴义务人"));
Map<Long, TaxAgent> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgent::getId, Function.identity()));
List<InsuranceAccountViewListDTO> insuranceAccountViewListDTOS = siAccountBiz.buildRecords(insuranceAccountDetailPOS, paymentMap);
List<List<Object>> excelSheetData = new ArrayList<>();
// 1.工作簿名称
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "社保福利档案");
// 2.表头
String[] header = {
SalaryI18nUtil.getI18nLabel( 93270, "缴纳组织"),
SalaryI18nUtil.getI18nLabel( 93272, "社保人数"),
SalaryI18nUtil.getI18nLabel( 93273, "公积金人数"),
SalaryI18nUtil.getI18nLabel( 93274, "其他福利人数"),
SalaryI18nUtil.getI18nLabel( 93275, "社保缴费合计"),
SalaryI18nUtil.getI18nLabel( 93276, "公积金缴费合计"),
SalaryI18nUtil.getI18nLabel( 93277, "其他福利缴费合计"),
SalaryI18nUtil.getI18nLabel( 93278, "合计")};
2022-04-21 15:04:35 +08:00
excelSheetData.add(Arrays.asList(header));
2022-04-18 20:24:43 +08:00
//工作簿数据
List<List<Object>> rows = new LinkedList<>();
for (InsuranceAccountViewListDTO dto : insuranceAccountViewListDTOS) {
List<Object> row = new LinkedList<>();
row.add(dto.getPayOrg());
row.add(dto.getSocialNum());
row.add(dto.getFundNum());
row.add(dto.getOtherNum());
row.add(dto.getSocialPaySum());
row.add(dto.getFundPaySum());
row.add(dto.getOtherPaySum());
row.add(dto.getSum());
rows.add(row);
}
excelSheetData.addAll(rows);
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
}
@Override
public XSSFWorkbook exportAccount(Integer paymentStatus, InsuranceExportParam param) {
List<AccountExportPO> accountExportPOS = MapperProxyFactory.getProxy(InsuranceExportMapper.class).exportAccount(paymentStatus, param.getBillMonth());
List<WeaTableColumn> columns = new ArrayList<>();
List<Map<String, Object>> records = new ArrayList<>();
if (PaymentStatusEnum.COMMON.getValue() == paymentStatus) {
columns = buildCommonColumns(accountExportPOS, false);
}
if (PaymentStatusEnum.REPAIR.getValue() == paymentStatus) {
columns = buildCommonColumns(accountExportPOS, true);
}
records = buildCommonRecords(accountExportPOS);
List<List<Object>> excelSheetData = new ArrayList<>();
//工作簿名称
String sheetName = SalaryI18nUtil.getI18nLabel(85368, "社保福利档案"); //表头
2022-04-21 15:04:35 +08:00
excelSheetData.add(Arrays.asList(columns.stream().map(WeaTableColumn::getText).toArray(String[]::new)));
2022-04-18 20:24:43 +08:00
//工作簿数据
List<List<Object>> rows = new LinkedList<>();
for (Map<String, Object> recordData : records) {
List<Object> row = new LinkedList<>();
for (WeaTableColumn column : columns) {
row.add(recordData.get(column.getColumn()));
}
rows.add(row);
}
excelSheetData.addAll(rows);
return ExcelUtil.genWorkbookV2(excelSheetData, sheetName);
}
private List<Map<String, Object>> buildCommonRecords(List<AccountExportPO> list) {
List<Map<String, Object>> result = new ArrayList<>();
List<TaxAgent> paymentList = MapperProxyFactory.getProxy(TaxAgentMapper.class).listAll();
SalaryAssert.notEmpty(paymentList, SalaryI18nUtil.getI18nLabel( 100341, "该租户无扣缴义务人"));
Map<Long, String> schemeIdNameMap = getSISchemeService(user).getSchemeIdNameMap();
Map<Long, TaxAgent> paymentMap = paymentList.stream().collect(Collectors.toMap(TaxAgent::getId, Function.identity()));
list.forEach(item -> {
Map<String, Object> record = new HashMap<>();
record.put("billMonth", item.getBillMonth());
record.put("billStatus", SalaryEnumUtil.enumMatchByValue(item.getBillStatus(), BillStatusEnum.values(), BillStatusEnum.class));
record.put("userName", item.getUserName());
record.put("department", item.getDepartmentName());
record.put("supplementaryMonth", item.getSupplementaryMonth());
record.put("mobile", item.getTelephone());
2022-04-21 15:04:35 +08:00
record.put("employeeStatus", item.getUserStatus() == null ? "" : getDefaultLabelByValue(item.getUserStatus()));
2022-04-18 20:24:43 +08:00
ResourceFromEnum from = SalaryEnumUtil.enumMatchByValue(item.getResourceFrom(), ResourceFromEnum.values(), ResourceFromEnum.class);
record.put("sourceFrom", SalaryI18nUtil.getI18nLabel( from.getLabelId(), from.getDefaultLabel()));
record.put("socialPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
record.put("socialAccount", item.getSocialAccount());
record.put("socialSchemeName", schemeIdNameMap.get(item.getSocialSchemeId()));
if (StringUtils.isNotEmpty(item.getSocialPaymentBaseString())) {
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, Object>().getClass());
socialJson.forEach((k, v) -> {
record.put(k + "socialBase", v);
});
}
record.put("fundPayOrg", paymentMap.get(item.getSocialPayOrg()) == null ? "" : paymentMap.get(item.getSocialPayOrg()).getName());
record.put("fundAccount", item.getFundAccount());
record.put("fundSchemeName", schemeIdNameMap.get(item.getFundSchemeId()));
record.put("supplementFundAccount", item.getSupplementFundAccount());
if (StringUtils.isNotEmpty(item.getFundPaymentBaseString())) {
Map<String, Object> socialJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, Object>().getClass());
socialJson.forEach((k, v) -> {
record.put(k + "fundBase", v);
});
}
record.put("otherPayOrg", paymentMap.get(item.getOtherPayOrg()) == null ? "" : paymentMap.get(item.getOtherPayOrg()).getName());
record.put("otherSchemeName", schemeIdNameMap.get(item.getOtherSchemeId()));
if (StringUtils.isNotEmpty(item.getOtherPaymentBaseString())) {
Map<String, Object> socialJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, Object>().getClass());
socialJson.forEach((k, v) -> {
record.put(k + "otherBase", v);
});
}
if (StringUtils.isNotEmpty(item.getSocialPerJson())) {
Map<String, Object> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, Object>().getClass());
socialJson.forEach((k, v) -> {
record.put(k + "socialPer", v);
});
}
record.put("socialPerSum", item.getSocialPerSum());
if (StringUtils.isNotEmpty(item.getFundPerJson())) {
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, Object>().getClass());
fundPerJson.forEach((k, v) -> {
record.put(k + "fundPer", v);
});
}
record.put("fundPerSum", item.getFundPerSum());
if (StringUtils.isNotEmpty(item.getOtherPerJson())) {
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, Object>().getClass());
fundPerJson.forEach((k, v) -> {
record.put(k + "otherPer", v);
});
}
record.put("otherPerSum", item.getOtherPerSum());
record.put("perSum", item.getPerSum());
if (StringUtils.isNotEmpty(item.getSocialComJson())) {
Map<String, Object> fundPerJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, Object>().getClass());
fundPerJson.forEach((k, v) -> {
record.put(k + "socialCom", v);
});
}
record.put("socialComSum", item.getSocialComSum());
if (StringUtils.isNotEmpty(item.getFundComJson())) {
Map<String, Object> fundPerJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, Object>().getClass());
fundPerJson.forEach((k, v) -> {
record.put(k + "fundCom", v);
});
}
record.put("fundComSum", item.getFundComSum());
if (StringUtils.isNotEmpty(item.getOtherPerJson())) {
Map<String, Object> fundPerJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, Object>().getClass());
fundPerJson.forEach((k, v) -> {
record.put(k + "otherCom", v);
});
}
record.put("otherComSum", item.getOtherComSum());
record.put("comSum", item.getComSum());
record.put("socialSum", item.getSocialSum());
record.put("fundSum", item.getFundSum());
record.put("otherSum", item.getOtherSum());
record.put("total", item.getTotal());
result.add(record);
});
return result;
}
private Map<Integer, Map<String, String>> buildComTitle(List<AccountExportPO> pos, Map<String, String> categoryIdNameMap) {
Set<String> socailIds = new HashSet<>();
Set<String> fundIds = new HashSet<>();
Set<String> otherIds = new HashSet<>();
Map<Integer, Map<String, String>> result = new HashMap<>();
pos.stream().forEach(item -> {
if (StringUtils.isNotBlank(item.getSocialComJson())) {
Map<String, String> socialJson = JSON.parseObject(item.getSocialComJson(), new HashMap<String, String>().getClass());
socialJson.forEach((k, v) -> {
socailIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getFundComJson())) {
Map<String, String> fundJson = JSON.parseObject(item.getFundComJson(), new HashMap<String, String>().getClass());
fundJson.forEach((k, v) -> {
fundIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getOtherComJson())) {
Map<String, String> otherJson = JSON.parseObject(item.getOtherComJson(), new HashMap<String, String>().getClass());
otherJson.forEach((k, v) -> {
otherIds.add(k);
});
}
});
Map<String, String> socialColumns = new HashMap<>();
Map<String, String> fundColumns = new HashMap<>();
Map<String, String> 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");
}
});
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns);
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns);
result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns);
return result;
}
private Map<Integer, Map<String, String>> buildPersonalTitle(List<AccountExportPO> pos, Map<String, String> categoryIdNameMap) {
Set<String> socailIds = new HashSet<>();
Set<String> fundIds = new HashSet<>();
Set<String> otherIds = new HashSet<>();
Map<Integer, Map<String, String>> result = new HashMap<>();
pos.stream().forEach(item -> {
if (StringUtils.isNotBlank(item.getSocialPerJson())) {
Map<String, String> socialJson = JSON.parseObject(item.getSocialPerJson(), new HashMap<String, String>().getClass());
socialJson.forEach((k, v) -> {
socailIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getFundPerJson())) {
Map<String, String> fundJson = JSON.parseObject(item.getFundPerJson(), new HashMap<String, String>().getClass());
fundJson.forEach((k, v) -> {
fundIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getOtherPerJson())) {
Map<String, String> otherJson = JSON.parseObject(item.getOtherPerJson(), new HashMap<String, String>().getClass());
otherJson.forEach((k, v) -> {
otherIds.add(k);
});
}
});
Map<String, String> socialColumns = new HashMap<>();
Map<String, String> fundColumns = new HashMap<>();
Map<String, String> 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");
}
});
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialColumns);
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundColumns);
result.put(WelfareTypeEnum.OTHER.getValue(), otherColumns);
return result;
}
private List<WeaTableColumn> buildCommonColumns(List<AccountExportPO> pos, boolean flag) {
List<WeaTableColumn> list = new ArrayList<>();
Map<String, String> categoryIdNameMap = categoryIdNameMap();
Map<Integer, Map<String, String>> columns = buildPaymentTitle(pos, categoryIdNameMap);
Map<Integer, Map<String, String>> personColumns = buildPersonalTitle(pos, categoryIdNameMap);
Map<Integer, Map<String, String>> comColumns = buildComTitle(pos, categoryIdNameMap);
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 85429, "姓名"), "userName"));
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( 100377, "数据来源"), "sourceFrom"));
if (flag) {
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 100379, "补缴月份"), "supplementaryMonth"));
}
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91325, "社保缴纳组织"), "socialPayOrg"));
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));
});
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91488, "公积金缴纳组织"), "fundPayOrg"));
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));
});
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91487, "补充公积金账号"), "supplementFundAccount"));
list.add(new WeaTableColumn("150px",SalaryI18nUtil.getI18nLabel( 91497, "其他福利缴纳组织"), "otherPayOrg"));
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, "其他福利单位合计"), "fundComSum"));
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<String, String> categoryIdNameMap() {
//系统福利类型
Map<Long, String> systemMap = MapperProxyFactory.getProxy(ICategoryMapper.class).listByDataType(DataTypeEnum.SYSTEM.getValue()).stream()
.collect(Collectors.toMap(ICategoryPO::getId, ICategoryPO::getInsuranceName));
Map<Long, String> customMap = MapperProxyFactory.getProxy(ICategoryMapper.class).listAll()
.stream().collect(Collectors.toMap(ICategoryPO::getId, ICategoryPO::getInsuranceName));
HashMap<Long, String> total = new HashMap<>();
if (MapUtils.isNotEmpty(systemMap)) {
total.putAll(systemMap);
}
if (MapUtils.isNotEmpty(customMap)) {
total.putAll(customMap);
}
HashMap<String, String> result = new HashMap<>();
total.forEach((k, v) -> {
result.put(String.valueOf(k), v);
});
return result;
}
private Map<Integer, Map<String, String>> buildPaymentTitle(List<AccountExportPO> pos, Map<String, String> categoryIdNameMap) {
Set<String> socailIds = new HashSet<>();
Set<String> fundIds = new HashSet<>();
Set<String> otherIds = new HashSet<>();
Map<Integer, Map<String, String>> result = new HashMap<>();
pos.stream().forEach(item -> {
if (StringUtils.isNotBlank(item.getSocialPaymentBaseString())) {
Map<String, String> socialJson = JSON.parseObject(item.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
socialJson.forEach((k, v) -> {
socailIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getFundPaymentBaseString())) {
Map<String, String> fundJson = JSON.parseObject(item.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
fundJson.forEach((k, v) -> {
fundIds.add(k);
});
}
if (StringUtils.isNotBlank(item.getOtherPaymentBaseString())) {
Map<String, String> otherJson = JSON.parseObject(item.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
otherJson.forEach((k, v) -> {
otherIds.add(k);
});
}
});
Map<String, String> socialColumns = new HashMap<>();
Map<String, String> fundColumns = new HashMap<>();
Map<String, String> 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;
}
}