Browse Source

应技术服务部要求 med_record_type 增加几个默认字段

gaodm 5 years ago
parent
commit
2fe01c7664

+ 5 - 0
doc/006.20200604v1.3.1/qc_initv1.3.1.sql

@@ -16,3 +16,8 @@ use `qc`;
 -- ALTER TABLE `qc_cases_entry_hospital` ADD INDEX `idx_cases_entry_id` (`cases_entry_id`) USING BTREE;
 -- ALTER TABLE `qc_cases_entry_hospital` ADD INDEX `idx_is_reject` (`is_reject`) USING BTREE;
 
+ALTER TABLE `med_record_type` ADD `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除' AFTER `remark`;
+ALTER TABLE `med_record_type` ADD `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间' AFTER `is_deleted`;
+ALTER TABLE `med_record_type` ADD `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改' AFTER `gmt_create`;
+ALTER TABLE `med_record_type` ADD `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值' AFTER `gmt_modified`;
+ALTER TABLE `med_record_type` ADD `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改' AFTER `creator`;

+ 29 - 62
src/main/java/com/diagbot/entity/MedRecordType.java

@@ -2,8 +2,11 @@ package com.diagbot.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
 
 import java.io.Serializable;
+import java.util.Date;
 
 /**
  * <p>
@@ -13,6 +16,8 @@ import java.io.Serializable;
  * @author gaodm
  * @since 2020-04-13
  */
+@Getter
+@Setter
 public class MedRecordType implements Serializable {
 
     private static final long serialVersionUID = 1L;
@@ -50,66 +55,28 @@ public class MedRecordType implements Serializable {
 
     private String remark;
 
-    public String getTypeId() {
-        return typeId;
-    }
-
-    public void setTypeId(String typeId) {
-        this.typeId = typeId;
-    }
-    public Long getHospitalId() {
-        return hospitalId;
-    }
-
-    public void setHospitalId(Long hospitalId) {
-        this.hospitalId = hospitalId;
-    }
-    public String getTypeName() {
-        return typeName;
-    }
-
-    public void setTypeName(String typeName) {
-        this.typeName = typeName;
-    }
-    public String getParentTypeId() {
-        return parentTypeId;
-    }
-
-    public void setParentTypeId(String parentTypeId) {
-        this.parentTypeId = parentTypeId;
-    }
-    public String getObjName() {
-        return objName;
-    }
-
-    public void setObjName(String objName) {
-        this.objName = objName;
-    }
-    public String getSpell() {
-        return spell;
-    }
-
-    public void setSpell(String spell) {
-        this.spell = spell;
-    }
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    @Override
-    public String toString() {
-        return "MedRecordType{" +
-            "typeId=" + typeId +
-            ", hospitalId=" + hospitalId +
-            ", typeName=" + typeName +
-            ", parentTypeId=" + parentTypeId +
-            ", objName=" + objName +
-            ", spell=" + spell +
-            ", remark=" + remark +
-        "}";
-    }
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
 }

+ 5 - 0
src/main/resources/mapper/MedRecordTypeMapper.xml

@@ -11,6 +11,11 @@
         <result column="obj_name" property="objName" />
         <result column="spell" property="spell" />
         <result column="remark" property="remark" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
     </resultMap>
 
 </mapper>