|
@@ -265,7 +265,7 @@ public class WorkController {
|
|
|
}
|
|
|
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
- sortList.add(new Sort("id_","asc"));
|
|
|
+ sortList.add(new Sort("process_date","desc"));
|
|
|
|
|
|
Page<Work> page = workService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(Work work : page.getResult()){
|
|
@@ -281,6 +281,14 @@ public class WorkController {
|
|
|
else{
|
|
|
work.setHaveBills(false);
|
|
|
}
|
|
|
+
|
|
|
+ BigDecimal totalLength = BigDecimal.ZERO;
|
|
|
+ List<Stock> stockList = stockService.findList(work.getId());
|
|
|
+ for(Stock stock : stockList) {
|
|
|
+ totalLength = totalLength.add(stock.getTagLength());
|
|
|
+ }
|
|
|
+ work.setTotalStock(stockList.size());
|
|
|
+ work.setTotalLength(totalLength);
|
|
|
}
|
|
|
|
|
|
msgResult.setResult(true);
|