diff --git a/ruoyi-activiti/pom.xml b/ruoyi-activiti/pom.xml index 3d8e1309..eb863aef 100644 --- a/ruoyi-activiti/pom.xml +++ b/ruoyi-activiti/pom.xml @@ -16,10 +16,13 @@ activiti-spring-boot-starter-rest-api ${activiti.version} - - com.ruoyi - ruoyi-framework - + + + + + + + com.ruoyi ruoyi-system diff --git a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html index 99928923..2d724d2b 100644 --- a/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html +++ b/ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html @@ -110,6 +110,7 @@ // 新增提交 function submitHandler() { + if ($.validate.form()) { // 获取表单数据 const developModifyOrderData = $("#form-developModifyOrder-add").serializeArray().reduce((obj, item) => { obj[item.name] = item.value; @@ -174,6 +175,7 @@ const jsonData = JSON.stringify(combinedData); // 发送 AJAX 请求到后端接口 $.operate.saveJson(prefix + "/add", jsonData); + } } diff --git a/ruoyi-framework/pom.xml b/ruoyi-framework/pom.xml index 4785ff9e..7382826f 100644 --- a/ruoyi-framework/pom.xml +++ b/ruoyi-framework/pom.xml @@ -77,6 +77,11 @@ ruoyi-system + + com.ruoyi + ruoyi-activiti + 4.6.1 + \ No newline at end of file diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java index 2ff35774..64a7ef43 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/exception/GlobalExceptionHandler.java @@ -1,6 +1,8 @@ package com.ruoyi.framework.web.exception; import javax.servlet.http.HttpServletRequest; + +import org.activiti.engine.ActivitiException; import org.apache.shiro.authz.AuthorizationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -113,4 +115,16 @@ public class GlobalExceptionHandler { return AjaxResult.error("演示模式,不允许操作"); } + + + + /** + * 工作流异常 + * */ + @ExceptionHandler(ActivitiException.class) + public AjaxResult activitiException(org.activiti.engine.ActivitiException e) + { + log.error(e.getMessage(), e); + return AjaxResult.error("请正确使用审批流程上的角色进行操作"); + } }