소스 검색

Merge branch 'dev/20201224_2.0.0' into debug

chengyao 4 년 전
부모
커밋
64c1391182

+ 14 - 7
src/main/java/com/diagbot/facade/BasDoctorInfoFacade.java

@@ -78,15 +78,22 @@ public class BasDoctorInfoFacade extends BasDoctorInfoServiceImpl {
                 QueryWrapper.groupBy("doctor_name");
                 QueryWrapper.orderByAsc("doctor_name");
                 list = behospitalInfoFacade.list(QueryWrapper);
+                if(ListUtil.isNotEmpty(list)){
+                    list.forEach(behospitalInfo -> {
+                                if(behospitalInfo!= null && StringUtils.isNotEmpty(behospitalInfo.getDoctorName())){
+                                    BasDoctorInfo basDoctorInfo = new BasDoctorInfo();
+                                    basDoctorInfo.setHospitalId(behospitalInfo.getHospitalId());
+                                    basDoctorInfo.setDoctorId(behospitalInfo.getDoctorId());
+                                    basDoctorInfo.setName(behospitalInfo.getDoctorName());
+                                    doctorData.add(basDoctorInfo);
+                                }
+                            }
+                    );
+                }
+
             }
         }
-        list.forEach(behospitalInfo -> {
-            BasDoctorInfo basDoctorInfo = new BasDoctorInfo();
-            basDoctorInfo.setHospitalId(behospitalInfo.getHospitalId());
-            basDoctorInfo.setDoctorId(behospitalInfo.getDoctorId());
-            basDoctorInfo.setName(behospitalInfo.getDoctorName());
-            doctorData.add(basDoctorInfo);
-        });
+
             return doctorData;
     }
 }

+ 1 - 1
src/main/java/com/diagbot/facade/ConsoleByDeptExportFacade.java

@@ -116,10 +116,10 @@ public class ConsoleByDeptExportFacade {
      */
     public void entryGroupExportByDeptCase(HttpServletResponse response,FilterPageByDeptVO filterPageByDeptVO) {
         filterFacade.filterPageByDeptVOSet(filterPageByDeptVO);
-        IPage<NumDTO> page = qcresultInfoFacade.entryCountGroupByCaseAndDeptPage(filterPageByDeptVO);
         filterPageByDeptVO.setCurrent(1L);
         filterPageByDeptVO.setSize(Long.MAX_VALUE);
         filterPageByDeptVO.setSearchCount(false);
+        IPage<NumDTO> page = qcresultInfoFacade.entryCountGroupByCaseAndDeptPage(filterPageByDeptVO);
         String fileName = "各模块缺陷详情.xls";
         ExcelUtils.exportExcel(page.getRecords(), null, "sheet1", NumDTO.class, fileName, response, 12.8f);
     }

+ 110 - 0
src/main/java/com/diagbot/facade/ConsoleByDeptFacade.java

@@ -485,9 +485,119 @@ public class ConsoleByDeptFacade {
         }
         filterFacade.filterOrderVOSame(filterOrderVO);
         List<LevelStsByDeptDTO> records = behospitalInfoFacade.levelStatisticsByDept(filterOrderVO);
+        if(ListUtil.isNotEmpty(records)){
+            for (LevelStsByDeptDTO record : records) {
+                BigDecimalMethod(record);
+            }
+        }
         return records;
     }
 
+    public void BigDecimalMethod(LevelStsByDeptDTO record){
+        BigDecimal entrySameBigDecimal = getSubtract(new BigDecimal(record.getEntryNum()), new BigDecimal(record.getSameNum() == null? 0:record.getSameNum()));
+
+        if(entrySameBigDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setEntrySameNum(1);
+        }else if(entrySameBigDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setEntrySameNum(0);
+        }else{
+            record.setEntrySameNum(-1);
+        }
+
+        BigDecimal sameMrNumBigDecimal = getSubtract(new BigDecimal(record.getMrNum()), new BigDecimal(record.getSameMrNum()  == null? 0:record.getSameMrNum()));
+        if(sameMrNumBigDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setMrSameNum(1);
+        }else if(sameMrNumBigDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setMrSameNum(0);
+        }else{
+            record.setMrSameNum(-1);
+        }
+
+        BigDecimal sameAvgValueDecimal = getSubtract(new BigDecimal(record.getAverageValue()), new BigDecimal(record.getSameAvgValue() == null? 0:record.getSameAvgValue()));
+        if(sameAvgValueDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setAvSameValue(1);
+        }else if(sameAvgValueDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setAvSameValue(0);
+        }else{
+            record.setAvSameValue(-1);
+        }
+
+        BigDecimal SameFirstLevelBigDecimal = getSubtract(new BigDecimal(record.getFirstLevelNum()), new BigDecimal(record.getSameFirstLevelNum() == null? 0:record.getSameFirstLevelNum()));
+        if(SameFirstLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setFirSameLevelNum(1);
+        }else if(SameFirstLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setFirSameLevelNum(0);
+        }else{
+            record.setFirSameLevelNum(-1);
+        }
+
+        BigDecimal SameSecondLevelBigDecimal = getSubtract(new BigDecimal(record.getSecondLevelNum()), new BigDecimal(record.getSameSecondLevelNum() == null? 0:record.getSameSecondLevelNum()));
+        if(SameSecondLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setSecSameLevelNum(1);
+        }else if(SameSecondLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setSecSameLevelNum(0);
+        }else{
+            record.setSecSameLevelNum(-1);
+        }
+
+        BigDecimal SameThirdLevelBigDecimal = getSubtract(new BigDecimal(record.getThirdLevelNum()), new BigDecimal(record.getSameThirdLevelNum() == null? 0:record.getSameThirdLevelNum()));
+        if(SameThirdLevelBigDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setThiSameLevelNum(1);
+        }else if(SameThirdLevelBigDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setThiSameLevelNum(0);
+        }else{
+            record.setThiSameLevelNum(-1);
+        }
+
+        BigDecimal SameFirstLevelPeDecimal = getSubtract(new BigDecimal(record.getFirstLevelPercent()), new BigDecimal(record.getSameFirstLevelPercent() == null? 0:record.getSameFirstLevelPercent()));
+        if(SameFirstLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setFirSameLevelPercent(1);
+        }else if(SameFirstLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setFirSameLevelPercent(0);
+        }else{
+            record.setFirSameLevelPercent(-1);
+        }
+
+        BigDecimal SameSecondLevelPeDecimal = getSubtract(new BigDecimal(record.getSecondLevelPercent()), new BigDecimal(record.getSameSecondLevelPercent() == null? 0:record.getSameSecondLevelPercent()));
+        if(SameSecondLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setSecSameLevelPercent(1);
+        }else if(SameSecondLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setSecSameLevelPercent(0);
+        }else{
+            record.setSecSameLevelPercent(-1);
+        }
+
+        BigDecimal SameThirdLevelPeDecimal = getSubtract(new BigDecimal(record.getThirdLevelPercent()), new BigDecimal(record.getSameThirdLevelPercent() == null? 0:record.getSameThirdLevelPercent()));
+        if(SameThirdLevelPeDecimal.compareTo(BigDecimal.ZERO)>0){
+            record.setThiSameLevelPercent(1);
+        }else if(SameThirdLevelPeDecimal.compareTo(BigDecimal.ZERO) == 0){
+            record.setThiSameLevelPercent(0);
+        }else{
+            record.setThiSameLevelPercent(-1);
+        }
+    };
+
+
+    /**
+     * 差值计算
+     *
+     * @param bigDecimalOne
+     * @param bigDecimalTwo
+     * @return
+     */
+    private BigDecimal getSubtract(BigDecimal bigDecimalOne, BigDecimal bigDecimalTwo) {
+        BigDecimal newBigDecimal = new BigDecimal(0);
+        if (null == bigDecimalOne && null != bigDecimalTwo) {
+            newBigDecimal = newBigDecimal.subtract(bigDecimalTwo);
+        } else if (null != bigDecimalOne && null == bigDecimalTwo) {
+            newBigDecimal = bigDecimalOne.subtract(newBigDecimal);
+        } else if (null != bigDecimalOne && null != bigDecimalTwo) {
+            newBigDecimal = bigDecimalOne.subtract(bigDecimalTwo);
+        }
+        return newBigDecimal;
+    }
+
+
     /**
      * 病案首页合格率占比
      *

+ 27 - 236
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -73,7 +73,7 @@
             AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
         <if test="deptName != null and deptName != ''">
-            and t.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+            and t.beh_dept_name= #{deptName}
         </if>
         <if test="doctorName != null and doctorName != ''">
             and CONCAT(
@@ -3633,7 +3633,7 @@
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
         <if test="deptName != null and deptName != ''">
-            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+            and a.beh_dept_name = #{deptName}
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3691,7 +3691,7 @@
             OR a.director_doctor_id like CONCAT('%',#{doctorCode},'%'))
         </if>
         <if test="deptName != null and deptName != ''">
-            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+            and a.beh_dept_name = #{deptName}
         </if>
         <if test="name != null and name != ''">
             AND a.name like CONCAT('%',#{name},'%')
@@ -3936,7 +3936,7 @@
         AND t1.behDeptName = t2.behDeptName
         ORDER BY
         t1.behDeptName,
-        t1.behDoctorName,
+        t1.doctorName,
         t1.patName,
         <if test="radioCheck !=null and radioCheck == 1">
             t1.caseName,
@@ -4175,7 +4175,7 @@
         AND t1.behDeptName = t2.behDeptName
         ORDER BY
         t1.behDeptName,
-        t1.behDoctorName,
+        t1.doctorName,
         t1.patName,
         <if test="radioCheck !=null and radioCheck == 1">
             t1.caseName,
@@ -4409,7 +4409,7 @@
         AND t1.behDeptName = t2.behDeptName
         ORDER BY
         t1.behDeptName,
-        t1.behDoctorName,
+        t1.doctorName,
         t1.patName,
         <if test="radioCheck !=null and radioCheck == 1">
             t1.caseName,
@@ -9851,6 +9851,7 @@
         a.beh_dept_id AS deptId,
         a.beh_dept_name AS deptName,
         a.doctor_name as doctorGroup,
+        a.doctor_name as doctorName,
         sum(c.cases_entry_id = 2658) as entry_2658_num,
         sum(c.cases_entry_id = 2686) as entry_2686_num,
         sum(c.cases_entry_id = 2657) as entry_2657_num,
@@ -9927,37 +9928,11 @@
 
     <!--    病历稽查表-科室-->
     <select id="getMedicalCheckByDept" resultMap="MedicalCheckMap">
-        SELECT
-        t1.deptId,
-        t1.deptName,
-        t2.doctorGroup,
-        t1.doctorName,
-        t1.entry_2658_num,
-        t1.entry_2686_num,
-        t1.entry_2657_num,
-        t1.entry_3010_num,
-        t1.entry_2655_num,
-        t1.entry_2654_num,
-        t1.entry_2852_num,
-        t1.entry_2287_num,
-        t1.entry_3025_num,
-        t1.entry_2170_num,
-        t1.entry_2930_num,
-        t1.entry_2900_num,
-        t1.entry_2229_num,
-        t1.entry_2217_num,
-        t1.entry_2218_num,
-        t1.entry_2220_num,
-        t1.entry_2486_num,
-        t1.entry_3063_num,
-        t1.entry_3062_num,
-        t1.entry_2495_num
-        from(
         SELECT
         a.beh_dept_id AS deptId,
         a.beh_dept_name AS deptName,
         a.doctor_name as doctorName,
-        e.group_id,
+        a.doctor_name as doctorGroup,
         sum(c.cases_entry_id = 2658) as entry_2658_num,
         sum(c.cases_entry_id = 2686) as entry_2686_num,
         sum(c.cases_entry_id = 2657) as entry_2657_num,
@@ -10038,93 +10013,7 @@
         GROUP BY
         a.beh_dept_id,
         e.group_id,
-        a.`doctor_name`)t1,
-        (SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        a.doctor_name as doctorGroup,
-        e.group_id,
-        sum(c.cases_entry_id = 2658) as entry_2658_num,
-        sum(c.cases_entry_id = 2686) as entry_2686_num,
-        sum(c.cases_entry_id = 2657) as entry_2657_num,
-        sum(c.cases_entry_id = 3010) as entry_3010_num,
-        sum(c.cases_entry_id = 2655) as entry_2655_num,
-        sum(c.cases_entry_id = 2654) as entry_2654_num,
-        sum(c.cases_entry_id = 2852) as entry_2852_num,
-        sum(c.cases_entry_id = 2287) as entry_2287_num,
-        sum(c.cases_entry_id = 3025) as entry_3025_num,
-        sum(c.cases_entry_id = 2170) as entry_2170_num,
-        sum(c.cases_entry_id = 2930) as entry_2930_num,
-        sum(c.cases_entry_id = 2900) as entry_2900_num,
-        sum(c.cases_entry_id = 2229) as entry_2229_num,
-        sum(c.cases_entry_id = 2217) as entry_2217_num,
-        sum(c.cases_entry_id = 2218) as entry_2218_num,
-        sum(c.cases_entry_id = 2220) as entry_2220_num,
-        sum(c.cases_entry_id = 2486) as entry_2486_num,
-        sum(c.cases_entry_id = 3063) as entry_3063_num,
-        sum(c.cases_entry_id = 3062) as entry_3062_num,
-        sum(c.cases_entry_id = 2495) as entry_2495_num
-        FROM
-        med_behospital_info a,
-        med_qcresult_info b,
-        med_qcresult_detail c,
-        qc_cases_entry d,
-        bas_doctor_info e,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = b.hospital_id
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = e.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = b.behospital_code
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        AND c.cases_entry_id = d.id
-        and a.doctor_id=e.doctor_id
-        and e.group_id is not NULL
-        AND LENGTH(e.group_id)>0
-        AND a.qc_type_id != 0
-        <if test="filterVO.userId!=null">
-            AND f.user_id = #{filterVO.userId}
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile != ''">
-            and a.is_placefile = #{filterVO.isPlacefile}
-        </if>
-        <if test="filterVO.hospitalId != null and filterVO.hospitalId != ''">
-            AND a.hospital_id = #{filterVO.hospitalId}
-        </if>
-        <if test="filterVO.name != null and filterVO.name != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterVO.name}, '%')
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile == 0">
-            <if test="filterVO.startDate != null ">
-                <![CDATA[ AND a.behospital_date >= #{filterVO.startDate}]]>
-            </if>
-            <if test="filterVO.endDate != null ">
-                <![CDATA[ AND a.behospital_date <= #{filterVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile == 1">
-            <if test="filterVO.startDate != null ">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterVO.startDate}]]>
-            </if>
-            <if test="filterVO.endDate != null ">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterVO.deptName != null and filterVO.deptName != ''">
-            AND a.beh_dept_name = #{filterVO.deptName}
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        e.group_id)t2
-        where t1.group_id = t2.group_id
+        a.doctor_name
     </select>
 
     <!--    病历稽查表最新sql、id&&name-->
@@ -10307,37 +10196,11 @@
 
     <!--    病历稽查表最新导出-->
     <select id="medicalCheckExportByDept" resultMap="MedicalCheckByDeptMap">
-        SELECT
-        t1.deptId,
-        t1.deptName,
-        t2.doctorGroup,
-        t1.doctorName,
-        t1.RYJLW_24,
-        t1.SCBCJLW_8H,
-        t1.ZRSCCFW_72H,
-        t1.RYHLJBCW_3D,
-        t1.ZRCFW_2W,
-        t1.ZZCFW_3W,
-        t1.QJJLW_6H,
-        t1.HZJLW_24H,
-        t1.SQTLXJW,
-        t1.SXJLSW_24H,
-        t1.XHSCW_30M,
-        t1.SHZDCFW_24H,
-        t1.SHJBCW_3D,
-        t1.ZKJBCW_3D,
-        t1.ZKJLW_24,
-        t1.BWZHJLBCW_MD,
-        t1.SXHWJL,
-        t1.SXPJW_24,
-        t1.WJZWJL,
-        t1.WYWWCXJ
-        from(
         SELECT
         a.beh_dept_id AS deptId,
         a.beh_dept_name AS deptName,
+        a.doctor_name as doctorGroup,
         a.doctor_name as doctorName,
-        e.group_id,
         GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2658 THEN a.behospital_code else null END ) as RYJLW_24,
         GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2686 THEN a.behospital_code else null END ) as SCBCJLW_8H,
         GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2657 THEN a.behospital_code else null END ) as ZRSCCFW_72H,
@@ -10418,93 +10281,7 @@
         GROUP BY
         a.beh_dept_id,
         e.group_id,
-        a.`doctor_name`)t1,
-        (SELECT
-        a.beh_dept_id AS deptId,
-        a.beh_dept_name AS deptName,
-        a.doctor_name as doctorGroup,
-        e.group_id,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2658 THEN a.behospital_code else null END ) as RYJLW_24,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2686 THEN a.behospital_code else null END ) as SCBCJLW_8H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2657 THEN a.behospital_code else null END ) as ZRSCCFW_72H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 3010 THEN a.behospital_code else null END ) as RYHLJBCW_3D,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2655 THEN a.behospital_code else null END ) as ZRCFW_2W,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2654 THEN a.behospital_code else null END ) as ZZCFW_3W,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2852 THEN a.behospital_code else null END ) as QJJLW_6H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2287 THEN a.behospital_code else null END ) as HZJLW_24H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 3025 THEN a.behospital_code else null END ) as SQTLXJW,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2170 THEN a.behospital_code else null END ) as SXJLSW_24H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2930 THEN a.behospital_code else null END ) as XHSCW_30M,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2900 THEN a.behospital_code else null END ) as SHZDCFW_24H,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2229 THEN a.behospital_code else null END ) as SHJBCW_3D,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2217 THEN a.behospital_code else null END ) as ZKJBCW_3D,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2218 THEN a.behospital_code else null END ) as ZKJLW_24,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2220 THEN a.behospital_code else null END ) as BWZHJLBCW_MD,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2486 THEN a.behospital_code else null END ) as SXHWJL,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 3063 THEN a.behospital_code else null END ) as SXPJW_24,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 3062 THEN a.behospital_code else null END ) as WJZWJL,
-        GROUP_CONCAT(DISTINCT case when c.cases_entry_id = 2495 THEN a.behospital_code else null END ) as WYWWCXJ
-        FROM
-        med_behospital_info a,
-        med_qcresult_info b,
-        med_qcresult_detail c,
-        qc_cases_entry d,
-        bas_doctor_info e,
-        sys_user_dept f
-        WHERE
-        a.is_deleted = 'N'
-        AND b.is_deleted = 'N'
-        AND c.is_deleted = 'N'
-        AND d.is_deleted = 'N'
-        AND e.is_deleted = 'N'
-        AND f.is_deleted = 'N'
-        AND a.hospital_id = b.hospital_id
-        AND a.hospital_id = c.hospital_id
-        AND a.hospital_id = e.hospital_id
-        AND a.hospital_id = f.hospital_id
-        AND a.behospital_code = b.behospital_code
-        AND a.behospital_code = c.behospital_code
-        AND a.beh_dept_id = f.dept_id
-        AND c.cases_entry_id = d.id
-        and a.doctor_id=e.doctor_id
-        and e.group_id is not NULL
-        AND LENGTH(e.group_id)>0
-        AND a.qc_type_id != 0
-        <if test="filterVO.userId!=null">
-            AND f.user_id = #{filterVO.userId}
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile != ''">
-            and a.is_placefile = #{filterVO.isPlacefile}
-        </if>
-        <if test="filterVO.hospitalId != null and filterVO.hospitalId != ''">
-            AND a.hospital_id = #{filterVO.hospitalId}
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile == 0">
-            <if test="filterVO.startDate != null ">
-                <![CDATA[ AND a.behospital_date >= #{filterVO.startDate}]]>
-            </if>
-            <if test="filterVO.endDate != null ">
-                <![CDATA[ AND a.behospital_date <= #{filterVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterVO.isPlacefile != null and filterVO.isPlacefile == 1">
-            <if test="filterVO.startDate != null ">
-                <![CDATA[ AND a.leave_hospital_date >= #{filterVO.startDate}]]>
-            </if>
-            <if test="filterVO.endDate != null ">
-                <![CDATA[ AND a.leave_hospital_date <= #{filterVO.endDate}]]>
-            </if>
-        </if>
-        <if test="filterVO.name != null and filterVO.name != ''">
-            AND a.doctor_name  like CONCAT('%', #{filterVO.name}, '%')
-        </if>
-        <if test="filterVO.deptName != null and filterVO.deptName != ''">
-            AND a.beh_dept_name = #{filterVO.deptName}
-        </if>
-        GROUP BY
-        a.beh_dept_id,
-        e.group_id)t2
-        where t1.group_id = t2.group_id
+        a.doctor_name
     </select>
 
     <!-- 未整改病历统计-->
@@ -14518,6 +14295,7 @@
         t1.grade_type AS gradeType,
         t1.score_res AS scoreRes,
         t1.NAME AS NAME,
+        t1.scoreBn,
         t1.sex AS sex,
         t1.beh_dept_id AS behDeptId,
         t1.beh_dept_name AS behDeptName,
@@ -14550,6 +14328,7 @@
         ifnull( hm_mci.STATUS, 0 ) AS mrStatus,
         mci.check_name AS chName,
         hm_mci.check_name AS mrName,
+        e.score_res as scoreBn,
         mci.gmt_create AS chTime,
         hm_mci.gmt_create AS mrTime
         FROM
@@ -14720,6 +14499,11 @@
         AND hm_mci.check_type = 1
         AND be.hospital_id = hm_mci.hospital_id
         AND be.behospital_code = hm_mci.behospital_code
+        LEFT JOIN med_qcresult_cases e
+        on  be.behospital_code = e.behospital_code
+        and be.hospital_id = e.hospital_id
+        AND e.is_deleted = 'N'
+        and e.cases_id = 243
         ) t1
         LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
         AND t1.behospital_code = t2.behospital_code
@@ -15672,6 +15456,7 @@
         f1.patName,
         f1.behospitalCode,
         f1.hospitalId,
+        f1.scoreBn,
         f1.behospitalDate,
         f1.leaveHospitalDate,
         f1.score,
@@ -15734,7 +15519,7 @@
         t1.gmt_create AS gradeTime,
         t1.diagnose,
         t1.ward_name AS wardName,
-        t2.age,
+        t1.scoreBn,
         t1.file_code AS fileCode,
         t1.checkStatus,
         t1.mrStatus,
@@ -15749,6 +15534,7 @@
         ifnull( mci.STATUS, 0 ) AS checkStatus,
         ifnull( hm_mci.STATUS, 0 ) AS mrStatus,
         mci.check_name AS chName,
+        e.score_res as scoreBn,
         hm_mci.check_name AS mrName,
         mci.gmt_create AS chTime,
         hm_mci.gmt_create AS mrTime
@@ -15920,6 +15706,11 @@
         AND hm_mci.check_type = 1
         AND be.hospital_id = hm_mci.hospital_id
         AND be.behospital_code = hm_mci.behospital_code
+        LEFT JOIN med_qcresult_cases e
+        on  be.behospital_code = e.behospital_code
+        and be.hospital_id = e.hospital_id
+        AND e.is_deleted = 'N'
+        and e.cases_id = 243
         ) t1
         LEFT JOIN med_home_page t2 ON t1.hospital_id = t2.hospital_id
         AND t1.behospital_code = t2.behospital_code
@@ -16641,7 +16432,7 @@
         SELECT
         f1.behDeptId,
         f1.behDeptName,
-        f1.doctorName AS behDoctorName,
+        f1.doctorName,
         f1.doctorId,
         f1.patName,
         f1.behospitalCode,

+ 1 - 5
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -2143,12 +2143,8 @@
             AND d.is_reject = #{filterPageByDeptVO.isReject}
         </if>
         GROUP BY
-        d.cases_id,
         d.cases_entry_id,
-        a.beh_dept_id,
-        a.beh_dept_name,
-        a.doctor_id,
-        a.doctor_name
+        d.cases_id
         ) tt1,
         qc_cases_entry tt2
         WHERE