|
@@ -38,6 +38,42 @@
|
|
|
</if>
|
|
|
ORDER BY a.cases_id,a.id
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getQcCasesEntryIndex" resultType="com.diagbot.dto.QcCasesEntryAllDTO">
|
|
|
+ SELECT distinct a.*,b.name as modeName
|
|
|
+ FROM qc_cases_entry a, qc_mode b, qc_cases_entry_hospital c
|
|
|
+ WHERE a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N '
|
|
|
+ and b.id= a.mode_id and a.id = c.cases_entry_id
|
|
|
+ <if test="hospitalId != null">
|
|
|
+ AND c.hospital_id = #{hospitalId}
|
|
|
+ </if>
|
|
|
+ <if test="casesId != null and casesId != ''">
|
|
|
+ AND a.cases_id = #{casesId}
|
|
|
+ </if>
|
|
|
+ <if test="modeId != null and modeId != ''">
|
|
|
+ AND b.id = #{modeId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null and name != ''">
|
|
|
+ AND a.name LIKE CONCAT('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="code != null and code != ''">
|
|
|
+ AND a.code = #{code}
|
|
|
+ </if>
|
|
|
+ <if test="ids != null and ids.size() > 0 ">
|
|
|
+ and a.id in
|
|
|
+ <foreach collection="ids" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="notIds != null and notIds.size() > 0 ">
|
|
|
+ and a.id not in
|
|
|
+ <foreach collection="notIds" item="item" open="(" separator="," close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ ORDER BY a.cases_id,a.id
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="getByCasesEntryId" resultType="com.diagbot.dto.QcCasesEntryDTO">
|
|
|
SELECT a.*,b.name as modeName FROM qc_cases_entry a
|
|
|
LEFT JOIN qc_mode b ON b.id= a.mode_id
|