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());