wangyu 6 лет назад
Родитель
Сommit
941d15ed19

+ 1 - 1
aipt-service/src/main/java/com/diagbot/dto/ConceptRetrievalDTO.java

@@ -16,7 +16,7 @@ public class ConceptRetrievalDTO {
     private Long parentId;//父级id
     private String parentName;//父级名称
     private String sameName;//同义词名称
-    private Integer showType;//显示类型(1本体,2同义词)
+    private Long showType;//显示类型(1本体,0同义词)
     private Long libTypeId;//标签类型id
     private String libTypeName;//标签类型名称
     private Integer type;//questionType

+ 1 - 1
icss-service/src/main/java/com/diagbot/dto/ConceptRetrievalDTO.java

@@ -16,7 +16,7 @@ public class ConceptRetrievalDTO {
     private Long parentId;//父级id
     private String parentName;//父级名称
     private String sameName;//同义词名称
-    private Integer showType;//显示类型(1本体,2同义词)
+    private Long showType;//显示类型(1本体,0同义词)
     private Long libTypeId;//标签类型id
     private String libTypeName;//标签类型名称
     private Integer type;//questionType

+ 1 - 1
icss-service/src/main/java/com/diagbot/dto/RetrievalDTO.java

@@ -16,7 +16,7 @@ public class RetrievalDTO {
     //标签id
     private Long questionId;
     //显示类型
-    private Integer showType;
+    private Long showType;
     //Tag名称
     private String retrievalName;
     //概念id

+ 1 - 1
triage-service/src/main/java/com/diagbot/dto/ConceptRetrievalDTO.java

@@ -16,5 +16,5 @@ public class ConceptRetrievalDTO {
     private Long parentId;//父级id
     private String parentName;//父级名称
     private String sameName;//同义词名称
-    private Integer showType;//显示类型(1本体,2同义词)
+    private Long showType;//显示类型(1本体,0同义词)
 }

+ 4 - 0
triage-service/src/main/java/com/diagbot/dto/SymptomSearchDTO.java

@@ -13,4 +13,8 @@ import lombok.Setter;
 public class SymptomSearchDTO extends ConceptBaseDTO{
     //同义词
     private String searchName;
+    //标签显示类型
+    private Long showType;
+    //显示类型中文
+    private String showTypeCn;
 }

+ 51 - 0
triage-service/src/main/java/com/diagbot/enums/ShowTypeEnum.java

@@ -0,0 +1,51 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * 
+ * @author zhoutg
+ * @Description: 诊断类型
+ * @date 2018年11月21日 下午2:31:42
+ */
+public enum ShowTypeEnum implements KeyedNamed {
+    Synonym(0, "同义词"),
+    Noumenon(1, "本体");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    ShowTypeEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static ShowTypeEnum getEnum(Integer key) {
+        for (ShowTypeEnum item : ShowTypeEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        ShowTypeEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}
+

+ 3 - 0
triage-service/src/main/java/com/diagbot/facade/SymptomFacade.java

@@ -6,6 +6,7 @@ import com.diagbot.dto.ConceptRetrievalDTO;
 import com.diagbot.dto.RespDTO;
 import com.diagbot.dto.SymptomSearchDTO;
 import com.diagbot.entity.Symptom;
+import com.diagbot.enums.ShowTypeEnum;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.util.RespDTOUtil;
 import com.diagbot.util.StringUtil;
@@ -72,6 +73,8 @@ public class SymptomFacade {
             if (StringUtil.isNotEmpty(conceptRetrievalDTO.getSameName())) {//同义词
                 symptomSearchDTO.setSearchName(conceptRetrievalDTO.getSameName());
             }
+            symptomSearchDTO.setShowType(conceptRetrievalDTO.getShowType());
+            symptomSearchDTO.setShowTypeCn(ShowTypeEnum.getName(conceptRetrievalDTO.getShowType().intValue()));
             symptomList.add(symptomSearchDTO);
         }
         return symptomList;