优化单据列表查询接口,提高查询效率
This commit is contained in:
@@ -319,8 +319,9 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public Map<String, BigDecimal> getFinishDepositMapByNumberList(List<String> numberList) {
|
||||
List<FinishDepositVo> list = depotHeadMapperEx.getFinishDepositByNumberList(numberList);
|
||||
Map<String,BigDecimal> finishDepositMap = new HashMap<>();
|
||||
if(numberList.size()>0) {
|
||||
List<FinishDepositVo> list = depotHeadMapperEx.getFinishDepositByNumberList(numberList);
|
||||
if(list!=null && list.size()>0) {
|
||||
for (FinishDepositVo finishDepositVo : list) {
|
||||
if(finishDepositVo!=null) {
|
||||
@@ -328,12 +329,14 @@ public class DepotHeadService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return finishDepositMap;
|
||||
}
|
||||
|
||||
public Map<String, Integer> getBillSizeMapByLinkNumberList(List<String> numberList) throws Exception {
|
||||
List<DepotHead> list = getBillListByLinkNumberList(numberList);
|
||||
Map<String, Integer> billListMap = new HashMap<>();
|
||||
if(numberList.size()>0) {
|
||||
List<DepotHead> list = getBillListByLinkNumberList(numberList);
|
||||
if(list!=null && list.size()>0) {
|
||||
for (DepotHead depotHead : list) {
|
||||
if(depotHead!=null) {
|
||||
@@ -341,12 +344,14 @@ public class DepotHeadService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return billListMap;
|
||||
}
|
||||
|
||||
public Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList) {
|
||||
List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList);
|
||||
Map<Long, Integer> billListMap = new HashMap<>();
|
||||
if(idList.size()>0) {
|
||||
List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList);
|
||||
if(list!=null && list.size()>0) {
|
||||
for (AccountItem accountItem : list) {
|
||||
if(accountItem!=null) {
|
||||
@@ -354,6 +359,7 @@ public class DepotHeadService {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return billListMap;
|
||||
}
|
||||
|
||||
@@ -605,20 +611,24 @@ public class DepotHeadService {
|
||||
}
|
||||
|
||||
public Map<Long,String> findMaterialsListMapByHeaderIdList(List<Long> idList)throws Exception {
|
||||
List<MaterialsListVo> list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList);
|
||||
Map<Long,String> materialsListMap = new HashMap<>();
|
||||
for(MaterialsListVo materialsListVo : list){
|
||||
if(idList.size()>0) {
|
||||
List<MaterialsListVo> list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList);
|
||||
for (MaterialsListVo materialsListVo : list) {
|
||||
materialsListMap.put(materialsListVo.getHeaderId(), materialsListVo.getMaterialsList());
|
||||
}
|
||||
}
|
||||
return materialsListMap;
|
||||
}
|
||||
|
||||
public Map<Long,BigDecimal> getMaterialCountListMapByHeaderIdList(List<Long> idList)throws Exception {
|
||||
List<MaterialCountVo> list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList);
|
||||
Map<Long,BigDecimal> materialCountListMap = new HashMap<>();
|
||||
if(idList.size()>0) {
|
||||
List<MaterialCountVo> list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList);
|
||||
for(MaterialCountVo materialCountVo : list){
|
||||
materialCountListMap.put(materialCountVo.getHeaderId(), materialCountVo.getMaterialCount());
|
||||
}
|
||||
}
|
||||
return materialCountListMap;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user