|
|
|
@ -422,7 +422,8 @@ public class WmsInventoryServiceImpl implements IWmsInventoryService {
|
|
|
|
for (WmsInventoryLedgerVo record : ledgerList) {
|
|
|
|
for (WmsInventoryLedgerVo record : ledgerList) {
|
|
|
|
String key = record.getMaterialId() + "_" + record.getBatchCode() + "_" + record.getLocationCode();
|
|
|
|
String key = record.getMaterialId() + "_" + record.getBatchCode() + "_" + record.getLocationCode();
|
|
|
|
BigDecimal currentBalance = balanceMap.getOrDefault(key, BigDecimal.ZERO);
|
|
|
|
BigDecimal currentBalance = balanceMap.getOrDefault(key, BigDecimal.ZERO);
|
|
|
|
BigDecimal newBalance = currentBalance.add(record.getChangeQty());
|
|
|
|
BigDecimal changeQty = record.getChangeQty() != null ? record.getChangeQty() : BigDecimal.ZERO;
|
|
|
|
|
|
|
|
BigDecimal newBalance = currentBalance.add(changeQty);
|
|
|
|
balanceMap.put(key, newBalance);
|
|
|
|
balanceMap.put(key, newBalance);
|
|
|
|
record.setBalanceQty(newBalance);
|
|
|
|
record.setBalanceQty(newBalance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|