This commit is contained in:
wangliwen 2022-12-13 11:00:19 +08:00
parent 2994ebde69
commit fafd6f48cd
1 changed files with 15 additions and 7 deletions

View File

@ -29,12 +29,20 @@
</resultMap> </resultMap>
<select id="getMyProcessInstancePage" parameterType="map" resultMap="ProcessActivityEntity"> <select id="getMyProcessInstancePage" parameterType="map" resultMap="ProcessActivityEntity">
SELECT aht.*, arp.NAME_ as DEF_NAME, ahp.BUSINESS_KEY_, ahp.START_TIME_, ahp.END_TIME_, SELECT
ahp.START_USER_ID_, arp.VERSION_ as DEF_VERSION_ aht.*,
FROM (SELECT DISTINCT PROC_DEF_ID_, PROC_INST_ID_,ASSIGNEE_ FROM ACT_HI_TASKINST) aht arp.NAME_ AS DEF_NAME,
LEFT JOIN ACT_HI_PROCINST ahp on aht.PROC_INST_ID_ = ahp.PROC_INST_ID_ ahp.BUSINESS_KEY_,
LEFT JOIN ACT_RE_PROCDEF arp on aht.PROC_DEF_ID_ = arp.ID_ ahp.START_TIME_,
WHERE aht.ASSIGNEE_ = #{userId} ahp.END_TIME_,
ahp.START_USER_ID_,
arp.VERSION_ AS DEF_VERSION_
FROM
( SELECT DISTINCT PROC_DEF_ID_, PROC_INST_ID_, ASSIGNEE_ FROM ACT_HI_TASKINST ) aht
LEFT JOIN ACT_HI_PROCINST ahp ON aht.PROC_INST_ID_ = ahp.PROC_INST_ID_
LEFT JOIN ACT_RE_PROCDEF arp ON aht.PROC_DEF_ID_ = arp.ID_
WHERE
aht.ASSIGNEE_ = #{userId}
<if test="processInstanceId != null"> <if test="processInstanceId != null">
and aht.PROC_INST_ID_ = #{processInstanceId} and aht.PROC_INST_ID_ = #{processInstanceId}
</if> </if>
@ -59,7 +67,7 @@
<if test="ended != null"> <if test="ended != null">
and ahp.END_TIME_ IS NOT NULL and ahp.END_TIME_ IS NOT NULL
</if> </if>
ORDER BY ORDER BY
ahp.START_TIME_ DESC ahp.START_TIME_ DESC
</select> </select>