|
@@ -241,23 +241,6 @@
|
|
|
LEFT JOIN examination_basic eb ON FIND_IN_SET(er.exam_location_id_,eb.exam_location_id_list_) AND er.tenant_id_ = eb.tenant_id_
|
|
|
<include refid="queryExamRoomPageSql"/>
|
|
|
</select>
|
|
|
-
|
|
|
- <sql id="queryExamRoomPageSql">
|
|
|
- <where>
|
|
|
- <if test="organIds!=null">
|
|
|
- AND er.organ_id_ IN
|
|
|
- <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
- #{organId}
|
|
|
- </foreach>
|
|
|
- </if>
|
|
|
- <if test="examId!=null">
|
|
|
- AND er.examination_basic_id_=#{examId}
|
|
|
- </if>
|
|
|
- <if test="examRoomId!=null">
|
|
|
- AND er.id_=#{examRoomId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
|
|
|
<select id="queryExamRoomPage" resultMap="ExamRoomDto">
|
|
|
SELECT
|
|
@@ -273,6 +256,23 @@
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
+ <sql id="queryExamRoomCondition">
|
|
|
+ <where>
|
|
|
+ <if test="organIds!=null">
|
|
|
+ AND er.organ_id_ IN
|
|
|
+ <foreach collection="organIds" item="organId" separator="," open="(" close=")">
|
|
|
+ #{organId}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="examRoomId!=null">
|
|
|
+ AND er.id_=#{examRoomId}
|
|
|
+ </if>
|
|
|
+ <if test="examId!=null">
|
|
|
+ AND er.examination_basic_id_ = #{examId}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
+
|
|
|
<select id="queryExamRoom" resultMap="ExamRoomDto">
|
|
|
SELECT
|
|
|
er.*,
|
|
@@ -281,7 +281,7 @@
|
|
|
eb.name_ exam_name_
|
|
|
FROM exam_room er
|
|
|
LEFT JOIN exam_location el ON er.exam_location_id_ = el.id_
|
|
|
- <include refid="queryExamRoomPageSql"/>
|
|
|
+ <include refid="queryExamRoomCondition"/>
|
|
|
ORDER BY eb.expect_exam_start_time_ DESC
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
@@ -289,7 +289,7 @@
|
|
|
<select id="countExamRoom" resultType="java.lang.Integer">
|
|
|
SELECT COUNT(er.id_) FROM exam_room er
|
|
|
LEFT JOIN exam_location el ON er.exam_location_id_ = el.id_
|
|
|
- <include refid="queryExamRoomPageSql"/>
|
|
|
+ <include refid="queryExamRoomCondition"/>
|
|
|
</select>
|
|
|
|
|
|
<select id="getWithExam" resultMap="ExamRoom">
|