Commit e15fff8402ff6cb898e5b07f0687631d1979536f
1 parent
3c165e0c
只有新建状态或订单池才能进行单据合并。
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
@@ -514,8 +514,11 @@ public class ShipmentHeaderController extends BaseController { | @@ -514,8 +514,11 @@ public class ShipmentHeaderController extends BaseController { | ||
514 | } | 514 | } |
515 | if ("merge".equals(shipmentHeader.getShipmentType())) { | 515 | if ("merge".equals(shipmentHeader.getShipmentType())) { |
516 | throw new ServiceException("单据类型为合并单据,不允许合并!!!"); | 516 | throw new ServiceException("单据类型为合并单据,不允许合并!!!"); |
517 | - | ||
518 | } | 517 | } |
518 | + if (shipmentHeader.getLastStatus()>QuantityConstant.RECEIPT_HEADER_POOL || shipmentHeader.getFirstStatus()>QuantityConstant.RECEIPT_HEADER_POOL) { | ||
519 | + throw new ServiceException("单据已被使用,不能合并,必须是新建状态或订单池!"); | ||
520 | + } | ||
521 | + | ||
519 | }); | 522 | }); |
520 | // 创建合并后的头表 | 523 | // 创建合并后的头表 |
521 | ShipmentHeader shipmentHeader = new ShipmentHeader(); | 524 | ShipmentHeader shipmentHeader = new ShipmentHeader(); |