diff --git a/src/com/engine/salary/biz/SIArchivesBiz.java b/src/com/engine/salary/biz/SIArchivesBiz.java index ff5fe4727..be722d87c 100644 --- a/src/com/engine/salary/biz/SIArchivesBiz.java +++ b/src/com/engine/salary/biz/SIArchivesBiz.java @@ -322,7 +322,7 @@ public class SIArchivesBiz { } } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -376,7 +376,7 @@ public class SIArchivesBiz { } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -429,7 +429,7 @@ public class SIArchivesBiz { } List addGroups = new ArrayList<>(); - List inputItems = buildPaymentBase(user, schemeId, welfareType); + List inputItems = buildPaymentBase(user, schemeId, welfareType, welBaseDiffSign); //如果查询结果中存在 方案中缺失福利险种的值,设置初始值 for (SearchConditionItem item : inputItems) { String insuranceId = item.getDomkey().length > 0 ? item.getDomkey()[0] : null; @@ -466,13 +466,22 @@ public class SIArchivesBiz { * @param schemeId * @return */ - public List buildPaymentBase(User user, Long schemeId, Integer welfareType) { + public List buildPaymentBase(User user, Long schemeId, Integer welfareType, boolean welBaseDiffSign) { List inputItems = new ArrayList<>(); if (schemeId == null) { return new ArrayList<>(); } List list = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_PERSON.getValue())).collect(Collectors.toList()); + if (!welBaseDiffSign) { + List perInsuranceIdList = list.stream().map(InsuranceSchemeDetailPO::getInsuranceId).collect(Collectors.toList()); + List moreComList = queryListByPrimaryIdIsPayment(schemeId, welfareType).stream() + .filter(f -> f.getPaymentScope().equals(PaymentScopeEnum.SCOPE_COMPANY.getValue()) && !perInsuranceIdList.contains(f.getInsuranceId())).collect(Collectors.toList()); + if (moreComList.size() > 0) { + list.addAll(moreComList); + } + } + SICategoryBiz siCategoryBiz = new SICategoryBiz(); list.forEach(insuranceSchemeDetail -> { ICategoryPO iCategoryPO = siCategoryBiz.getByID(insuranceSchemeDetail.getInsuranceId());