优化单据列表查询接口,提高查询效率
This commit is contained in:
@@ -319,12 +319,14 @@ 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);
|
|
||||||
Map<String,BigDecimal> finishDepositMap = new HashMap<>();
|
Map<String,BigDecimal> finishDepositMap = new HashMap<>();
|
||||||
if(list!=null && list.size()>0) {
|
if(numberList.size()>0) {
|
||||||
for (FinishDepositVo finishDepositVo : list) {
|
List<FinishDepositVo> list = depotHeadMapperEx.getFinishDepositByNumberList(numberList);
|
||||||
if(finishDepositVo!=null) {
|
if(list!=null && list.size()>0) {
|
||||||
finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit());
|
for (FinishDepositVo finishDepositVo : list) {
|
||||||
|
if(finishDepositVo!=null) {
|
||||||
|
finishDepositMap.put(finishDepositVo.getNumber(), finishDepositVo.getFinishDeposit());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -332,12 +334,14 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
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);
|
|
||||||
Map<String, Integer> billListMap = new HashMap<>();
|
Map<String, Integer> billListMap = new HashMap<>();
|
||||||
if(list!=null && list.size()>0) {
|
if(numberList.size()>0) {
|
||||||
for (DepotHead depotHead : list) {
|
List<DepotHead> list = getBillListByLinkNumberList(numberList);
|
||||||
if(depotHead!=null) {
|
if(list!=null && list.size()>0) {
|
||||||
billListMap.put(depotHead.getLinkNumber(), list.size());
|
for (DepotHead depotHead : list) {
|
||||||
|
if(depotHead!=null) {
|
||||||
|
billListMap.put(depotHead.getLinkNumber(), list.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -345,12 +349,14 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList) {
|
public Map<Long,Integer> getFinancialBillNoMapByBillIdList(List<Long> idList) {
|
||||||
List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList);
|
|
||||||
Map<Long, Integer> billListMap = new HashMap<>();
|
Map<Long, Integer> billListMap = new HashMap<>();
|
||||||
if(list!=null && list.size()>0) {
|
if(idList.size()>0) {
|
||||||
for (AccountItem accountItem : list) {
|
List<AccountItem> list = accountHeadService.getFinancialBillNoByBillIdList(idList);
|
||||||
if(accountItem!=null) {
|
if(list!=null && list.size()>0) {
|
||||||
billListMap.put(accountItem.getBillId(), list.size());
|
for (AccountItem accountItem : list) {
|
||||||
|
if(accountItem!=null) {
|
||||||
|
billListMap.put(accountItem.getBillId(), list.size());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -605,19 +611,23 @@ public class DepotHeadService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Map<Long,String> findMaterialsListMapByHeaderIdList(List<Long> idList)throws Exception {
|
public Map<Long,String> findMaterialsListMapByHeaderIdList(List<Long> idList)throws Exception {
|
||||||
List<MaterialsListVo> list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList);
|
|
||||||
Map<Long,String> materialsListMap = new HashMap<>();
|
Map<Long,String> materialsListMap = new HashMap<>();
|
||||||
for(MaterialsListVo materialsListVo : list){
|
if(idList.size()>0) {
|
||||||
materialsListMap.put(materialsListVo.getHeaderId(), materialsListVo.getMaterialsList());
|
List<MaterialsListVo> list = depotHeadMapperEx.findMaterialsListMapByHeaderIdList(idList);
|
||||||
|
for (MaterialsListVo materialsListVo : list) {
|
||||||
|
materialsListMap.put(materialsListVo.getHeaderId(), materialsListVo.getMaterialsList());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return materialsListMap;
|
return materialsListMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Long,BigDecimal> getMaterialCountListMapByHeaderIdList(List<Long> idList)throws Exception {
|
public Map<Long,BigDecimal> getMaterialCountListMapByHeaderIdList(List<Long> idList)throws Exception {
|
||||||
List<MaterialCountVo> list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList);
|
|
||||||
Map<Long,BigDecimal> materialCountListMap = new HashMap<>();
|
Map<Long,BigDecimal> materialCountListMap = new HashMap<>();
|
||||||
for(MaterialCountVo materialCountVo : list){
|
if(idList.size()>0) {
|
||||||
materialCountListMap.put(materialCountVo.getHeaderId(), materialCountVo.getMaterialCount());
|
List<MaterialCountVo> list = depotHeadMapperEx.getMaterialCountListByHeaderIdList(idList);
|
||||||
|
for(MaterialCountVo materialCountVo : list){
|
||||||
|
materialCountListMap.put(materialCountVo.getHeaderId(), materialCountVo.getMaterialCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return materialCountListMap;
|
return materialCountListMap;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user