Browse Source

系统设置

gaodm 5 years ago
parent
commit
79e521f3a7

+ 21 - 0
docs/031.20200229自诊程序配置/init_zzcx.sql

@@ -0,0 +1,21 @@
+use `sys-zzcx`;
+
+DROP TABLE IF EXISTS `zzcx_sys_set`;
+CREATE TABLE `zzcx_sys_set` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `is_deleted` char(1) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) DEFAULT NULL COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) DEFAULT NULL COMMENT '修改人,如果为0则表示纪录未修改',
+  `hospital_code` varchar(255) NOT NULL DEFAULT '朗通通用' COMMENT '医院名称',
+  `name` varchar(100) DEFAULT NULL COMMENT '配置名称',
+  `code` varchar(100) DEFAULT NULL COMMENT '配置编码',
+  `value` varchar(255) DEFAULT NULL,
+  `remark` varchar(128) DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8 COMMENT='医院所有配置信息';
+
+
+
+

+ 169 - 0
zzcx-service/src/main/java/com/diagbot/entity/SysSet.java

@@ -0,0 +1,169 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 医院所有配置信息
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-02-09
+ */
+@TableName("zzcx_sys_set")
+public class SysSet implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 医院名称
+     */
+    private String hospitalCode;
+
+    /**
+     * 配置名称
+     */
+    private String name;
+
+    /**
+     * 配置编码
+     */
+    private String code;
+
+    private String value;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getHospitalCode() {
+        return hospitalCode;
+    }
+
+    public void setHospitalCode(String hospitalCode) {
+        this.hospitalCode = hospitalCode;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysSet{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", hospitalCode=" + hospitalCode +
+            ", name=" + name +
+            ", code=" + code +
+            ", value=" + value +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 16 - 0
zzcx-service/src/main/java/com/diagbot/mapper/SysSetMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysSet;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 医院所有配置信息 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-02-09
+ */
+public interface SysSetMapper extends BaseMapper<SysSet> {
+
+}

+ 16 - 0
zzcx-service/src/main/java/com/diagbot/service/SysSetService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysSet;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 医院所有配置信息 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-02-09
+ */
+public interface SysSetService extends IService<SysSet> {
+
+}

+ 20 - 0
zzcx-service/src/main/java/com/diagbot/service/impl/SysSetServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysSet;
+import com.diagbot.mapper.SysSetMapper;
+import com.diagbot.service.SysSetService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 医院所有配置信息 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-02-09
+ */
+@Service
+public class SysSetServiceImpl extends ServiceImpl<SysSetMapper, SysSet> implements SysSetService {
+
+}

+ 20 - 0
zzcx-service/src/main/java/com/diagbot/web/SysSetController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 医院所有配置信息 前端控制器
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-02-09
+ */
+@Controller
+@RequestMapping("/sysSet")
+public class SysSetController {
+
+}

+ 20 - 0
zzcx-service/src/main/resources/mapper/SysSetMapper.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.SysSetMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.SysSet">
+        <id column="id" property="id" />
+        <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" />
+        <result column="hospital_code" property="hospitalCode" />
+        <result column="name" property="name" />
+        <result column="code" property="code" />
+        <result column="value" property="value" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 2 - 2
zzcx-service/src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("gaodm");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
         strategy.setTablePrefix(new String[] { "zzcx_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "zzcx_opt_info" }); // 需要生成的表
+        strategy.setInclude(new String[] { "zzcx_sys_set" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);