Forráskód Böngészése

Merge remote-tracking branch 'origin/his/hebei-demo' into his/hebei-demo

xiewei 6 hónapja
szülő
commit
e0db485619

+ 12 - 0
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -166,6 +166,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
     @Autowired
     QcresultDetailFacade qcresultDetailFacade;
 
+    @Autowired
+    private RedisUtils redisUtils;
+
 
     /**
      * 分页
@@ -1135,6 +1138,15 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             }
         }
         OutputInfo outputInfo = response.getData();
+        //判断是否演示病历包含的条目
+        Object casesEntryObj = redisUtils.get("hebeiyanshi_behospitalcode_" + queryVo.getBehospitalInfo().getBehospitalCode());
+        if (casesEntryObj != null) {
+            String[] infos = casesEntryObj.toString().split("_");
+            Map<String, String> infoMap = new HashMap<>();
+            infoMap.put("info", infos[1]);
+            outputInfo.getResult().put(infos[0],infoMap);
+        }
+
         // 质控编码列表
         List<String> codeList = new ArrayList<>();
         // code和info的映射map

+ 2 - 2
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -63,10 +63,10 @@ public class ConsoleFacade {
     @Autowired
     private ResultStatisticsAggregate resultStatisticsAggregate;
     @Autowired
-    private QcresultInfoFacade qcresultInfoFacade;
-    @Autowired
     private HomePageFacade homePageFacade;
     @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
     private BehospitalInfoFacade behospitalInfoFacade;
     @Autowired
     private SysHospitalSetFacade sysHospitalSetFacade;

+ 7 - 1
src/main/java/com/diagbot/vo/FilterPageVO.java

@@ -6,7 +6,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
-import javax.validation.constraints.NotNull;
+import java.util.List;
 
 /**
  * @Description:
@@ -106,4 +106,10 @@ public class FilterPageVO extends Page {
      */
     private String organizationName;
 
+    /**
+     *  目标条目id列表
+     */
+    private List<Long> targetEntryIds;
+
+    private Boolean enableTargetEntryId = false;
 }

+ 11 - 0
src/main/java/com/diagbot/web/ConsoleController.java

@@ -4,10 +4,12 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.*;
 import com.diagbot.facade.ConsoleFacade;
+import com.diagbot.util.RedisUtils;
 import com.diagbot.vo.*;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -31,6 +33,8 @@ public class ConsoleController {
 
     @Autowired
     private ConsoleFacade consoleFacade;
+    @Autowired
+    private RedisUtils redisUtils;
 
     //region-----------------------聚合接口开始-------------------------------
     @ApiOperation(value = "病历相关统计[by:zhaops]",
@@ -431,6 +435,13 @@ public class ConsoleController {
     @PostMapping("/entryGroupByEntryInnerPage")
     @SysLogger("entryGroupByEntryInnerPage")
     public RespDTO<IPage<EntryNumDTO>> entryGroupByEntryInnerPage(@RequestBody @Valid FilterPageVO filterPageVO) {
+        if(filterPageVO.getEnableTargetEntryId()) {
+            String key = "console:entryGroup4UnreasonableDiagnosis:targetEntryIds";
+            List<Long> targetEntryIds = (List<Long>) redisUtils.get(key);
+            if (!CollectionUtils.isEmpty(targetEntryIds)) {
+                filterPageVO.setTargetEntryIds(targetEntryIds);
+            }
+        }
         return RespDTO.onSuc(consoleFacade.entryGroupByEntryInnerPage(filterPageVO));
     }
     //endregion-----------------------分页接口结束-------------------------------

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

@@ -2268,10 +2268,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-<!--        <if test="hospitalId != null and hospitalId != ''">-->
-<!--            AND a.hospital_id = #{hospitalId}-->
-<!--        </if>-->
-        <include refid="hospitalIdChoose"/>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="startDate != null and startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{startDate}]]>
@@ -2323,10 +2323,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-        <!--<if test="hospitalId != null and hospitalId != ''">
+        <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="startDate != null and startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{startDate}]]>
@@ -2401,10 +2401,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-       <!-- <if test="hospitalId != null and hospitalId != ''">
+        <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="lastStartDate != null and lastStartDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
@@ -2456,10 +2456,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-        <!--<if test="hospitalId != null and hospitalId != ''">
+        <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="lastStartDate != null and lastStartDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{lastStartDate}]]>
@@ -3312,10 +3312,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-<!--        <if test="hospitalId != null and hospitalId != ''">-->
-<!--            AND a.hospital_id = #{hospitalId}-->
-<!--        </if>-->
-        <include refid="hospitalIdChoose"/>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
 
 
         <if test="isPlacefile != null and isPlacefile == 0">
@@ -3371,10 +3371,10 @@
             and a.is_placefile = #{isPlacefile}
         </if>
         AND a.qc_type_id != 0
-<!--        <if test="hospitalId != null and hospitalId != ''">-->
-<!--            AND a.hospital_id = #{hospitalId}-->
-<!--        </if>-->
-        <include refid="hospitalIdChoose"/>
+        <if test="hospitalId != null and hospitalId != ''">
+            AND a.hospital_id = #{hospitalId}
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="startDate != null and startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{startDate}]]>
@@ -3443,10 +3443,10 @@
         </if>
         AND d.cases_id = 243
         AND a.qc_type_id != 0
-        <!--<if test="hospitalId != null and hospitalId != ''">
+        <if test="hospitalId != null and hospitalId != ''">
             AND a.hospital_id = #{hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="isPlacefile != null and isPlacefile == 0">
             <if test="startDate != null and startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{startDate}]]>
@@ -3543,13 +3543,13 @@
         <choose>
             <when test="organizationName != null and organizationName != ''">
                 <choose>
-                    <when test="organizationName == '邵逸夫'">
+                    <when test="organizationName == '邵逸夫医院'">
                         AND a.hospital_id = 2
                     </when>
-                    <when test="organizationName == '浙江大学附属第一医院'">
+                    <when test="organizationName == '浙江大学医学院附属第一医院'">
                         AND a.hospital_id = 3
                     </when>
-                    <when test="organizationName == '七院'">
+                    <when test="organizationName == '杭州第人民医院'">
                         AND a.hospital_id = 14
                     </when>
                 </choose>

+ 24 - 17
src/main/resources/mapper/QcresultInfoMapper.xml

@@ -487,6 +487,12 @@
         qc_cases_entry tt2
         WHERE
         tt2.is_deleted = 'N'
+        <if test="filterPageVO.targetEntryIds != null">
+            AND tt2.id in
+            <foreach collection="filterPageVO.targetEntryIds" item="targetEntryId" separator="," open="(" close=")">
+                #{targetEntryId}
+            </foreach>
+        </if>
         AND tt1.cases_id = tt2.cases_id
         AND tt1.cases_entry_id = tt2.id
         <if test="filterPageVO.name != null and filterPageVO.name != ''">
@@ -497,6 +503,7 @@
         </if>
 
     </select>
+
     <!-- 条目缺陷占比缺陷总量(内页) -->
     <select id="entryGroupByEntrySum" resultType="java.lang.Integer">
         SELECT
@@ -1588,10 +1595,10 @@
             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}-->
-<!--        </if>-->
-        <include refid="hospitalIdChoose"/>
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+            AND a.hospital_id = #{filterPageVO.hospitalId}
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
             <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
@@ -1637,10 +1644,10 @@
             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}-->
-<!--        </if>-->
-        <include refid="hospitalIdChoose"/>
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+            AND a.hospital_id = #{filterPageVO.hospitalId}
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
             <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
@@ -1690,13 +1697,13 @@
         <choose>
             <when test="filterPageVO.organizationName != null and filterPageVO.organizationName != ''">
                 <choose>
-                    <when test="filterPageVO.organizationName == '邵逸夫'">
+                    <when test="filterPageVO.organizationName == '邵逸夫医院'">
                         AND a.hospital_id = 2
                     </when>
-                    <when test="filterPageVO.organizationName == '浙江大学附属第一医院'">
+                    <when test="filterPageVO.organizationName == '浙江大学医学院附属第一医院'">
                         AND a.hospital_id = 3
                     </when>
-                    <when test="filterPageVO.organizationName == '七院'">
+                    <when test="filterPageVO.organizationName == '杭州第人民医院'">
                         AND a.hospital_id = 14
                     </when>
                 </choose>
@@ -1763,10 +1770,10 @@
             and a.is_placefile = #{filterPageVO.isPlacefile}
         </if>
         AND a.qc_type_id != 0
-        <!--<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
             <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>
@@ -1838,10 +1845,10 @@
         AND e.cases_id = d.cases_id
         AND e.id = d.cases_entry_id
         AND a.qc_type_id != 0
-        <!--<if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
+        <if test="filterPageVO.hospitalId != null and filterPageVO.hospitalId != ''">
             AND a.hospital_id = #{filterPageVO.hospitalId}
-        </if>-->
-        <include refid="hospitalIdChoose"/>
+        </if>
+<!--        <include refid="hospitalIdChoose"/>-->
         <if test="filterPageVO.isPlacefile != null and filterPageVO.isPlacefile == 0">
             <if test="filterPageVO.startDate != null and filterPageVO.startDate != ''">
                 <![CDATA[ AND a.behospital_date >= #{filterPageVO.startDate}]]>