|
@@ -62,6 +62,76 @@
|
|
|
tffal.create_time desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="flowApproveUserList" resultType="com.qmth.distributed.print.business.bean.result.FlowApproveResult">
|
|
|
+ select
|
|
|
+ tffal.flow_id as flowId,
|
|
|
+ tffal.task_id as taskId,
|
|
|
+ tffal.start_id as startId,
|
|
|
+ su.real_name as startName,
|
|
|
+ tffal.create_time as createTime,
|
|
|
+ tffal.primary_approve_id as primaryApproveId,
|
|
|
+ (
|
|
|
+ select
|
|
|
+ t.real_name
|
|
|
+ from
|
|
|
+ sys_user t
|
|
|
+ where
|
|
|
+ t.id = tffal.primary_approve_id) as primaryApproveName,
|
|
|
+ tffal.primary_approve_remark as primaryApproveRemark,
|
|
|
+ tffal.second_approve_id as secondApproveId,
|
|
|
+ (
|
|
|
+ select
|
|
|
+ t.real_name
|
|
|
+ from
|
|
|
+ sys_user t
|
|
|
+ where
|
|
|
+ t.id = tffal.second_approve_id) as secondApproveName,
|
|
|
+ tffal.second_approve_remark as secondApproveRemark,
|
|
|
+ tffal.three_approve_id as threeApproveId,
|
|
|
+ tffal.three_approve_remark as threeApproveRemark,
|
|
|
+ (
|
|
|
+ select
|
|
|
+ t.real_name
|
|
|
+ from
|
|
|
+ sys_user t
|
|
|
+ where
|
|
|
+ t.id = tffal.three_approve_id) as threeApproveName,
|
|
|
+ tffal.four_approve_id as fourApproveId,
|
|
|
+ tffal.four_approve_remark as fourApproveRemark,
|
|
|
+ (
|
|
|
+ select
|
|
|
+ t.real_name
|
|
|
+ from
|
|
|
+ sys_user t
|
|
|
+ where
|
|
|
+ t.id = tffal.four_approve_id) as fourApproveName,
|
|
|
+ tffa.status
|
|
|
+ from
|
|
|
+ t_f_flow_approve_log tffal
|
|
|
+ left join t_f_flow_approve tffa on tffa.flow_id = tffal.flow_id
|
|
|
+ left join sys_user su on su.id = tffal.start_id
|
|
|
+ <where>
|
|
|
+ <if test="startName != null and startName != ''">
|
|
|
+ and su.real_name like concat('%',#{startName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="schoolId != null and schoolId != ''">
|
|
|
+ and tffal.school_id = #{schoolId}
|
|
|
+ </if>
|
|
|
+ <!-- <if test="orgId != null and orgId != ''">-->
|
|
|
+ <!-- and tffal.org_id = #{orgId}-->
|
|
|
+ <!-- </if>-->
|
|
|
+ <if test="flowId != null and flowId != ''">
|
|
|
+ and EXISTS(
|
|
|
+ select tetf.exam_task_id from t_exam_task_flow tetf
|
|
|
+ where tetf.flow_id = #{flowId} and tetf.exam_task_id = tffal.task_id
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ and tffal.enable = 1
|
|
|
+ </where>
|
|
|
+ order by
|
|
|
+ tffal.create_time desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="findActIdByFlowKey" resultType="java.lang.String">
|
|
|
select max(arp.ID_) as actFlowId from act_re_procdef arp where arp.KEY_ = #{flowKey} order by arp.VERSION_ desc LIMIT 1
|
|
|
</select>
|