From d4c19bfd9f452b40b95b354c5338795dcaf66ce4 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Mon, 20 May 2024 17:13:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E7=8A=B6=E6=80=81=E9=AA=8C?= =?UTF-8?q?=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../zc/business/controller/DcEventProcessController.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java index 08f1bf54..594dba25 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEventProcessController.java @@ -9,6 +9,8 @@ import com.ruoyi.common.config.RuoYiConfig; import com.ruoyi.common.exception.file.InvalidExtensionException; import com.ruoyi.common.utils.file.FileUploadUtils; import com.ruoyi.common.utils.file.MimeTypeUtils; +import com.zc.business.domain.DcEvent; +import com.zc.business.service.IDcEventService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.security.access.prepost.PreAuthorize; @@ -43,6 +45,8 @@ public class DcEventProcessController extends BaseController { @Autowired private IDcEventProcessService dcEventProcessService; + @Autowired + private IDcEventService dcEventService; /** * 查询事件处理流程列表 @@ -101,6 +105,10 @@ public class DcEventProcessController extends BaseController @Log(title = "事件处理流程", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody DcEventProcess dcEventProcess){ + DcEvent dcEvent = dcEventService.selectDcEventById(dcEventProcess.getEventId()); + if (dcEvent.getEventState() == 2){ + return AjaxResult.error("事件已结束,无法进行操作!"); + } if (dcEventProcess.getProcessType() != null && dcEventProcess.getProcessType() == 1){ int status = dcEventProcessService.selectPreviousNodeStatus(dcEventProcess.getEventId(),dcEventProcess.getProcessId()); if (status < 1){