Bläddra i källkod

静态信息导入

gaodm 4 år sedan
förälder
incheckning
84d10be2c3

+ 183 - 0
src/main/java/com/diagbot/entity/GraphConceptDetail.java

@@ -0,0 +1,183 @@
+package com.diagbot.entity;
+
+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 2021-02-02
+ */
+public class GraphConceptDetail 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;
+
+    /**
+     * 提示概念id
+     */
+    private Long conceptId;
+
+    /**
+     * 提示明细标题
+     */
+    private String title;
+
+    /**
+     * 提示明细内容
+     */
+    private String content;
+
+    /**
+     * 纯文本
+     */
+    private String text;
+
+    /**
+     * 提示明细序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 内容类型(多选):1-化验、辅检、手术和操作、诊断、药品静态信息,2-注意事项,3-临床路径,4-治疗方案
+     */
+    private String contentType;
+
+    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 Long getConceptId() {
+        return conceptId;
+    }
+
+    public void setConceptId(Long conceptId) {
+        this.conceptId = conceptId;
+    }
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+    public String getContent() {
+        return content;
+    }
+
+    public void setContent(String content) {
+        this.content = content;
+    }
+    public String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getContentType() {
+        return contentType;
+    }
+
+    public void setContentType(String contentType) {
+        this.contentType = contentType;
+    }
+
+    @Override
+    public String toString() {
+        return "GraphConceptDetail{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", conceptId=" + conceptId +
+            ", title=" + title +
+            ", content=" + content +
+            ", text=" + text +
+            ", orderNo=" + orderNo +
+            ", contentType=" + contentType +
+        "}";
+    }
+}

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 92 - 0
src/main/java/com/diagbot/facade/ExportFacade.java


+ 13 - 0
src/main/java/com/diagbot/facade/GraphConceptDetailFacade.java

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.GraphConceptDetailServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2021/2/2 9:33
+ */
+@Component
+public class GraphConceptDetailFacade extends GraphConceptDetailServiceImpl {
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/GraphConceptDetailMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.GraphConceptDetail;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 静态知识内容表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-02-02
+ */
+public interface GraphConceptDetailMapper extends BaseMapper<GraphConceptDetail> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.GraphConceptDetail;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 静态知识内容表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-02-02
+ */
+public interface GraphConceptDetailService extends IService<GraphConceptDetail> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.GraphConceptDetail;
+import com.diagbot.mapper.GraphConceptDetailMapper;
+import com.diagbot.service.GraphConceptDetailService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 静态知识内容表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2021-02-02
+ */
+@Service
+public class GraphConceptDetailServiceImpl extends ServiceImpl<GraphConceptDetailMapper, GraphConceptDetail> implements GraphConceptDetailService {
+
+}

+ 7 - 0
src/main/java/com/diagbot/web/ExportController.java

@@ -64,4 +64,11 @@ public class ExportController {
     public RespDTO<Map<String, Object>> importExcelTip(TestAllVO testAllVO) {
         return RespDTO.onSuc(exportFacade.importExcelTip(testAllVO));
     }
+
+    @ApiOperation(value = "导入静态信息[gaodm]",
+            notes = "")
+    @PostMapping("/importStatic")
+    public RespDTO<Map<String, Object>> importStatic() {
+        return RespDTO.onSuc(exportFacade.importStatic());
+    }
 }

+ 21 - 0
src/main/resources/mapper/GraphConceptDetailMapper.xml

@@ -0,0 +1,21 @@
+<?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.GraphConceptDetailMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.GraphConceptDetail">
+        <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="concept_id" property="conceptId" />
+        <result column="title" property="title" />
+        <result column="content" property="content" />
+        <result column="text" property="text" />
+        <result column="order_no" property="orderNo" />
+        <result column="content_type" property="contentType" />
+    </resultMap>
+
+</mapper>

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

@@ -49,14 +49,14 @@ public class CodeGeneration {
         dsc.setDriverName("com.mysql.cj.jdbc.Driver");
         dsc.setUsername("root");
         dsc.setPassword("lantone");
-        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/med_2021?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
+        dsc.setUrl("jdbc:mysql://192.168.2.236:3306/cdss?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf-8");
         mpg.setDataSource(dsc);
 
         // 策略配置
         StrategyConfig strategy = new StrategyConfig();
         // strategy.setTablePrefix(new String[] { "demo_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "kl_rule"}); // 需要生成的表
+        strategy.setInclude(new String[] { "graph_concept_detail"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);