优化单据列表接口,增加总数量返回字段
This commit is contained in:
@@ -61,6 +61,9 @@ public interface DepotHeadMapperEx {
|
||||
String findMaterialsListByHeaderId(
|
||||
@Param("id") Long id);
|
||||
|
||||
BigDecimal getMaterialCountByHeaderId(
|
||||
@Param("id") Long id);
|
||||
|
||||
List<DepotHeadVo4InDetail> findInOutDetail(
|
||||
@Param("beginTime") String beginTime,
|
||||
@Param("endTime") String endTime,
|
||||
|
||||
@@ -41,6 +41,8 @@ public class DepotHeadVo4List extends DepotHead{
|
||||
|
||||
private BigDecimal debt;
|
||||
|
||||
private BigDecimal materialCount;
|
||||
|
||||
public String getProjectName() {
|
||||
return projectName;
|
||||
}
|
||||
@@ -176,4 +178,12 @@ public class DepotHeadVo4List extends DepotHead{
|
||||
public void setDebt(BigDecimal debt) {
|
||||
this.debt = debt;
|
||||
}
|
||||
|
||||
public BigDecimal getMaterialCount() {
|
||||
return materialCount;
|
||||
}
|
||||
|
||||
public void setMaterialCount(BigDecimal materialCount) {
|
||||
this.materialCount = materialCount;
|
||||
}
|
||||
}
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user