Browse Source

仅停用状态可删除箱码幅面记录

v_HuilingDeng 3 years ago
parent
commit
52b3b6dcea

+ 3 - 0
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/service/impl/BoxCodeFormatImpl.java

@@ -147,6 +147,9 @@ public class BoxCodeFormatImpl implements BoxCodeFormatService {
         if (boxCodeFormat == null) {
             throw new BusinessException(ErrorCodeEnum.NO_EXISTS_DATA.getCode(), "箱码幅面不存在");
         }
+        if (boxCodeFormat.getState() == StateEnum.ENABLE.getCode()) {
+            throw new BusinessException("该箱码幅面还在启用中,不能删除。");
+        }
 
         //逻辑删除
         boxCodeFormat.setIsDelete(1);