From e4071edab6b8ccfa38913c1a751fc383327889a5 Mon Sep 17 00:00:00 2001 From: Harryxzy Date: Tue, 12 Nov 2024 16:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A4=BE=E4=BF=9D=E7=A6=8F?= =?UTF-8?q?=E5=88=A9=E5=8F=B0=E8=B4=A6=E6=B7=BB=E5=8A=A0=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SIRepairServiceImpl.java | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java index 9ce45ed5a..64758d625 100644 --- a/src/com/engine/salary/service/impl/SIRepairServiceImpl.java +++ b/src/com/engine/salary/service/impl/SIRepairServiceImpl.java @@ -227,8 +227,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); Map socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); List socialIds = new ArrayList<>(); - socialIds.addAll(socialMap.keySet()); - socialIds.addAll(socialComMap.keySet()); + socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); + socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet()); socialIds = socialIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); @@ -266,8 +266,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); Map fundComMap = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new HashMap().getClass()); List fundIds = new ArrayList<>(); - fundIds.addAll(fundMap.keySet()); - fundIds.addAll(fundComMap.keySet()); + fundIds.addAll(fundMap == null ? Collections.emptyList() : fundMap.keySet()); + fundIds.addAll(fundComMap == null ? Collections.emptyList() : fundComMap.keySet()); fundIds = fundIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId()); @@ -305,8 +305,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); Map otherComMap = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new HashMap().getClass()); List otherIds = new ArrayList<>(); - otherIds.addAll(otherMap.keySet()); - otherIds.addAll(otherComMap.keySet()); + otherIds.addAll(otherMap == null ? Collections.emptyList() : otherMap.keySet()); + otherIds.addAll(otherComMap == null ? Collections.emptyList() : otherComMap.keySet()); otherIds = otherIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId()); @@ -346,8 +346,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map socialMap = JSON.parseObject(socialSchemePO.getSocialPaymentBaseString(), new HashMap().getClass()); Map socialComMap = JSON.parseObject(socialSchemePO.getSocialPaymentComBaseString(), new HashMap().getClass()); List socialIds = new ArrayList<>(); - socialIds.addAll(socialMap.keySet()); - socialIds.addAll(socialComMap.keySet()); + socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); + socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet()); socialIds = socialIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); @@ -393,8 +393,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { 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.keySet()); - socialIds.addAll(socialComMap.keySet()); + socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); + socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialMap.keySet()); socialIds = socialIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); @@ -441,8 +441,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { 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.keySet()); - socialIds.addAll(socialComMap.keySet()); + socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); + socialIds.addAll(socialComMap == null ? Collections.emptyList() :socialComMap.keySet()); socialIds = socialIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); @@ -488,8 +488,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { socialComMap = socialComMap.entrySet().stream().filter(e -> "9002".equals(e.getKey())) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); List socialIds = new ArrayList<>(); - socialIds.addAll(socialMap.keySet()); - socialIds.addAll(socialComMap.keySet()); + socialIds.addAll(socialMap == null ? Collections.emptyList() : socialMap.keySet()); + socialIds.addAll(socialComMap == null ? Collections.emptyList() : socialComMap.keySet()); socialIds = socialIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(socialSchemePO.getSocialSchemeId()); @@ -529,8 +529,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map fundMap = JSON.parseObject(fundSchemePO.getFundPaymentBaseString(), new HashMap().getClass()); Map fundComMap = JSON.parseObject(fundSchemePO.getFundPaymentComBaseString(), new HashMap().getClass()); List fundIds = new ArrayList<>(); - fundIds.addAll(fundMap.keySet()); - fundIds.addAll(fundComMap.keySet()); + fundIds.addAll(fundMap == null ? Collections.emptyList() : fundMap.keySet()); + fundIds.addAll(fundComMap == null ? Collections.emptyList() : fundComMap.keySet()); fundIds = fundIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(fundSchemePO.getFundSchemeId()); @@ -570,8 +570,8 @@ public class SIRepairServiceImpl extends Service implements SIRepairService { Map otherMap = JSON.parseObject(otherSchemePO.getOtherPaymentBaseString(), new HashMap().getClass()); Map otherComMap = JSON.parseObject(otherSchemePO.getOtherPaymentComBaseString(), new HashMap().getClass()); List otherIds = new ArrayList<>(); - otherIds.addAll(otherMap.keySet()); - otherIds.addAll(otherComMap.keySet()); + otherIds.addAll(otherMap == null ? Collections.emptyList() : otherMap.keySet()); + otherIds.addAll(otherComMap == null ? Collections.emptyList() : otherComMap.keySet()); otherIds = otherIds.stream().distinct().collect(Collectors.toList()); //查询该福利方案下开启缴纳的福利项 List insuranceIdAndScopeList = payInsuranceIdAndScopeList(otherSchemePO.getOtherSchemeId());