|
@@ -246,7 +246,7 @@
|
|
|
a.create_id createId,
|
|
|
a.create_time createTime,
|
|
|
a.status,
|
|
|
- a.flow_id flowId,
|
|
|
+ art.PROC_INST_ID_ flowId,
|
|
|
f.setup,
|
|
|
f.status as auditStatus,
|
|
|
f.status as flowStatus,
|
|
@@ -254,8 +254,13 @@
|
|
|
a.lecturer_name lecturerName,
|
|
|
so.name teachingRoomName,
|
|
|
true as myself
|
|
|
- FROM
|
|
|
- exam_task a
|
|
|
+ FROM ACT_RU_TASK art
|
|
|
+ left join t_exam_task_flow tetf on
|
|
|
+ tetf.flow_id = art.PROC_INST_ID_
|
|
|
+ left join exam_task a on
|
|
|
+ a.id = tetf.exam_task_id
|
|
|
+ left join act_ru_identitylink ari on
|
|
|
+ ari.TASK_ID_ = art.ID_
|
|
|
LEFT JOIN
|
|
|
basic_card_rule b ON a.card_rule_id = b.id
|
|
|
LEFT JOIN
|
|
@@ -273,7 +278,7 @@
|
|
|
AND a.review = true
|
|
|
and EXISTS(
|
|
|
select * from
|
|
|
- (<include refid="findFlowIdToMySelfSql" />) t where t.flowId = a.flow_id)
|
|
|
+ (<include refid="findFlowIdToMySelfSql" />) t where t.flowId = art.PROC_INST_ID_)
|
|
|
and f.status <![CDATA[ <> ]]> 'START'
|
|
|
<if test="schoolId != null and schoolId != ''">
|
|
|
and a.school_id = #{schoolId}
|
|
@@ -305,12 +310,12 @@
|
|
|
<if test="createName != null and createName != ''">
|
|
|
and d.real_name like concat('%',#{createName},'%')
|
|
|
</if>
|
|
|
- <if test="orgIds != null">
|
|
|
+ <!--<if test="orgIds != null">
|
|
|
AND a.org_id IN
|
|
|
<foreach collection="orgIds" item="item" index="index" open="(" separator="," close=")">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
- </if>
|
|
|
+ </if>-->
|
|
|
</where>
|
|
|
) t
|
|
|
order by t.createTime desc
|
|
@@ -358,7 +363,7 @@
|
|
|
sys_org e ON a.teaching_room_id = e.id
|
|
|
<where>
|
|
|
a.enable = true and a.review = true
|
|
|
- and (f.status = 'AUDITING' or f.status = 'FINISH')
|
|
|
+ and (f.status = 'AUDITING' or f.status = 'REJECT' or f.status = 'FINISH')
|
|
|
and EXISTS (
|
|
|
select
|
|
|
aht.PROC_INST_ID_
|
|
@@ -391,11 +396,15 @@
|
|
|
and ahi.TASK_ID_ = aht.id_)
|
|
|
and ahi.USER_ID_ = cast(#{currentUserId} as char)) temp
|
|
|
join ACT_HI_TASKINST t on
|
|
|
- t.ID_ = temp.TASK_ID_
|
|
|
- join t_f_flow_approve_log tffal on
|
|
|
- tffal.flow_id = t.PROC_INST_ID_
|
|
|
- where (tffal.primary_approve_id = #{currentUserId} or tffal.second_approve_id = #{currentUserId})
|
|
|
- and t.PROC_INST_ID_ = a.flow_id)
|
|
|
+ t.ID_ = temp.TASK_ID_
|
|
|
+ join t_exam_task_flow tetf on
|
|
|
+ tetf.flow_id = t.PROC_INST_ID_
|
|
|
+ JOIN t_f_flow_approve_log tffal ON
|
|
|
+ tffal.task_id = tetf.exam_task_id
|
|
|
+ where (tffal.primary_approve_id = #{currentUserId} or tffal.second_approve_id = #{currentUserId}
|
|
|
+ OR tffal.three_approve_id = #{currentUserId}
|
|
|
+ OR tffal.four_approve_id = #{currentUserId})
|
|
|
+ AND t.PROC_INST_ID_ = tetf.flow_id)
|
|
|
<if test="schoolId != null and schoolId != ''">
|
|
|
and a.school_id = #{schoolId}
|
|
|
</if>
|