Prechádzať zdrojové kódy

Merge branch 'temp' into test

zhoutg 5 rokov pred
rodič
commit
870d4ba99e

+ 5 - 2
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -273,7 +273,6 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         queryVo.setInputCatalogueMap(getInputCatalogueMap(qcCasesEntryDTOList)); // 设置质控条目编码
         List<MedrecVo> medrecVoList = new ArrayList<>(); // 设置内容
 
-
         // 添加住院病历信息
         List<BehospitalInfo> behospitalInfoList = this.list(new QueryWrapper<BehospitalInfo>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
@@ -287,6 +286,8 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             content.put("content", behospitalInfoList);
             medrecVo.setContent(content);
             medrecVoList.add(medrecVo);
+
+            queryVo.setBehospitalInfo(behospitalInfoList.get(0));
         }
 
         // 会诊记录
@@ -354,10 +355,11 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
 
         // 处理公共数据
         QueryVo queryVo = dealCommonData(hospitalId, analyzeVO);
+        queryVo.setUseCrfCache(analyzeVO.isUseCrfCache());
         //  调用质控接口
         Response<OutputInfo> response = qcServiceClient.extract(queryVo);
         if (response == null || response.getData() == null) {
-            throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!");
+            throw new CommonException(CommonErrorCode.RPC_ERROR, "远程质控接口没有返回数据!【" + analyzeVO.getBehospitalCode() + "】");
         }
         OutputInfo outputInfo = response.getData();
         //根据质控结果获取质控条目
@@ -724,6 +726,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             analyzeVO.setIsTask(true);
             analyzeVO.setHospitalId(bean.getHospitalId());
             analyzeVO.setBehospitalCode(bean.getBehospitalCode());
+            analyzeVO.setUseCrfCache(taskVO.isUseCrfCache());
             authServiceClient.analyze_rpc(analyzeVO);
         }
     }

+ 3 - 0
src/main/java/com/diagbot/vo/AnalyzeVO.java

@@ -18,4 +18,7 @@ public class AnalyzeVO {
     private Boolean isTask = false;
     @ApiModelProperty(hidden = true)
     private Long modeId;
+    // 是否使用CRF缓存(false: 不使用缓存,true:使用缓存)
+    @ApiModelProperty(hidden = true)
+    private boolean useCrfCache;
 }

+ 5 - 0
src/main/java/com/diagbot/vo/QueryVo.java

@@ -1,5 +1,6 @@
 package com.diagbot.vo;
 
+import com.diagbot.entity.BehospitalInfo;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -24,4 +25,8 @@ public class QueryVo extends TokenVO {
     private String cid;
 
     private String hospitalId;
+    // 是否使用CRF缓存(false: 不使用缓存,true:使用缓存)
+    private boolean useCrfCache;
+    // 添加基本病历信息
+    private BehospitalInfo behospitalInfo;
 }

+ 2 - 0
src/main/java/com/diagbot/vo/TaskVO.java

@@ -30,4 +30,6 @@ public class TaskVO {
     // 出院时间过滤
     @ApiModelProperty(hidden = true)
     private Date endLeaveDate;
+    // 是否使用CRF缓存
+    private boolean useCrfCache;
 }

+ 3 - 1
src/main/java/com/diagbot/web/BehospitalInfoController.java

@@ -78,6 +78,7 @@ public class BehospitalInfoController {
     @SysLogger("analyze")
     @Transactional
     public RespDTO<AnalyzeDTO> analyze(@RequestBody AnalyzeVO analyzeVO) {
+        analyzeVO.setUseCrfCache(true);
         return RespDTO.onSuc(behospitalInfoFacade.analyze(analyzeVO));
     }
 
@@ -153,7 +154,8 @@ public class BehospitalInfoController {
                     "<br>" +
                     "type:类型过滤(1:出院时间比当前时间早3天前的病历(例如:长兴病历))<br>" +
                     "hosptialIdList:医院列表id,1:长兴,3:台州,2:邵逸夫<br>" +
-                    "filterFlag: 筛选病历数据:0:未评分的病历,【推荐使用】;1:全部病历,【谨慎使用】")
+                    "filterFlag: 筛选病历数据:0:未评分的病历,【推荐使用】;1:全部病历,【谨慎使用】<br>" +
+                    "useCrfCache: 是否使用crf缓存(true:使用crf缓存,false:不使用)")
     @PostMapping("/execule")
     @SysLogger("execule")
     public RespDTO<Boolean> execule(@RequestBody TaskVO taskVO) {

+ 1 - 0
src/main/resources/application-dev.yml

@@ -9,6 +9,7 @@ hystrix:
       maxQueueSize: 200 #BlockingQueue的最大队列数
       queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
     default:
       execution:
         timeout:

+ 1 - 0
src/main/resources/application-local.yml

@@ -9,6 +9,7 @@ hystrix:
       maxQueueSize: 200 #BlockingQueue的最大队列数
       queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
     default:
       execution:
         timeout:

+ 2 - 1
src/main/resources/application-pre.yml

@@ -9,6 +9,7 @@ hystrix:
       maxQueueSize: 200 #BlockingQueue的最大队列数
       queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
     default:
       execution:
         timeout:
@@ -164,7 +165,7 @@ qc.address: http://192.168.2.186:6009
 
 # 加解密开关
 encrypt:
-  enable: true
+  enable: false
 
 swagger:
   enable: true

+ 2 - 1
src/main/resources/application-pro.yml

@@ -9,6 +9,7 @@ hystrix:
       maxQueueSize: 200 #BlockingQueue的最大队列数
       queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
     default:
       execution:
         timeout:
@@ -164,7 +165,7 @@ qc.address: http://192.168.2.123:6009
 
 # 加解密开关
 encrypt:
-  enable: true
+  enable: false
 
 swagger:
   enable: true

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

@@ -9,6 +9,7 @@ hystrix:
       maxQueueSize: 200 #BlockingQueue的最大队列数
       queueSizeRejectionThreshold: 50 #即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
   command:
+    QcServiceClient#extract(QueryVo).execution.isolation.thread.timeoutInMilliseconds: 3600000
     default:
       execution:
         timeout: