From 6de4a4f2414ff3e7da50fa40ce25015573d399d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=B1=E6=B6=9B?= <15850646081@163.com> Date: Tue, 3 Feb 2026 15:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D=E7=A9=BA?= =?UTF-8?q?=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIRepairServiceImpl.java | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java index bb24354e2..79ae11524 100644 --- a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java @@ -387,11 +387,15 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { && (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) { if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); - socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + if(socialMap!=null){ + socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } Map socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); - socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + if(socialComMap!=null){ + socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey()) || "9002".equals(e.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } List socialIds = new ArrayList<>(); socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialMap.keySet()); @@ -434,12 +438,16 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { && (!projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) { if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); - socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + if (socialMap != null) { + socialMap = socialMap.entrySet().stream().filter(e -> "9001".equals(e.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } Map socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); - socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + if (socialComMap != null) { + socialComMap = socialComMap.entrySet().stream().filter(e -> "9001".equals(e.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } List socialIds = new ArrayList<>(); socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); socialIds.addAll(socialComMap == null ? Collections.emptyList() :socialComMap.keySet()); @@ -482,8 +490,10 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { && (projects.contains(ProjectTypeEnum.MEDICAL_INSURANCE.getValue()))) { if (socialSchemePO != null && (StringUtils.isNotBlank(socialSchemePO.getSocialPaymentBaseString()) || StringUtils.isNotBlank(socialSchemePO.getSocialPaymentComBaseString()))) { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); - socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey())) - .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + if(socialMap!=null){ + socialMap = socialMap.entrySet().stream().filter(e -> "9002".equals(e.getKey())) + .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); + } Map socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); if(socialComMap !=null){ socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey()))