优化商品模块的库存统计

This commit is contained in:
季圣华
2019-10-12 15:03:04 +08:00
parent ee8390559b
commit f90aa299aa
5 changed files with 30 additions and 55 deletions

View File

@@ -100,9 +100,8 @@ public class MaterialService {
}
}
m.setMaterialOther(materialOther);
Long InSum = depotItemService.findByTypeAndMaterialId("入库", m.getId());
Long OutSum = depotItemService.findByTypeAndMaterialId("出库", m.getId());
m.setStock(InSum - OutSum);
Long tenantId = m.getTenantId();
m.setStock(depotItemService.getStockByParam(null,m.getId(),null,null,tenantId));
resList.add(m);
}
}