|
@@ -16,6 +16,7 @@ import org.springframework.stereotype.Component;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.HashMap;
|
|
|
+import java.util.LinkedHashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -53,7 +54,7 @@ public class IndicationFacade {
|
|
|
*/
|
|
|
public IndicationDTO indicationFac(IndicationPushVO indicationPushVO) {
|
|
|
IndicationDTO res = new IndicationDTO();
|
|
|
-
|
|
|
+ Map<String, Object> debug = new LinkedHashMap<>();
|
|
|
//方法适配处理
|
|
|
List<String> ruleTypeList = Arrays.asList(indicationPushVO.getRuleType().split(","));
|
|
|
indicationPushVO.setRuleTypeList(ruleTypeList);
|
|
@@ -78,7 +79,7 @@ public class IndicationFacade {
|
|
|
if (methodList.contains("crf")) {
|
|
|
wordCrfDTO = commonFacade.crf_process(indicationPushVO);
|
|
|
}
|
|
|
- long crfEnd = System.currentTimeMillis();
|
|
|
+ CoreUtil.getDebugStr(crfStart, "模型处理耗时", debug);
|
|
|
|
|
|
// 标准词转换
|
|
|
long standStart = System.currentTimeMillis();
|
|
@@ -87,21 +88,20 @@ public class IndicationFacade {
|
|
|
Map<String, Map<String, String>> standConvertMap = neoFacade.standConvertCrf(standConvert);
|
|
|
commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
|
|
|
}
|
|
|
- long standEnd = System.currentTimeMillis();
|
|
|
+ CoreUtil.getDebugStr(standStart, "标准词转换耗时", debug);
|
|
|
|
|
|
try {
|
|
|
Map<String, Object> invokeParams = new HashMap<>();
|
|
|
invokeParams.put("wordCrfDTO", wordCrfDTO);
|
|
|
invokeParams.put("indicationPushVO", indicationPushVO);
|
|
|
+ invokeParams.put("debug", debug);
|
|
|
res = DataFacade.get("indicationAll", invokeParams, IndicationDTO.class);
|
|
|
} catch (Exception e) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "提醒类服务出错" + e.getMessage());
|
|
|
}
|
|
|
|
|
|
// 输入调试信息
|
|
|
- CoreUtil.getDebugStrFirst(standStart, standEnd, "同义词转换", res.getDebugStr());
|
|
|
- CoreUtil.getDebugStrFirst(crfStart, crfEnd, "处理模型数据", res.getDebugStr());
|
|
|
- CoreUtil.getDebugStr(l1, "本次调用总计", res.getDebugStr());
|
|
|
+ CoreUtil.getDebugStr(l1, "本次调用总计耗时", res.getDebug());
|
|
|
return res;
|
|
|
}
|
|
|
}
|