From 399a85950412b457174447a0ec5347b5a839176f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Wed, 22 Mar 2023 17:29:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E8=B4=A8bug=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchase/SupProductController.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java index e621aaf1..8a7be91b 100644 --- a/src/main/java/com/glxp/api/controller/purchase/SupProductController.java +++ b/src/main/java/com/glxp/api/controller/purchase/SupProductController.java @@ -188,16 +188,18 @@ public class SupProductController { if (StrUtil.isEmpty(supProductEntity.getProductId()) || StrUtil.isEmpty(supProductEntity.getManufacturerIdFk()) || StrUtil.isEmpty(supProductEntity.getCustomerId())) { return ResultVOUtils.error(500, "参数错误!"); } - //判断是不是存在草稿 - List supCertEntityList1 = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId()); - for (SupCertEntity obj : supCertEntityList1) { - if (obj.getAuditStatus() == 0) { - return ResultVOUtils.error(999, "证书中存在草稿不允许提交!"); - } - } + //提交审核 if (supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_CHANGE || supProductEntity.getAuditStatus() == ConstantStatus.AUDIT_UN) { + //判断是不是存在草稿 + List supCertEntityList1 = supCertService.findAll(supProductEntity.getCustomerId(), supProductEntity.getManufacturerIdFk(), supProductEntity.getProductId()); + for (SupCertEntity obj : supCertEntityList1) { + if (obj.getAuditStatus() == 0) { + return ResultVOUtils.error(999, "证书中存在草稿不允许提交!"); + } + } + //判断是否上级供应商是否审核通过 SupManufacturerEntity supManufacturerEntity = supManufacturerService.findManufacturer(supProductEntity.getManufacturerIdFk());