瀏覽代碼

病历模块类型相关接口

zhoutg 5 年之前
父節點
當前提交
422dfcc5bf

+ 180 - 0
mrman-service/src/main/java/com/diagbot/entity/MedRecordModule.java

@@ -0,0 +1,180 @@
+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 zhoutg
+ * @since 2020-04-29
+ */
+public class MedRecordModule implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 数据模块ID
+     */
+    private Long modeId;
+
+    /**
+     * 数据模块名称
+     */
+    private String modeName;
+
+    /**
+     * 模板类型
+     */
+    private String recTypeDetail;
+
+    /**
+     * 住院号示例
+     */
+    private String behospitalCodes;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public Long getModeId() {
+        return modeId;
+    }
+
+    public void setModeId(Long modeId) {
+        this.modeId = modeId;
+    }
+    public String getModeName() {
+        return modeName;
+    }
+
+    public void setModeName(String modeName) {
+        this.modeName = modeName;
+    }
+    public String getRecTypeDetail() {
+        return recTypeDetail;
+    }
+
+    public void setRecTypeDetail(String recTypeDetail) {
+        this.recTypeDetail = recTypeDetail;
+    }
+    public String getBehospitalCodes() {
+        return behospitalCodes;
+    }
+
+    public void setBehospitalCodes(String behospitalCodes) {
+        this.behospitalCodes = behospitalCodes;
+    }
+    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 getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "MedRecordModule{" +
+            "id=" + id +
+            ", hospitalId=" + hospitalId +
+            ", modeId=" + modeId +
+            ", modeName=" + modeName +
+            ", recTypeDetail=" + recTypeDetail +
+            ", behospitalCodes=" + behospitalCodes +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 31 - 0
mrman-service/src/main/java/com/diagbot/facade/MedRecordModuleFacade.java

@@ -0,0 +1,31 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.MedRecordModule;
+import com.diagbot.service.impl.MedRecordModuleServiceImpl;
+import com.diagbot.vo.MedRecordModuleVO;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @author zhoutg
+ * @Description:
+ * @date 2020-03-17 13:47
+ */
+@Component
+public class MedRecordModuleFacade extends MedRecordModuleServiceImpl {
+
+    /**
+     * 获取所有的模板类型
+     *
+     * @param medRecordModuleVO
+     * @return
+     */
+    public List<MedRecordModule> getList(MedRecordModuleVO medRecordModuleVO) {
+        return this.list(new QueryWrapper<MedRecordModule>()
+                .eq("hospital_id", medRecordModuleVO.getHospitalId())
+                .eq("mode_id", medRecordModuleVO.getModeId())
+        );
+    }
+}

+ 16 - 0
mrman-service/src/main/java/com/diagbot/mapper/MedRecordModuleMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.MedRecordModule;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-29
+ */
+public interface MedRecordModuleMapper extends BaseMapper<MedRecordModule> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.MedRecordModule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-29
+ */
+public interface MedRecordModuleService extends IService<MedRecordModule> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedRecordModule;
+import com.diagbot.mapper.MedRecordModuleMapper;
+import com.diagbot.service.MedRecordModuleService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-29
+ */
+@Service
+public class MedRecordModuleServiceImpl extends ServiceImpl<MedRecordModuleMapper, MedRecordModule> implements MedRecordModuleService {
+
+}

+ 14 - 0
mrman-service/src/main/java/com/diagbot/vo/MedRecordModuleVO.java

@@ -0,0 +1,14 @@
+package com.diagbot.vo;
+
+import lombok.Data;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2018/8/6 10:16
+ */
+@Data
+public class MedRecordModuleVO {
+    private Long hospitalId;
+    private Long modeId;
+}

+ 43 - 0
mrman-service/src/main/java/com/diagbot/web/MedRecordModuleController.java

@@ -0,0 +1,43 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.entity.MedRecordModule;
+import com.diagbot.facade.MedRecordModuleFacade;
+import com.diagbot.vo.MedRecordModuleVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-04-29
+ */
+@RestController
+@RequestMapping("/med/RecordModule")
+@Api(value = "病历模块类型相关接口", tags = { "病历模块类型相关接口" })
+public class MedRecordModuleController {
+
+    @Autowired
+    MedRecordModuleFacade medRecordModuleFacade;
+
+    @ApiOperation(value = "获取全部病历模板类型[by:zhoutg]",
+            notes = "获取全部病历模板类型")
+    @PostMapping("/getAll")
+    @SysLogger("getAll")
+    public RespDTO<List<MedRecordModule>> getAll(@RequestBody MedRecordModuleVO medRecordModuleVO) {
+        List<MedRecordModule> data = medRecordModuleFacade.getList(medRecordModuleVO);
+        return RespDTO.onSuc(data);
+    }
+}

+ 21 - 0
mrman-service/src/main/resources/mapper/MedRecordModuleMapper.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.MedRecordModuleMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedRecordModule">
+        <id column="id" property="id" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="mode_id" property="modeId" />
+        <result column="mode_name" property="modeName" />
+        <result column="rec_type_detail" property="recTypeDetail" />
+        <result column="behospital_codes" property="behospitalCodes" />
+        <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="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 1 - 1
mrman-service/src/test/java/com/diagbot/CodeGeneration.java

@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "icss_" });// 此处可以修改为您的表前缀
          strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "qc_question_info","qc_question_mapping","qc_module_info","qc_module_detail" }); // 需要生成的表
+        strategy.setInclude(new String[] { "med_record_module" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);