瀏覽代碼

Merge branch 'dev/20220407_v2.3.0通用版_医生质控平均分报表' into debug

songxinlu 3 年之前
父節點
當前提交
62f43d6e14

+ 3 - 3
src/main/java/com/diagbot/dto/ExportDoctorAverageStatisticsDTO.java

@@ -36,13 +36,13 @@ public class ExportDoctorAverageStatisticsDTO implements Serializable {
     private Double averageValue = 0d;
 
     @Excel(name = "甲级病历数")
-    private String firstLevelStrNum = "0";
+    private Integer firstLevelStrNum = 0;
 
     @Excel(name = "乙级病历数")
-    private String secondLevelStrNum = "0";
+    private Integer secondLevelStrNum = 0;
 
     @Excel(name = "丙级病历数")
-    private String thirdLevelStrNum = "0";
+    private Integer thirdLevelStrNum = 0;
 
 
 }

+ 1 - 2
src/main/java/com/diagbot/facade/ConsoleExportFacade.java

@@ -909,6 +909,7 @@ public class ConsoleExportFacade {
      */
     public void getDoctorDetailPageExport(HttpServletResponse response, GetDoctorDetailPageVO getDetailListPageVO) {
         //1.查询
+        getDetailListPageVO.setSize(Long.MAX_VALUE);
         IPage<GetDoctorDetailPageDTO> doctorDetailPage = consoleByDoctorFacade.getDoctorDetailPage(getDetailListPageVO);
         //2.列表拷贝
         List<ExportGetDoctorDetailPageDTO> records = BeanUtil.listCopyTo(doctorDetailPage.getRecords(), ExportGetDoctorDetailPageDTO.class);
@@ -942,9 +943,7 @@ public class ConsoleExportFacade {
         if (endDate.getTime() - startDate.getTime() > interval) {
             throw new CommonException(CommonErrorCode.PARAM_ERROR, "统计区间不能大于90天");
         }
-        getDetailRecordListPageVO.setCurrent(1L);
         getDetailRecordListPageVO.setSize(Long.MAX_VALUE);
-        getDetailRecordListPageVO.setSearchCount(false);
         //1.查询
         IPage<GetDetailRecordListPageDTO> detailRecordListPage = consoleByDoctorFacade.getDetailRecordListPage(getDetailRecordListPageVO);
         List<ExportGetDetailRecordListPageDTO> records = BeanUtil.listCopyTo(detailRecordListPage.getRecords(), ExportGetDetailRecordListPageDTO.class);

+ 5 - 3
src/main/java/com/diagbot/facade/RecordCheckFacade.java

@@ -34,6 +34,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.HashMap;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -226,13 +227,14 @@ public class RecordCheckFacade {
             }
         });
         Long hospitalId = Long.parseLong(SysUserUtils.getCurrentHospitalID());
-        List<Integer> valus = medBehospitalTypeServiceImpl.list(new QueryWrapper<MedBehospitalType>()
+        Map<String,Integer> valueMaps = medBehospitalTypeServiceImpl.list(new QueryWrapper<MedBehospitalType>()
                 .eq("hospital_id", hospitalId)
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .isNotNull("value")
-                .groupBy("value")).stream().map(MedBehospitalType::getValue).collect(Collectors.toList());
+                .select("behospital_type,value")
+                .groupBy("value")).stream().collect(Collectors.toMap(MedBehospitalType::getBehospitalType, MedBehospitalType::getValue,(k1, k2) -> k1, LinkedHashMap::new));
         out.put("source", checkTypes);
-        out.put("value", valus);
+        out.put("value", valueMaps);
         return out;
     }
 }

+ 1 - 1
src/main/resources/application-test.yml

@@ -61,7 +61,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://192.168.2.126:3307/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
+      url: jdbc:mysql://192.168.2.126:3307/qc_xy?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
       username: root
       password: Lat0ne@tesT
       # 连接池的配置信息

+ 18 - 6
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -20515,18 +20515,30 @@
                 <![CDATA[ AND a.leave_hospital_date <= #{getDoctorDetailPageVO.endDate}]]>
             </if>
         </if>
-        <if test="getDoctorDetailPageVO.deptName != null and getDoctorDetailPageVO.deptName != ''">
-            AND a.beh_dept_name  =  #{getDoctorDetailPageVO.deptName}
+        <if test="getDoctorDetailPageVO.deptName != null and getDoctorDetailPageVO.deptName != '' and getDoctorDetailPageVO.deptName != '-0'">
+            AND a.beh_dept_name = #{getDoctorDetailPageVO.deptName}
         </if>
-        <if test="getDoctorDetailPageVO.doctorName != null and getDoctorDetailPageVO.doctorName != ''">
-            AND a.doctor_name = #{getDoctorDetailPageVO.doctorName}
+        <if test="getDoctorDetailPageVO.deptName == '-0'">
+            AND (a.beh_dept_name IS NULL OR a.beh_dept_name = '' OR a.beh_dept_name = '-')
         </if>
-        <if test="getDoctorDetailPageVO.deptId != null and getDoctorDetailPageVO.deptId != ''">
+        <if test="getDoctorDetailPageVO.deptId != null and getDoctorDetailPageVO.deptId != '' and getDoctorDetailPageVO.deptId != '-0'">
             AND a.beh_dept_id = #{getDoctorDetailPageVO.deptId}
         </if>
-        <if test="getDoctorDetailPageVO.doctorId != null and getDoctorDetailPageVO.doctorId != ''">
+        <if test="getDoctorDetailPageVO.deptId == '-0'">
+            AND (a.beh_dept_id IS NULL OR a.beh_dept_id = '' OR a.beh_dept_id = '-')
+        </if>
+        <if test="getDoctorDetailPageVO.doctorId != null and getDoctorDetailPageVO.doctorId != '' and getDoctorDetailPageVO.doctorId != '-0'">
             AND a.doctor_id = #{getDoctorDetailPageVO.doctorId}
         </if>
+        <if test="getDoctorDetailPageVO.doctorId == '-0'">
+            AND (a.doctor_id IS NULL OR a.doctor_id = '' OR a.doctor_id = '-')
+        </if>
+        <if test="getDoctorDetailPageVO.doctorName != null and getDoctorDetailPageVO.doctorName != '' and getDoctorDetailPageVO.doctorName != '-0' ">
+            AND a.doctor_name =  #{getDoctorDetailPageVO.doctorName}
+        </if>
+        <if test="getDoctorDetailPageVO.doctorName == '-0'">
+            AND (a.doctor_name IS NULL OR a.doctor_name = '' OR a.doctor_name = '-')
+        </if>
         <if test="getDoctorDetailPageVO.isReject != null">
             AND d.is_reject = #{getDoctorDetailPageVO.isReject}
         </if>