解决批次商品和多属性商品的成本价计算的bug

This commit is contained in:
jishenghua
2025-10-29 15:52:02 +08:00
parent 76ab9b9183
commit dfc567d154

View File

@@ -1099,8 +1099,8 @@ public class DepotItemService {
Boolean inOutManageFlag = false; Boolean inOutManageFlag = false;
//查询多单位信息 //查询多单位信息
Unit unitInfo = materialService.findUnit(depotItem.getMaterialId()); Unit unitInfo = materialService.findUnit(depotItem.getMaterialId());
List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, depotItem.getSku(), List<DepotItemVo4DetailByTypeAndMId> itemList = findDetailByDepotIdsAndMaterialIdList(null, forceFlag, inOutManageFlag, null,
depotItem.getBatchNumber(), null, null, null, depotItem.getMaterialId(), null, null); null, null, null, null, depotItem.getMaterialId(), null, null);
Collections.reverse(itemList); //倒序之后变成按时间从前往后排序 Collections.reverse(itemList); //倒序之后变成按时间从前往后排序
BigDecimal currentNumber = BigDecimal.ZERO; BigDecimal currentNumber = BigDecimal.ZERO;
BigDecimal currentUnitPrice = BigDecimal.ZERO; BigDecimal currentUnitPrice = BigDecimal.ZERO;