|
|
@ -45,7 +45,7 @@ |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
ex_question_categories |
|
|
|
ex_question_categories |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
is_deleted = '0' |
|
|
|
is_deleted = 0 |
|
|
|
<if test="industryId!= null and industryId!= ''"> |
|
|
|
<if test="industryId!= null and industryId!= ''"> |
|
|
|
AND industry_id = #{industryId} |
|
|
|
AND industry_id = #{industryId} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -68,7 +68,7 @@ |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
ex_question_categories |
|
|
|
ex_question_categories |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
is_deleted = '0' |
|
|
|
is_deleted = 0 |
|
|
|
<if test="industryId!= null and industryId!= ''"> |
|
|
|
<if test="industryId!= null and industryId!= ''"> |
|
|
|
AND industry_id = #{industryId} |
|
|
|
AND industry_id = #{industryId} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -105,7 +105,7 @@ |
|
|
|
FROM |
|
|
|
FROM |
|
|
|
ex_question_categories |
|
|
|
ex_question_categories |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
is_deleted = '0' |
|
|
|
is_deleted = 0 |
|
|
|
<if test="id!= null and id!= ''"> |
|
|
|
<if test="id!= null and id!= ''"> |
|
|
|
AND id = #{id} |
|
|
|
AND id = #{id} |
|
|
|
</if> |
|
|
|
</if> |
|
|
@ -124,13 +124,33 @@ |
|
|
|
a.status, |
|
|
|
a.status, |
|
|
|
b.question_number |
|
|
|
b.question_number |
|
|
|
FROM ex_question_categories a |
|
|
|
FROM ex_question_categories a |
|
|
|
LEFT JOIN ex_paper_questions b ON b.question_id = a.id AND b.is_deleted = '0' |
|
|
|
LEFT JOIN ex_paper_questions b ON b.question_id = a.id AND b.is_deleted = 0 |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
a.is_deleted = '0' |
|
|
|
a.is_deleted = 0 |
|
|
|
<if test="paperId!= null and paperId!= ''"> |
|
|
|
<if test="paperId!= null and paperId!= ''"> |
|
|
|
AND b.paper_id = #{paperId} |
|
|
|
AND b.paper_id = #{paperId} |
|
|
|
</if> |
|
|
|
</if> |
|
|
|
</where> |
|
|
|
</where> |
|
|
|
ORDER BY b.question_number asc |
|
|
|
ORDER BY b.question_number asc |
|
|
|
</select> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="getQuestiongInExamSize" resultType="int"> |
|
|
|
|
|
|
|
SELECT |
|
|
|
|
|
|
|
count(DISTINCT qc.id) |
|
|
|
|
|
|
|
FROM |
|
|
|
|
|
|
|
ex_question_categories qc |
|
|
|
|
|
|
|
INNER JOIN ex_paper_questions pq ON pq.question_id = qc.id |
|
|
|
|
|
|
|
AND pq.is_deleted = 0 |
|
|
|
|
|
|
|
INNER JOIN ex_exam_papers ep ON ep.id = pq.paper_id |
|
|
|
|
|
|
|
AND ep.is_deleted = 0 |
|
|
|
|
|
|
|
<where> |
|
|
|
|
|
|
|
qc.is_deleted = 0 |
|
|
|
|
|
|
|
<if test="ids!= null and ids.size() > 0"> |
|
|
|
|
|
|
|
AND qc.id IN |
|
|
|
|
|
|
|
<foreach item="item" index="index" collection="ids" |
|
|
|
|
|
|
|
open="(" separator="," close=")"> |
|
|
|
|
|
|
|
#{item} |
|
|
|
|
|
|
|
</foreach> |
|
|
|
|
|
|
|
</if> |
|
|
|
|
|
|
|
</where> |
|
|
|
|
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|
</mapper> |