薪酬系统-福利档案,导出功能,根据区分个人和公司福利基数逻辑改造
This commit is contained in:
parent
1287a97fe5
commit
bb1b785f55
|
|
@ -1520,26 +1520,22 @@ public class SIArchivesBiz {
|
|||
|
||||
socialCollect.putAll(customSocial);
|
||||
socialCollect.putAll(sysSocial);
|
||||
// socialSet.forEach(item -> {
|
||||
// if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
// socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
// }
|
||||
// });
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人");
|
||||
socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
socialComSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位");
|
||||
socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1550,26 +1546,21 @@ public class SIArchivesBiz {
|
|||
Map<Long, ICategoryPO> sysFund = iCategoryMapper.listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
fundCollect.putAll(customFund);
|
||||
fundCollect.putAll(sysFund);
|
||||
// fundSet.forEach(item -> {
|
||||
// if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
// fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
// }
|
||||
// });
|
||||
if (welBaseDiffSign) {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人");
|
||||
fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
fundComSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位");
|
||||
fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1580,26 +1571,22 @@ public class SIArchivesBiz {
|
|||
Map<Long, ICategoryPO> sysOther = iCategoryMapper.listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
otherCollect.putAll(customOther);
|
||||
otherCollect.putAll(sysOther);
|
||||
// otherSet.forEach(item -> {
|
||||
// if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
// otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
// }
|
||||
// });
|
||||
|
||||
if (welBaseDiffSign) {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "个人");
|
||||
otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
otherComSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数" + "单位");
|
||||
otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + "申报基数");
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import com.engine.salary.util.db.MapperProxyFactory;
|
|||
import com.engine.salary.util.excel.ExcelParseHelper;
|
||||
import com.engine.salary.util.excel.ExcelSupport;
|
||||
import com.engine.salary.util.excel.ExcelUtil;
|
||||
import com.engine.salary.util.excel.ExcelUtilPlus;
|
||||
import com.engine.salary.util.page.PageInfo;
|
||||
import com.engine.salary.util.page.SalaryPageUtil;
|
||||
import com.engine.salary.util.valid.ValidUtil;
|
||||
|
|
@ -261,6 +262,7 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
@Override
|
||||
public List<Map<String, Object>> buildTableData(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
List<Map<String, Object>> records = new ArrayList<>();
|
||||
List<TaxAgentPO> taxAgentPOS = getTaxAgentMapper().listAll();
|
||||
Map<Long, TaxAgentPO> longTaxAgentPOMap = SalaryEntityUtil.convert2Map(taxAgentPOS, TaxAgentPO::getId);
|
||||
|
|
@ -286,9 +288,6 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
Map<String, InsuranceArchivesFundSchemePO> fundSchemePOMap = SalaryEntityUtil.convert2Map(fundList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId());
|
||||
Map<String, InsuranceArchivesOtherSchemePO> otherSchemePOMap = SalaryEntityUtil.convert2Map(otherList, k -> k.getPaymentOrganization() + "-" + k.getEmployeeId());
|
||||
|
||||
// Map<Long, InsuranceArchivesSocialSchemePO> socialSchemePOMap = socialList.stream().collect(Collectors.toMap(InsuranceArchivesSocialSchemePO::getEmployeeId, Function.identity()));
|
||||
// Map<Long, InsuranceArchivesFundSchemePO> fundSchemePOMap = fundList.stream().collect(Collectors.toMap(InsuranceArchivesFundSchemePO::getEmployeeId, Function.identity()));
|
||||
// Map<Long, InsuranceArchivesOtherSchemePO> otherSchemePOMap = otherList.stream().collect(Collectors.toMap(InsuranceArchivesOtherSchemePO::getEmployeeId, Function.identity()));
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
InsuranceArchivesSocialSchemePO socialItem = socialSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
InsuranceArchivesFundSchemePO fundItem = fundSchemePOMap.get(item.getPaymentOrganization() + "-" + item.getEmployeeId());
|
||||
|
|
@ -307,15 +306,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("socialName", getSiSchemeService().querySchemeName(socialItem.getSocialSchemeId()));
|
||||
Map<String, Object> socialJson = JSON.parseObject(socialItem.getSocialPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(), PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(socialJson);
|
||||
if (socialComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(socialItem.getSocialSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
socialComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (socialJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(socialItem.getSocialSchemeId());
|
||||
socialJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("socialAccount", socialItem.getSocialAccount());
|
||||
map.put("socialStartTime", socialItem.getSocialStartTime());
|
||||
|
|
@ -326,15 +347,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("fundAccount", fundItem.getFundAccount());
|
||||
Map<String, Object> fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(fundJson);
|
||||
if (fundComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(fundItem.getFundSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
fundComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (fundJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(fundItem.getFundSchemeId());
|
||||
fundJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("supplementFundAccount", fundItem.getSupplementFundAccount());
|
||||
map.put("fundStartTime", fundItem.getFundStartTime());
|
||||
|
|
@ -345,15 +388,37 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
map.put("otherName", getSiSchemeService().querySchemeName(otherItem.getOtherSchemeId()));
|
||||
Map<String, Object> otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
if (welBaseDiffSign) {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_PERSON.getValue());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "per", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
// map.putAll(otherJson);
|
||||
if (otherComJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = siArchivesBiz.payInsuranceIds(otherItem.getOtherSchemeId(),PaymentScopeEnum.SCOPE_COMPANY.getValue());
|
||||
otherComJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k + "com", v);
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
if (otherJson != null) {
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
List<Long> insuranceIdList = payInsuranceIds(otherItem.getOtherSchemeId());
|
||||
otherJson.forEach((k, v) -> {
|
||||
if (insuranceIdList.contains(Long.valueOf(k))) {
|
||||
map.put(k, v);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
map.put("otherStartTime", otherItem.getOtherStartTime());
|
||||
map.put("otherEndTime", otherItem.getOtherEndTime());
|
||||
|
|
@ -422,11 +487,11 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
|
||||
//工作簿数据
|
||||
List<List<String>> rows = new LinkedList<>();
|
||||
List<String> collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList());
|
||||
List<List<Object>> rows = new LinkedList<>();
|
||||
List<Object> collect = columns.stream().map(WeaTableColumn::getText).collect(Collectors.toList());
|
||||
rows.add(collect);
|
||||
for (Map<String, Object> recordData : records) {
|
||||
List<String> row = new LinkedList<>();
|
||||
List<Object> row = new LinkedList<>();
|
||||
for (WeaTableColumn column : columns) {
|
||||
try {
|
||||
Object o = recordData.get(column.getColumn());
|
||||
|
|
@ -437,20 +502,8 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
}
|
||||
rows.add(row);
|
||||
}
|
||||
// return salaryBatchService.simpleExportExcel(ExportExcelInfo.builder()
|
||||
// .bizId(exportMap.get("biz"))
|
||||
// .flag(true)
|
||||
// .userId(employeeId)
|
||||
// .eteamsId(eteamsId)
|
||||
// .tenantKey(tenantKey)
|
||||
// .operator(operator)
|
||||
// .module(exportMap.get("module"))
|
||||
// .fileName(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 94629, "社保福利档案") + SalaryDateUtil.getFormatLocalDateTime(LocalDateTime.now()))
|
||||
// .handlerName("insuranceArchivesExportHandler")
|
||||
// .dataType(SalaryI18nUtil.getI18nLabel(tenantKey, employeeId, 99915, "档案"))
|
||||
// .function(exportMap.get("function")).build(), sheetList);
|
||||
//获取excel
|
||||
return ExcelUtil.genWorkbook(rows, sheetName);
|
||||
return ExcelUtilPlus.genWorkbookV2(rows, sheetName);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -532,10 +585,17 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
|
||||
|
||||
public Map<Integer, Map<String, String>> buildColumnTitle(List<InsuranceArchivesEmployeePO> insuranceArchivesEmployeePOS, Long employeeId) {
|
||||
boolean welBaseDiffSign = siArchivesBiz.isDiffWelBase();
|
||||
|
||||
Map<Integer, Map<String, String>> result = new HashMap<>();
|
||||
Set<String> socialSet = new HashSet<>();
|
||||
Set<String> fundSet = new HashSet<>();
|
||||
Set<String> otherSet = new HashSet<>();
|
||||
|
||||
Set<String> socialComSet = new HashSet<>();
|
||||
Set<String> fundComSet = new HashSet<>();
|
||||
Set<String> otherComSet = new HashSet<>();
|
||||
|
||||
insuranceArchivesEmployeePOS.forEach(item -> {
|
||||
List<InsuranceArchivesSocialSchemePO> socialByEmployeeId = siArchivesBiz.getSocialByEmployeeIds(new ArrayList<Long>() {{
|
||||
add(item.getEmployeeId());
|
||||
|
|
@ -571,6 +631,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (socialJson != null) {
|
||||
socialJson.forEach((k, v) -> socialSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> socialComJson = JSON.parseObject(socialItem.getSocialPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (socialComJson != null) {
|
||||
socialComJson.forEach((k, v) -> socialComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (fundItem != null) {
|
||||
Map<String, Object> fundJson = JSON.parseObject(fundItem.getFundPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -578,6 +646,14 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (fundJson != null) {
|
||||
fundJson.forEach((k, v) -> fundSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> fundComJson = JSON.parseObject(fundItem.getFundPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (fundComJson != null) {
|
||||
fundComJson.forEach((k, v) -> fundComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (otherItem != null) {
|
||||
Map<String, Object> otherJson = JSON.parseObject(otherItem.getOtherPaymentBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
|
|
@ -585,42 +661,92 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
if (otherJson != null) {
|
||||
otherJson.forEach((k, v) -> otherSet.add(k));
|
||||
}
|
||||
//如果需要区分个人和公司福利基数
|
||||
if (welBaseDiffSign) {
|
||||
Map<String, Object> otherComJson = JSON.parseObject(otherItem.getOtherPaymentComBaseString(), new TypeReference<Map<String, Object>>() {
|
||||
});
|
||||
if (otherComJson != null) {
|
||||
otherComJson.forEach((k, v) -> otherComSet.add(k));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
Map<String, String> socialMap = new HashMap<>();
|
||||
Map<String, String> socialComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> socialCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
|
||||
Map<Long, ICategoryPO> sysSocial = getICategoryMapper().listByWelfareType(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
socialCollect.putAll(customSocial);
|
||||
socialCollect.putAll(sysSocial);
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item + "per", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
socialComSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialComMap.put(item + "com", socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
socialSet.forEach(item -> {
|
||||
if (socialCollect.containsKey(Long.valueOf(item))) {
|
||||
socialMap.put(item, socialCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> fundMap = new HashMap<>();
|
||||
Map<String, String> fundComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> fundCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysFund = getICategoryMapper().listByWelfareType(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
fundCollect.putAll(customFund);
|
||||
fundCollect.putAll(sysFund);
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item + "per", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
fundComSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundComMap.put(item + "com", fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
fundSet.forEach(item -> {
|
||||
if (fundCollect.containsKey(Long.valueOf(item))) {
|
||||
fundMap.put(item, fundCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, String> otherMap = new HashMap<>();
|
||||
Map<String, String> otherComMap = new HashMap<>();
|
||||
Map<Long, ICategoryPO> otherCollect = new HashMap<>();
|
||||
Map<Long, ICategoryPO> customOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), null).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
Map<Long, ICategoryPO> sysOther = getICategoryMapper().listByWelfareType(WelfareTypeEnum.OTHER.getValue(), DataTypeEnum.SYSTEM.getValue()).stream().collect(Collectors.toMap(ICategoryPO::getId, Function.identity()));
|
||||
otherCollect.putAll(customOther);
|
||||
otherCollect.putAll(sysOther);
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(100293, "申报基数"));
|
||||
}
|
||||
});
|
||||
if (welBaseDiffSign) {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item + "per", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"个人"));
|
||||
}
|
||||
});
|
||||
otherComSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherComMap.put(item + "com", otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数") + SalaryI18nUtil.getI18nLabel(0,"单位"));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
otherSet.forEach(item -> {
|
||||
if (otherCollect.containsKey(Long.valueOf(item))) {
|
||||
otherMap.put(item, otherCollect.get(Long.valueOf(item)).getInsuranceName() + SalaryI18nUtil.getI18nLabel(0, "申报基数"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// map根据key排序
|
||||
LinkedHashMap<String, String> socialMapWithAscKey = socialMap.entrySet().stream()
|
||||
|
|
@ -635,6 +761,23 @@ public class SISchemeServiceImpl extends Service implements SISchemeService {
|
|||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
if (welBaseDiffSign) {
|
||||
LinkedHashMap<String, String> socialComMapWithAscKey = socialComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> fundComMapWithAscKey = fundComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
LinkedHashMap<String, String> otherComMapWithAscKey = otherComMap.entrySet().stream()
|
||||
.sorted(Map.Entry.comparingByKey())
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (oldValue, newValue) -> oldValue,
|
||||
LinkedHashMap::new));
|
||||
socialMapWithAscKey.putAll(socialComMapWithAscKey);
|
||||
fundMapWithAscKey.putAll(fundComMapWithAscKey);
|
||||
otherMapWithAscKey.putAll(otherComMapWithAscKey);
|
||||
}
|
||||
|
||||
result.put(WelfareTypeEnum.SOCIAL_SECURITY.getValue(), socialMapWithAscKey);
|
||||
result.put(WelfareTypeEnum.ACCUMULATION_FUND.getValue(), fundMapWithAscKey);
|
||||
|
|
|
|||
Loading…
Reference in New Issue