This commit is contained in:
clay
2024-03-06 17:44:09 +08:00
commit adaec0eadd
1493 changed files with 219939 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
liquibase.database.core.CockroachDatabase
liquibase.database.core.DB2Database
liquibase.database.core.Db2zDatabase
liquibase.database.core.DerbyDatabase
liquibase.database.core.Firebird3Database
liquibase.database.core.FirebirdDatabase
liquibase.database.core.H2Database
liquibase.database.core.HsqlDatabase
liquibase.database.core.InformixDatabase
liquibase.database.core.Ingres9Database
liquibase.database.core.MSSQLDatabase
liquibase.database.core.MariaDBDatabase
liquibase.database.core.MockDatabase
liquibase.database.core.MySQLDatabase
liquibase.database.core.OracleDatabase
liquibase.database.core.PostgresDatabase
liquibase.database.core.SQLiteDatabase
liquibase.database.core.SybaseASADatabase
liquibase.database.core.SybaseDatabase
liquibase.database.core.DmDatabase
liquibase.database.core.UnsupportedDatabase

View File

@@ -0,0 +1,18 @@
# Spring
spring:
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 10.7.127.185:38848
namespace: clay
dubbo:
registry:
parameters:
namespace: dubbo-clay
code:
java:
class-path: E:\home\clay\code\

View File

@@ -0,0 +1,15 @@
# Spring
spring:
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: nacos.fateverse.svc.cluster.local:8848
management:
server:
port: 9595
code:
java:
class-path: /home/clay/code/

View File

@@ -0,0 +1,60 @@
# Tomcat
server:
port: 5060
# Spring
spring:
main:
allow-bean-definition-overriding: true
application:
# 应用名称
name: workflow
profiles:
# 环境配置
active: dev
cloud:
nacos:
discovery:
# 服务注册地址
server-addr: 192.168.101.108:8848
username: nacos
password: nacos
namespace: ${spring.profiles.active}
config:
# 配置中心地址
server-addr: ${spring.cloud.nacos.discovery.server-addr}
file-extension: yaml
namespace: ${spring.profiles.active}
shared-configs:
- data-id: application-${spring.profiles.active}.yaml
refresh: true
flowable:
dmn:
enabled: false
cmmn:
enabled: false
idm:
enabled: false
async-history-executor-activate: false
async-executor-activate: true
check-process-definitions: false
content:
enabled: false
app:
enabled: false
eventregistry:
enabled: false
dubbo:
application:
name: dubbo-${spring.application.name}
protocol:
name: dubbo
port: -1
registry:
address: nacos://${spring.cloud.nacos.discovery.server-addr}
username: ${spring.cloud.nacos.discovery.username}
password: ${spring.cloud.nacos.discovery.password}
parameters:
namespace: dubbo-${spring.profiles.active}

View File

@@ -0,0 +1,44 @@
<?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="cn.fateverse.workflow.mapper.FormItemDataMapper">
<insert id="insert">
insert into wk_ru_form_item_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="processInstanceId != null and processInstanceId != ''">process_instance_id,</if>
<if test="isPresent != null ">is_present,</if>
<if test="isStart != null ">is_start,</if>
<if test="formData != null and formData != ''">form_data,</if>
<if test="optionalUser != null and optionalUser != ''">optional_user,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="processInstanceId != null and processInstanceId != ''">#{processInstanceId},</if>
<if test="isStart != null ">#{isStart},</if>
<if test="isPresent != null ">#{isPresent},</if>
<if test="formData != null and formData != ''">#{formData},</if>
<if test="optionalUser != null and optionalUser != ''">#{optionalUser},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updatePresentStart">
update wk_ru_form_item_data
set is_present = 0
where process_instance_id = #{processInstanceId}
</update>
<select id="selectByProcessInstanceId" resultType="cn.fateverse.workflow.entity.vo.FormItemData">
select id, process_instance_id, is_start, is_present, form_data,optional_user, create_time, create_by
from wk_ru_form_item_data
<where>
<if test="isPresent != null">and is_present = #{isPresent}</if>
<if test="processInstanceId != null and processInstanceId != ''">and process_instance_id =
#{processInstanceId}
</if>
</where>
</select>
</mapper>

View File

@@ -0,0 +1,40 @@
<?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="cn.fateverse.workflow.mapper.FormPermMapper">
<sql id="formPermSql">
select id, deployment_id, from_key, required, perm
from wk_re_form_perm
</sql>
<insert id="batchInsert">
insert into wk_re_form_perm
(id,deployment_id,from_key,required,perm)
values
<foreach collection="list" separator="," item="item">
(#{item.id},
#{item.deploymentId},
#{item.fromKey},
#{item.required},
#{item.perm})
</foreach>
</insert>
<select id="selectListByFormKeyAndDeploymentId" resultType="cn.fateverse.workflow.entity.FormPerm">
<include refid="formPermSql"/>
<where>
<if test="fromKey != null and fromKey != ''"> and from_key = #{fromKey}</if>
<if test="deploymentId != null and deploymentId != ''"> and deployment_id = #{deploymentId}</if>
</where>
</select>
<select id="selectListByFormKeyListAndDeploymentId"
resultType="cn.fateverse.workflow.entity.FormPerm">
<include refid="formPermSql"/>
where deployment_id = #{deploymentId} and from_key in
<foreach collection="fromKeys" item="fromKey" open="(" separator="," close=")" index="index">
#{fromKey}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,11 @@
<?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="cn.fateverse.workflow.mapper.HisFlowableActinstMapper" >
<delete id="deleteByIds" parameterType="java.util.List">
delete from act_hi_actinst where ID_ in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,169 @@
<?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="cn.fateverse.workflow.mapper.HistoricalOperationMapper">
<sql id="historicalOperationSql">
select task_id,
process_instance_id,
operation_name,
operation,
approval_mode,
message,
finish_time,
node_id,
node_type,
state,
start_time,
user_info,
mark
from wk_hi_operation
</sql>
<select id="selectListByProcessInstanceId"
resultType="cn.fateverse.workflow.entity.HistoricalOperation">
<include refid="historicalOperationSql"/>
<where>
<if test="processInstanceId != null and processInstanceId !=''">and process_instance_id =
#{processInstanceId}
</if>
<if test="mark != null">and mark = #{mark}</if>
</where>
order by start_time asc
</select>
<select id="selectByTaskId"
resultType="cn.fateverse.workflow.entity.HistoricalOperation">
<include refid="historicalOperationSql"/>
where task_id = #{taskId}
</select>
<select id="selectByProcessInstanceIdAndNodeId"
resultType="cn.fateverse.workflow.entity.HistoricalOperation">
<include refid="historicalOperationSql"/>
where process_instance_id = #{processInstanceId} and node_id = #{nodeId} and mark = 0
</select>
<select id="selectCountByProcessInstanceIdAndNodeId" resultType="java.lang.Integer">
select count(1)
from wk_hi_operation
where process_instance_id = #{processInstanceId}
and node_id = #{nodeId}
and mark = 0
</select>
<update id="updateStatusByProcessInstanceIdAndNodeId">
update wk_hi_operation
set state = #{state},
finish_time = sysdate()
where process_instance_id = #{processInstanceId}
and node_id = #{nodeId}
and mark = 0
</update>
<select id="selectByProcessInstanceIdAndNotNodeId"
resultType="cn.fateverse.workflow.entity.HistoricalOperation">
<include refid="historicalOperationSql"/>
where process_instance_id = #{processInstanceId} and state = #{state}
</select>
<select id="selectRunningByProcessInstanceId"
resultType="cn.fateverse.workflow.entity.HistoricalOperation">
<include refid="historicalOperationSql"/>
where state = 'RUNNING' and mark = 0
and process_instance_id in
<foreach collection="list" item="processInstanceId" open="(" separator="," close=")">
#{processInstanceId}
</foreach>
</select>
<insert id="insert">
insert into wk_hi_operation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="taskId != null and taskId != ''">task_id,</if>
<if test="nodeId != null and nodeId != ''">node_id,</if>
<if test="processInstanceId != null and processInstanceId != ''">process_instance_id,</if>
<if test="operationName != null and operationName != ''">operation_name,</if>
<if test="operation != null">operation,</if>
<if test="approvalMode != null and approvalMode != ''">approval_mode,</if>
<if test="message != null and message != ''">message,</if>
<if test="nodeType != null and nodeType != ''">node_type,</if>
<if test="state != null">state,</if>
<if test="startTime != null ">start_time,</if>
<if test="finishTime != null ">finish_time,</if>
<if test="userInfo != null and userInfo != ''">user_info,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="taskId != null and taskId != ''">#{taskId},</if>
<if test="nodeId != null and nodeId != ''">#{nodeId},</if>
<if test="processInstanceId != null and processInstanceId != ''">#{processInstanceId},</if>
<if test="operationName != null and operationName != ''">#{operationName},</if>
<if test="operation != null">#{operation},</if>
<if test="approvalMode != null and approvalMode != ''">#{approvalMode},</if>
<if test="message != null and message != ''">#{message},</if>
<if test="nodeType != null and nodeType != ''">#{nodeType},</if>
<if test="state != null">#{state},</if>
<if test="startTime != null ">#{startTime},</if>
<if test="finishTime != null ">#{finishTime},</if>
<if test="userInfo != null and userInfo != ''">#{userInfo},</if>
</trim>
</insert>
<update id="update">
update wk_hi_operation
<set>
<if test="finishTime != null ">finish_time = #{finishTime},</if>
<if test="state != null">state = #{state},</if>
<if test="userInfo != null and userInfo != ''">user_info = #{userInfo},</if>
<if test="message != null and message != ''">message = #{message},</if>
</set>
where process_instance_id = #{processInstanceId} and node_id = #{nodeId}
</update>
<update id="batchUpdate">
update wk_hi_operation
<set>
<trim prefix="finish_time = case" suffix="end,">
<foreach collection="list" separator=" " item="item">
<if test="item.finishTime != null">
when task_id = #{item.taskId} then #{item.finishTime}
</if>
</foreach>
</trim>
<trim prefix="state = case" suffix="end,">
<foreach collection="list" separator=" " item="item">
<if test="item.state != null">
when task_id = #{item.taskId} then #{item.state}
</if>
</foreach>
</trim>
<trim prefix="mark = case" suffix="end,">
<foreach collection="list" separator=" " item="item">
<if test="item.mark != null and item.mark != ''">
when task_id = #{item.taskId} then #{item.mark}
</if>
</foreach>
</trim>
<trim prefix="user_info = case" suffix="end,">
<foreach collection="list" separator=" " item="item">
<if test="item.userInfo != null and item.userInfo != ''">
</if>
when task_id = #{item.taskId} then #{item.userInfo}
</foreach>
</trim>
<trim prefix="message = case" suffix="end,">
<foreach collection="list" separator=" " item="item">
<if test="item.message != null and item.message != ''">
when task_id = #{item.taskId} then #{item.message}
</if>
</foreach>
</trim>
</set>
where task_id in
<foreach collection="list" item="item" index="index"
separator="," open="(" close=")">
#{item.taskId}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,81 @@
<?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="cn.fateverse.workflow.mapper.ProcessBusinessMapper">
<sql id="WorkflowBusinessResult">
select business_id,
group_id,
deployment_id,
process_definition_key,
deployment_name,
remark,
create_by,
create_time,
update_by,
update_time
from wk_re_process_business
</sql>
<select id="selectWorkflowBusinessSimple" resultType="cn.fateverse.workflow.entity.vo.ProcessDefinitionVo">
select business_id, arp.ID_ as process_definition_id,
group_id,rb.deployment_id,process_definition_key, rb.deployment_name,rd.logo,concat('v', arp.VERSION_) as version
,update_time,rb.remark,arp.SUSPENSION_STATE_ as state
from wk_re_process_business rb
left join act_re_procdef arp on arp.DEPLOYMENT_ID_ = rb.deployment_id
left join wk_re_process_data rd on rb.deployment_id = rd.deployment_id
<where>
<if test="deploymentName != null and deploymentName != ''">and rb.deployment_name like
concat('%',#{deploymentName},'%')
</if>
<if test="startTime != null and endTime != null">and update_time between #{startTime} and #{endTime}</if>
<if test="state != null">and arp.SUSPENSION_STATE_ = #{state}</if>
</where>
order by create_time desc
</select>
<insert id="insert" keyProperty="businessId" useGeneratedKeys="true">
insert into wk_re_process_business
<trim prefix=" ( " suffix=" ) " suffixOverrides=",">
<if test="groupId != null and groupId != ''">group_id,</if>
<if test="deploymentId != null and deploymentId != ''">deployment_id,</if>
<if test="processDefinitionKey != null and processDefinitionKey != ''">process_definition_key,</if>
<if test="deploymentName != null and deploymentName != ''">deployment_name,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix=" values ( " suffix=" ) " suffixOverrides=",">
<if test="groupId != null and groupId != ''">#{groupId},</if>
<if test="deploymentId != null and deploymentId != ''">#{deploymentId},</if>
<if test="processDefinitionKey != null and processDefinitionKey != ''">#{processDefinitionKey},</if>
<if test="deploymentName != null and deploymentName != ''">#{deploymentName},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<select id="selectByDeploymentKey"
resultType="cn.fateverse.workflow.entity.ProcessBusiness">
<include refid="WorkflowBusinessResult"/>
where process_definition_key = #{processDefinitionKey}
</select>
<select id="selectByDeploymentId" resultType="cn.fateverse.workflow.entity.ProcessBusiness">
<include refid="WorkflowBusinessResult"/>
where deployment_id = #{deploymentId}
</select>
<update id="update">
update wk_re_process_business
<set>
<if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
<if test="deploymentId != null and deploymentId != ''">deployment_id = #{deploymentId},</if>
<if test="processDefinitionKey != null and processDefinitionKey != ''">process_definition_key = #{processDefinitionKey},</if>
<if test="deploymentName != null and deploymentName != ''">deployment_name = #{deploymentName},</if>
<if test="remark != null and remark != ''">remark = #{remark},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
where business_id = #{businessId}
</update>
</mapper>

View File

@@ -0,0 +1,56 @@
<?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="cn.fateverse.workflow.mapper.ProcessDataMapper">
<select id="selectByDeploymentKey" resultType="cn.fateverse.workflow.entity.vo.ProcessDefinitionHistoryVo">
select wrd.logo, arp.ID_ as process_definition_id, arp.NAME_ as deployment_name, concat('v', arp.VERSION_) as version,arp.KEY_ as deployment_key, wrd.remark, arp.SUSPENSION_STATE_ as state, wrd.deployment_id
from wk_re_process_data wrd
inner join act_re_procdef arp on arp.DEPLOYMENT_ID_ = wrd.deployment_id
where arp.KEY_ = #{processDefinitionKey}
order by arp.VERSION_ desc
</select>
<select id="selectByProcessDefinitionId" resultType="cn.fateverse.workflow.entity.ProcessData">
select wrd.deployment_id,deployment_name, logo, settings, process_str, form_item_str, remark
from wk_re_process_data wrd
left join act_re_procdef arp on arp.DEPLOYMENT_ID_ = wrd.deployment_id
where arp.ID_ = #{processDefinitionId}
</select>
<select id="selectByDeploymentId" resultType="cn.fateverse.workflow.entity.ProcessData">
select deployment_id, deployment_name, logo, settings, process_str, form_item_str, remark
from wk_re_process_data where deployment_id = #{deploymentId}
</select>
<select id="selectByProcessDefinitionKey" resultType="cn.fateverse.workflow.entity.ProcessData">
select wrpd.deployment_id, wrpd.deployment_name, wrpd.logo, wrpd.settings, wrpd.process_str, wrpd.form_item_str, wrpd.remark
from wk_re_process_data wrpd
left join wk_re_process_business wrpb on wrpd.deployment_id = wrpb.deployment_id
where wrpb.process_definition_key = #{processDefinitionKey}
</select>
<insert id="insert">
insert into wk_re_process_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deploymentId != null and deploymentId != ''">deployment_id,</if>
<if test="deploymentName != null and deploymentName != ''">deployment_name,</if>
<if test="logo != null and logo != ''">logo,</if>
<if test="settings != null and settings != ''">settings,</if>
<if test="processStr != null and processStr != ''">process_str,</if>
<if test="formItemStr != null and formItemStr != ''">form_item_str,</if>
<if test="remark != null and remark != ''">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deploymentId != null and deploymentId != ''">#{deploymentId},</if>
<if test="deploymentName != null and deploymentName != ''">#{deploymentName},</if>
<if test="logo != null and logo != ''">#{logo},</if>
<if test="settings != null and settings != ''">#{settings},</if>
<if test="processStr != null and processStr != ''">#{processStr},</if>
<if test="formItemStr != null and formItemStr != ''">#{formItemStr},</if>
<if test="remark != null and remark != ''">#{remark},</if>
</trim>
</insert>
</mapper>

View File

@@ -0,0 +1,45 @@
<?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="cn.fateverse.workflow.mapper.ProcessFileMapper">
<insert id="insert" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
insert into wk_process_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="fileName != null and fileName != ''">file_name,</if>
<if test="originalFilename != null and originalFilename != ''">original_filename,</if>
<if test="url != null and url != ''">url,</if>
<if test="uri != null and uri != ''">uri,</if>
<if test="fileType != null and fileType != ''">file_type,</if>
<if test="size != null ">size,</if>
<if test="isImage != null ">is_images,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fileName != null and fileName != ''">#{fileName},</if>
<if test="originalFilename != null and originalFilename != ''">#{originalFilename},</if>
<if test="url != null and url != ''">#{url},</if>
<if test="uri != null and uri != ''">#{uri},</if>
<if test="fileType != null and fileType != ''">#{fileType},</if>
<if test="size != null ">#{size},</if>
<if test="isImage != null ">#{isImage},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<delete id="delete">
delete
from wk_process_file
where id = #{fileId}
</delete>
<select id="selectById" resultType="cn.fateverse.workflow.entity.ProcessFile">
select id, file_name, original_filename, url, uri, file_type, size, is_images, create_by, create_time
from wk_process_file
where id = #{fileId}
</select>
</mapper>

View File

@@ -0,0 +1,112 @@
<?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="cn.fateverse.workflow.mapper.ProcessListenerMapper">
<resultMap id="ProcessListenerResult" type="cn.fateverse.workflow.entity.ProcessListener">
<id column="id" property="id"/>
<result column="listener_type" property="listenerType"/>
<result column="event_type" property="eventType"/>
<result column="listener_name" property="listenerName"/>
<result column="listener_value" property="listenerValue"/>
<result column="listener_value_type" property="listenerValueType"/>
<result column="create_by" property="createBy"/>
<result column="create_time" property="createTime"/>
<result column="update_by" property="updateBy"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<sql id="selectProcessListenerVo">
select id,
listener_type,
event_type,
listener_name,
listener_value,
listener_value_type,
create_by,
create_time,
update_by,
update_time
from wk_re_process_listener
</sql>
<select id="selectList" resultMap="ProcessListenerResult">
<include refid="selectProcessListenerVo"/>
<where>
<if test="listenerType != null and listenerType != ''">and listener_type = #{listenerType}</if>
<if test="eventType != null and eventType != ''">and event_type like concat('%', #{eventType}, '%')</if>
<if test="listenerName != null and listenerName != ''">and listener_name like concat('%', #{listenerName},'%')
</if>
<if test="listenerValueType != null and listenerValueType != ''">and listener_value_type = #{listenerValueType}
</if>
</where>
</select>
<select id="selectById" resultMap="ProcessListenerResult">
<include refid="selectProcessListenerVo"/>
where id = #{id}
</select>
<select id="selectIds" resultType="cn.fateverse.workflow.entity.ProcessListener">
<include refid="selectProcessListenerVo"/>
where id in
<foreach collection="list" open="(" separator="," close=")" item="id">
#{id}
</foreach>
</select>
<insert id="insert">
insert into wk_re_process_listener
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="listenerType != null">listener_type,</if>
<if test="eventType != null">event_type,</if>
<if test="listenerName != null">listener_name,</if>
<if test="listenerValue != null">listener_value,</if>
<if test="listenerValueType != null">listener_value_type,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="listenerType != null">#{listenerType},</if>
<if test="eventType != null">#{eventType},</if>
<if test="listenerName != null">#{listenerName},</if>
<if test="listenerValue != null">#{listenerValue},</if>
<if test="listenerValueType != null">#{listenerValueType},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="update">
update wk_re_process_listener
<set>
<if test="listenerType != null">listener_type = #{listenerType},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="listenerName != null">listener_name = #{listenerName},</if>
<if test="listenerValue != null">listener_value = #{listenerValue},</if>
<if test="listenerValueType != null">listener_value_type = #{listenerValueType},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</set>
where id = #{id}
</update>
<delete id="deleteById">
delete
from wk_re_process_listener
where id = #{id}
</delete>
<delete id="deleteBatchByIdList" parameterType="String">
delete from wk_re_process_listener
where id in
<foreach collection="list" open="(" close=")" separator="," item="id">
#{id}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,54 @@
<?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="cn.fateverse.workflow.mapper.ProcessMapper">
<select id="selectProcessInstanceMapByList"
resultType="org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl">
select ID_ as id, NAME_ as name, START_TIME_ as startTime from act_ru_execution
where ID_ in
<foreach collection="list" open="(" separator="," close=")" item="processInstanceId">
#{processInstanceId}
</foreach>
</select>
<select id="selectProcessInstanceListByAssigneeAndStates"
resultType="cn.fateverse.workflow.entity.vo.ProcessInstanceVo">
select ahp.ID_ as processInstanceId,
ahp.NAME_ as deploymentName,
ahp.START_TIME_ as submitTime,
ahp.END_TIME_ as endTime,
ahv.TEXT_ as state
from act_hi_procinst ahp
left join act_hi_taskinst aht on ahp.ID_ = aht.PROC_INST_ID_
left join act_hi_varinst ahv on ahv.PROC_INST_ID_ = ahp.ID_
<where>
ahv.NAME_ = 'processStatus'
<if test="userId != null">and aht.ASSIGNEE_ = #{userId}</if>
<if test="state != null">and ahv.TEXT_ = #{state}</if>
</where>
group by ahp.ID_
order by ahp.START_TIME_ desc
</select>
<insert id="insertUserTaskInHistorical">
insert into act_hi_taskinst
(ID_, PROC_DEF_ID_, TASK_DEF_KEY_, PROC_INST_ID_, EXECUTION_ID_, NAME_, ASSIGNEE_, START_TIME_, END_TIME_,
PRIORITY_, LAST_UPDATED_TIME_)
values (#{id}, #{processDefinitionId}, #{taskDefinitionKey}, #{processInstanceId}, #{executionId}, #{name},
#{assignee}, sysdate(), sysdate(), 50, sysdate())
</insert>
<update id="batchInsertUserTaskInHistorical">
insert into act_hi_taskinst
(ID_, PROC_DEF_ID_, TASK_DEF_KEY_, PROC_INST_ID_, EXECUTION_ID_,NAME_, ASSIGNEE_, START_TIME_, END_TIME_,
PRIORITY_, LAST_UPDATED_TIME_)
values
<foreach collection="list" separator="," item="task">
(#{task.id},#{task.processDefinitionId},#{task.taskDefinitionKey},#{task.processInstanceId},#{task.executionId},
#{task.name},#{task.assignee},sysdate(),sysdate(),50,sysdate())
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,11 @@
<?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="cn.fateverse.workflow.mapper.RunFlowableActinstMapper" >
<delete id="deleteRunActinstsByIds" parameterType="java.util.List">
delete from act_ru_actinst where ID_ in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{item}
</foreach>
</delete>
</mapper>

View File

@@ -0,0 +1,14 @@
<?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="cn.fateverse.workflow.mapper.TaskRuntimeMapper">
<select id="searchTaskListByProcessInstanceIds" resultType="org.flowable.task.service.impl.persistence.entity.TaskEntityImpl">
select ID_ as id, NAME_ as name, PROC_INST_ID_ as processInstanceId,TASK_DEF_KEY_ as taskDefinitionKey
from act_ru_task where PROC_INST_ID_ in
<foreach collection="list" open="(" separator="," close=")" item="processInstanceId">
#{processInstanceId}
</foreach>
</select>
</mapper>

View File

@@ -0,0 +1,121 @@
<?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="cn.fateverse.workflow.mapper.UserInstanceMapper">
<sql id="userInstanceSQL">
select instance_id,
process_instance_id,
user_id,
deployment_name,
state,
initiator,
submit_time,
finish_time,
create_time,
create_by,
update_time,
update_by
from wk_re_user_instance
</sql>
<select id="selectByInstanceId" resultType="cn.fateverse.workflow.entity.UserInstance">
<include refid="userInstanceSQL"/>
where instance_id = #{instanceId}
</select>
<select id="selectByProcessInstanceId" resultType="cn.fateverse.workflow.entity.UserInstance">
<include refid="userInstanceSQL"/>
where process_instance_id = #{processInstanceId}
</select>
<select id="selectByUserId" resultType="cn.fateverse.workflow.entity.UserInstance">
<include refid="userInstanceSQL"/>
<where>
<if test="userId != null and userId != ''">and user_id = #{userId}</if>
<if test="state != null and state != ''">and state = #{state}</if>
<if test="deploymentName != null and deploymentName != ''">and deployment_name like
concat('%',#{deploymentName},'%')
</if>
</where>
</select>
<select id="selectProcessInstanceListByUserIdAndState"
resultType="cn.fateverse.workflow.entity.UserInstance">
select process_instance_id,
user_id,
deployment_name,
submit_time,
finish_time,
state,
initiator,
instance_id
from wk_re_user_instance wrui
left join act_hi_taskinst aht on wrui.process_instance_id = aht.PROC_INST_ID_
<where>
<if test="userId != null">and wrui.user_id = #{userId} or aht.ASSIGNEE_ = #{userId}</if>
<if test="state != null">and wrui.state = #{state}</if>
<if test="deploymentName != null and deploymentName != ''">and deployment_name like
concat('%',#{deploymentName},'%')
</if>
</where>
order by wrui.submit_time desc
</select>
<!-- group by process_instance_id-->
<insert id="insert">
insert into wk_re_user_instance
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="instanceId != null and instanceId != ''">instance_id,</if>
<if test="userId != null and userId != ''">user_id,</if>
<if test="processInstanceId != null and processInstanceId != ''">process_instance_id,</if>
<if test="deploymentName != null and deploymentName != ''">deployment_name,</if>
<if test="state != null and state != ''">state,</if>
<if test="initiator != null and initiator != ''">initiator,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="submitTime != null">submit_time,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="instanceId != null and instanceId != ''">#{instanceId},</if>
<if test="userId != null and userId != ''">#{userId},</if>
<if test="processInstanceId != null and processInstanceId != ''">#{processInstanceId},</if>
<if test="deploymentName != null and deploymentName != ''">#{deploymentName},</if>
<if test="state != null and state != ''">#{state},</if>
<if test="initiator != null and initiator != ''">#{initiator},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="submitTime != null ">#{submitTime},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="update">
update wk_re_user_instance
<set>
<if test="processInstanceId != null and processInstanceId != ''">process_instance_id =
#{processInstanceId},
</if>
<if test="state != null and state != ''">state = #{state},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="finishTime != null">finish_time = #{finishTime},</if>
update_time = #{updateTime}
</set>
where instance_id = #{instanceId};
</update>
<update id="updateState">
update wk_re_user_instance
set state = #{state}
where process_instance_id = #{processInstanceId}
</update>
<update id="updateStateByProcessInstanceIdList">
update wk_re_user_instance
set state = #{state}
where process_instance_id in
<foreach collection="list" open="(" separator="," close=")" item="processInstanceId">
#{processInstanceId}
</foreach>
</update>
</mapper>

View File

@@ -0,0 +1,211 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<changeSet id="1" author="activiti">
<createTable tableName="ACT_DMN_DEPLOYMENT">
<column name="ID_" type="varchar(255)">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="NAME_" type="varchar(255)" />
<column name="CATEGORY_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="DEPLOY_TIME_" type="datetime">
<constraints nullable="true" />
</column>
<column name="TENANT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="PARENT_DEPLOYMENT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
</createTable>
<createTable tableName="ACT_DMN_DEPLOYMENT_RESOURCE">
<column name="ID_" type="varchar(255)">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="NAME_" type="varchar(255)" />
<column name="DEPLOYMENT_ID_" type="varchar(255)" />
<column name="RESOURCE_BYTES_" type="longblob">
<constraints nullable="true" />
</column>
</createTable>
<createTable tableName="ACT_DMN_DECISION_TABLE">
<column name="ID_" type="varchar(255)">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="NAME_" type="varchar(255)" />
<column name="VERSION_" type="int" />
<column name="KEY_" type="varchar(255)" />
<column name="CATEGORY_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="DEPLOYMENT_ID_" type="varchar(255)" />
<column name="PARENT_DEPLOYMENT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="TENANT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="RESOURCE_NAME_" type="varchar(255)" />
<column name="DESCRIPTION_" type="varchar(255)">
<constraints nullable="true" />
</column>
</createTable>
</changeSet>
<changeSet id="2" author="flowable">
<createTable tableName="ACT_DMN_HI_DECISION_EXECUTION">
<column name="ID_" type="varchar(255)">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="DECISION_DEFINITION_ID_" type="varchar(255)" />
<column name="DEPLOYMENT_ID_" type="varchar(255)" />
<column name="START_TIME_" type="datetime" />
<column name="END_TIME_" type="datetime">
<constraints nullable="true" />
</column>
<column name="INSTANCE_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="EXECUTION_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="ACTIVITY_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="FAILED_" type="boolean" defaultValueBoolean="false" />
<column name="TENANT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="EXECUTION_JSON_" type="longtext">
<constraints nullable="true" />
</column>
</createTable>
</changeSet>
<changeSet id="2" author="flowable">
<createTable tableName="ACT_DMN_HI_DECISION_EXECUTION">
<column name="ID_" type="varchar(255)">
<constraints primaryKey="true" nullable="false" />
</column>
<column name="DECISION_DEFINITION_ID_" type="varchar(255)" />
<column name="DEPLOYMENT_ID_" type="varchar(255)" />
<column name="START_TIME_" type="datetime" />
<column name="END_TIME_" type="datetime">
<constraints nullable="true" />
</column>
<column name="INSTANCE_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="EXECUTION_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="ACTIVITY_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="FAILED_" type="boolean" defaultValueBoolean="false" />
<column name="TENANT_ID_" type="varchar(255)">
<constraints nullable="true" />
</column>
<column name="EXECUTION_JSON_" type="longtext">
<constraints nullable="true" />
</column>
</createTable>
</changeSet>
<changeSet id="3" author="flowable">
<addColumn tableName="ACT_DMN_HI_DECISION_EXECUTION">
<column name="SCOPE_TYPE_" type="varchar(255)" />
</addColumn>
</changeSet>
<changeSet id="4" author="flowable">
<dropColumn columnName="PARENT_DEPLOYMENT_ID_" tableName="ACT_DMN_DECISION_TABLE" />
</changeSet>
<changeSet id="5" author="flowable" dbms="mysql,mariadb">
<modifyDataType tableName="ACT_DMN_DEPLOYMENT" columnName="DEPLOY_TIME_" newDataType="datetime(3)" />
<modifyDataType tableName="ACT_DMN_HI_DECISION_EXECUTION" columnName="START_TIME_" newDataType="datetime(3)" />
<modifyDataType tableName="ACT_DMN_HI_DECISION_EXECUTION" columnName="END_TIME_" newDataType="datetime(3)" />
</changeSet>
<changeSet id="6" author="flowable">
<createIndex tableName="ACT_DMN_DECISION_TABLE" indexName="ACT_IDX_DEC_TBL_UNIQ" unique="true">
<column name="KEY_" />
<column name="VERSION_" />
<column name="TENANT_ID_" />
</createIndex>
</changeSet>
<changeSet id="7" author="flowable" dbms="!dm">
<dropIndex tableName="ACT_DMN_DECISION_TABLE" indexName="ACT_IDX_DEC_TBL_UNIQ"/>
<renameTable
newTableName="ACT_DMN_DECISION"
oldTableName="ACT_DMN_DECISION_TABLE"/>
<createIndex tableName="ACT_DMN_DECISION" indexName="ACT_IDX_DMN_DEC_UNIQ" unique="true">
<column name="KEY_" />
<column name="VERSION_" />
<column name="TENANT_ID_" />
</createIndex>
</changeSet>
<changeSet id="7" author="flowable" dbms="dm">
<dropIndex tableName="ACT_DMN_DECISION_TABLE" indexName="ACT_IDX_DEC_TBL_UNIQ"/>
<sql>
CREATE TABLE ACT_DMN_DECISION AS SELECT * FROM ACT_DMN_DECISION_TABLE;
</sql>
<sql>
DROP TABLE ACT_DMN_DECISION_TABLE;
</sql>
<createIndex tableName="ACT_DMN_DECISION" indexName="ACT_IDX_DMN_DEC_UNIQ" unique="true">
<column name="KEY_" />
<column name="VERSION_" />
<column name="TENANT_ID_" />
</createIndex>
</changeSet>
<changeSet id="8" author="flowable">
<addColumn tableName="ACT_DMN_DECISION">
<column name="DECISION_TYPE_" type="varchar(255)" />
</addColumn>
</changeSet>
</databaseChangeLog>

View File

@@ -0,0 +1,129 @@
/*
Target Server Type : MySQL
Target Server Version : 50730
File Encoding : 65001
Date: 22/03/2023 16:49:55
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for wk_hi_operation
-- ----------------------------
DROP TABLE IF EXISTS `wk_hi_operation`;
CREATE TABLE `wk_hi_operation` (
`task_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '任务id',
`node_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '节点id',
`process_instance_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '流程实例id',
`operation_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作名称',
`operation` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '行为',
`approval_mode` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审批模式',
`message` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '评论json数据',
`node_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '节点类型',
`state` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '返回类型',
`user_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '用户json数据',
`finish_time` datetime NULL DEFAULT NULL COMMENT '完成时间',
`start_time` bigint(22) UNSIGNED NULL DEFAULT NULL COMMENT '开始时间',
`mark` int(1) NULL DEFAULT 0 COMMENT '是否被回退标记, 1 回退 0 正常',
PRIMARY KEY (`task_id`) USING BTREE,
INDEX `start_time_index`(`start_time`) USING BTREE COMMENT '开始时间索引'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_process_file
-- ----------------------------
DROP TABLE IF EXISTS `wk_process_file`;
CREATE TABLE `wk_process_file` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
`file_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件名称',
`original_filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原始文件名称',
`url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '访问路径',
`uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '资源定位',
`file_type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '文件类型',
`size` int(11) NULL DEFAULT NULL COMMENT '文件大小',
`is_images` int(1) NULL DEFAULT NULL COMMENT '是否是图片',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_re_form_perm
-- ----------------------------
DROP TABLE IF EXISTS `wk_re_form_perm`;
CREATE TABLE `wk_re_form_perm` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '表单id',
`deployment_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '实例id',
`from_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'task的表单权限key',
`required` int(1) NULL DEFAULT NULL COMMENT '是否必填',
`perm` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限类型',
PRIMARY KEY (`id`, `from_key`, `deployment_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_re_process_business
-- ----------------------------
DROP TABLE IF EXISTS `wk_re_process_business`;
CREATE TABLE `wk_re_process_business` (
`business_id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '业务id',
`group_id` int(11) NULL DEFAULT NULL COMMENT '分组id',
`deployment_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程部署id',
`process_definition_key` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署是的key',
`deployment_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '流程部署名称',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人',
`update_time` datetime NULL DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`business_id`) USING BTREE,
UNIQUE INDEX `deployment_id`(`deployment_id`) USING BTREE COMMENT '流程id索引'
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_re_process_data
-- ----------------------------
DROP TABLE IF EXISTS `wk_re_process_data`;
CREATE TABLE `wk_re_process_data` (
`deployment_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署id',
`deployment_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '部署名称',
`logo` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'logo',
`settings` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '设置信息',
`process_str` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '流程字符串',
`form_item_str` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表单字符串',
`remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注'
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_ru_form_item
-- ----------------------------
DROP TABLE IF EXISTS `wk_ru_form_item`;
CREATE TABLE `wk_ru_form_item` (
`id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '表单id',
`parent_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '父id',
`process_instance_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '实例id',
`name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '后端枚举变量',
`value` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '',
`valueType` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值的类型',
`props` varchar(2048) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置信息',
PRIMARY KEY (`id`, `process_instance_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for wk_ru_form_item_data
-- ----------------------------
DROP TABLE IF EXISTS `wk_ru_form_item_data`;
CREATE TABLE `wk_ru_form_item_data` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '表单id',
`process_instance_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '实例id',
`form_data` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '表单数据',
`is_start` int(1) NULL DEFAULT 0 COMMENT '是否为start的数据',
`is_present` int(1) NULL DEFAULT NULL COMMENT '是否当前task需要的数据',
`create_by` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 191 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;