| | |
| | | continue; |
| | | } |
| | | Long productModelId = stockItem.getProductModelId(); |
| | | stockQuantityMap.merge(productModelId, defaultDecimal(stockItem.getQualitity()), BigDecimal::add); |
| | | BigDecimal quantity = defaultDecimal(stockItem.getQualitity()); |
| | | stockQuantityMap.merge(productModelId, quantity, BigDecimal::add); |
| | | String batchNo = stockItem.getBatchNo(); |
| | | if (batchNo != null && !batchNo.trim().isEmpty()) { |
| | | // 只添加库存数量大于0的批号 |
| | | if (batchNo != null && !batchNo.trim().isEmpty() && quantity.compareTo(BigDecimal.ZERO) > 0) { |
| | | stockBatchNoMap.computeIfAbsent(productModelId, key -> new LinkedHashSet<>()).add(batchNo); |
| | | } |
| | | } |