chengyao vor 4 Jahren
Ursprung
Commit
c41c8be83f

+ 1 - 0
src/main/java/com/diagbot/config/ResourceServerConfigurer.java

@@ -229,6 +229,7 @@ public class ResourceServerConfigurer extends ResourceServerConfigurerAdapter {
                 .antMatchers("/print/export/unModifyMRPageExportByDept").permitAll()
                 .antMatchers("/consoleByDept/medicalCheckFormKs").permitAll()
                 .antMatchers("/print/export/medicalCheckExportByDept").permitAll()
+                .antMatchers("/consoleByDept/medicalCheckTitleKs").permitAll()
                 .antMatchers("/**").authenticated();
         //                .antMatchers("/**").permitAll();
     }

+ 1 - 0
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -273,6 +273,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/print/export/unModifyMRPageExportByDept", request)
                 || matchers("/consoleByDept/medicalCheckFormKs", request)
                 || matchers("/print/export/medicalCheckExportByDept", request)
+                || matchers("/consoleByDept/medicalCheckTitleKs", request)
                 || matchers("/", request)) {
             return true;
         }

+ 3 - 3
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -913,14 +913,14 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         // 病案首页
         //义乌数据回来还要处理
-        if(analyzeVO.getHospitalId()==5 && ListUtil.isNotEmpty(recMap.get("病案首页"))){
+    /*    if(analyzeVO.getHospitalId()==5 && ListUtil.isNotEmpty(recMap.get("病案首页"))){
             addDataWithInnerKey("病案首页", recMap, medrecVoList);
-        }else {
+        }else {*/
             if(homePage != null){
             addDataWithFirstPage("病案首页", homePage, medrecVoList, dicMap,
                     homePageList, homeOperationInfoList);
              }
-        }
+//        }
 
         queryVo.setMedrec(medrecVoList);
         return queryVo;

+ 37 - 43
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -41,13 +41,7 @@
 
     <select id="getPage" resultType="com.diagbot.dto.BehospitalInfoDTO">
         SELECT * FROM (
-        select distinct  a.*,
-        ifnull(b.level,'未评分') as `level`,
-        b.grade_type,
-        b.score_res,
-        b.gmt_create as grade_time,
-        CONCAT( ifnull(c.age,'') ,ifnull(c.age_unit,'') )as age,
-        e.score_res as score_bn,
+        select   t.*,
         CASE WHEN ISNULL(g.status) THEN 0 ELSE g.status END check_status,
         CASE WHEN ISNULL(h.status) THEN 0 ELSE h.status END mr_status,
         g.check_type AS ch_type,
@@ -56,13 +50,9 @@
         h.check_name AS mr_name,
         g.check_time AS ch_time,
         h.check_time AS mr_time
-        from med_behospital_info a
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
-        ON a.behospital_code = g.behospital_code
-        AND a.hospital_id = g.hospital_id
-        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
-        ON a.behospital_code = h.behospital_code
-        AND a.hospital_id = h.hospital_id
+        from (
+        select a.*, ifnull(b.level,'未评分') as `level`, b.grade_type, b.score_res, b.gmt_create as
+        grade_time,IF(c.age is null, null,CONCAT( ifnull(c.age,'') ,ifnull(c.age_unit,'') )as age,e.score_res as score_bn from med_behospital_info a
         LEFT JOIN med_qcresult_info b
         on a.behospital_code = b.behospital_code and b.is_deleted = 'N'
         left join med_home_page c
@@ -71,55 +61,61 @@
         on  a.behospital_code = e.behospital_code
         AND e.is_deleted = 'N'
         and e.cases_id = 243
-        where
-        a.is_deleted = 'N'
+        ) t
+        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N' AND check_type = 0 ) g
+        ON t.behospital_code = g.behospital_code
+        AND t.hospital_id = g.hospital_id
+        LEFT JOIN (SELECT * FROM med_check_info WHERE is_deleted = 'N'AND check_type = 1 ) h
+        ON t.behospital_code = h.behospital_code
+        AND t.hospital_id = h.hospital_id
+        where t.is_deleted = 'N'
         <if test="diagnose != null and diagnose != ''">
-            AND a.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
+            AND t.diagnose LIKE CONCAT( '%', #{diagnose}, '%' )
         </if>
         <if test="deptName != null and deptName != ''">
-            and a.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
+            and t.beh_dept_name LIKE CONCAT( '%', #{deptName}, '%' )
         </if>
         <if test="doctorName != null and doctorName != ''">
             and CONCAT(
-            IFNULL(a.doctor_name,''),IFNULL(a.beh_doctor_name,''),IFNULL(a.director_doctor_name,''))
+            IFNULL(t.doctor_name,''),IFNULL(t.beh_doctor_name,''),IFNULL(t.director_doctor_name,''))
             like CONCAT('%',#{doctorName},'%')
         </if>
         <if test="name != null and name != ''">
-            and a.name like CONCAT('%',#{name},'%')
+            and t.name like CONCAT('%',#{name},'%')
         </if>
         <if test="doctorCode != null and doctorCode != ''">
-            and (a.doctor_id = #{doctorCode}
-            or a.beh_doctor_id = #{doctorCode}
-            or a.director_doctor_id = #{doctorCode})
+            and (t.doctor_id = #{doctorCode}
+            or t.beh_doctor_id = #{doctorCode}
+            or t.director_doctor_id = #{doctorCode})
         </if>
         <if test="fileCode != null and fileCode != ''">
-            and a.file_code like CONCAT('%',#{fileCode},'%')
+            and t.file_code like CONCAT('%',#{fileCode},'%')
         </if>
         <if test="hospitalId != null">
-            and a.hospital_id = #{hospitalId}
+            and t.hospital_id = #{hospitalId}
         </if>
         <if test="behospitalCode != null and behospitalCode != ''">
-            and a.behospital_code like CONCAT('%',#{behospitalCode},'%')
+            and t.behospital_code like CONCAT('%',#{behospitalCode},'%')
         </if>
         <if test="behosDateStart != null">
-            <![CDATA[ and a.behospital_date >= #{behosDateStart}]]>
+            <![CDATA[ and t.behospital_date >= #{behosDateStart}]]>
         </if>
         <if test="behosDateEnd != null">
-            <![CDATA[ and a.behospital_date < #{behosDateEnd}]]>
+            <![CDATA[ and t.behospital_date < #{behosDateEnd}]]>
         </if>
         <if test="leaveHosDateStart != null">
-            <![CDATA[ and a.leave_hospital_date >= #{leaveHosDateStart}]]>
+            <![CDATA[ and t.leave_hospital_date >= #{leaveHosDateStart}]]>
         </if>
         <if test="leaveHosDateEnd != null">
-            <![CDATA[ and a.leave_hospital_date < #{leaveHosDateEnd}]]>
+            <![CDATA[ and t.leave_hospital_date < #{leaveHosDateEnd}]]>
         </if>
         <if test="level != null and level != ''">
-            and b.level = #{level}
+            and t.level = #{level}
         </if>
         <if test="isPlacefile != null and isPlacefile != ''">
-            and a.is_placefile = #{isPlacefile}
+            and t.is_placefile = #{isPlacefile}
         </if>
-        and a.qc_type_id != 0) p
+        and t.qc_type_id != 0) p
         where p.is_deleted="N"
         <if test="checkStatus != null ">
             and p.check_status = #{checkStatus}
@@ -6431,8 +6427,6 @@
             AND (
             ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-'AND t2.newborn_day != '—' )
             OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-'AND t2.newborn_month != '—' )
-            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-'AND t2.newborn_day != '—' )
-            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-'AND t2.newborn_month != '—' )
             )
         </if>
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==1">
@@ -7783,8 +7777,8 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
             AND (
-            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' )
-            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-' )
+            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' AND t2.newborn_day != '—' )
+            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-'AND t2.newborn_month != '—' )
             )
         </if>
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==1">
@@ -8011,8 +8005,8 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
             AND (
-            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' )
-            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-' )
+            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-'AND t2.newborn_day != '—'  )
+            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-'AND t2.newborn_month != '—' )
             )
         </if>
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==1">
@@ -8300,8 +8294,8 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
             AND (
-            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' )
-            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-' )
+            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-'AND t2.newborn_day != '—'  )
+            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-'AND t2.newborn_month != '—' )
             )
         </if>
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==1">
@@ -8537,8 +8531,8 @@
             AND t1.hospital_id = t2.hospital_id
             AND t1.behospital_code = t2.behospital_code
             AND (
-            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' )
-            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-' )
+            ( IFNULL( t2.newborn_day, '' ) != '' AND t2.newborn_day != '0' AND t2.newborn_day != '-' AND t2.newborn_day != '—' )
+            OR ( IFNULL( t2.newborn_month, '' )!= '' AND t2.newborn_month != '0' AND t2.newborn_month != '-' AND t2.newborn_month != '—')
             )
         </if>
         <if test="qcResultShortPageVO.leaveHosType != null and qcResultShortPageVO.leaveHosType ==1">