add -- 添加flowable工作流

This commit is contained in:
hewenqiang
2021-12-24 11:06:04 +08:00
parent 25959ccf65
commit 2c7cb006e5
49 changed files with 5538 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
package com.ruoyi.system.domain;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 流程实例关联表单对象 sys_instance_form
*
* @author XuanXuan Xuan
* @date 2021-03-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SysDeployForm extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Long id;
/**
* 表单主键
*/
@ExcelProperty(value = "表单主键")
private Long formId;
/**
* 流程定义主键
*/
@ExcelProperty(value = "流程定义主键")
private String deployId;
}

View File

@@ -0,0 +1,56 @@
package com.ruoyi.system.domain;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 流程表单对象 sys_task_form
*
* @author XuanXuan Xuan
* @date 2021-03-30
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class SysForm extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 表单主键
*/
private Long formId;
/**
* 表单名称
*/
@ExcelProperty(value = "表单名称")
private String formName;
/**
* 表单内容
*/
@ExcelProperty(value = "表单内容")
private String formContent;
/**
* 备注
*/
private String remark;
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("formId", getFormId())
.append("formName", getFormName())
.append("formContent", getFormContent())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("createBy", getCreateBy())
.append("updateBy", getUpdateBy())
.append("remark", getRemark())
.toString();
}
}

View File

@@ -0,0 +1,65 @@
package com.ruoyi.system.domain;
import com.alibaba.excel.annotation.ExcelProperty;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 流程任务关联单对象 sys_task_form
*
* @author XuanXuan Xuan
* @date 2021-04-03
*/
public class SysTaskForm extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 表单主键 */
@ExcelProperty(value = "表单主键")
private Long formId;
/** 所属任务 */
@ExcelProperty(value = "所属任务")
private String taskId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setFormId(Long formId)
{
this.formId = formId;
}
public Long getFormId()
{
return formId;
}
public void setTaskId(String taskId)
{
this.taskId = taskId;
}
public String getTaskId()
{
return taskId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("formId", getFormId())
.append("taskId", getTaskId())
.toString();
}
}

View File

@@ -0,0 +1,71 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysDeployForm;
import com.ruoyi.system.domain.SysForm;
import java.util.List;
/**
* 流程实例关联表单Mapper接口
*
* @author XuanXuan Xuan
* @date 2021-03-30
*/
public interface SysDeployFormMapper {
/**
* 查询流程实例关联表单
*
* @param id 流程实例关联表单ID
* @return 流程实例关联表单
*/
SysDeployForm selectSysDeployFormById(Long id);
/**
* 查询流程实例关联表单列表
*
* @param SysDeployForm 流程实例关联表单
* @return 流程实例关联表单集合
*/
List<SysDeployForm> selectSysDeployFormList(SysDeployForm SysDeployForm);
/**
* 新增流程实例关联表单
*
* @param SysDeployForm 流程实例关联表单
* @return 结果
*/
int insertSysDeployForm(SysDeployForm SysDeployForm);
/**
* 修改流程实例关联表单
*
* @param SysDeployForm 流程实例关联表单
* @return 结果
*/
int updateSysDeployForm(SysDeployForm SysDeployForm);
/**
* 删除流程实例关联表单
*
* @param id 流程实例关联表单ID
* @return 结果
*/
int deleteSysDeployFormById(Long id);
/**
* 批量删除流程实例关联表单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteSysDeployFormByIds(Long[] ids);
/**
* 查询流程挂着的表单
*
* @param deployId
* @return
*/
SysForm selectSysDeployFormByDeployId(String deployId);
}

View File

@@ -0,0 +1,66 @@
package com.ruoyi.system.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
import com.ruoyi.system.domain.SysForm;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 流程表单Mapper接口
*
* @author XuanXuan Xuan
* @date 2021-03-30
*/
public interface SysFormMapper extends BaseMapperPlus<SysForm> {
/**
* 查询流程表单
*
* @param formId 流程表单ID
* @return 流程表单
*/
SysForm selectSysFormById(Long formId);
/**
* 查询流程表单列表
*
* @param sysForm 流程表单
* @return 流程表单集合
*/
Page<SysForm> selectSysFormPage(@Param("page") Page<SysForm> page, @Param("from") SysForm sysForm);
List<SysForm> selectSysFormList(SysForm sysForm);
/**
* 新增流程表单
*
* @param sysForm 流程表单
* @return 结果
*/
int insertSysForm(SysForm sysForm);
/**
* 修改流程表单
*
* @param sysForm 流程表单
* @return 结果
*/
int updateSysForm(SysForm sysForm);
/**
* 删除流程表单
*
* @param formId 流程表单ID
* @return 结果
*/
int deleteSysFormById(Long formId);
/**
* 批量删除流程表单
*
* @param formIds 需要删除的数据ID
* @return 结果
*/
int deleteSysFormByIds(Long[] formIds);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import com.ruoyi.system.domain.SysTaskForm;
import java.util.List;
/**
* 流程任务关联单Mapper接口
*
* @author XuanXuan Xuan
* @date 2021-04-03
*/
public interface SysTaskFormMapper {
/**
* 查询流程任务关联单
*
* @param id 流程任务关联单ID
* @return 流程任务关联单
*/
SysTaskForm selectSysTaskFormById(Long id);
/**
* 查询流程任务关联单列表
*
* @param sysTaskForm 流程任务关联单
* @return 流程任务关联单集合
*/
List<SysTaskForm> selectSysTaskFormList(SysTaskForm sysTaskForm);
/**
* 新增流程任务关联单
*
* @param sysTaskForm 流程任务关联单
* @return 结果
*/
int insertSysTaskForm(SysTaskForm sysTaskForm);
/**
* 修改流程任务关联单
*
* @param sysTaskForm 流程任务关联单
* @return 结果
*/
int updateSysTaskForm(SysTaskForm sysTaskForm);
/**
* 删除流程任务关联单
*
* @param id 流程任务关联单ID
* @return 结果
*/
int deleteSysTaskFormById(Long id);
/**
* 批量删除流程任务关联单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
int deleteSysTaskFormByIds(Long[] ids);
}

View File

@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysDeployFormMapper">
<resultMap type="com.ruoyi.system.domain.SysDeployForm" id="SysDeployFormResult">
<result property="id" column="id"/>
<result property="formId" column="form_id"/>
<result property="deployId" column="deploy_id"/>
</resultMap>
<sql id="selectSysDeployFormVo">
select id, form_id, deploy_id
from sys_deploy_form
</sql>
<select id="selectSysDeployFormList" parameterType="SysDeployForm" resultMap="SysDeployFormResult">
<include refid="selectSysDeployFormVo"/>
<where>
<if test="formId != null ">and form_id = #{formId}</if>
<if test="deployId != null and deployId != ''">and deploy_id = #{deployId}</if>
</where>
</select>
<select id="selectSysDeployFormById" parameterType="Long" resultMap="SysDeployFormResult">
<include refid="selectSysDeployFormVo"/>
where id = #{id}
</select>
<select id="selectSysDeployFormByDeployId" resultType="com.ruoyi.system.domain.SysForm">
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
where t2.deploy_id = #{deployId} limit 1
</select>
<insert id="insertSysDeployForm" parameterType="SysDeployForm" useGeneratedKeys="true" keyProperty="id">
insert into sys_deploy_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formId != null">form_id,</if>
<if test="deployId != null">deploy_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formId != null">#{formId},</if>
<if test="deployId != null">#{deployId},</if>
</trim>
</insert>
<update id="updateSysDeployForm" parameterType="SysDeployForm">
update sys_deploy_form
<trim prefix="SET" suffixOverrides=",">
<if test="formId != null">form_id = #{formId},</if>
<if test="deployId != null">deploy_id = #{deployId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysDeployFormById" parameterType="Long">
delete
from sys_deploy_form
where id = #{id}
</delete>
<delete id="deleteSysDeployFormByIds" parameterType="String">
delete from sys_deploy_form where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysFormMapper">
<resultMap type="com.ruoyi.system.domain.SysForm" id="SysFormResult">
<result property="formId" column="form_id"/>
<result property="formName" column="form_name"/>
<result property="formContent" column="form_content"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectSysFormVo">
select form_id,
form_name,
form_content,
create_time,
update_time,
create_by,
update_by,
remark
from sys_form
</sql>
<select id="selectSysFormPage" parameterType="SysForm" resultMap="SysFormResult">
<include refid="selectSysFormVo"/>
<where>
<if test="from.formName != null and from.formName != ''">
and form_name like concat('%', #{from.formName}, '%')
</if>
<if test="from.formContent != null and from.formContent != ''">
and form_content = #{from.formContent}
</if>
</where>
</select>
<select id="selectSysFormList" parameterType="SysForm" resultMap="SysFormResult">
<include refid="selectSysFormVo"/>
<where>
<if test="formName != null and formName != ''">and form_name like concat('%', #{formName}, '%')</if>
<if test="formContent != null and formContent != ''">and form_content = #{formContent}</if>
</where>
</select>
<select id="selectSysFormById" parameterType="Long" resultMap="SysFormResult">
<include refid="selectSysFormVo"/>
where form_id = #{formId}
</select>
<insert id="insertSysForm" parameterType="SysForm" useGeneratedKeys="true" keyProperty="formId">
insert into sys_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formName != null">form_name,</if>
<if test="formContent != null">form_content,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateBy != null">update_by,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formName != null">#{formName},</if>
<if test="formContent != null">#{formContent},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateSysForm" parameterType="SysForm">
update sys_form
<trim prefix="SET" suffixOverrides=",">
<if test="formName != null">form_name = #{formName},</if>
<if test="formContent != null">form_content = #{formContent},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where form_id = #{formId}
</update>
<delete id="deleteSysFormById" parameterType="Long">
delete
from sys_form
where form_id = #{formId}
</delete>
<delete id="deleteSysFormByIds" parameterType="String">
delete from sys_form where form_id in
<foreach item="formId" collection="array" open="(" separator="," close=")">
#{formId}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.SysTaskFormMapper">
<resultMap type="com.ruoyi.system.domain.SysTaskForm" id="SysTaskFormResult">
<result property="id" column="id"/>
<result property="formId" column="form_id"/>
<result property="taskId" column="task_id"/>
</resultMap>
<sql id="selectSysTaskFormVo">
select id, form_id, task_id
from sys_task_form
</sql>
<select id="selectSysTaskFormList" parameterType="SysTaskForm" resultMap="SysTaskFormResult">
<include refid="selectSysTaskFormVo"/>
<where>
<if test="formId != null ">and form_id = #{formId}</if>
<if test="taskId != null and taskId != ''">and task_id = #{taskId}</if>
</where>
</select>
<select id="selectSysTaskFormById" parameterType="Long" resultMap="SysTaskFormResult">
<include refid="selectSysTaskFormVo"/>
where id = #{id}
</select>
<insert id="insertSysTaskForm" parameterType="SysTaskForm" useGeneratedKeys="true" keyProperty="id">
insert into sys_task_form
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="formId != null">form_id,</if>
<if test="taskId != null">task_id,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="formId != null">#{formId},</if>
<if test="taskId != null">#{taskId},</if>
</trim>
</insert>
<update id="updateSysTaskForm" parameterType="SysTaskForm">
update sys_task_form
<trim prefix="SET" suffixOverrides=",">
<if test="formId != null">form_id = #{formId},</if>
<if test="taskId != null">task_id = #{taskId},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteSysTaskFormById" parameterType="Long">
delete
from sys_task_form
where id = #{id}
</delete>
<delete id="deleteSysTaskFormByIds" parameterType="String">
delete from sys_task_form where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>