优化 - 社保福利台账小数位数

This commit is contained in:
Harryxzy 2024-06-05 15:30:57 +08:00
parent 91b8809c03
commit 16f5ffcf29
4 changed files with 72 additions and 10 deletions

View File

@ -497,6 +497,7 @@
<select id="queryNormalList" resultMap="BaseResultMap">
SELECT
t.id,t.employee_id,t.social_per_json,t.social_com_json,
t.social_scheme_id,t.fund_scheme_id,t.other_scheme_id,
t.fund_per_json,t.fund_com_json,t.other_per_json,
t.other_com_json,t.social_per_sum,t.social_com_sum,
t.fund_per_sum,t.fund_com_sum,t.other_per_sum,

View File

@ -3502,6 +3502,16 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
Map<String, Object> resultMap = new HashMap<>();
// resultMap.put("data", dataMap);
// resultMap.put("items", addGroups);
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = new ArrayList<>();
List<Long> schemeIdList = new ArrayList<>();
schemeIdList.add(insuranceAccountDetailPO.getSocialSchemeId());
schemeIdList.add(insuranceAccountDetailPO.getFundSchemeId());
schemeIdList.add(insuranceAccountDetailPO.getOtherSchemeId());
schemeIdList = schemeIdList.stream().filter(schemeId -> schemeId != null).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(schemeIdList)) {
insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(schemeIdList);
}
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
List<Map<String, String>> perList = new ArrayList<>();
List<Map<String, String>> comList = new ArrayList<>();
@ -3521,6 +3531,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
map.put("insuranceName", item.getLabel());
map.put("insuranceId", insuranceId);
map.put("insuranceValue", dataMap.get(domkey[0]));
map.put("validNum", schemeValidNumMap.getOrDefault(insuranceId + "-2", 2).toString());
if (map.get("insuranceValue") != null && !"".equals(map.get("insuranceValue"))) {
perList.add(map);
@ -3534,6 +3545,7 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
map.put("insuranceName", item.getLabel());
map.put("insuranceId", insuranceId);
map.put("insuranceValue", dataMap.get(domkey[0]));
map.put("validNum", schemeValidNumMap.getOrDefault(insuranceId + "-1", 2).toString());
if (map.get("insuranceValue") != null && !"".equals(map.get("insuranceValue"))) {
comList.add(map);
@ -3562,10 +3574,15 @@ public class SIAccountServiceImpl extends Service implements SIAccountService {
}
//对比可进行缴纳福利项与上面的已有福利项生成map
for (Map<String, String> balancePayItem : balancePaymentGroup) {
Map<String, Object> target = (Map<String, Object>)targetMap.get(balancePayItem.get("insuranceId") + "-" + balancePayItem.get("paymentScope"));
if (targetMap.get(balancePayItem.get("insuranceId") + "-" + balancePayItem.get("paymentScope")) == null) {
balancePayItem.put("insuranceValue", "");
balancePayItem.put("validNum", balancePayItem.get("validNum"));
resultList.add(balancePayItem);
} else {
target.put("validNum", balancePayItem.get("validNum"));
}
}
}
}

View File

@ -4,12 +4,11 @@ import com.alibaba.fastjson.JSON;
import com.api.formmode.mybatis.util.SqlProxyHandle;
import com.engine.common.util.ServiceUtil;
import com.engine.core.impl.Service;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.config.SalaryElogConfig;
import com.engine.salary.constant.SalaryDefaultTenantConstant;
import com.engine.hrmelog.entity.dto.LoggerContext;
import com.engine.salary.encrypt.EncryptUtil;
import com.engine.salary.entity.siaccount.param.BalanceAccountBaseParam;
import com.engine.salary.entity.siaccount.param.EditAccountDetailParam;
import com.engine.salary.entity.siaccount.param.InspectAccountParam;
import com.engine.salary.entity.siaccount.po.InsuranceAccountBatchPO;
import com.engine.salary.entity.siaccount.po.InsuranceAccountDetailPO;
@ -24,7 +23,6 @@ import com.engine.salary.enums.siaccount.ResourceFromEnum;
import com.engine.salary.enums.sicategory.DeleteTypeEnum;
import com.engine.salary.enums.sicategory.IsPaymentEnum;
import com.engine.salary.enums.sicategory.PaymentScopeEnum;
import com.engine.salary.enums.sicategory.WelfareTypeEnum;
import com.engine.salary.exception.SalaryRunTimeException;
import com.engine.salary.mapper.siaccount.InsuranceAccountBatchMapper;
import com.engine.salary.mapper.siaccount.InsuranceAccountDetailMapper;
@ -39,17 +37,15 @@ import com.engine.salary.service.SIAccountService;
import com.engine.salary.service.SIBalanceService;
import com.engine.salary.util.SalaryEntityUtil;
import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.IdGenerator;
import com.engine.salary.util.db.MapperProxyFactory;
import com.google.common.collect.Lists;
import com.engine.salary.util.db.IdGenerator;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import weaver.hrm.User;
import java.math.BigDecimal;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@ -175,6 +171,8 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -187,6 +185,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -198,6 +197,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -207,6 +207,8 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
Map<String, String> fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
fundMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -219,6 +221,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -230,6 +233,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -239,6 +243,9 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
Map<String, String> otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
otherMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -251,6 +258,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -262,6 +270,7 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});

View File

@ -28,10 +28,7 @@ import com.engine.salary.util.SalaryI18nUtil;
import com.engine.salary.util.db.MapperProxyFactory;
import org.apache.commons.lang3.StringUtils;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
@ -230,6 +227,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -241,6 +240,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -251,6 +251,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -260,6 +261,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(fundSchemePO.getFundSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
fundMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -271,6 +274,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -281,6 +285,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -290,6 +295,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(otherSchemePO.getOtherSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
otherMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -301,6 +308,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -311,6 +319,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -322,6 +331,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -333,6 +344,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -343,6 +355,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -358,6 +371,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -369,6 +384,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -379,6 +395,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -394,6 +411,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -405,6 +424,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -415,6 +435,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -430,6 +451,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(socialSchemePO.getSocialSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
socialMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -441,6 +464,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -451,6 +475,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -462,6 +487,9 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(fundSchemePO.getFundSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
fundMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -473,6 +501,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -483,6 +512,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});
@ -494,6 +524,9 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
Map<String, String> otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
//查询该福利方案下开启缴纳的福利项
List<String> insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());
List<InsuranceSchemeDetailPO> insuranceSchemeDetailPOS = getInsuranceSchemeDetailMapper().listBySchemeIds(Collections.singletonList(otherSchemePO.getOtherSchemeId()));
Map<String, Integer> schemeValidNumMap = SalaryEntityUtil.convert2Map(insuranceSchemeDetailPOS, po -> po.getInsuranceId() + "-" + po.getPaymentScope(), InsuranceSchemeDetailPO::getValidNum);
otherMap.forEach((k, v) -> {
String welfareTypeName = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "社保" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "公积金" : "企业年金及其它福利" );
String welfareTypeSign = welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 1 ? "social" : (welfareTypeMap.get(Long.valueOf(k)) != null && welfareTypeMap.get(Long.valueOf(k)) == 2 ? "fund" : "other" );
@ -505,6 +538,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
comMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
comMap.put("paymentScope", "公司");
comMap.put("paymentScopeSign", "com");
comMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue(), 2).toString());
resultList.add(comMap);
}
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue())) {
@ -515,6 +549,7 @@ public class SIRepairServiceImpl extends Service implements SIRepairService {
perMap.put("insuranceName", categoryNameMap.get(Long.valueOf(k)));
perMap.put("paymentScope", "个人");
perMap.put("paymentScopeSign", "per");
perMap.put("validNum",schemeValidNumMap.getOrDefault(k + "-" + PaymentScopeEnum.SCOPE_PERSON.getValue(), 2).toString());
resultList.add(perMap);
}
});