Browse Source

提示信息增加诊断依据标志

Zhaops 6 years ago
parent
commit
7c9666b793

+ 14 - 0
icss-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -80,6 +80,11 @@ public class IntroduceDetail implements Serializable {
      */
     private Integer position;
 
+    /**
+     * 是否诊断依据(1-是,0-否)
+     */
+    private Integer isReason;
+
     public Long getId() {
         return id;
     }
@@ -176,6 +181,14 @@ public class IntroduceDetail implements Serializable {
         this.position = position;
     }
 
+    public Integer getIsReason() {
+        return isReason;
+    }
+
+    public void setIsReason(Integer isReason) {
+        this.isReason = isReason;
+    }
+
     @Override
     public String toString() {
         return "IntroduceDetail{" +
@@ -191,6 +204,7 @@ public class IntroduceDetail implements Serializable {
                 ", text=" + text +
                 ", orderNo=" + orderNo +
                 ", position=" + position +
+                ", is_reason=" + isReason +
                 "}";
     }
 }

+ 50 - 0
icss-service/src/main/java/com/diagbot/enums/IsReasonEnum.java

@@ -0,0 +1,50 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息-是否诊断依据
+ * @Author:zhaops
+ * @time: 2018/11/30 11:16
+ */
+public enum IsReasonEnum implements KeyedNamed {
+
+    No(0, "否"),
+    Yes(1, "是");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IsReasonEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IsReasonEnum getEnum(Integer key) {
+        for (IsReasonEnum item : IsReasonEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IsReasonEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 1 - 0
icss-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -16,6 +16,7 @@
         <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
+        <result column="is_reason" property="isReason" />
     </resultMap>
 
 </mapper>

+ 14 - 0
icssman-service/src/main/java/com/diagbot/entity/IntroduceDetail.java

@@ -80,6 +80,11 @@ public class IntroduceDetail implements Serializable {
      */
     private Integer position;
 
+    /**
+     * 是否诊断依据(1-是,0-否)
+     */
+    private Integer isReason;
+
     public Long getId() {
         return id;
     }
@@ -176,6 +181,14 @@ public class IntroduceDetail implements Serializable {
         this.position = position;
     }
 
+    public Integer getIsReason() {
+        return isReason;
+    }
+
+    public void setIsReason(Integer isReason) {
+        this.isReason = isReason;
+    }
+
     @Override
     public String toString() {
         return "IntroduceDetail{" +
@@ -191,6 +204,7 @@ public class IntroduceDetail implements Serializable {
                 ", text=" + text +
                 ", orderNo=" + orderNo +
                 ", position=" + position +
+                ", is_reason=" + isReason +
                 "}";
     }
 }

+ 50 - 0
icssman-service/src/main/java/com/diagbot/enums/IsReasonEnum.java

@@ -0,0 +1,50 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @Description:提示信息-是否诊断依据
+ * @Author:zhaops
+ * @time: 2018/11/30 11:16
+ */
+public enum IsReasonEnum implements KeyedNamed {
+
+    No(0, "否"),
+    Yes(1, "是");
+
+    @Setter
+    private Integer key;
+
+    @Setter
+    private String name;
+
+    IsReasonEnum(Integer key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static IsReasonEnum getEnum(Integer key) {
+        for (IsReasonEnum item : IsReasonEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(Integer key) {
+        IsReasonEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+}

+ 4 - 3
icssman-service/src/main/java/com/diagbot/facade/IntroduceInfoFacade.java

@@ -43,10 +43,10 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         IntroduceInfo introduceInfo = new IntroduceInfo();
         if (!(introduceVO.getId() == null)) {
             introduceInfo = this.getById(introduceVO.getId());
-            //introduceInfo.setModifier(UserUtils.getCurrentPrincipleID());
+            introduceInfo.setModifier(UserUtils.getCurrentPrincipleID());
             introduceInfo.setGmtModified(new Date());
         } else {
-            //introduceInfo.setCreator(UserUtils.getCurrentPrincipleID());
+            introduceInfo.setCreator(UserUtils.getCurrentPrincipleID());
             introduceInfo.setGmtCreate(new Date());
         }
         introduceInfo.setName(introduceVO.getName());
@@ -66,13 +66,14 @@ public class IntroduceInfoFacade extends IntroduceInfoServiceImpl {
         for (IntroduceDetailVO detailVO : introduceVO.getDetailVOList()) {
             IntroduceDetail detail = new IntroduceDetail();
             detail.setIntroduceId(introduceInfo.getId());
-            //detail.setCreator(UserUtils.getCurrentPrincipleID());
+            detail.setCreator(UserUtils.getCurrentPrincipleID());
             detail.setGmtCreate(new Date());
             detail.setContent(detailVO.getContent());
             detail.setText(detailVO.getText());
             detail.setTitle(detailVO.getTitle());
             detail.setOrderNo(detailVO.getOrderNo());
             detail.setPosition(detailVO.getPosition());
+            detail.setIsReason(detailVO.getIsReason());
             introduceDetailList.add(detail);
         }
         //插入新的明细记录

+ 6 - 1
icssman-service/src/main/java/com/diagbot/vo/IntroduceDetailVO.java

@@ -31,4 +31,9 @@ public class IntroduceDetailVO {
      * 显示位置:1-右侧显示,0-都显示
      */
     private Integer position;
-}
+
+    /**
+     * 是否诊断依据(1-是,0-否)
+     */
+    private Integer isReason;
+}

+ 1 - 0
icssman-service/src/main/resources/mapper/IntroduceDetailMapper.xml

@@ -16,6 +16,7 @@
         <result column="text" property="text" />
         <result column="order_no" property="orderNo" />
         <result column="position" property="position" />
+        <result column="is_reason" property="isReason" />
     </resultMap>
 
 </mapper>