<?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.ruili.wcp.dao.management.FlowRuntimeTaskMapper">
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO">
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*,
|
f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
limit #{currIndex} ,
|
#{pageSize}
|
</select>
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="oracle">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b, cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="kingbasees">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b, cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="dameng">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b, cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="xugu">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="findTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="sqlServer">
|
SELECT * FROM (
|
SELECT ROW_NUMBER() OVER(order by b.create_time desc) AS rn,
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*,
|
f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
) as A WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
|
<select id="findTasksCountByAssigneeUserId" parameterType="map"
|
resultType="int">
|
SELECT
|
COUNT(*)
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b ,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
and (b.assignee_user_id
|
is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is
|
null and
|
exists (select 1 from sys_flow_runtime_identitylink c where
|
b.task_id=c.task_id and c.user_id=#{userId}) ))
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
</select>
|
|
<!--获取个人待办、公办待办列表-->
|
<select id="findWaitDealTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO">
|
SELECT
|
a.emergency_degree_code,a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,a.create_unit,a.file_code,a.last_update_time,
|
b.*,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test='type =="0"'>
|
and (b.assignee_user_id is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and c.user_id=#{userId})
|
))
|
</if>
|
<if test='type =="1"'>
|
and b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and (exists(
|
select 1 from sys_group_user p,sys_account q where p.user_id=q.user_id and c.group_id=p.group_id and
|
q.user_id=#{userId}) or exists (select 1 from sys_role_user r,sys_account s where r.user_id=s.user_id and
|
c.group_id=r.role_id and s.user_id=#{userId})))
|
</if>
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by IFNULL(a.emergency_degree_code,-1) desc,b.create_time desc
|
limit #{currIndex} ,
|
#{pageSize}
|
</select>
|
<select id="findWaitDealTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="oracle">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.emergency_degree_code,a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,a.create_unit,a.file_code,a.last_update_time,
|
b.*,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test='type =="0"'>
|
and (b.assignee_user_id is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and c.user_id=#{userId})
|
))
|
</if>
|
<if test='type =="1"'>
|
and b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and (exists(
|
select 1 from sys_group_user p,sys_account q where p.user_id=q.user_id and c.group_id=p.group_id and
|
q.user_id=#{userId}) or exists (select 1 from sys_role_user r,sys_account s where r.user_id=s.user_id and
|
c.group_id=r.role_id and s.user_id=#{userId})))
|
</if>
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by NVL(a.emergency_degree_code,-1) desc,b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="findWaitDealTasksByAssigneeUserId" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="kingbasees">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.emergency_degree_code,a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,a.create_unit,a.file_code,a.last_update_time,
|
b.*,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test='type =="0"'>
|
and (b.assignee_user_id is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and c.user_id=#{userId})
|
))
|
</if>
|
<if test='type =="1"'>
|
and b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and (exists(
|
select 1 from sys_group_user p,sys_account q where p.user_id=q.user_id and c.group_id=p.group_id and
|
q.user_id=#{userId}) or exists (select 1 from sys_role_user r,sys_account s where r.user_id=s.user_id and
|
c.group_id=r.role_id and s.user_id=#{userId})))
|
</if>
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by NVL(a.emergency_degree_code,-1) desc,b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
|
<!--获取个人待办、公办待办数量-->
|
<select id="findWaitDealTasksCountByAssigneeUserId" parameterType="map"
|
resultType="int">
|
SELECT
|
COUNT(*)
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b ,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test='type =="0"'>
|
and (b.assignee_user_id is not null
|
and b.assignee_user_id=#{userId} or (b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and c.user_id=#{userId})
|
))
|
</if>
|
<if test='type =="1"'>
|
and b.assignee_user_id is null
|
and exists (select 1 from sys_flow_runtime_identitylink c where b.task_id=c.task_id and (exists(
|
select 1 from sys_group_user p,sys_account q where p.user_id=q.user_id and c.group_id=p.group_id and
|
q.user_id=#{userId}) or exists (select 1 from sys_role_user r,sys_account s where r.user_id=s.user_id and
|
c.group_id=r.role_id and s.user_id=#{userId})))
|
</if>
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
</select>
|
|
<select id="findTasksByProcessInstanceIdAndUserId"
|
parameterType="map" resultType="com.ruili.wcp.data.entity.management.FlowRuntimeTask">
|
SELECT a.*
|
FROM sys_flow_runtime_task a
|
WHERE a.process_instance_id = #{processInstanceId}
|
and (a.assignee_user_id is not null and a.assignee_user_id = #{userId} or
|
(a.assignee_user_id is null and exists(select 1
|
from sys_flow_runtime_identitylink b
|
where a.task_id = b.task_id
|
and b.user_id = #{userId})))
|
</select>
|
<select id="findAssigneeUserByTaskId" resultType="string">
|
SELECT identity_name
|
FROM sys_flow_runtime_identitylink
|
WHERE TASK_ID = #{taskId}
|
</select>
|
|
<!--流程监控-->
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO">
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*,
|
f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
limit #{currIndex} ,
|
#{pageSize}
|
</select>
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="oracle">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="kingbasees">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="dameng">
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
limit #{currIndex},
|
#{pageSize}
|
</select>
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="xugu">
|
SELECT * FROM (
|
SELECT A.*, ROWNUM AS rn FROM (
|
SELECT
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*
|
,f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
order by b.create_time desc
|
) A
|
) WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
<select id="getFlowMonitorTasks" parameterType="map"
|
resultType="com.ruili.wcp.data.vo.management.PendingTaskVO" databaseId="sqlServer">
|
SELECT * FROM (
|
SELECT ROW_NUMBER() OVER(order by b.create_time desc) AS rn,
|
a.flow_definition_name,a.execution_name,a.module_id,a.table_id,a.key_id,a.business_view_url,a.start_user_name,b.*,
|
f.module_name
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
) as A WHERE rn BETWEEN ${currIndex} AND (${currIndex} + ${pageSize})
|
</select>
|
|
<select id="countFlowMonitorTasks" parameterType="map"
|
resultType="int">
|
SELECT
|
COUNT(*)
|
FROM sys_flow_runtime_execution a,sys_flow_runtime_task b ,cnf_module f
|
WHERE
|
a.execution_id=b.process_instance_id and a.module_id = f.module_id
|
<if test="searchKey != null and searchKey != ''">
|
and a.execution_name like '%${searchKey}%'
|
</if>
|
<if test="flowDefinitionId != null and flowDefinitionId != ''">
|
and a.flow_definition_id = #{flowDefinitionId}
|
</if>
|
<if test="moduleId != null and moduleId != ''">
|
and f.module_id = #{moduleId}
|
</if>
|
</select>
|
</mapper>
|