From 56bb9a5af385258cb23e18f3ca7cf796d30714e6 Mon Sep 17 00:00:00 2001 From: sy Date: Tue, 23 Jan 2024 15:08:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E9=85=AC=E7=B3=BB=E7=BB=9F-=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E6=A1=A3=E6=A1=88=EF=BC=8C=E7=BC=96=E8=BE=91=E9=A1=B5?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E8=BF=94=E5=9B=9E=E7=BC=96=E8=BE=91=E6=A1=86?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E5=8F=82=E6=95=B0=E7=BC=BA=E5=A4=B1=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/engine/salary/biz/SIArchivesBiz.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) 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());