|
@@ -754,26 +754,48 @@
|
|
|
|
|
|
<select id="getFlowTaskReadyList" resultType="com.qmth.distributed.print.business.bean.result.WorkResult">
|
|
<select id="getFlowTaskReadyList" resultType="com.qmth.distributed.print.business.bean.result.WorkResult">
|
|
select
|
|
select
|
|
- temp.*,
|
|
|
|
- c.real_name as userName
|
|
|
|
|
|
+ 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
|
|
from
|
|
(
|
|
(
|
|
select
|
|
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.*,
|
|
case
|
|
case
|
|
- when art.ASSIGNEE_ is null then
|
|
|
|
- (
|
|
|
|
|
|
+ when et.ariUserId is not null then
|
|
|
|
+ et.ariUserId
|
|
|
|
+ when et.assigneeId is not null then
|
|
|
|
+ et.assigneeId
|
|
|
|
+ else et.user_id
|
|
|
|
+ end as userId
|
|
|
|
+ from
|
|
|
|
+ (
|
|
|
|
+ select
|
|
|
|
+ et.*,
|
|
|
|
+ art.ASSIGNEE_ as assigneeId,
|
|
|
|
+ (
|
|
select
|
|
select
|
|
ari.USER_ID_
|
|
ari.USER_ID_
|
|
from
|
|
from
|
|
@@ -782,89 +804,28 @@
|
|
ari.TASK_ID_ = art.ID_
|
|
ari.TASK_ID_ = art.ID_
|
|
and art.ASSIGNEE_ is null
|
|
and art.ASSIGNEE_ is null
|
|
and ari.TYPE_ = 'candidate'
|
|
and ari.TYPE_ = 'candidate'
|
|
- and ari.USER_ID_ = #{userId})
|
|
|
|
- else art.ASSIGNEE_
|
|
|
|
- end as userId,
|
|
|
|
- et.start_time startTime,
|
|
|
|
- et.end_time endTime,
|
|
|
|
- tffa.status,
|
|
|
|
- et.enable,
|
|
|
|
- et.create_time createTime,
|
|
|
|
- art.EXECUTION_ID_ as executionId,
|
|
|
|
- et.flow_id as flowId,
|
|
|
|
- art.NAME_ as taskName,
|
|
|
|
- art.TASK_DEF_KEY_ as taskDefKey,
|
|
|
|
- art.ID_ as taskId,
|
|
|
|
- tffa.setup
|
|
|
|
- from
|
|
|
|
- (
|
|
|
|
- select
|
|
|
|
- et.id,
|
|
|
|
- et.school_id ,
|
|
|
|
- et.org_id,
|
|
|
|
- et.course_code,
|
|
|
|
- et.course_name,
|
|
|
|
- et.specialty,
|
|
|
|
- et.paper_number,
|
|
|
|
- et.card_rule_id,
|
|
|
|
- case
|
|
|
|
- et.card_rule_id when -1 then '全部通卡'
|
|
|
|
- else b.name
|
|
|
|
- end,
|
|
|
|
- et.user_id,
|
|
|
|
- et.start_time,
|
|
|
|
- et.end_time,
|
|
|
|
- et.enable,
|
|
|
|
- et.create_time,
|
|
|
|
- et.flow_id
|
|
|
|
|
|
+ and ari.USER_ID_ = #{userId}) as ariUserId,
|
|
|
|
+ tffa.status as flowStatus,
|
|
|
|
+ art.EXECUTION_ID_,
|
|
|
|
+ art.NAME_,
|
|
|
|
+ art.TASK_DEF_KEY_,
|
|
|
|
+ art.ID_,
|
|
|
|
+ tffa.setup
|
|
from
|
|
from
|
|
exam_task et
|
|
exam_task et
|
|
- left join basic_card_rule b ON
|
|
|
|
- et.card_rule_id = b.id
|
|
|
|
- left join sys_user c ON
|
|
|
|
- et.user_id = c.id
|
|
|
|
- WHERE
|
|
|
|
- et.user_id = #{userId}
|
|
|
|
- and et.school_id = #{schoolId}
|
|
|
|
- and et.flow_id is null
|
|
|
|
- union all
|
|
|
|
- select
|
|
|
|
- et.id,
|
|
|
|
- et.school_id,
|
|
|
|
- et.org_id,
|
|
|
|
- et.course_code,
|
|
|
|
- et.course_name,
|
|
|
|
- et.specialty,
|
|
|
|
- et.paper_number,
|
|
|
|
- et.card_rule_id,
|
|
|
|
- case
|
|
|
|
- et.card_rule_id when -1 then '全部通卡'
|
|
|
|
- else b.name
|
|
|
|
- end,
|
|
|
|
- et.user_id,
|
|
|
|
- et.start_time,
|
|
|
|
- et.end_time,
|
|
|
|
- et.enable,
|
|
|
|
- et.create_time,
|
|
|
|
- et.flow_id
|
|
|
|
- from
|
|
|
|
- exam_task et
|
|
|
|
- left join basic_card_rule b ON
|
|
|
|
- et.card_rule_id = b.id
|
|
|
|
- left join sys_user c ON
|
|
|
|
- et.user_id = c.id
|
|
|
|
- WHERE
|
|
|
|
- et.user_id = #{userId}
|
|
|
|
- and et.school_id = #{schoolId}
|
|
|
|
- and et.flow_id is not null) 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
|
|
|
|
|
|
+ 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}) et
|
|
|
|
+ ) et
|
|
left join basic_card_rule b ON
|
|
left join basic_card_rule b ON
|
|
- et.card_rule_id = b.id ) temp
|
|
|
|
- left join sys_user c ON
|
|
|
|
- temp.userId = c.id
|
|
|
|
|
|
+ et.card_rule_id = b.id
|
|
|
|
+ left join sys_user c ON
|
|
|
|
+ et.userId = c.id
|
|
|
|
+ where
|
|
|
|
+ et.userId = #{userId}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="findByFlowStatus" resultType="com.qmth.distributed.print.business.entity.ExamTask">
|
|
<select id="findByFlowStatus" resultType="com.qmth.distributed.print.business.entity.ExamTask">
|