diff --git a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java index 9a6b43c..5ab8956 100644 --- a/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java +++ b/src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java @@ -514,8 +514,11 @@ public class ShipmentHeaderController extends BaseController { } if ("merge".equals(shipmentHeader.getShipmentType())) { throw new ServiceException("单据类型为合并单据,不允许合并!!!"); - } + if (shipmentHeader.getLastStatus()>QuantityConstant.RECEIPT_HEADER_POOL || shipmentHeader.getFirstStatus()>QuantityConstant.RECEIPT_HEADER_POOL) { + throw new ServiceException("单据已被使用,不能合并,必须是新建状态或订单池!"); + } + }); // 创建合并后的头表 ShipmentHeader shipmentHeader = new ShipmentHeader();