Browse Source

销售订单已审核已关闭的订单,不允许反审核

rainco 7 years ago
parent
commit
b86f1f2c40

+ 5 - 0
applications/sale/sale-server/src/main/java/com/usoftchina/saas/sale/service/impl/SaleServiceImpl.java

@@ -287,6 +287,11 @@ public class SaleServiceImpl implements SaleService{
         if (null != code) {
             throw new BizException(BizExceptionCode.SALE_ALREADY_UNAUDIT);
         }
+        //单据状态为已关闭,无法审核
+        code = saleMapper.validateCloseStatus(id);
+        if (null != code) {
+            throw new BizException(BizExceptionCode.SALE_CLOSE.getCode(),String.format(BizExceptionCode.SALE_CLOSE.getMessage(),"反审核"));
+        }
         //检测出货状态为未出货
         Integer num = saleMapper.checkSendStatus(id);
         if (num > 0) {