style workflow xml 格式

This commit is contained in:
dhb52 2024-12-11 18:30:41 +08:00
parent a5ed5083eb
commit 4354d257e6
2 changed files with 73 additions and 61 deletions

View File

@ -5,16 +5,20 @@
<mapper namespace="org.dromara.workflow.mapper.FlwDefMapper">
<select id="page" resultType="org.dromara.warm.flow.orm.entity.FlowDefinition">
select *
from (select a.* from flow_definition a
from (
select a.*
from flow_definition a
join (
select flow_code,
coalesce(
max(case when is_publish = 1 then version end),
max(version)
) as version
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
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}
</select>

View File

@ -47,10 +47,11 @@
<result property="delFlag" column="del_flag"/>
<result property="formPath" column="form_path"/>
</resultMap>
<select id="getTaskWaitByPage" resultMap="FlowTaskResult">
select * from (
select
distinct t.id,
select distinct
t.id,
t.node_code,
t.node_name,
t.node_type,
@ -71,11 +72,12 @@
from flow_task as t
left join flow_user uu on uu.associated = t.id
left join flow_definition d on t.definition_id = d.id
left join flow_instance i on t.instance_id = i.id where
t.node_type = 1 and
t.del_flag = '0' and
uu.del_flag = '0' and
uu.type in ('1','2','3')) t
left join flow_instance i on t.instance_id = i.id
where t.node_type = 1
and t.del_flag = '0'
and uu.del_flag = '0'
and uu.type in ('1','2','3')
) t
${ew.getCustomSqlSegment}
</select>
@ -107,9 +109,13 @@
c.version
from flow_his_task a
left join flow_instance b on a.instance_id = b.id
left join flow_definition c on a.definition_id = c.id where
a.del_flag ='0' and b.del_flag = '0' and c.del_flag = '0' and a.node_type in ('1','3','4')
) t ${ew.getCustomSqlSegment}
left join flow_definition c on a.definition_id = c.id
where a.del_flag ='0'
and b.del_flag = '0'
and c.del_flag = '0'
and a.node_type in ('1','3','4')
) t
${ew.getCustomSqlSegment}
</select>
<select id="getTaskCopyByPage" resultMap="FlowTaskResult">
@ -125,13 +131,15 @@
d.flow_name,
d.flow_code,
d.version
from
flow_user a
from flow_user a
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_definition d on c.definition_id=d.id
where
a.type = '4' and a.del_flag = '0' and b.del_flag = '0' and d.del_flag = '0'
) t ${ew.getCustomSqlSegment}
where a.type = '4'
and a.del_flag = '0'
and b.del_flag = '0'
and d.del_flag = '0'
) t
${ew.getCustomSqlSegment}
</select>
</mapper>