style workflow xml 格式
This commit is contained in:
parent
a5ed5083eb
commit
4354d257e6
@ -5,16 +5,20 @@
|
|||||||
<mapper namespace="org.dromara.workflow.mapper.FlwDefMapper">
|
<mapper namespace="org.dromara.workflow.mapper.FlwDefMapper">
|
||||||
<select id="page" resultType="org.dromara.warm.flow.orm.entity.FlowDefinition">
|
<select id="page" resultType="org.dromara.warm.flow.orm.entity.FlowDefinition">
|
||||||
select *
|
select *
|
||||||
from (select a.* from flow_definition a
|
from (
|
||||||
join (
|
select a.*
|
||||||
select flow_code,
|
from flow_definition a
|
||||||
coalesce(
|
join (
|
||||||
max(case when is_publish = 1 then version end),
|
select flow_code,
|
||||||
max(version)
|
coalesce(
|
||||||
) as version
|
max(case when is_publish = 1 then version end),
|
||||||
from flow_definition group by flow_code
|
max(version)
|
||||||
) b
|
) as version
|
||||||
on (a.flow_code = b.flow_code and a.version = b.version) where a.del_flag = '0') t
|
from flow_definition
|
||||||
|
group by flow_code
|
||||||
|
) b on (a.flow_code = b.flow_code and a.version = b.version)
|
||||||
|
where a.del_flag = '0'
|
||||||
|
) t
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -47,35 +47,37 @@
|
|||||||
<result property="delFlag" column="del_flag"/>
|
<result property="delFlag" column="del_flag"/>
|
||||||
<result property="formPath" column="form_path"/>
|
<result property="formPath" column="form_path"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getTaskWaitByPage" resultMap="FlowTaskResult">
|
<select id="getTaskWaitByPage" resultMap="FlowTaskResult">
|
||||||
select*from (
|
select * from (
|
||||||
select
|
select distinct
|
||||||
distinct t.id,
|
t.id,
|
||||||
t.node_code,
|
t.node_code,
|
||||||
t.node_name,
|
t.node_name,
|
||||||
t.node_type,
|
t.node_type,
|
||||||
t.definition_id,
|
t.definition_id,
|
||||||
t.instance_id,
|
t.instance_id,
|
||||||
t.create_time,
|
t.create_time,
|
||||||
t.update_time,
|
t.update_time,
|
||||||
t.tenant_id,
|
t.tenant_id,
|
||||||
i.business_id,
|
i.business_id,
|
||||||
i.flow_status,
|
i.flow_status,
|
||||||
d.flow_name,
|
d.flow_name,
|
||||||
d.flow_code,
|
d.flow_code,
|
||||||
d.form_custom,
|
d.form_custom,
|
||||||
d.form_path,
|
d.form_path,
|
||||||
d.version,
|
d.version,
|
||||||
uu.processed_by,
|
uu.processed_by,
|
||||||
uu.type
|
uu.type
|
||||||
from flow_task as t
|
from flow_task as t
|
||||||
left join flow_user uu on uu.associated = t.id
|
left join flow_user uu on uu.associated = t.id
|
||||||
left join flow_definition d on t.definition_id = d.id
|
left join flow_definition d on t.definition_id = d.id
|
||||||
left join flow_instance i on t.instance_id = i.id where
|
left join flow_instance i on t.instance_id = i.id
|
||||||
t.node_type = 1 and
|
where t.node_type = 1
|
||||||
t.del_flag = '0' and
|
and t.del_flag = '0'
|
||||||
uu.del_flag = '0' and
|
and uu.del_flag = '0'
|
||||||
uu.type in ('1','2','3')) t
|
and uu.type in ('1','2','3')
|
||||||
|
) t
|
||||||
${ew.getCustomSqlSegment}
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -106,32 +108,38 @@
|
|||||||
c.flow_code,
|
c.flow_code,
|
||||||
c.version
|
c.version
|
||||||
from flow_his_task a
|
from flow_his_task a
|
||||||
left join flow_instance b on a.instance_id = b.id
|
left join flow_instance b on a.instance_id = b.id
|
||||||
left join flow_definition c on a.definition_id = c.id where
|
left join flow_definition c on a.definition_id = c.id
|
||||||
a.del_flag ='0' and b.del_flag = '0' and c.del_flag = '0' and a.node_type in ('1','3','4')
|
where a.del_flag ='0'
|
||||||
) t ${ew.getCustomSqlSegment}
|
and b.del_flag = '0'
|
||||||
|
and c.del_flag = '0'
|
||||||
|
and a.node_type in ('1','3','4')
|
||||||
|
) t
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTaskCopyByPage" resultMap="FlowTaskResult">
|
<select id="getTaskCopyByPage" resultMap="FlowTaskResult">
|
||||||
select * from (
|
select * from (
|
||||||
select
|
select
|
||||||
b.id ,
|
b.id ,
|
||||||
a.processed_by,
|
a.processed_by,
|
||||||
c.flow_status,
|
c.flow_status,
|
||||||
c.business_id,
|
c.business_id,
|
||||||
a.create_time,
|
a.create_time,
|
||||||
b.node_name,
|
b.node_name,
|
||||||
b.node_code,
|
b.node_code,
|
||||||
d.flow_name,
|
d.flow_name,
|
||||||
d.flow_code,
|
d.flow_code,
|
||||||
d.version
|
d.version
|
||||||
from
|
from flow_user a
|
||||||
flow_user a
|
left join flow_his_task b on a.associated = b.task_id
|
||||||
left join flow_his_task b on a.associated = b.task_id
|
left join flow_instance c on b.instance_id = c.id
|
||||||
left join flow_instance c on b.instance_id = c.id
|
left join flow_definition d on c.definition_id=d.id
|
||||||
left join flow_definition d on c.definition_id=d.id
|
where a.type = '4'
|
||||||
where
|
and a.del_flag = '0'
|
||||||
a.type = '4' and a.del_flag = '0' and b.del_flag = '0' and d.del_flag = '0'
|
and b.del_flag = '0'
|
||||||
) t ${ew.getCustomSqlSegment}
|
and d.del_flag = '0'
|
||||||
|
) t
|
||||||
|
${ew.getCustomSqlSegment}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user