修复社保福利台账补差添加bug
This commit is contained in:
parent
ec669c1f51
commit
9819bb25e0
|
|
@ -167,13 +167,18 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
|
||||
List<Map<String, String>> resultList = new ArrayList<>();
|
||||
|
||||
if (socialSchemePO != null && StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString())) {
|
||||
if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()) )) {
|
||||
Map<String, String> socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
Map<String, String> socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
List<String> socialIds = new ArrayList<>();
|
||||
socialIds.addAll(socialMap.keySet());
|
||||
socialIds.addAll(socialComMap.keySet());
|
||||
socialIds = socialIds.stream().distinct().collect(Collectors.toList());
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
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) -> {
|
||||
socialIds.forEach(k -> {
|
||||
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" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
|
|
@ -203,13 +208,18 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
});
|
||||
|
||||
}
|
||||
if (fundSchemePO != null && StringUtils.isNotBlank(fundSchemePO.getFundPaymentBaseString())) {
|
||||
if (fundSchemePO != null && (StringUtils.isNotBlank(fundSchemePO.getFundPaymentBaseString()) || StringUtils.isNotBlank(fundSchemePO.getFundPaymentComBaseString()))) {
|
||||
Map<String, String> fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
Map<String, String> fundComMap = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
List<String> fundIds = new ArrayList<>();
|
||||
fundIds.addAll(fundMap.keySet());
|
||||
fundIds.addAll(fundComMap.keySet());
|
||||
fundIds = fundIds.stream().distinct().collect(Collectors.toList());
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
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) -> {
|
||||
fundIds.forEach(k -> {
|
||||
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" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
|
|
@ -239,14 +249,19 @@ public class SIBalanceServiceImpl extends Service implements SIBalanceService {
|
|||
});
|
||||
|
||||
}
|
||||
if (otherSchemePO != null && StringUtils.isNotBlank(otherSchemePO.getOtherPaymentBaseString())) {
|
||||
if (otherSchemePO != null && (StringUtils.isNotBlank(otherSchemePO.getOtherPaymentBaseString()) || StringUtils.isNotBlank(otherSchemePO.getOtherPaymentComBaseString()))) {
|
||||
Map<String, String> otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap<String, String>().getClass());
|
||||
Map<String, String> otherComMap = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new HashMap<String, String>().getClass());
|
||||
List<String> otherIds = new ArrayList<>();
|
||||
otherIds.addAll(otherMap.keySet());
|
||||
otherIds.addAll(otherComMap.keySet());
|
||||
otherIds = otherIds.stream().distinct().collect(Collectors.toList());
|
||||
//查询该福利方案下开启缴纳的福利项
|
||||
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) -> {
|
||||
otherIds.forEach(k -> {
|
||||
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" );
|
||||
if (insuranceIdAndScopeList.contains(k + "-" + PaymentScopeEnum.SCOPE_COMPANY.getValue())) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue