Browse Source

添加中文转换

zhoutg 6 years ago
parent
commit
24fd5cacb9
1 changed files with 24 additions and 1 deletions
  1. 24 1
      icssman-service/src/main/java/com/diagbot/dto/QuestionPageDTO.java

+ 24 - 1
icssman-service/src/main/java/com/diagbot/dto/QuestionPageDTO.java

@@ -2,6 +2,8 @@ package com.diagbot.dto;
 
 import com.diagbot.entity.QuestionDetail;
 import com.diagbot.entity.QuestionMapping;
+import com.diagbot.enums.QuestionTypeEnum;
+import com.diagbot.enums.TagTypeEnum;
 import lombok.Getter;
 import lombok.Setter;
 
@@ -86,16 +88,26 @@ public class QuestionPageDTO implements Serializable {
      */
     private String tagType;
 
+    /**
+     * 标签标识(中文)
+     */
+    private String tagTypeStr;
+
     /**
      * 控件类型(0:无类型,默认值 1:下拉单选 2:下拉多选 3:纯文本 4:待定 5:待定 6:文本框 7:数字键盘文本框 99:联合推送)
      */
     private Integer controlType;
 
     /**
-     * 类型(1:症状 3:其他史 4:查体,5:化验 6:辅检 7:诊断)
+     * 类型
      */
     private Integer type;
 
+    /**
+     * 类型(中文名称)
+     */
+    private String typeStr;
+
     /**
      * 子类型,(0:项目,1:描述)
      */
@@ -155,4 +167,15 @@ public class QuestionPageDTO implements Serializable {
      * 映射表
      */
     private List<QuestionMapping> questionMappings = new ArrayList<>();
+
+
+
+    /*****************************将类型转换成中文返回*****************************************/
+    public String getTypeStr() {
+        return QuestionTypeEnum.getName(this.type);
+    }
+    public String getTagTypeStr() {
+        return this.tagType == null ? "" : TagTypeEnum.getName(Integer.valueOf(this.tagType));
+    }
+    /**********************************************************************/
 }