Browse Source

Merge remote-tracking branch 'origin/master'

MarkHuang 4 years ago
parent
commit
007e50eeb8

+ 5 - 0
src/main/java/com/diagbot/dto/PushPlanDTO.java

@@ -4,7 +4,9 @@ import lombok.Getter;
 import lombok.Setter;
 
 import java.util.ArrayList;
+import java.util.LinkedHashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description: 检验检查计划出参
@@ -14,5 +16,8 @@ import java.util.List;
 @Getter
 @Setter
 public class PushPlanDTO {
+    // 随访计划信息
     private List<PushPlansDTO> pushPlans = new ArrayList<>();
+    // 记录调试信息
+    private Map<String, Object> debug = new LinkedHashMap<>();
 }

+ 16 - 0
src/main/java/com/diagbot/facade/PushFacade.java

@@ -71,10 +71,26 @@ public class PushFacade {
      * @return
      */
     public PushPlanDTO pushPlan(PushPlanVO pushPlanVO) {
+        Map<String, Object> debug = new LinkedHashMap<>();
+        long l1 = System.currentTimeMillis();
         PushPlanDTO pushPlanDTO = new PushPlanDTO();
         if (pushPlanVO.getOperationName() != null) {
+            WordCrfDTO wordCrfDTO = new WordCrfDTO();
+            wordCrfDTO.setOperationName(pushPlanVO.getOperationName());
+            // 标准词转换
+            long standStart = System.currentTimeMillis();
+            StandConvert standConvert = commonFacade.dataTypeGet(wordCrfDTO);
+            Map<String, Map<String, String>> standConvertMap = neoFacade.standConvertCrf(standConvert);
+            commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
+            CoreUtil.getDebugStr(standStart, "标准词转换耗时", debug);
+            // 推送随访计划
+            long pushStart = System.currentTimeMillis();
             pushPlanDTO = followupPlanInfoFacade.getFollowUpPlans(pushPlanVO.getOperationName(), pushPlanVO.getHospitalId());
+            CoreUtil.getDebugStr(pushStart, "推送耗时", debug);
+            pushPlanDTO.setDebug(debug);
         }
+        CoreUtil.getDebugStr(l1, "本次调用总计耗时", debug);
+
         return pushPlanDTO;
     }
 }

+ 1 - 1
src/main/java/com/diagbot/web/Cn2SpellController.java

@@ -27,7 +27,7 @@ public class Cn2SpellController {
     private Cn2SpellFacade cn2SpellFacade;
 
     @ApiOperation(value = "拼音转化拼音首字母[by:gaodm]",
-            notes = "")
+            notes = "cnList: 汉字列表")
     @PostMapping("/cn2Spell")
     @SysLogger("cn2Spell")
     public RespDTO<Cn2SpellDTO> cn2Spell(@RequestBody Cn2SpellVO cn2SpellVO) {