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"> <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 (
select a.*
from flow_definition a
join ( join (
select flow_code, select flow_code,
coalesce( coalesce(
max(case when is_publish = 1 then version end), max(case when is_publish = 1 then version end),
max(version) max(version)
) as version ) as version
from flow_definition group by flow_code from flow_definition
) b group by flow_code
on (a.flow_code = b.flow_code and a.version = b.version) where a.del_flag = '0') t ) 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>

View File

@ -47,10 +47,11 @@
<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,
@ -71,11 +72,12 @@
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>
@ -107,9 +109,13 @@
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">
@ -125,13 +131,15 @@
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 where a.type = '4'
a.type = '4' and a.del_flag = '0' and b.del_flag = '0' and d.del_flag = '0' and a.del_flag = '0'
) t ${ew.getCustomSqlSegment} and b.del_flag = '0'
and d.del_flag = '0'
) t
${ew.getCustomSqlSegment}
</select> </select>
</mapper> </mapper>