|
|
@ -309,10 +309,29 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
|
warehouseStorageOrder.setWarehouseEmployee(loginName); |
|
|
|
List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); |
|
|
|
|
|
|
|
|
|
|
|
int actualArriveNum = 0; |
|
|
|
//检查填写的实际到货数是否有空值
|
|
|
|
boolean hasActualArriveNumNull = warehouseStorageOrderDetailList.stream() |
|
|
|
.anyMatch(item -> item.getActualArriveNum() == null); |
|
|
|
if (hasActualArriveNumNull) { |
|
|
|
throw new BusinessException("存在实际到货数为空,请检查!"); |
|
|
|
} |
|
|
|
|
|
|
|
//入库单主表的实际到货数为子表的合计
|
|
|
|
int actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum(); |
|
|
|
actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum(); |
|
|
|
|
|
|
|
int temporaryQualifiedNum = 0; |
|
|
|
//检查填写的品质合格数是否有空值
|
|
|
|
boolean hasTemporaryQualifiedNumNull = warehouseStorageOrderDetailList.stream() |
|
|
|
.anyMatch(item -> item.getTemporaryQualifiedNum() == null); |
|
|
|
if (hasTemporaryQualifiedNumNull) { |
|
|
|
throw new BusinessException("存在品质合格数为空,请检查!"); |
|
|
|
} |
|
|
|
//入库单主表的暂收合格数为子表的合计
|
|
|
|
int temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum(); |
|
|
|
temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum(); |
|
|
|
|
|
|
|
if (actualArriveNum < temporaryQualifiedNum) { |
|
|
|
throw new BusinessException("暂收合格数不能大于实际到货数"); |
|
|
|
} |
|
|
@ -661,10 +680,32 @@ public class WarehouseStorageOrderServiceImpl implements IWarehouseStorageOrderS |
|
|
|
warehouseStorageOrder.setWarehouseQualityStatus("0"); |
|
|
|
warehouseStorageOrder.setWarehouseEmployee(loginName); |
|
|
|
List<WarehouseStorageOrderDetail> warehouseStorageOrderDetailList = warehouseStorageOrder.getWarehouseStorageOrderDetailList(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int actualArriveNum = 0; |
|
|
|
//检查填写的实际到货数是否有空值
|
|
|
|
boolean hasActualArriveNumNull = warehouseStorageOrderDetailList.stream() |
|
|
|
.anyMatch(item -> item.getActualArriveNum() == null); |
|
|
|
if (hasActualArriveNumNull) { |
|
|
|
throw new BusinessException("存在实际到货数为空,请检查!"); |
|
|
|
} |
|
|
|
|
|
|
|
//入库单主表的实际到货数为子表的合计
|
|
|
|
int actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum(); |
|
|
|
actualArriveNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getActualArriveNum).sum(); |
|
|
|
|
|
|
|
int temporaryQualifiedNum = 0; |
|
|
|
//检查填写的品质合格数是否有空值
|
|
|
|
boolean hasTemporaryQualifiedNumNull = warehouseStorageOrderDetailList.stream() |
|
|
|
.anyMatch(item -> item.getTemporaryQualifiedNum() == null); |
|
|
|
if (hasTemporaryQualifiedNumNull) { |
|
|
|
throw new BusinessException("存在品质合格数为空,请检查!"); |
|
|
|
} |
|
|
|
//入库单主表的暂收合格数为子表的合计
|
|
|
|
int temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum(); |
|
|
|
temporaryQualifiedNum = warehouseStorageOrderDetailList.stream().mapToInt(WarehouseStorageOrderDetail::getTemporaryQualifiedNum).sum(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (actualArriveNum < temporaryQualifiedNum) { |
|
|
|
throw new BusinessException("暂收合格数不能大于实际到货数"); |
|
|
|
} |
|
|
|