Browse Source

Merge remote-tracking branch 'origin/dev/20220613_v2.1.6厦门个性化_出院人数统计' into debug

wangsy 3 years ago
parent
commit
84d08c2604

+ 3 - 5
doc/049.20220613_v2.1.6厦门个性化_出院人数统计/qc_init_v2.1.6.sql

@@ -10,11 +10,9 @@ update sys_user_pageset a set a.order_no = 22 where a.name = '评分时间' and
 INSERT INTO `sys_user_pageset` (`is_deleted`,`gmt_create`,`gmt_modified`,`creator`,`modifier`,`user_id`,`page_type`,`name`,`val`,`status`,`order_no`) VALUES ('N','1970-01-01 12:00:00','1970-01-01 12:00:00','0','0',-1,1,'主刀医生','operationDoctorName',1,22);
 INSERT INTO `sys_user_pageset` (`is_deleted`,`gmt_create`,`gmt_modified`,`creator`,`modifier`,`user_id`,`page_type`,`name`,`val`,`status`,`order_no`) VALUES ('N','1970-01-01 12:00:00','1970-01-01 12:00:00','0','0',-1,1,'手术级别','operationLevel',1,23);
 
-update sys_user_pageset a set a.order_no = 24 where a.name = '病区' and a.user_id = -1;
-update sys_user_pageset a set a.order_no = 25 where a.name = '医疗组' and a.user_id = -1;
-update sys_user_pageset a set a.order_no = 26 where a.name = '科室' and a.user_id = -1;
-update sys_user_pageset a set a.order_no = 27 where a.name = '评分时间' and a.user_id = -1;
-update sys_user_pageset a set a.order_no = 28 where a.name = '是否日间病历' and a.user_id = -1;
+update sys_user_pageset a set a.order_no = 24 where a.name = '科室' and a.user_id = -1;
+update sys_user_pageset a set a.order_no = 25 where a.name = '评分时间' and a.user_id = -1;
+update sys_user_pageset a set a.order_no = 26 where a.name = '是否日间病历' and a.user_id = -1;
 
 
 

+ 1 - 1
src/main/java/com/diagbot/dto/QcResultShortDTO.java

@@ -74,7 +74,7 @@ public class QcResultShortDTO {
     @Excel(name = "主任医生", width = 30, orderNum = "16")
     private String directorDoctorName;
     @Excel(name = "主刀医生", width = 30, orderNum = "17")
-    private String operationDocterName;
+     private String operationDoctorName;
     /**
      * 科室编码
      */

+ 0 - 18
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -2667,24 +2667,6 @@ public class ConsoleFacade {
     public IPage<QcResultShortDTO> leaveHosMRPage(QcResultShortPageVO qcResultShortPageVO) {
         filterFacade.qcResultShortPageVOSet(qcResultShortPageVO);
         IPage<QcResultShortDTO> page = behospitalInfoFacade.leaveHosMRPage(qcResultShortPageVO);
-        List<QcResultShortDTO> records = page.getRecords();
-        HashMap<String, QcResultShortDTO> map = new HashMap<String, QcResultShortDTO>();
-        for (QcResultShortDTO record : records) {
-            if (map.get(record.getBehospitalCode())==null){
-                map.put(record.getBehospitalCode(),record);
-            }else {
-                QcResultShortDTO qcResultShortDTO = map.get(record.getBehospitalCode());
-                qcResultShortDTO.setOperationDocterName(qcResultShortDTO.getOperationDocterName()+","+record.getOperationDocterName());
-                qcResultShortDTO.setOperationLevel(qcResultShortDTO.getOperationLevel()+","+record.getOperationLevel());
-                map.put(record.getBehospitalCode(),qcResultShortDTO);
-            }
-        }
-        List<QcResultShortDTO> resultShortDTOS=new ArrayList<>();
-        Set<Map.Entry<String, QcResultShortDTO>> entries = map.entrySet();
-        for (Map.Entry<String, QcResultShortDTO> entry : entries) {
-            resultShortDTOS.add(entry.getValue());
-        }
-        page.setRecords(resultShortDTOS);
         return page;
     }
 

+ 21 - 10
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -7804,9 +7804,12 @@
     <!-- 离院病人评分详情页-->
     <select id="leaveHosMRPage" resultType="com.diagbot.dto.QcResultShortDTO">
         SELECT DISTINCT
-        t.*,
-        t4.operation_doctor_id AS operationDocterName,
-        t4.operation_level AS operationLevel
+        t.*
+        <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
+            ,
+            GROUP_CONCAT(case when t4.operation_doctor_id is not null then t4.operation_doctor_id else '' end separator ',') AS operationDoctorName,
+            GROUP_CONCAT(case when t4.operation_level is not null then t4.operation_level else '' end separator ',') AS operationLevel
+        </if>
         FROM
         (SELECT
         t1.hospital_id AS hospitalId,
@@ -8013,7 +8016,7 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
         </if>
-        <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 6">
+        <if test='qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 6 and qcResultShortPageVO.hospitalId == "7"'>
             ,med_home_page t2
             WHERE
             t2.is_deleted = 'N'
@@ -8025,7 +8028,7 @@
             or t2.blood_fee != null
             )
         </if>
-        <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 7">
+        <if test='qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType == 7 and qcResultShortPageVO.hospitalId == "7"'>
             ,med_home_page t2
             ,med_doctor_advice b
             WHERE
@@ -8040,13 +8043,17 @@
             AND b.da_status != '作废'
         </if>
         )t
+        <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
         ,med_home_page t3
         ,med_home_operation_info t4
+        </if>
         where 1=1
+        <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
         AND t.hospitalId = t3.hospital_id
         AND t.hospitalId = t4.hospital_id
         AND t.behospitalCode = t3.behospital_code
         AND t3.home_page_id = t4.home_page_id
+        </if>
         <if test="qcResultShortPageVO.checkStatus != null">
             and t.checkStatus = #{qcResultShortPageVO.checkStatus}
         </if>
@@ -8074,11 +8081,15 @@
         <if test="qcResultShortPageVO.level != null and qcResultShortPageVO.level != ''">
             AND t.`level` = #{qcResultShortPageVO.level}
         </if>
-        <if test="qcResultShortPageVO.operationDoctor != null and qcResultShortPageVO.operationDoctor != ''">
-            AND t4.`operationDocterName` = #{qcResultShortPageVO.operationDoctor}
-        </if>
-        <if test="qcResultShortPageVO.operationLevel != null and qcResultShortPageVO.operationLevel != ''">
-            AND t4.`operationLevel` = #{qcResultShortPageVO.operationLevel}
+        <if test='qcResultShortPageVO.isPlacefile != null and qcResultShortPageVO.isPlacefile != "" and qcResultShortPageVO.isPlacefile == "1" and qcResultShortPageVO.hospitalId == "7"'>
+            <if test="qcResultShortPageVO.operationDoctor != null and qcResultShortPageVO.operationDoctor != ''">
+                AND t4.`operation_doctor_id` like concat('%', #{qcResultShortPageVO.operationDoctor}, '%')
+            </if>
+            <if test="qcResultShortPageVO.operationLevel != null and qcResultShortPageVO.operationLevel != ''">
+                AND t4.`operation_level` like concat('%', #{qcResultShortPageVO.operationLevel}, '%')
+            </if>
+            GROUP BY
+            t.behospitalCode
         </if>
     </select>