Explorar o código

标准词转换服务

zhoutg %!s(int64=4) %!d(string=hai) anos
pai
achega
6cd4a48a87

+ 5 - 5
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -37,7 +37,7 @@ public class IndicationFacade {
 
     static {
         methodMap = new HashMap<>();
-        methodMap.put("2", Arrays.asList("M1", "M2"));
+        methodMap.put("2", Arrays.asList("crf", "stand"));
         methodMap.put("3", Arrays.asList());
     }
 
@@ -66,18 +66,17 @@ public class IndicationFacade {
         IndicationDTO res = new IndicationDTO();
         WordCrfDTO wordCrfDTO = null;
         long l1 = System.currentTimeMillis();
-        if (methodList.contains("M1")) {
+        if (methodList.contains("crf")) {
             // 模型处理数据
             wordCrfDTO = commonFacade.crf_process(indicationPushVO);
             CoreUtil.getDubugStr(l1, "处理模型数据", res.getDubugStr());
         }
 
-        if (methodList.contains("M2")) {
+        if (methodList.contains("stand")) {
             // 标准词转换
             long l2 = System.currentTimeMillis();
             StandConvert standConvert = commonFacade.dataTypeGet(wordCrfDTO);
             Map<String, Map<String, String>> standConvertMap = neoFacade.standConvertCrf(standConvert);
-            //        Map<String, Map<String, String>> standConvertMap = neoFacade.standConvert(standConvert);
             commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
             CoreUtil.getDubugStr(l2, "同义词转换", res.getDubugStr());
         }
@@ -87,8 +86,9 @@ public class IndicationFacade {
         if (ruleTypeList.contains("2")) {
             billFacade.billFac(indicationPushVO, wordCrfDTO, res);
         }
+        // 其他类型提示
 
-        // TODO 其他类型提示
+        // 调试信息
         CoreUtil.getDubugStr(l3, "开单合理性规则处理", res.getDubugStr());
         CoreUtil.getDubugStr(l1, "本次调用总计", res.getDubugStr());
         return res;

+ 7 - 7
src/main/java/com/diagbot/facade/NeoFacade.java

@@ -394,7 +394,7 @@ public class NeoFacade {
      * @return
      */
     public Map<String, String> getStandConvertMapBatch(List<String> list, String type) {
-        long l1 = System.currentTimeMillis();
+        // long l1 = System.currentTimeMillis();
         Map<String, String> typeMap = redisUtil.getValueByType(type);
         Map<String, String> standConvertMap = new LinkedHashMap<>();
         List<String> notList = new ArrayList<>();
@@ -438,14 +438,14 @@ public class NeoFacade {
             if (standConvertMap != null && !standConvertMap.isEmpty()) {
                 typeMap.putAll(standConvertMap);
             }
-            long l2 = System.currentTimeMillis();
-            System.out.println("存放前" + type + ":" + (l2 - l1) / 1000.0);
+            // long l2 = System.currentTimeMillis();
+            // System.out.println("存放前" + type + ":" + (l2 - l1) / 1000.0);
             redisUtil.updateValueByType(typeMap, type);
-            long l3 = System.currentTimeMillis();
-            System.out.println("存放" + type + ":" + (l3 - l2) / 1000.0);
+            // long l3 = System.currentTimeMillis();
+            // System.out.println("存放" + type + ":" + (l3 - l2) / 1000.0);
         }
-        long l4 = System.currentTimeMillis();
-        System.out.println("共耗时:" + type + ":" + (l4 - l1) / 1000.0);
+        // long l4 = System.currentTimeMillis();
+        // System.out.println("共耗时:" + type + ":" + (l4 - l1) / 1000.0);
         return typeMap;
     }
 }