Przeglądaj źródła

流程关联表单

csg6 1 tydzień temu
rodzic
commit
a841ba07c5

+ 9 - 4
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-admin/src/main/resources/application-druid-dev.yml

@@ -6,11 +6,16 @@ spring:
6 6
         druid:
7 7
             # 主库数据源
8 8
             master:
9
-                url: jdbc:mysql://39.105.121.97:13306/double_defense_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
10 9
 #                url: jdbc:mysql://127.0.0.1:13306/double_defense?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
11
-                username: double_defense_dev
10
+#                url: jdbc:mysql://localhost:3306/ruoyi?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=false
11
+#                username: root
12
+#                password: root123456
13
+#                url: jdbc:mysql://39.105.121.97:13306/double_defense_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=false
14
+#                url: jdbc:mysql://192.168.3.19:3366/double_defense_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=false
15
+                url: jdbc:mysql://192.168.3.19:3366/double_defense_dev_du_liang?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=false
16
+                username: root
17
+#                username: double_defense_dev
12 18
                 password: Eitc@gnhz702
13
-#                password: 123456
14 19
             # 从库数据源
15 20
             slave:
16 21
                 # 从数据源开关/默认关闭
@@ -89,6 +94,6 @@ spring:
89 94
     # flowable相关表
90 95
     flowable:
91 96
         # true 会对数据库中所有表进行更新操作。如果表不存在,则自动创建(建议开发时使用)
92
-        database-schema-update: true #数据库中不存在流程表时,将该值设置为true
97
+        database-schema-update: false #数据库中不存在流程表时,将该值设置为true
93 98
         # 关闭定时任务JOB
94 99
         async-executor-activate: false

+ 1 - 1
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-admin/src/main/resources/application.yml

@@ -12,7 +12,7 @@ ruoyi:
12 12
   # 文件路径 文件上传路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath)
13 13
 #  profile: /opt/app/uploadPath
14 14
 #  profile: C:/test/gnhz/shuangkong
15
-  profile: C:/gnhz/shuangkong/uploadPath
15
+  profile: D:/codeUploadPath/shuang_kong/uploadPath
16 16
   # 获取ip地址开关
17 17
   addressEnabled: false
18 18
   # 验证码类型 math 数字计算 char 字符验证

+ 67 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-flowable/src/main/java/com/ruoyi/flowable/controller/FlowInstanceController.java

@@ -0,0 +1,67 @@
1
+package com.ruoyi.flowable.controller;
2
+
3
+
4
+import com.ruoyi.common.annotation.Log;
5
+import com.ruoyi.common.core.controller.BaseController;
6
+import com.ruoyi.common.core.domain.AjaxResult;
7
+import com.ruoyi.common.enums.BusinessType;
8
+import com.ruoyi.flowable.domain.vo.FlowTaskVo;
9
+import com.ruoyi.flowable.service.IFlowInstanceService;
10
+import io.swagger.annotations.Api;
11
+import io.swagger.annotations.ApiOperation;
12
+import io.swagger.annotations.ApiParam;
13
+import lombok.extern.slf4j.Slf4j;
14
+import org.springframework.beans.factory.annotation.Autowired;
15
+import org.springframework.web.bind.annotation.*;
16
+
17
+import java.util.Map;
18
+
19
+/**
20
+ * <p>工作流流程实例管理<p>
21
+ *
22
+ * @author Tony
23
+ * @date 2021-04-03
24
+ */
25
+@Slf4j
26
+@Api(tags = "工作流流程实例管理")
27
+@RestController
28
+@RequestMapping("/flowable/instance")
29
+public class FlowInstanceController extends BaseController {
30
+
31
+    @Autowired
32
+    private IFlowInstanceService flowInstanceService;
33
+
34
+    @ApiOperation(value = "根据流程定义id启动流程实例")
35
+    @PostMapping("/startBy/{procDefId}")
36
+    public AjaxResult startById(@ApiParam(value = "流程定义id") @PathVariable(value = "procDefId") String procDefId,
37
+                                @ApiParam(value = "变量集合,json对象") @RequestBody Map<String, Object> variables) {
38
+        return flowInstanceService.startProcessInstanceById(procDefId, variables);
39
+
40
+    }
41
+
42
+    @ApiOperation(value = "激活或挂起流程实例")
43
+    @PostMapping(value = "/updateState")
44
+    public AjaxResult updateState(@ApiParam(value = "1:激活,2:挂起", required = true) @RequestParam Integer state,
45
+                                  @ApiParam(value = "流程实例ID", required = true) @RequestParam String instanceId) {
46
+        flowInstanceService.updateState(state,instanceId);
47
+        return AjaxResult.success();
48
+    }
49
+
50
+    @ApiOperation("结束流程实例")
51
+    @PostMapping(value = "/stopProcessInstance")
52
+    public AjaxResult stopProcessInstance(@RequestBody FlowTaskVo flowTaskVo) {
53
+        flowInstanceService.stopProcessInstance(flowTaskVo);
54
+        return AjaxResult.success();
55
+    }
56
+
57
+    @ApiOperation(value = "删除流程实例")
58
+    @Log(title = "删除任务", businessType = BusinessType.DELETE)
59
+    @DeleteMapping(value = "/delete/{instanceIds}")
60
+    public AjaxResult delete(@ApiParam(value = "流程实例ID", required = true) @PathVariable String[] instanceIds,
61
+                             @ApiParam(value = "删除原因") @RequestParam(required = false) String deleteReason) {
62
+        for (String instanceId : instanceIds) {
63
+            flowInstanceService.delete(instanceId,deleteReason);
64
+        }
65
+        return AjaxResult.success();
66
+    }
67
+}

+ 65 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/java/com/ruoyi/system/domain/SysTaskForm.java

@@ -0,0 +1,65 @@
1
+package com.ruoyi.system.domain;
2
+
3
+import com.ruoyi.common.annotation.Excel;
4
+import com.ruoyi.common.core.domain.BaseEntity;
5
+import org.apache.commons.lang3.builder.ToStringBuilder;
6
+import org.apache.commons.lang3.builder.ToStringStyle;
7
+
8
+/**
9
+ * 流程任务关联单对象 sys_task_form
10
+ * 
11
+ * @author Tony
12
+ * @date 2021-04-03
13
+ */
14
+public class SysTaskForm extends BaseEntity
15
+{
16
+    private static final long serialVersionUID = 1L;
17
+
18
+    /** 主键 */
19
+    private Long id;
20
+
21
+    /** 表单主键 */
22
+    @Excel(name = "表单主键")
23
+    private Long formId;
24
+
25
+    /** 所属任务 */
26
+    @Excel(name = "所属任务")
27
+    private String taskId;
28
+
29
+    public void setId(Long id) 
30
+    {
31
+        this.id = id;
32
+    }
33
+
34
+    public Long getId() 
35
+    {
36
+        return id;
37
+    }
38
+    public void setFormId(Long formId) 
39
+    {
40
+        this.formId = formId;
41
+    }
42
+
43
+    public Long getFormId() 
44
+    {
45
+        return formId;
46
+    }
47
+    public void setTaskId(String taskId) 
48
+    {
49
+        this.taskId = taskId;
50
+    }
51
+
52
+    public String getTaskId() 
53
+    {
54
+        return taskId;
55
+    }
56
+
57
+    @Override
58
+    public String toString() {
59
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
60
+            .append("id", getId())
61
+            .append("formId", getFormId())
62
+            .append("taskId", getTaskId())
63
+            .toString();
64
+    }
65
+}

+ 62 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysTaskFormMapper.java

@@ -0,0 +1,62 @@
1
+package com.ruoyi.system.mapper;
2
+
3
+import com.ruoyi.system.domain.SysTaskForm;
4
+
5
+import java.util.List;
6
+
7
+/**
8
+ * 流程任务关联单Mapper接口
9
+ * 
10
+ * @author Tony
11
+ * @date 2021-04-03
12
+ */
13
+public interface SysTaskFormMapper 
14
+{
15
+    /**
16
+     * 查询流程任务关联单
17
+     * 
18
+     * @param id 流程任务关联单ID
19
+     * @return 流程任务关联单
20
+     */
21
+    public SysTaskForm selectSysTaskFormById(Long id);
22
+
23
+    /**
24
+     * 查询流程任务关联单列表
25
+     * 
26
+     * @param sysTaskForm 流程任务关联单
27
+     * @return 流程任务关联单集合
28
+     */
29
+    public List<SysTaskForm> selectSysTaskFormList(SysTaskForm sysTaskForm);
30
+
31
+    /**
32
+     * 新增流程任务关联单
33
+     * 
34
+     * @param sysTaskForm 流程任务关联单
35
+     * @return 结果
36
+     */
37
+    public int insertSysTaskForm(SysTaskForm sysTaskForm);
38
+
39
+    /**
40
+     * 修改流程任务关联单
41
+     * 
42
+     * @param sysTaskForm 流程任务关联单
43
+     * @return 结果
44
+     */
45
+    public int updateSysTaskForm(SysTaskForm sysTaskForm);
46
+
47
+    /**
48
+     * 删除流程任务关联单
49
+     * 
50
+     * @param id 流程任务关联单ID
51
+     * @return 结果
52
+     */
53
+    public int deleteSysTaskFormById(Long id);
54
+
55
+    /**
56
+     * 批量删除流程任务关联单
57
+     * 
58
+     * @param ids 需要删除的数据ID
59
+     * @return 结果
60
+     */
61
+    public int deleteSysTaskFormByIds(Long[] ids);
62
+}

+ 66 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/resources/mapper/system/SysDeployFormMapper.xml

@@ -0,0 +1,66 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.SysDeployFormMapper">
6
+    
7
+    <resultMap type="SysDeployForm" id="SysDeployFormResult">
8
+        <result property="id"    column="id"    />
9
+        <result property="formId"    column="form_id"    />
10
+        <result property="deployId"    column="deploy_id"    />
11
+    </resultMap>
12
+
13
+    <sql id="selectSysDeployFormVo">
14
+        select id, form_id, deploy_id from sys_deploy_form
15
+    </sql>
16
+
17
+    <select id="selectSysDeployFormList" parameterType="SysDeployForm" resultMap="SysDeployFormResult">
18
+        <include refid="selectSysDeployFormVo"/>
19
+        <where>  
20
+            <if test="formId != null "> and form_id = #{formId}</if>
21
+            <if test="deployId != null  and deployId != ''"> and deploy_id = #{deployId}</if>
22
+        </where>
23
+    </select>
24
+    
25
+    <select id="selectSysDeployFormById" parameterType="Long" resultMap="SysDeployFormResult">
26
+        <include refid="selectSysDeployFormVo"/>
27
+        where id = #{id}
28
+    </select>
29
+
30
+    <select id="selectSysDeployFormByDeployId" resultType="com.ruoyi.system.domain.SysForm">
31
+        select t1.form_content as formContent,t1.form_name as formName,t1.form_id as formId from sys_form t1 left join sys_deploy_form t2 on t1.form_id = t2.form_id
32
+        where t2.deploy_id = #{deployId} limit 1
33
+    </select>
34
+
35
+    <insert id="insertSysDeployForm" parameterType="SysDeployForm" useGeneratedKeys="true" keyProperty="id">
36
+        insert into sys_deploy_form
37
+        <trim prefix="(" suffix=")" suffixOverrides=",">
38
+            <if test="formId != null">form_id,</if>
39
+            <if test="deployId != null">deploy_id,</if>
40
+         </trim>
41
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
42
+            <if test="formId != null">#{formId},</if>
43
+            <if test="deployId != null">#{deployId},</if>
44
+         </trim>
45
+    </insert>
46
+
47
+    <update id="updateSysDeployForm" parameterType="SysDeployForm">
48
+        update sys_deploy_form
49
+        <trim prefix="SET" suffixOverrides=",">
50
+            <if test="formId != null">form_id = #{formId},</if>
51
+            <if test="deployId != null">deploy_id = #{deployId},</if>
52
+        </trim>
53
+        where id = #{id}
54
+    </update>
55
+
56
+    <delete id="deleteSysDeployFormById" parameterType="Long">
57
+        delete from sys_deploy_form where id = #{id}
58
+    </delete>
59
+
60
+    <delete id="deleteSysDeployFormByIds" parameterType="String">
61
+        delete from sys_deploy_form where id in 
62
+        <foreach item="id" collection="array" open="(" separator="," close=")">
63
+            #{id}
64
+        </foreach>
65
+    </delete>
66
+</mapper>

+ 82 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/resources/mapper/system/SysFormMapper.xml

@@ -0,0 +1,82 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.SysFormMapper">
6
+    
7
+    <resultMap type="SysForm" id="SysFormResult">
8
+        <result property="formId"    column="form_id"    />
9
+        <result property="formName"    column="form_name"    />
10
+        <result property="formContent"    column="form_content"    />
11
+        <result property="createTime"    column="create_time"    />
12
+        <result property="updateTime"    column="update_time"    />
13
+        <result property="createBy"    column="create_by"    />
14
+        <result property="updateBy"    column="update_by"    />
15
+        <result property="remark"    column="remark"    />
16
+    </resultMap>
17
+
18
+    <sql id="selectSysFormVo">
19
+        select form_id, form_name, form_content, create_time, update_time, create_by, update_by, remark from sys_form
20
+    </sql>
21
+
22
+    <select id="selectSysFormList" parameterType="SysForm" resultMap="SysFormResult">
23
+        <include refid="selectSysFormVo"/>
24
+        <where>  
25
+            <if test="formName != null  and formName != ''"> and form_name like concat('%', #{formName}, '%')</if>
26
+            <if test="formContent != null  and formContent != ''"> and form_content = #{formContent}</if>
27
+        </where>
28
+        order by create_time desc
29
+    </select>
30
+    
31
+    <select id="selectSysFormById" parameterType="Long" resultMap="SysFormResult">
32
+        <include refid="selectSysFormVo"/>
33
+        where form_id = #{formId}
34
+    </select>
35
+        
36
+    <insert id="insertSysForm" parameterType="SysForm" useGeneratedKeys="true" keyProperty="formId">
37
+        insert into sys_form
38
+        <trim prefix="(" suffix=")" suffixOverrides=",">
39
+            <if test="formName != null">form_name,</if>
40
+            <if test="formContent != null">form_content,</if>
41
+            <if test="createTime != null">create_time,</if>
42
+            <if test="updateTime != null">update_time,</if>
43
+            <if test="createBy != null">create_by,</if>
44
+            <if test="updateBy != null">update_by,</if>
45
+            <if test="remark != null">remark,</if>
46
+         </trim>
47
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
48
+            <if test="formName != null">#{formName},</if>
49
+            <if test="formContent != null">#{formContent},</if>
50
+            <if test="createTime != null">#{createTime},</if>
51
+            <if test="updateTime != null">#{updateTime},</if>
52
+            <if test="createBy != null">#{createBy},</if>
53
+            <if test="updateBy != null">#{updateBy},</if>
54
+            <if test="remark != null">#{remark},</if>
55
+         </trim>
56
+    </insert>
57
+
58
+    <update id="updateSysForm" parameterType="SysForm">
59
+        update sys_form
60
+        <trim prefix="SET" suffixOverrides=",">
61
+            <if test="formName != null">form_name = #{formName},</if>
62
+            <if test="formContent != null">form_content = #{formContent},</if>
63
+            <if test="createTime != null">create_time = #{createTime},</if>
64
+            <if test="updateTime != null">update_time = #{updateTime},</if>
65
+            <if test="createBy != null">create_by = #{createBy},</if>
66
+            <if test="updateBy != null">update_by = #{updateBy},</if>
67
+            <if test="remark != null">remark = #{remark},</if>
68
+        </trim>
69
+        where form_id = #{formId}
70
+    </update>
71
+
72
+    <delete id="deleteSysFormById" parameterType="Long">
73
+        delete from sys_form where form_id = #{formId}
74
+    </delete>
75
+
76
+    <delete id="deleteSysFormByIds" parameterType="String">
77
+        delete from sys_form where form_id in 
78
+        <foreach item="formId" collection="array" open="(" separator="," close=")">
79
+            #{formId}
80
+        </foreach>
81
+    </delete>
82
+</mapper>

+ 115 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/resources/mapper/system/SysListenerMapper.xml

@@ -0,0 +1,115 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.SysListenerMapper">
6
+
7
+    <resultMap type="SysListener" id="SysListenerResult">
8
+        <result property="id" column="id"/>
9
+        <result property="name" column="name"/>
10
+        <result property="type" column="type"/>
11
+        <result property="eventType" column="event_type"/>
12
+        <result property="valueType" column="value_type"/>
13
+        <result property="value" column="value"/>
14
+        <result property="createTime" column="create_time"/>
15
+        <result property="updateTime" column="update_time"/>
16
+        <result property="createBy" column="create_by"/>
17
+        <result property="updateBy" column="update_by"/>
18
+        <result property="status" column="status"/>
19
+        <result property="remark" column="remark"/>
20
+    </resultMap>
21
+
22
+    <sql id="selectSysListenerVo">
23
+        select id,
24
+               name,
25
+               type,
26
+               event_type,
27
+               value_type,
28
+               value,
29
+               create_time,
30
+               update_time,
31
+               create_by,
32
+               update_by,
33
+               status,
34
+               remark
35
+        from sys_listener
36
+    </sql>
37
+
38
+    <select id="selectSysListenerList" parameterType="SysListener" resultMap="SysListenerResult">
39
+        <include refid="selectSysListenerVo"/>
40
+        <where>
41
+            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
42
+            <if test="type != null  and type != ''">and type = #{type}</if>
43
+            <if test="eventType != null  and eventType != ''">and event_type = #{eventType}</if>
44
+            <if test="valueType != null  and valueType != ''">and value_type = #{valueType}</if>
45
+            <if test="value != null  and value != ''">and value = #{value}</if>
46
+            <if test="status != null ">and status = #{status}</if>
47
+        </where>
48
+    </select>
49
+
50
+    <select id="selectSysListenerById" parameterType="Long" resultMap="SysListenerResult">
51
+        <include refid="selectSysListenerVo"/>
52
+        where id = #{id}
53
+    </select>
54
+
55
+    <insert id="insertSysListener" parameterType="SysListener" useGeneratedKeys="true" keyProperty="id">
56
+        insert into sys_listener
57
+        <trim prefix="(" suffix=")" suffixOverrides=",">
58
+            <if test="name != null">name,</if>
59
+            <if test="type != null">type,</if>
60
+            <if test="eventType != null">event_type,</if>
61
+            <if test="valueType != null">value_type,</if>
62
+            <if test="value != null">value,</if>
63
+            <if test="createTime != null">create_time,</if>
64
+            <if test="updateTime != null">update_time,</if>
65
+            <if test="createBy != null">create_by,</if>
66
+            <if test="updateBy != null">update_by,</if>
67
+            <if test="status != null">status,</if>
68
+            <if test="remark != null">remark,</if>
69
+        </trim>
70
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
71
+            <if test="name != null">#{name},</if>
72
+            <if test="type != null">#{type},</if>
73
+            <if test="eventType != null">#{eventType},</if>
74
+            <if test="valueType != null">#{valueType},</if>
75
+            <if test="value != null">#{value},</if>
76
+            <if test="createTime != null">#{createTime},</if>
77
+            <if test="updateTime != null">#{updateTime},</if>
78
+            <if test="createBy != null">#{createBy},</if>
79
+            <if test="updateBy != null">#{updateBy},</if>
80
+            <if test="status != null">#{status},</if>
81
+            <if test="remark != null">#{remark},</if>
82
+        </trim>
83
+    </insert>
84
+
85
+    <update id="updateSysListener" parameterType="SysListener">
86
+        update sys_listener
87
+        <trim prefix="SET" suffixOverrides=",">
88
+            <if test="name != null">name = #{name},</if>
89
+            <if test="type != null">type = #{type},</if>
90
+            <if test="eventType != null">event_type = #{eventType},</if>
91
+            <if test="valueType != null">value_type = #{valueType},</if>
92
+            <if test="value != null">value = #{value},</if>
93
+            <if test="createTime != null">create_time = #{createTime},</if>
94
+            <if test="updateTime != null">update_time = #{updateTime},</if>
95
+            <if test="createBy != null">create_by = #{createBy},</if>
96
+            <if test="updateBy != null">update_by = #{updateBy},</if>
97
+            <if test="status != null">status = #{status},</if>
98
+            <if test="remark != null">remark = #{remark},</if>
99
+        </trim>
100
+        where id = #{id}
101
+    </update>
102
+
103
+    <delete id="deleteSysListenerById" parameterType="Long">
104
+        delete
105
+        from sys_listener
106
+        where id = #{id}
107
+    </delete>
108
+
109
+    <delete id="deleteSysListenerByIds" parameterType="String">
110
+        delete from sys_listener where id in
111
+        <foreach item="id" collection="array" open="(" separator="," close=")">
112
+            #{id}
113
+        </foreach>
114
+    </delete>
115
+</mapper>

+ 31 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/resources/mapper/system/flowable/FlowDeployMapper.xml

@@ -0,0 +1,31 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.FlowDeployMapper">
6
+    
7
+
8
+    <select id="selectDeployList" resultType="com.ruoyi.system.domain.FlowProcDefDto">
9
+
10
+        SELECT
11
+            rp.id_ as id,
12
+            rp.deployment_id_ as deploymentId,
13
+            rd.name_ as name,
14
+            rd.category_ as category,
15
+            rp.key_ as flowKey,
16
+            rp.version_ as version,
17
+            rp.suspension_state_ as suspensionState,
18
+            rd.deploy_time_  as deploymentTime
19
+        FROM
20
+            act_re_procdef rp
21
+                LEFT JOIN act_re_deployment rd ON rp.deployment_id_ = rd.id_
22
+        <where>
23
+            <if test="name != null and name != ''">
24
+               and rd.name_ like concat('%', #{name}, '%')
25
+            </if>
26
+        </where>
27
+        order by rd.deploy_time_ desc
28
+    </select>
29
+
30
+
31
+</mapper>

+ 61 - 0
RuoYi-Vue-master/RuoYi-Vue-master/ruoyi-system/src/main/resources/mapper/system/flowable/SysTaskFormMapper.xml

@@ -0,0 +1,61 @@
1
+<?xml version="1.0" encoding="UTF-8" ?>
2
+<!DOCTYPE mapper
3
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
4
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
5
+<mapper namespace="com.ruoyi.system.mapper.SysTaskFormMapper">
6
+    
7
+    <resultMap type="SysTaskForm" id="SysTaskFormResult">
8
+        <result property="id"    column="id"    />
9
+        <result property="formId"    column="form_id"    />
10
+        <result property="taskId"    column="task_id"    />
11
+    </resultMap>
12
+
13
+    <sql id="selectSysTaskFormVo">
14
+        select id, form_id, task_id from sys_task_form
15
+    </sql>
16
+
17
+    <select id="selectSysTaskFormList" parameterType="SysTaskForm" resultMap="SysTaskFormResult">
18
+        <include refid="selectSysTaskFormVo"/>
19
+        <where>  
20
+            <if test="formId != null "> and form_id = #{formId}</if>
21
+            <if test="taskId != null  and taskId != ''"> and task_id = #{taskId}</if>
22
+        </where>
23
+    </select>
24
+    
25
+    <select id="selectSysTaskFormById" parameterType="Long" resultMap="SysTaskFormResult">
26
+        <include refid="selectSysTaskFormVo"/>
27
+        where id = #{id}
28
+    </select>
29
+        
30
+    <insert id="insertSysTaskForm" parameterType="SysTaskForm" useGeneratedKeys="true" keyProperty="id">
31
+        insert into sys_task_form
32
+        <trim prefix="(" suffix=")" suffixOverrides=",">
33
+            <if test="formId != null">form_id,</if>
34
+            <if test="taskId != null">task_id,</if>
35
+         </trim>
36
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
37
+            <if test="formId != null">#{formId},</if>
38
+            <if test="taskId != null">#{taskId},</if>
39
+         </trim>
40
+    </insert>
41
+
42
+    <update id="updateSysTaskForm" parameterType="SysTaskForm">
43
+        update sys_task_form
44
+        <trim prefix="SET" suffixOverrides=",">
45
+            <if test="formId != null">form_id = #{formId},</if>
46
+            <if test="taskId != null">task_id = #{taskId},</if>
47
+        </trim>
48
+        where id = #{id}
49
+    </update>
50
+
51
+    <delete id="deleteSysTaskFormById" parameterType="Long">
52
+        delete from sys_task_form where id = #{id}
53
+    </delete>
54
+
55
+    <delete id="deleteSysTaskFormByIds" parameterType="String">
56
+        delete from sys_task_form where id in 
57
+        <foreach item="id" collection="array" open="(" separator="," close=")">
58
+            #{id}
59
+        </foreach>
60
+    </delete>
61
+</mapper>