Pārlūkot izejas kodu

过滤已填过的缺陷条目

zhoutg 5 gadi atpakaļ
vecāks
revīzija
a65e2dd619

+ 5 - 0
mrman-service/src/main/java/com/diagbot/vo/QcCasesEntryIndexVO.java

@@ -49,4 +49,9 @@ public class QcCasesEntryIndexVO extends Page {
      * notIds
      */
     private List<Long> notIds;
+
+    /**
+     * filter
+     */
+    private Integer filter;
 }

+ 23 - 0
mrman-service/src/main/resources/mapper/QcCasesEntryMapper.xml

@@ -71,6 +71,29 @@
                 #{item}
             </foreach>
         </if>
+        <if test="filter != null and filter == 1">
+            and a.id not in
+            (
+            select DISTINCT cases_entry_id from (
+            select aa.id,substring_index(substring_index(aa.cases_entry_ids,',',bb.help_topic_id+1),',',-1) cases_entry_id
+            from
+            qc_question_info aa
+            join
+            <![CDATA[
+                        mysql.help_topic bb
+                        on bb.help_topic_id < (length(aa.cases_entry_ids) - length(replace(aa.cases_entry_ids,',',''))+1)
+                    ]]>
+            where aa.is_deleted = 'N'
+            <if test="hospitalId != null">
+                AND aa.hospital_id = #{hospitalId}
+            </if>
+            <if test="modeId != null and modeId != ''">
+                AND aa.mode_id = #{modeId}
+            </if>
+            ) tt
+            where tt.cases_entry_id != ''
+            )
+        </if>
         ORDER BY a.cases_id,a.id
     </select>