优化商品的库存明细

This commit is contained in:
季圣华
2020-12-13 00:16:45 +08:00
parent c22f9262f5
commit feb85c60c0
5 changed files with 81 additions and 22 deletions

View File

@@ -199,9 +199,12 @@ public class DepotController {
DepotEx de = new DepotEx();
if(mId!=0) {
BigDecimal stock = materialService.getInitStock(mId, depot.getId());
BigDecimal currentStock = materialService.getCurrentStock(mId, depot.getId());
de.setStock(stock);
de.setAllStock(stock.add(currentStock));
} else {
de.setStock(BigDecimal.ZERO);
de.setAllStock(BigDecimal.ZERO);
}
de.setId(depot.getId());
de.setName(depot.getName());