拣货完成无论拣货多少都为拣货完成;

This commit is contained in:
王奎兴
2026-02-09 18:11:44 +08:00
parent 51e5b871e7
commit ee4cd312ab
@@ -206,10 +206,18 @@ public class HandoverTaskOrderDomainService {
BigDecimal newFreezeQuantity = oldFreezeQuantity.subtract(checkQuantity); BigDecimal newFreezeQuantity = oldFreezeQuantity.subtract(checkQuantity);
BigDecimal oldArea = materialInventoryPO.getArea(); BigDecimal oldArea = materialInventoryPO.getArea();
BigDecimal oldVolume = materialInventoryPO.getVolume(); BigDecimal oldVolume = materialInventoryPO.getVolume();
BigDecimal oldGrossWeight = materialInventoryPO.getGrossWeight(); BigDecimal oldGrossWeight = materialInventoryPO.getGrossWeight();
BigDecimal oldNetWeight = materialInventoryPO.getNetWeight(); BigDecimal oldNetWeight = materialInventoryPO.getNetWeight();
// 初始化旧数据,避免空指针
oldArea = oldArea != null ? oldArea : BigDecimal.ZERO;
oldVolume = oldVolume != null ? oldVolume : BigDecimal.ZERO;
oldGrossWeight = oldGrossWeight != null ? oldGrossWeight : BigDecimal.ZERO;
oldNetWeight = oldNetWeight != null ? oldNetWeight : BigDecimal.ZERO;
BigDecimal newArea = oldArea.subtract(checkArea); BigDecimal newArea = oldArea.subtract(checkArea);
BigDecimal newVolume = oldVolume.subtract(checkVolume); BigDecimal newVolume = oldVolume.subtract(checkVolume);
BigDecimal newGrossWeight = oldGrossWeight.subtract(checkGrossWeight); BigDecimal newGrossWeight = oldGrossWeight.subtract(checkGrossWeight);