瀏覽代碼

Merge branch 'dev/20200716_1.3.9' into debug

gaodm 5 年之前
父節點
當前提交
fe28a2f210

+ 58 - 22
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -947,8 +947,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
         OutputInfo outputInfo = response.getData();
-        //根据质控结果获取质控条目
-        // QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
         List<String> codeList = new ArrayList<>();
         // code和info的映射map
         Map<String, String> codeToInfoMap = new LinkedHashMap<>();
@@ -960,28 +958,66 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
                 codeToInfoMap.put(key, mapInfo.get("info"));
             }
         }
-        // List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
-        // if (ListUtil.isNotEmpty(codeList)) {
-        //     qcResultAlgQueryVO.setCodeList(codeList);
-        //     qcResultAlgQueryVO.setHospitalId(hospitalId);
-        //     qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
-        // }
-        //
-        // // 评分
-        // AlgorithmVO algorithmVO = new AlgorithmVO();
-        // algorithmVO.setType(0);
-        // algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
-        // AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
 
-        //保存
-        // Map<String, Object> pageMap = outputInfo.getPageData();
-        // String pageData = JSON.toJSONString(pageMap);
-        // 获取菜单信息
-        // List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
-        // String menuData = JSON.toJSONString(qcModeDTOList);
+        // 归档状态保存结果到数据库
+        if ("0".equals(analyzeRunVO.getIsPlacefile())) {
+            List<QcResultAlgVO> qcResultAlgVOList = new ArrayList<>();
+            if (ListUtil.isNotEmpty(codeList)) {
+                // 根据质控结果获取质控条目
+                QcResultAlgQueryVO qcResultAlgQueryVO = new QcResultAlgQueryVO();
+                qcResultAlgQueryVO.setCodeList(codeList);
+                qcResultAlgQueryVO.setHospitalId(hospitalId);
+                qcResultAlgVOList = qcCasesEntryFacade.getQcResultAlgVO(qcResultAlgQueryVO);
+            }
 
-        // 运行质控不保存评分结果信息
-        // Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask());
+            // 对info赋值
+            for (QcResultAlgVO bean : qcResultAlgVOList) {
+                String info = codeToInfoMap.get(bean.getCode());
+                if (StringUtil.isNotBlank(info)) {
+                    bean.setInfo(info);
+                }
+            }
+
+            // 评分
+            AlgorithmVO algorithmVO = new AlgorithmVO();
+            algorithmVO.setType(0);
+            algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
+            algorithmVO.setHospitalId(hospitalId);
+            algorithmVO.setBehospitalCode(analyzeVO.getBehospitalCode());
+            algorithmVO.setQcResultAlgVOList(qcResultAlgVOList);
+            AlgorithmDTO algorithmDTO = algorithmFacade.getAlgorithmRes(algorithmVO);
+
+            //保存
+            Map<String, Object> pageMap = outputInfo.getPageData();
+            // 手动拼接数据【知情同意书】【谈话告知书】
+            List<MedicalRecord> recordList = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("behospital_code", analyzeVO.getBehospitalCode())
+                    .eq("hospital_id", hospitalId)
+                    .in("mode_id", Arrays.asList(53, 54, 16))
+                    .orderByAsc("rec_date")
+            );
+            List<MedicalRecordDTO> medicalRecordDTOList = BeanUtil.listCopyTo(recordList, MedicalRecordDTO.class);
+            Map<Long, List<MedicalRecordDTO>> recordMap = EntityUtil.makeEntityListMap(medicalRecordDTOList, "modeId");
+            List<MedicalRecordDTO> recordDTOList = new ArrayList<>();
+            if (recordMap.get(53L) != null) {
+                recordDTOList.addAll(recordMap.get(53L)); // 知情同意书
+            }
+            if (recordMap.get(16L) != null) {
+                recordDTOList.addAll(recordMap.get(16L)); // 手术知情同意书
+            }
+            // 知情同意书 = 【知情同意书】 + 【手术知情同意书】
+            pageMap.put("知情同意书", recordDTOList);
+            pageMap.put("谈话告知书", recordMap.get(54L));
+
+            String pageData = JSON.toJSONString(pageMap);
+            // 获取菜单信息
+            List<QcModeDTO> qcModeDTOList = qcModeFacade.getMenu(pageMap);
+            String menuData = JSON.toJSONString(qcModeDTOList);
+
+            // 保存评分结果信息
+            Date date = qcresultInfoFacade.saveQcResult(algorithmDTO, algorithmVO, analyzeVO, pageData, menuData, analyzeVO.getIsTask(), null);
+        }
 
         // 返回缺陷提示信息
         List<MsgDTO> msgDTOList = new ArrayList<>();

+ 2 - 0
src/main/java/com/diagbot/vo/AnalyzeRunVO.java

@@ -21,4 +21,6 @@ public class AnalyzeRunVO {
     // 模块id
     @NotNull(message = "modeId不能为空")
     private Long modeId;
+    // 归档字段
+    private String isPlacefile = "1";
 }

+ 2 - 2
src/main/java/com/diagbot/vo/BehospitalPageVO.java

@@ -92,8 +92,8 @@ public class BehospitalPageVO extends Page implements Serializable {
     /**
      * 是否归档(0:未归档,1:已归档)
      */
-    @ApiModelProperty(hidden = true)
-    private String isPlacefile;
+//    @ApiModelProperty(hidden = true)
+    private String isPlacefile = "1";
 
     private Integer checkStatus;
 }

+ 4 - 0
src/main/java/com/diagbot/vo/EntryStatisticsVO.java

@@ -48,4 +48,8 @@ public class EntryStatisticsVO {
      * 科室名称
      */
     private String deptName;
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/ExportQcresultVO.java

@@ -28,4 +28,9 @@ public class ExportQcresultVO {
     private String deptId;
     private String name;
     private Integer checkStatus;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterPageVO.java

@@ -66,4 +66,9 @@ public class FilterPageVO extends Page {
      * 规则类型(0:无,1:空项,2:错误)
      */
     private Integer ruleType;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterUnModifyMRVO.java

@@ -57,4 +57,9 @@ public class FilterUnModifyMRVO {
      * 排序(降序)
      */
     private String desc;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/FilterVO.java

@@ -49,4 +49,9 @@ public class FilterVO {
     private String deptClass;
 
     private String level;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 5 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -76,4 +76,9 @@ public class QcResultShortPageVO extends Page {
      * 核查状态(1:已核查,0:未核查)
      */
     private Integer checkStatus;
+
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 4 - 0
src/main/java/com/diagbot/vo/TaskVO.java

@@ -32,4 +32,8 @@ public class TaskVO {
     private Date endLeaveDate;
     // 是否使用CRF缓存
     private boolean useCrfCache;
+    /**
+     * 是否归档(0:未归档,1:已归档)
+     */
+    private String isPlacefile = "1";
 }

+ 6 - 4
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -89,11 +89,13 @@ public class BehospitalInfoController {
 
     @ApiOperation(value = "评分-运行质控[by:zhoutg]",
             notes = "    // 病历id\n" +
-                    "     String behospitalCode;\n" +
+                    "    String behospitalCode;\n" +
                     "    // 医院ID\n" +
-                    "     Long hospitalId;\n" +
+                    "    Long hospitalId;\n" +
                     "    // 模块id\n" +
-                    "     Long modeId;")
+                    "    Long modeId;\n" +
+                    "    // 归档字段\n" +
+                    "    String isPlacefile;")
     @PostMapping("/analyze_run")
     @SysLogger("analyze_run")
     @Transactional
@@ -220,7 +222,7 @@ public class BehospitalInfoController {
         return RespDTO.onSuc(data);
     }
 
-    @ApiOperation(value = "导出病历[by:gaodm]",
+    @ApiOperation(value = "导出病历例子[by:gaodm]",
             notes = "")
     @PostMapping("/exportExcel")
     @SysLogger("exportExcel")

+ 196 - 74
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -98,8 +98,7 @@
         <if test="isPlacefile != null and isPlacefile != ''">
             and t.is_placefile = #{isPlacefile}
         </if>
-        and t.qc_type_id != 0
-        and t.is_placefile = 1) p
+        and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="checkStatus != null ">
         and p.check_status = #{checkStatus}
@@ -161,7 +160,9 @@
         AND a.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -195,7 +196,9 @@
         AND a.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -213,7 +216,9 @@
         select * from med_behospital_info a
         where a.is_deleted = 'N'
         and a.qc_type_id != 0
-        and a.is_placefile = 1
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="filterFlag != null and filterFlag == 0">
             and
             not EXISTS (
@@ -241,7 +246,9 @@
             select * from med_behospital_info b
             where b.is_deleted = 'N'
             and b.qc_type_id != 0
-            and b.is_placefile = 1
+            <if test="isPlacefile != null and isPlacefile != ''">
+                and b.is_placefile = #{isPlacefile}
+            </if>
             <if test="startLeaveDate != null">
                 <![CDATA[ and b.leave_hospital_date >= #{startLeaveDate}]]>
             </if>
@@ -332,8 +339,7 @@
         <if test="isPlacefile != null and isPlacefile != ''">
             and t.is_placefile = #{isPlacefile}
         </if>
-        and t.qc_type_id != 0
-        and t.is_placefile = 1) p
+        and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="checkStatus != null ">
             and p.check_status = #{checkStatus}
@@ -413,8 +419,7 @@
         <if test="isPlacefile != null and isPlacefile != ''">
             and t.is_placefile = #{isPlacefile}
         </if>
-        and t.qc_type_id != 0
-        and t.is_placefile = 1) p
+        and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="checkStatus != null ">
             and p.check_status = #{checkStatus}
@@ -493,8 +498,7 @@
         <if test="isPlacefile != null and isPlacefile != ''">
             and t.is_placefile = #{isPlacefile}
         </if>
-        and t.qc_type_id != 0
-        and t.is_placefile = 1) p
+        and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="checkStatus != null ">
             and p.check_status = #{checkStatus}
@@ -509,7 +513,9 @@
         med_behospital_info a
         WHERE
         a.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -533,7 +539,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND (
         ( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' AND b.newborn_day != '-' )
         OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' AND b.newborn_month != '-' )
@@ -563,7 +571,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND b.return_to_type = '死亡'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -591,7 +601,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
         AND c.mode_id = d.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND d.`name` = '手术记录'
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
@@ -620,7 +632,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.beh_dept_id = c.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="userId!=null">
             AND c.user_id = #{userId}
         </if>
@@ -661,7 +675,9 @@
         ( IFNULL( b.newborn_day, '' ) != '' AND b.newborn_day != '0' AND b.newborn_day != '-' )
         OR ( IFNULL( b.newborn_month, '' )!= '' AND b.newborn_month != '0' AND b.newborn_month != '-' )
         )
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND c.user_id = #{userId}
@@ -700,7 +716,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
         AND b.return_to_type = '死亡'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND c.user_id = #{userId}
@@ -742,7 +760,9 @@
         AND a.beh_dept_id = c.dept_id
         AND d.mode_id = e.id
         AND e.`name` = '手术记录'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND c.user_id = #{userId}
@@ -789,7 +809,9 @@
         AND a.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -824,7 +846,9 @@
         AND a.is_deleted = 'N'
         AND c.is_deleted = 'N'
         AND d.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -874,7 +898,9 @@
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND e.user_id = #{filterPageByDeptVO.userId}
@@ -920,7 +946,9 @@
         AND d.is_deleted = 'N'
         AND e.is_deleted = 'N'
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByDeptVO.userId!=null">
             AND e.user_id = #{filterPageByDeptVO.userId}
@@ -991,7 +1019,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1033,7 +1063,9 @@
         AND a.behospital_code = d.behospital_code
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1172,7 +1204,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
         AND d.parent_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1229,7 +1263,9 @@
         AND d.cases_entry_id = e.id
         AND a.beh_dept_id = f.dept_id
         AND f.parent_dept_id = g.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1369,8 +1405,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
-        AND a.is_placefile = '1'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1435,8 +1472,9 @@
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1563,7 +1601,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = 243
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1607,7 +1647,9 @@
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND d.cases_id = 243
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1665,7 +1707,9 @@
         AND b.cases_id = c.cases_id
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND d.cases_id = 243
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
@@ -1800,7 +1844,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1851,7 +1897,9 @@
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -1974,7 +2022,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = f.dept_id
         AND c.cases_id = 243
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2032,7 +2082,9 @@
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND c.cases_id = 243
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2105,7 +2157,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND d.cases_id = 243
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
@@ -2311,7 +2365,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2358,7 +2414,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2469,7 +2527,9 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.id
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2523,7 +2583,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.beh_dept_id = c.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2633,7 +2695,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = d.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.doctor_id in
             (SELECT doctor_id FROM `bas_doctor_info`
             where is_deleted = 'N' and hospital_id = #{hospitalId} and group_id in (
@@ -2700,7 +2764,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -2841,7 +2907,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -3010,7 +3078,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.userId != null and qcResultShortPageVO.userId != ''">
             AND e.user_id = #{qcResultShortPageVO.userId}
         </if>
@@ -3242,7 +3312,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND b.mode_id = 30
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3297,7 +3369,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND b.home_page_id = c.home_page_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3348,7 +3422,9 @@
         AND b.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3399,7 +3475,9 @@
         DAY,
         DATE( behospital_date ),
         DATE( leave_hospital_date ))> 30
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3501,7 +3579,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND b.leave_hospital_type = '非医嘱离院'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3556,7 +3636,9 @@
         med_behospital_info a
         WHERE
         a.is_deleted = 'N'
-        AND a.is_placefile = 1
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         AND IFNULL( a.diagnose, '' )!= ''
         AND IFNULL( a.file_code, '' )!= ''
@@ -3578,7 +3660,9 @@
         med_behospital_info tt2
         WHERE
         tt2.is_deleted = 'N'
-        AND tt2.is_placefile = 1
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and tt2.is_placefile = #{isPlacefile}
+        </if>
         AND tt2.qc_type_id != 0
         AND tt1.file_code = tt2.file_code
         AND tt1.diagnose = tt2.diagnose
@@ -3623,7 +3707,9 @@
         med_behospital_info a
         WHERE
         a.is_deleted = 'N'
-        AND a.is_placefile = 1
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         AND IFNULL( a.diagnose, '' )!= ''
         AND IFNULL( a.file_code, '' )!= ''
@@ -3696,7 +3782,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
         AND c.cases_id = 243
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -3743,7 +3831,9 @@
         AND b.cases_id = c.cases_id
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND d.cases_id = 243
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
@@ -3841,7 +3931,9 @@
         WHERE
         a.is_deleted = 'N'
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -3980,7 +4072,9 @@
         AND m3.gmt_create = m4.gmt_create
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
-        AND m1.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and m1.is_placefile = #{isPlacefile}
+        </if>
         AND m1.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND m1.hospital_id = #{hospitalId}
@@ -4012,7 +4106,9 @@
         AND a.behospital_code = e.behospital_code
         AND d.cases_id = 243
         AND d.score_res > e.score_res
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -4039,7 +4135,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.qc_type_id != 0
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -4089,7 +4187,9 @@
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.qc_type_id != 0
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -4124,7 +4224,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.qc_type_id != 0
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND ifnull(c.`status`,0) = 1
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -4160,7 +4262,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
         AND a.qc_type_id != 0
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -4212,7 +4316,9 @@
         AND m3.gmt_create = m4.gmt_create
         AND m3.have_home_page = 1
         AND m4.cases_id = 243
-        AND m1.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and m1.is_placefile = #{isPlacefile}
+        </if>
         AND m1.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND m1.hospital_id = #{hospitalId}
@@ -4416,7 +4522,9 @@
         WHERE
         a.is_deleted = 'N'
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -4589,7 +4697,9 @@
         WHERE
         a.is_deleted = 'N'
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -4802,7 +4912,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -4986,7 +5098,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -5113,7 +5227,9 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
         </if>
@@ -5218,7 +5334,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -5384,7 +5502,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>
@@ -5531,7 +5651,9 @@
         AND c.cases_id = d.cases_id
         AND c.cases_entry_id = d.id
         AND a.qc_type_id != 0
-        AND a.is_placefile = 1
+        <if test="qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != ''">
+            and a.is_placefile = #{qcResultShortPageVO.isPlacefile}
+        </if>
         <if test="qcResultShortPageVO.hospitalId != null and qcResultShortPageVO.hospitalId != ''">
             AND a.hospital_id = #{qcResultShortPageVO.hospitalId}
         </if>

+ 24 - 8
src/main/resources/mapper/HomePageMapper.xml

@@ -168,7 +168,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -200,7 +202,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -244,7 +248,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -278,7 +284,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -312,7 +320,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -369,7 +379,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -403,7 +415,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}
@@ -437,7 +451,9 @@
         AND a.behospital_code = b.behospital_code
         AND a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND a.is_placefile = '1'
+        <if test="filterPageByAverageVO.isPlacefile != null and filterPageByAverageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByAverageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageByAverageVO.hospitalId != null and filterPageByAverageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageByAverageVO.hospitalId}

+ 87 - 29
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -61,7 +61,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -100,7 +102,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -135,7 +139,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -188,7 +194,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -218,7 +226,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -288,7 +298,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -318,7 +330,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -381,7 +395,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -427,7 +443,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -485,7 +503,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND d.is_reject = 1
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
@@ -522,7 +542,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -554,7 +576,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -595,7 +619,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
         AND d.parent_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
@@ -632,7 +658,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="userId!=null">
             AND d.user_id = #{userId}
@@ -691,7 +719,9 @@
         AND a.behospital_code = c.behospital_code
         AND c.cases_entry_id = d.id
         AND a.beh_dept_id = e.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="userId!=null">
             AND e.user_id = #{userId}
@@ -757,7 +787,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="userId!=null">
             AND f.user_id = #{userId}
@@ -798,7 +830,9 @@
         AND a.hospital_id = f.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
+        <if test="isPlacefile != null and isPlacefile != ''">
+            and a.is_placefile = #{isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="userId!=null">
             AND f.user_id = #{userId}
@@ -881,7 +915,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageByDeptVO.userId!=null">
             AND f.user_id = #{filterPageByDeptVO.userId}
@@ -941,7 +977,9 @@
         AND a.hospital_id = f.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = f.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageByDeptVO.userId!=null">
             AND f.user_id = #{filterPageByDeptVO.userId}
@@ -1011,7 +1049,9 @@
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = b.behospital_code
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1047,7 +1087,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1129,7 +1171,9 @@
         AND d.is_deleted = 'N'
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1180,7 +1224,9 @@
         AND e.is_deleted = 'N'
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         AND e.cases_id = d.cases_id
         AND e.id = d.cases_entry_id
         AND a.qc_type_id != 0
@@ -1230,7 +1276,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1272,7 +1320,9 @@
         AND c.is_deleted = 'N'
         AND a.hospital_id = c.hospital_id
         AND a.behospital_code = c.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageVO.isPlacefile}
+        </if>
         <![CDATA[AND a.qc_type_id <>0 ]]>
         <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
@@ -1349,7 +1399,9 @@
         AND a.behospital_code = c.behospital_code
         AND a.behospital_code = d.behospital_code
         AND a.beh_dept_id = g.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageByDeptVO.userId!=null">
             AND g.user_id = #{filterPageByDeptVO.userId}
@@ -1396,7 +1448,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.behospital_code = c.behospital_code
         AND a.beh_dept_id = d.dept_id
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND a.qc_type_id != 0
         <if test="filterPageByDeptVO.userId!=null">
             AND d.user_id = #{filterPageByDeptVO.userId}
@@ -1492,7 +1546,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.hospital_id = f.hospital_id
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND a.beh_dept_id = f.dept_id
         AND a.qc_type_id != 0
         <if test="filterPageByDeptVO.userId!=null">
@@ -1560,7 +1616,9 @@
         AND a.hospital_id = d.hospital_id
         AND a.hospital_id = f.hospital_id
         AND a.behospital_code = d.behospital_code
-        AND a.is_placefile = '1'
+        <if test="filterPageByDeptVO.isPlacefile != null and filterPageByDeptVO.isPlacefile != ''">
+            and a.is_placefile = #{filterPageByDeptVO.isPlacefile}
+        </if>
         AND d.cases_id = e.cases_id
         AND d.cases_entry_id = e.id
         AND a.beh_dept_id = f.dept_id