|
@@ -138,30 +138,33 @@ public class PushFacade {
|
|
|
//诊断 返回tagName+标签
|
|
|
if (featureTypeSet.contains(String.valueOf(QuestionTypeEnum.Disease.getKey()))) {
|
|
|
Map<String, List<QuestionDTO>> disMapDTO = new LinkedHashMap<>();
|
|
|
- Map<String, List<FeatureRate>> disFeatureMap=new LinkedHashMap<>();
|
|
|
- List<String> diseaseNameList=dis.stream().map(disease->disease.getFeatureName()).collect(Collectors.toList());
|
|
|
- Map<String,String> highRiskMap=new HashMap<>();
|
|
|
- highRiskMap.put("disease",String.join(",",diseaseNameList));
|
|
|
+ Map<String, List<FeatureRate>> disFeatureMap = new LinkedHashMap<>();
|
|
|
+ //警惕
|
|
|
+ List<String> diseaseNameList = dis.stream().map(disease -> disease.getFeatureName()).collect(Collectors.toList());
|
|
|
+ Map<String, String> highRiskMap = new HashMap<>();
|
|
|
+ highRiskMap.put("disease", String.join(",", diseaseNameList));
|
|
|
Response<GdbResponse> graphRes = highRiskServiceClient.highRiskPageData(highRiskMap);
|
|
|
- Map<String,String> graphResult=graphRes.getData().getResult();
|
|
|
- if(graphResult.size()>0) {
|
|
|
- Map<String, Object> disMap = new LinkedHashMap<>();
|
|
|
- for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
|
- if (entry.getValue().equals("1")) {
|
|
|
- disMap.put(entry.getKey(), "");
|
|
|
+ if (graphRes != null) {
|
|
|
+ Map<String, String> graphResult = graphRes.getData().getResult();
|
|
|
+ if (graphResult.size() > 0) {
|
|
|
+ Map<String, Object> disMap = new LinkedHashMap<>();
|
|
|
+ for (Map.Entry<String, String> entry : graphResult.entrySet()) {
|
|
|
+ if (entry.getValue().equals("1")) {
|
|
|
+ disMap.put(entry.getKey(), "");
|
|
|
+ }
|
|
|
}
|
|
|
+ List<QuestionDTO> disDTO = getTagListByMap(disMap, pushVO, QuestionTypeEnum.Disease.getKey());
|
|
|
+ disMapDTO.put("警惕", disDTO);
|
|
|
}
|
|
|
- List<QuestionDTO> disDTO = getTagListByMap(disMap, pushVO, QuestionTypeEnum.Disease.getKey());
|
|
|
- disMapDTO.put("警惕", disDTO);
|
|
|
}
|
|
|
|
|
|
//诊断分类
|
|
|
- for(FeatureRate featureRate:dis) {
|
|
|
+ for (FeatureRate featureRate : dis) {
|
|
|
if (StringUtil.isBlank(featureRate.getDesc())) {
|
|
|
featureRate.setDesc("{\"可能诊断\":\"\"}");
|
|
|
}
|
|
|
Map<String, Object> descMap = FastJsonUtils.getJsonToMap(featureRate.getDesc());
|
|
|
- for(String disClass:descMap.keySet()) {
|
|
|
+ for (String disClass : descMap.keySet()) {
|
|
|
List<FeatureRate> featureRateList = Lists.newLinkedList();
|
|
|
if (disFeatureMap.get(disClass) != null) {
|
|
|
featureRateList = disFeatureMap.get(disClass);
|