|
@@ -235,15 +235,7 @@
|
|
a.status,
|
|
a.status,
|
|
a.flow_id flowId,
|
|
a.flow_id flowId,
|
|
f.setup,
|
|
f.setup,
|
|
- CASE
|
|
|
|
- WHEN a.review = 1 AND a.status = 'SUBMIT' THEN 'NOT_AUDITED'
|
|
|
|
- WHEN a.review = 1 AND a.status IN ('STAGE', 'FINISH') AND a.review_status IS NOT NULL THEN 'AUDITED'
|
|
|
|
- ELSE ''
|
|
|
|
- END auditStatus,
|
|
|
|
- CASE
|
|
|
|
- WHEN a.review_status IS NULL THEN ''
|
|
|
|
- ELSE a.review_status
|
|
|
|
- END reviewStatus
|
|
|
|
|
|
+ f.status as flowStatus
|
|
FROM
|
|
FROM
|
|
exam_task a
|
|
exam_task a
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
@@ -259,7 +251,7 @@
|
|
<where>
|
|
<where>
|
|
a.enable = true
|
|
a.enable = true
|
|
AND a.review = true
|
|
AND a.review = true
|
|
- AND f.status != 'FINISH'
|
|
|
|
|
|
+ AND f.status = 'AUDITING' or f.status = 'REJECT'
|
|
<if test="schoolId != null and schoolId != ''">
|
|
<if test="schoolId != null and schoolId != ''">
|
|
and a.school_id = #{schoolId}
|
|
and a.school_id = #{schoolId}
|
|
</if>
|
|
</if>
|
|
@@ -301,7 +293,7 @@
|
|
</select>
|
|
</select>
|
|
<select id="listTaskReviewAudited" resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDto">
|
|
<select id="listTaskReviewAudited" resultType="com.qmth.distributed.print.business.bean.dto.ExamTaskDto">
|
|
SELECT
|
|
SELECT
|
|
- a.id,
|
|
|
|
|
|
+ distinct a.id,
|
|
a.school_id schoolId,
|
|
a.school_id schoolId,
|
|
a.course_code courseCode,
|
|
a.course_code courseCode,
|
|
a.course_name courseName,
|
|
a.course_name courseName,
|
|
@@ -319,15 +311,9 @@
|
|
a.create_id createId,
|
|
a.create_id createId,
|
|
a.create_time createTime,
|
|
a.create_time createTime,
|
|
a.status,
|
|
a.status,
|
|
- CASE
|
|
|
|
- WHEN a.review = 1 AND a.status = 'SUBMIT' THEN 'NOT_AUDITED'
|
|
|
|
- WHEN a.review = 1 AND a.status IN ('STAGE', 'FINISH') AND a.review_status IS NOT NULL THEN 'AUDITED'
|
|
|
|
- ELSE ''
|
|
|
|
- END auditStatus,
|
|
|
|
- CASE
|
|
|
|
- WHEN a.review_status IS NULL THEN ''
|
|
|
|
- ELSE a.review_status
|
|
|
|
- END reviewStatus
|
|
|
|
|
|
+ a.flow_id flowId,
|
|
|
|
+ f.setup,
|
|
|
|
+ f.status as flowStatus
|
|
FROM
|
|
FROM
|
|
exam_task a
|
|
exam_task a
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
@@ -336,6 +322,10 @@
|
|
sys_user c ON a.user_id = c.id
|
|
sys_user c ON a.user_id = c.id
|
|
LEFT JOIN
|
|
LEFT JOIN
|
|
sys_user d ON a.create_id = d.id
|
|
sys_user d ON a.create_id = d.id
|
|
|
|
+ LEFT JOIN t_f_flow_approve f ON
|
|
|
|
+ a.flow_id = f.flow_id
|
|
|
|
+ LEFT JOIN t_f_flow_approve_log tffal ON
|
|
|
|
+ a.flow_id = tffal.flow_id
|
|
<where>
|
|
<where>
|
|
a.enable = true and a.review = true and a.status in ('STAGE','FINISH') and a.review_status is not null
|
|
a.enable = true and a.review = true and a.status in ('STAGE','FINISH') and a.review_status is not null
|
|
<if test="schoolId != null and schoolId != ''">
|
|
<if test="schoolId != null and schoolId != ''">
|
|
@@ -351,7 +341,7 @@
|
|
and a.paper_number = #{paperNumber}
|
|
and a.paper_number = #{paperNumber}
|
|
</if>
|
|
</if>
|
|
<if test="userId != null and userId != ''">
|
|
<if test="userId != null and userId != ''">
|
|
- and a.user_id = #{userId}
|
|
|
|
|
|
+ and (tffal.primary_approve_id = #{userId} or tffal.second_approve_id = #{userId})
|
|
</if>
|
|
</if>
|
|
<if test="cardRuleId != null and cardRuleId != ''">
|
|
<if test="cardRuleId != null and cardRuleId != ''">
|
|
and a.card_rule_id = #{cardRuleId}
|
|
and a.card_rule_id = #{cardRuleId}
|