解决bug:新的租户如果没有创建仓库,只创建了商品,点击修正库存,报错

This commit is contained in:
jishenghua
2025-10-29 21:22:53 +08:00
parent dfc567d154
commit 77ac13b61c
2 changed files with 7 additions and 7 deletions

View File

@@ -1430,10 +1430,9 @@ public class MaterialService {
}
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
public int batchSetMaterialCurrentStock(String ids) throws Exception {
public int batchSetMaterialCurrentStock(String ids, List<Depot> depotList) throws Exception {
int res = 0;
List<Long> idList = StringUtil.strToLongList(ids);
List<Depot> depotList = depotService.getAllList();
for(Long mId: idList) {
BigDecimal currentUnitPrice = materialCurrentStockMapperEx.getCurrentUnitPriceByMId(mId);
for(Depot depot: depotList) {