优化单据列表接口,增加总数量返回字段

This commit is contained in:
季圣华
2022-10-19 21:00:21 +08:00
parent b0b1ddf8cb
commit 3f1b4410d6
4 changed files with 30 additions and 1 deletions

View File

@@ -151,6 +151,7 @@ public class DepotHeadService {
dh.setOperTimeStr(getCenternTime(dh.getOperTime()));
}
dh.setMaterialsList(findMaterialsListByHeaderId(dh.getId()));
dh.setMaterialCount(getMaterialCountByHeaderId(dh.getId()));
resList.add(dh);
}
}
@@ -486,6 +487,16 @@ public class DepotHeadService {
return result;
}
private BigDecimal getMaterialCountByHeaderId(Long id) {
BigDecimal result = null;
try{
result = depotHeadMapperEx.getMaterialCountByHeaderId(id);
}catch(Exception e){
JshException.readFail(logger, e);
}
return result;
}
public List<DepotHeadVo4InDetail> findInOutDetail(String beginTime, String endTime, String type, String [] creatorArray,
String [] organArray, String materialParam, List<Long> depotList, Integer oId, String number,
String remark, Integer offset, Integer rows) throws Exception{