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 b0999cdb..47508b46 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 @@ -319,12 +319,14 @@ public class DepotHeadService { } public Map getFinishDepositMapByNumberList(List numberList) { - List list = depotHeadMapperEx.getFinishDepositByNumberList(numberList); Map finishDepositMap = new HashMap<>(); - if(list!=null && list.size()>0) { - for (FinishDepositVo finishDepositVo : list) { - if(finishDepositVo!=null) { - finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit()); + if(numberList.size()>0) { + List list = depotHeadMapperEx.getFinishDepositByNumberList(numberList); + if(list!=null && list.size()>0) { + for (FinishDepositVo finishDepositVo : list) { + if(finishDepositVo!=null) { + finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit()); + } } } } @@ -332,12 +334,14 @@ public class DepotHeadService { } public Map getBillSizeMapByLinkNumberList(List numberList) throws Exception { - List list = getBillListByLinkNumberList(numberList); Map billListMap = new HashMap<>(); - if(list!=null && list.size()>0) { - for (DepotHead depotHead : list) { - if(depotHead!=null) { - billListMap.put(depotHead.getLinkNumber(), list.size()); + if(numberList.size()>0) { + List list = getBillListByLinkNumberList(numberList); + if(list!=null && list.size()>0) { + for (DepotHead depotHead : list) { + if(depotHead!=null) { + billListMap.put(depotHead.getLinkNumber(), list.size()); + } } } } @@ -345,12 +349,14 @@ public class DepotHeadService { } public Map getFinancialBillNoMapByBillIdList(List idList) { - List list = accountHeadService.getFinancialBillNoByBillIdList(idList); Map billListMap = new HashMap<>(); - if(list!=null && list.size()>0) { - for (AccountItem accountItem : list) { - if(accountItem!=null) { - billListMap.put(accountItem.getBillId(), list.size()); + if(idList.size()>0) { + List list = accountHeadService.getFinancialBillNoByBillIdList(idList); + if(list!=null && list.size()>0) { + for (AccountItem accountItem : list) { + if(accountItem!=null) { + billListMap.put(accountItem.getBillId(), list.size()); + } } } } @@ -605,19 +611,23 @@ public class DepotHeadService { } public Map findMaterialsListMapByHeaderIdList(List idList)throws Exception { - List list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList); Map materialsListMap = new HashMap<>(); - for(MaterialsListVo materialsListVo : list){ - materialsListMap.put(materialsListVo.getHeaderId(), materialsListVo.getMaterialsList()); + if(idList.size()>0) { + List list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList); + for (MaterialsListVo materialsListVo : list) { + materialsListMap.put(materialsListVo.getHeaderId(), materialsListVo.getMaterialsList()); + } } return materialsListMap; } public Map getMaterialCountListMapByHeaderIdList(List idList)throws Exception { - List list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList); Map materialCountListMap = new HashMap<>(); - for(MaterialCountVo materialCountVo : list){ - materialCountListMap.put(materialCountVo.getHeaderId(), materialCountVo.getMaterialCount()); + if(idList.size()>0) { + List list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList); + for(MaterialCountVo materialCountVo : list){ + materialCountListMap.put(materialCountVo.getHeaderId(), materialCountVo.getMaterialCount()); + } } return materialCountListMap; }