Zhaops 6 rokov pred
rodič
commit
f322cc48fa

+ 14 - 1
icss-service/src/main/java/com/diagbot/facade/PushFacade.java

@@ -119,7 +119,20 @@ public class PushFacade {
             pushDTO.setLabMap(labMap);
         } else if (featureTypeSet.contains(QuestionTypeEnum.Pacs.getKey())) {
             pushDTO.setPacsMap(pacsMap);
-        } else if (featureTypeSet.contains(QuestionTypeEnum.Disease.getKey())) {
+        }
+        //诊断 返回tagName+id
+        else if (featureTypeSet.contains(QuestionTypeEnum.Disease.getKey())) {
+            QueryWrapper<QuestionInfo> questionInfoQueryWrapper = new QueryWrapper();
+            questionInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey()).
+                    in("tag_name", disMap.keySet()).
+                    eq("type", QuestionTypeEnum.Disease.getKey());
+            List<QuestionInfo> disList = questionFacade.list(questionInfoQueryWrapper);
+            Map<String, QuestionInfo> questionInfoMap = EntityUtil.makeEntityMap(disList, "tagName");
+            for (Map.Entry<String, Object> entry : disMap.entrySet()) {
+                if (questionInfoMap.get(entry.getKey()) != null) {
+                    entry.setValue(questionInfoMap.get(entry.getKey()).getId());
+                }
+            }
             pushDTO.setDisMap(disMap);
         }
         //症状(主诉 type=1;现病史 type=2) 返回 tagName+填写单