|
@@ -788,7 +788,6 @@
|
|
|
et.ariUserId
|
|
|
when et.assigneeId is not null then
|
|
|
et.assigneeId
|
|
|
- else et.user_id
|
|
|
end as userId
|
|
|
from
|
|
|
(
|
|
@@ -818,14 +817,73 @@
|
|
|
left join t_f_flow_approve tffa on
|
|
|
tffa.flow_id = et.flow_id
|
|
|
where
|
|
|
- et.school_id = #{schoolId}) et
|
|
|
+ et.school_id = 2
|
|
|
+ and et.flow_id is not null) et
|
|
|
) et
|
|
|
- left join basic_card_rule b ON
|
|
|
- et.card_rule_id = b.id
|
|
|
- left join sys_user c ON
|
|
|
- et.userId = c.id
|
|
|
- where
|
|
|
- et.userId = #{userId}
|
|
|
+ left join basic_card_rule b ON
|
|
|
+ et.card_rule_id = b.id
|
|
|
+ left join sys_user c ON
|
|
|
+ et.userId = c.id
|
|
|
+ where
|
|
|
+ et.userId = #{userId}
|
|
|
+ union all
|
|
|
+ select
|
|
|
+ et.id,
|
|
|
+ et.school_id schoolId,
|
|
|
+ et.org_id as orgId,
|
|
|
+ et.course_code courseCode,
|
|
|
+ et.course_name courseName,
|
|
|
+ et.specialty,
|
|
|
+ et.paper_number paperNumber,
|
|
|
+ et.card_rule_id cardRuleId,
|
|
|
+ case
|
|
|
+ et.card_rule_id when -1 then '全部通卡'
|
|
|
+ else b.name
|
|
|
+ end cardRuleName,
|
|
|
+ et.userId,
|
|
|
+ c.real_name userName,
|
|
|
+ et.start_time startTime,
|
|
|
+ et.end_time endTime,
|
|
|
+ et.flowStatus as status,
|
|
|
+ et.enable,
|
|
|
+ et.create_time createTime,
|
|
|
+ et.EXECUTION_ID_ as executionId,
|
|
|
+ et.flow_id as flowId,
|
|
|
+ et.NAME_ as taskName,
|
|
|
+ et.TASK_DEF_KEY_ as taskDefKey,
|
|
|
+ et.ID_ as taskId,
|
|
|
+ et.setup
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ et.*,
|
|
|
+ et.user_id as userId
|
|
|
+ from
|
|
|
+ (
|
|
|
+ select
|
|
|
+ et.*,
|
|
|
+ tffa.status as flowStatus,
|
|
|
+ art.EXECUTION_ID_,
|
|
|
+ art.NAME_,
|
|
|
+ art.TASK_DEF_KEY_,
|
|
|
+ art.ID_,
|
|
|
+ tffa.setup
|
|
|
+ from
|
|
|
+ exam_task et
|
|
|
+ left join ACT_RU_TASK art on
|
|
|
+ et.flow_id = art.PROC_INST_ID_
|
|
|
+ left join t_f_flow_approve tffa on
|
|
|
+ tffa.flow_id = et.flow_id
|
|
|
+ where
|
|
|
+ et.school_id = #{schoolId}
|
|
|
+ and et.flow_id is null) et
|
|
|
+ ) et
|
|
|
+ left join basic_card_rule b ON
|
|
|
+ et.card_rule_id = b.id
|
|
|
+ left join sys_user c ON
|
|
|
+ et.userId = c.id
|
|
|
+ where
|
|
|
+ et.userId = #{userId}
|
|
|
</select>
|
|
|
|
|
|
<select id="findByFlowStatus" resultType="com.qmth.distributed.print.business.entity.ExamTask">
|