解决单据单号模糊查询的bug

This commit is contained in:
季圣华
2022-12-12 23:36:03 +08:00
parent 0bb9445ecd
commit 1f98d617a9

View File

@@ -305,27 +305,39 @@ public class DepotHeadService {
public Map<String, BigDecimal> getFinishDepositMapByNumberList(List<String> numberList) { public Map<String, BigDecimal> getFinishDepositMapByNumberList(List<String> numberList) {
List<FinishDepositVo> list = depotHeadMapperEx.getFinishDepositByNumberList(numberList); List<FinishDepositVo> list = depotHeadMapperEx.getFinishDepositByNumberList(numberList);
Map<String,BigDecimal> finishDepositMap = new HashMap<>(); Map<String,BigDecimal> finishDepositMap = new HashMap<>();
for(FinishDepositVo finishDepositVo : list){ if(list!=null && list.size()>0) {
for (FinishDepositVo finishDepositVo : list) {
if(finishDepositVo!=null) {
finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit()); finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit());
} }
}
}
return finishDepositMap; return finishDepositMap;
} }
public Map<String, Integer> getBillSizeMapByLinkNumberList(List<String> numberList) throws Exception { public Map<String, Integer> getBillSizeMapByLinkNumberList(List<String> numberList) throws Exception {
List<DepotHead> list = getBillListByLinkNumberList(numberList); List<DepotHead> list = getBillListByLinkNumberList(numberList);
Map<String, Integer> billListMap = new HashMap<>(); Map<String, Integer> billListMap = new HashMap<>();
for(DepotHead depotHead : list){ if(list!=null && list.size()>0) {
for (DepotHead depotHead : list) {
if(depotHead!=null) {
billListMap.put(depotHead.getLinkNumber(), list.size()); billListMap.put(depotHead.getLinkNumber(), list.size());
} }
}
}
return billListMap; return billListMap;
} }
public Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList) { public Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList) {
List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList); List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList);
Map<Long, Integer> billListMap = new HashMap<>(); Map<Long, Integer> billListMap = new HashMap<>();
for(AccountItem accountItem : list){ if(list!=null && list.size()>0) {
for (AccountItem accountItem : list) {
if(accountItem!=null) {
billListMap.put(accountItem.getBillId(), list.size()); billListMap.put(accountItem.getBillId(), list.size());
} }
}
}
return billListMap; return billListMap;
} }