Procházet zdrojové kódy

feat:执行流程用户节点关联脚本中间表添加自动触发的脚本需要根据执行节点表中的节点前后执行字段

xuezizhuo před 1 rokem
rodič
revize
20fad5776f

+ 12 - 0
ruoyi-process-execution/src/main/java/com/ruoyi/execution/produce/dispersed/enetity/BpmExecuteNodeMiddle.java

@@ -42,6 +42,9 @@ public class BpmExecuteNodeMiddle extends BaseEntity
     @Excel(name = "自动触发脚本编码1,2,3(自动触发的脚本需要根据执行节点表中的节点前后执行)")
     private String taskAutomaticScriptTriggerType;
 
+    /** 自动触发的脚本需要根据执行节点表中的节点前后执行 */
+    private String taskNodeAroundScriptKey;
+
     public void setId(Long id) 
     {
         this.id = id;
@@ -106,6 +109,14 @@ public class BpmExecuteNodeMiddle extends BaseEntity
         return taskAutomaticScriptTriggerType;
     }
 
+    public String getTaskNodeAroundScriptKey() {
+        return taskNodeAroundScriptKey;
+    }
+
+    public void setTaskNodeAroundScriptKey(String taskNodeAroundScriptKey) {
+        this.taskNodeAroundScriptKey = taskNodeAroundScriptKey;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -116,6 +127,7 @@ public class BpmExecuteNodeMiddle extends BaseEntity
             .append("taskExecuteUserNo", getTaskExecuteUserNo())
             .append("taskArtificialScriptKey", getTaskArtificialScriptKey())
             .append("taskAutomaticScriptTriggerType", getTaskAutomaticScriptTriggerType())
+            .append("taskNodeAroundScriptKey",getTaskNodeAroundScriptKey())
             .toString();
     }
 }

+ 10 - 3
ruoyi-process-execution/src/main/resources/mapper/bpm/dispersed/BpmExecuteNodeMiddleMapper.xml

@@ -13,6 +13,7 @@
         <result property="taskExecuteUserNo" column="task_execute_user_no"/>
         <result property="taskArtificialScriptKey" column="task_artificial_script_key"/>
         <result property="taskAutomaticScriptTriggerType" column="task_automatic_script_trigger_type"/>
+        <result property="taskNodeAroundScriptKey" column="task_node_around_script_key"/>
     </resultMap>
 
     <sql id="selectBpmExecuteNodeMiddleVo">
@@ -22,7 +23,8 @@
                task_real_role,
                task_execute_user_no,
                task_artificial_script_key,
-               task_automatic_script_trigger_type
+               task_automatic_script_trigger_type,
+               task_node_around_script_key
         from bpm_execute_node_middle
     </sql>
 
@@ -64,6 +66,7 @@
             <if test="taskExecuteUserNo != null">task_execute_user_no,</if>
             <if test="taskArtificialScriptKey != null">task_artificial_script_key,</if>
             <if test="taskAutomaticScriptTriggerType != null">task_automatic_script_trigger_type,</if>
+            <if test="taskNodeAroundScriptKey != null">task_node_around_script_key,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="taskNodeKey != null">#{taskNodeKey},</if>
@@ -72,6 +75,7 @@
             <if test="taskExecuteUserNo != null">#{taskExecuteUserNo},</if>
             <if test="taskArtificialScriptKey != null">#{taskArtificialScriptKey},</if>
             <if test="taskAutomaticScriptTriggerType != null">#{taskAutomaticScriptTriggerType},</if>
+            <if test="taskNodeAroundScriptKey != null">#{taskNodeAroundScriptKey},</if>
         </trim>
     </insert>
     <insert id="insertBpmExecuteNodeMiddleList" parameterType="java.util.List">
@@ -80,7 +84,8 @@
         task_real_role,
         task_execute_user_no,
         task_artificial_script_key,
-        task_automatic_script_trigger_type)
+        task_automatic_script_trigger_type,
+        task_node_around_script_key)
         values
         <foreach collection="list" item="item" index="index" separator=",">
             (#{item.taskNodeKey},
@@ -88,7 +93,8 @@
             #{item.taskRealRole},
             #{item.taskExecuteUserNo},
             #{item.taskArtificialScriptKey},
-            #{item.taskAutomaticScriptTriggerType})
+            #{item.taskAutomaticScriptTriggerType},
+            #{item.taskNodeAroundScriptKey})
         </foreach>
     </insert>
 
@@ -104,6 +110,7 @@
             <if test="taskAutomaticScriptTriggerType != null">task_automatic_script_trigger_type =
                 #{taskAutomaticScriptTriggerType},
             </if>
+            <if test="taskNodeAroundScriptKey != null">task_node_around_script_key = #{taskNodeAroundScriptKey},</if>
         </trim>
         where id = #{id}
     </update>

+ 1 - 1
ruoyi-system/src/main/java/com/ruoyi/system/entity/BpmNodeScriptRelevance.java

@@ -32,7 +32,7 @@ public class BpmNodeScriptRelevance extends BaseEntity {
     private String scriptKey;
 
     /**
-     * 脚本触发机制(0:手动;1:自动)
+     * 脚本触发机制(0:异常手动;1:正常自动;2:节点前后自动)
      */
     @Excel(name = "脚本触发机制", readConverterExp = "0=:手动;1:自动")
     private Long scriptTriggerType;