From 1f98d617a92bb3e03ea07190f943eb4b09d24a7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 12 Dec 2022 23:36:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=8D=95=E6=8D=AE=E5=8D=95?= =?UTF-8?q?=E5=8F=B7=E6=A8=A1=E7=B3=8A=E6=9F=A5=E8=AF=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/depotHead/DepotHeadService.java | 24 ++++++++++++++----- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java index a73797e8..0b0500d7 100644 --- a/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java +++ b/jshERP-boot/src/main/java/com/jsh/erp/service/depotHead/DepotHeadService.java @@ -305,8 +305,12 @@ public class DepotHeadService { public Map getFinishDepositMapByNumberList(List numberList) { List list = depotHeadMapperEx.getFinishDepositByNumberList(numberList); Map finishDepositMap = new HashMap<>(); - for(FinishDepositVo finishDepositVo : list){ - finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit()); + if(list!=null && list.size()>0) { + for (FinishDepositVo finishDepositVo : list) { + if(finishDepositVo!=null) { + finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit()); + } + } } return finishDepositMap; } @@ -314,8 +318,12 @@ public class DepotHeadService { public Map getBillSizeMapByLinkNumberList(List numberList) throws Exception { List list = getBillListByLinkNumberList(numberList); Map billListMap = new HashMap<>(); - for(DepotHead depotHead : list){ - billListMap.put(depotHead.getLinkNumber(), list.size()); + if(list!=null && list.size()>0) { + for (DepotHead depotHead : list) { + if(depotHead!=null) { + billListMap.put(depotHead.getLinkNumber(), list.size()); + } + } } return billListMap; } @@ -323,8 +331,12 @@ public class DepotHeadService { public Map getFinancialBillNoMapByBillIdList(List idList) { List list = accountHeadService.getFinancialBillNoByBillIdList(idList); Map billListMap = new HashMap<>(); - for(AccountItem accountItem : list){ - billListMap.put(accountItem.getBillId(), list.size()); + if(list!=null && list.size()>0) { + for (AccountItem accountItem : list) { + if(accountItem!=null) { + billListMap.put(accountItem.getBillId(), list.size()); + } + } } return billListMap; }