Commit 7ce67ced by 崔彦峰

modify:等级考试列表查询sql修改增加状态status过滤。

1 parent 61d3da47
...@@ -50,25 +50,28 @@ ...@@ -50,25 +50,28 @@
WHERE exam.deleted_flag = 'N' WHERE exam.deleted_flag = 'N'
<if test="notRelatedPlan != null and notRelatedPlan"> <if test="notRelatedPlan != null and notRelatedPlan">
AND ( AND (
<!-- 情况1:考试没有关联任何培训计划 --> (
NOT EXISTS ( <!-- 情况1:考试没有关联任何培训计划 -->
SELECT 1 NOT EXISTS (
FROM dj_car_life_learning_center_training_plan plan SELECT 1
WHERE plan.exam_id = exam.id FROM dj_car_life_learning_center_training_plan plan
AND plan.deleted_flag = 'N' WHERE plan.exam_id = exam.id
AND plan.scene_type = 1 AND plan.deleted_flag = 'N'
) AND plan.scene_type = 1
<!-- 情况2:或者考试关联了指定的培训计划 --> )
<if test="planId != null"> AND exam.status in(1,2)
OR EXISTS ( )
SELECT 1 <!-- 情况2:或者考试关联了指定的培训计划 -->
FROM dj_car_life_learning_center_training_plan plan <if test="planId != null">
WHERE plan.exam_id = exam.id OR EXISTS (
AND plan.deleted_flag = 'N' SELECT 1
AND plan.scene_type = 1 FROM dj_car_life_learning_center_training_plan plan
AND plan.id = #{planId} WHERE plan.exam_id = exam.id
) AND plan.deleted_flag = 'N'
</if> AND plan.scene_type = 1
AND plan.id = #{planId}
)
</if>
) )
</if> </if>
<if test="beisenExamName != null and beisenExamName != ''"> <if test="beisenExamName != null and beisenExamName != ''">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!