Prechádzať zdrojové kódy

分页获取医院条目数据信息及基础类

wangfeng 5 rokov pred
rodič
commit
1fc7153553

+ 24 - 0
src/main/java/com/diagbot/dto/QcCasesEntryHospitalDTO.java

@@ -0,0 +1,24 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-04-13 16:09
+ */
+@Setter
+@Getter
+public class QcCasesEntryHospitalDTO {
+    private Long id;
+    private Long casesId;
+    private String casesName;
+    private String name;
+    private String msg;
+    private Double score;
+    private Integer isReject;
+    private Integer isUsed;
+}

+ 201 - 0
src/main/java/com/diagbot/entity/QcCasesEntry.java

@@ -0,0 +1,201 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病历条目
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public class QcCasesEntry implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    private String casesName;
+
+    /**
+     * 数据模块ID-对应qc_mode.id
+     */
+    private Long modeId;
+
+    private String code;
+
+    /**
+     * 条目
+     */
+    private String name;
+
+    private String precond;
+
+    /**
+     * 顺序号
+     */
+    private Integer orderNo;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public Long getCasesId() {
+        return casesId;
+    }
+
+    public void setCasesId(Long casesId) {
+        this.casesId = casesId;
+    }
+    public String getCasesName() {
+        return casesName;
+    }
+
+    public void setCasesName(String casesName) {
+        this.casesName = casesName;
+    }
+    public Long getModeId() {
+        return modeId;
+    }
+
+    public void setModeId(Long modeId) {
+        this.modeId = modeId;
+    }
+    public String getCode() {
+        return code;
+    }
+
+    public void setCode(String code) {
+        this.code = code;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getPrecond() {
+        return precond;
+    }
+
+    public void setPrecond(String precond) {
+        this.precond = precond;
+    }
+    public Integer getOrderNo() {
+        return orderNo;
+    }
+
+    public void setOrderNo(Integer orderNo) {
+        this.orderNo = orderNo;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCasesEntry{" +
+            "id=" + id +
+            ", casesId=" + casesId +
+            ", casesName=" + casesName +
+            ", modeId=" + modeId +
+            ", code=" + code +
+            ", name=" + name +
+            ", precond=" + precond +
+            ", orderNo=" + orderNo +
+            ", remark=" + remark +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+        "}";
+    }
+}

+ 198 - 0
src/main/java/com/diagbot/entity/QcCasesEntryHospital.java

@@ -0,0 +1,198 @@
+package com.diagbot.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病历条目
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public class QcCasesEntryHospital implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历id
+     */
+    private Long casesEntryId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 扣分值
+     */
+    private BigDecimal score;
+
+    /**
+     * 条目提示信息
+     */
+    private String msg;
+
+    /**
+     * 0-未启用 1-启用
+     */
+    private Integer isUsed;
+
+    /**
+     * 单项否决(1-单项否决 0-非)
+     */
+    private Integer isReject;
+
+    /**
+     * 备注
+     */
+    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 Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date 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 getCasesEntryId() {
+        return casesEntryId;
+    }
+
+    public void setCasesEntryId(Long casesEntryId) {
+        this.casesEntryId = casesEntryId;
+    }
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+    public BigDecimal getScore() {
+        return score;
+    }
+
+    public void setScore(BigDecimal score) {
+        this.score = score;
+    }
+    public String getMsg() {
+        return msg;
+    }
+
+    public void setMsg(String msg) {
+        this.msg = msg;
+    }
+    public Integer getIsUsed() {
+        return isUsed;
+    }
+
+    public void setIsUsed(Integer isUsed) {
+        this.isUsed = isUsed;
+    }
+    public Integer getIsReject() {
+        return isReject;
+    }
+
+    public void setIsReject(Integer isReject) {
+        this.isReject = isReject;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCasesEntryHospital{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", casesEntryId=" + casesEntryId +
+            ", hospitalId=" + hospitalId +
+            ", score=" + score +
+            ", msg=" + msg +
+            ", isUsed=" + isUsed +
+            ", isReject=" + isReject +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 31 - 0
src/main/java/com/diagbot/facade/QcCasesEntryHospitalFacade.java

@@ -0,0 +1,31 @@
+package com.diagbot.facade;
+
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.service.QcCasesEntryHospitalService;
+import com.diagbot.service.impl.QcCasesEntryHospitalServiceImpl;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-04-13 16:23
+ */
+@Component
+public class QcCasesEntryHospitalFacade extends QcCasesEntryHospitalServiceImpl {
+    @Autowired
+    QcCasesEntryHospitalService qcCasesEntryHospitalService;
+
+    /**
+     *
+     * @param qcCasesEntryHospitalVO
+     * @return
+     */
+    public List<QcCasesEntryHospitalDTO> QcCasesEntryHospitals(QcCasesEntryHospitalVO qcCasesEntryHospitalVO) {
+        List<QcCasesEntryHospitalDTO> data = qcCasesEntryHospitalService.getQcCasesEntryAlls(qcCasesEntryHospitalVO);
+        return data;
+    }
+}

+ 21 - 0
src/main/java/com/diagbot/mapper/QcCasesEntryHospitalMapper.java

@@ -0,0 +1,21 @@
+package com.diagbot.mapper;
+
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.entity.QcCasesEntryHospital;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历条目 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public interface QcCasesEntryHospitalMapper extends BaseMapper<QcCasesEntryHospital> {
+
+    List<QcCasesEntryHospitalDTO> getQcCasesEntryAlls(QcCasesEntryHospitalVO qcCasesEntryHospitalVO);
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QcCasesEntry;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 病历条目 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public interface QcCasesEntryMapper extends BaseMapper<QcCasesEntry> {
+
+}

+ 22 - 0
src/main/java/com/diagbot/service/QcCasesEntryHospitalService.java

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.entity.QcCasesEntryHospital;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历条目 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public interface QcCasesEntryHospitalService extends IService<QcCasesEntryHospital> {
+
+    public List<QcCasesEntryHospitalDTO> getQcCasesEntryAlls(QcCasesEntryHospitalVO qcCasesEntryHospitalVO);
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QcCasesEntry;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 病历条目 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+public interface QcCasesEntryService extends IService<QcCasesEntry> {
+
+}

+ 28 - 0
src/main/java/com/diagbot/service/impl/QcCasesEntryHospitalServiceImpl.java

@@ -0,0 +1,28 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.entity.QcCasesEntryHospital;
+import com.diagbot.mapper.QcCasesEntryHospitalMapper;
+import com.diagbot.service.QcCasesEntryHospitalService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历条目 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+@Service
+public class QcCasesEntryHospitalServiceImpl extends ServiceImpl<QcCasesEntryHospitalMapper, QcCasesEntryHospital> implements QcCasesEntryHospitalService {
+
+    @Override
+    public List<QcCasesEntryHospitalDTO> getQcCasesEntryAlls(QcCasesEntryHospitalVO qcCasesEntryHospitalVO) {
+        return baseMapper.getQcCasesEntryAlls(qcCasesEntryHospitalVO);
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QcCasesEntry;
+import com.diagbot.mapper.QcCasesEntryMapper;
+import com.diagbot.service.QcCasesEntryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历条目 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+@Service
+public class QcCasesEntryServiceImpl extends ServiceImpl<QcCasesEntryMapper, QcCasesEntry> implements QcCasesEntryService {
+
+}

+ 24 - 0
src/main/java/com/diagbot/vo/QcCasesEntryHospitalVO.java

@@ -0,0 +1,24 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-04-13 16:16
+ */
+@Setter
+@Getter
+public class QcCasesEntryHospitalVO extends Page {
+
+    @NotNull(message = "请输入医院id")
+    private Long hospitalId;
+    private Long casesId;
+    private String name;
+    private Integer isReject;
+    private Integer isUsed;
+}

+ 20 - 0
src/main/java/com/diagbot/web/QcCasesEntryController.java

@@ -0,0 +1,20 @@
+package com.diagbot.web;
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import org.springframework.stereotype.Controller;
+
+/**
+ * <p>
+ * 病历条目 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+@Controller
+@RequestMapping("/qcCasesEntry")
+public class QcCasesEntryController {
+
+}

+ 45 - 0
src/main/java/com/diagbot/web/QcCasesEntryHospitalController.java

@@ -0,0 +1,45 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.QcCasesEntryHospitalFacade;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+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 javax.validation.Valid;
+import java.util.List;
+
+/**
+ * <p>
+ * 病历条目 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-04-13
+ */
+
+@RestController
+@RequestMapping("/qcCasesEntryHospital")
+@SuppressWarnings("unchecked")
+@Api(value = "条目数据维护API", tags = { "条目数据维护API-wf" })
+public class QcCasesEntryHospitalController {
+    @Autowired
+    private QcCasesEntryHospitalFacade qcCasesEntryHospitalFacade;
+
+    @ApiOperation(value = "分页获取医院条目数据信息[by:wangfeng]",
+            notes = "hospitalId:医院id 必传</br>casesName:类别名称</br>name:条目名" +
+                    "isReject:单项否决 1-单项否决 0-非</br>isUsed:是否启用 0-未启用 1-启用")
+    @PostMapping("/getQcCasesEntryAll")
+    @SysLogger("getQcCasesEntryAll")
+    public RespDTO<List<QcCasesEntryHospitalDTO>> QcCasesEntryHospital(@RequestBody @Valid QcCasesEntryHospitalVO qcCasesEntryHospitalVO) {
+        return RespDTO.onSuc(qcCasesEntryHospitalFacade.QcCasesEntryHospitals(qcCasesEntryHospitalVO));
+    }
+}

+ 54 - 0
src/main/resources/mapper/QcCasesEntryHospitalMapper.xml

@@ -0,0 +1,54 @@
+<?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.QcCasesEntryHospitalMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcCasesEntryHospital">
+        <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="cases_entry_id" property="casesEntryId"/>
+        <result column="hospital_id" property="hospitalId"/>
+        <result column="score" property="score"/>
+        <result column="msg" property="msg"/>
+        <result column="is_used" property="isUsed"/>
+        <result column="is_reject" property="isReject"/>
+        <result column="remark" property="remark"/>
+    </resultMap>
+
+    <select id="getQcCasesEntryAlls" resultType="com.diagbot.dto.QcCasesEntryHospitalDTO">
+      select
+         b.id as id,
+         a.cases_id as casesId,
+         a.cases_name As casesName,
+         a.name as name,
+         b.msg As msg,
+         b.score as score,
+         b.is_reject As isReject,
+         b.is_used AS isUsed
+       from
+       qc_cases_entry a
+       join qc_cases_entry_hospital b
+        on a.id = b.cases_entry_id
+       where a.is_deleted = "N"
+        AND b.is_deleted = "N"
+    <if test="hospitalId != null and hospitalId != ''">
+        AND b.hospital_id = #{hospitalId}
+    </if>
+    <if test="casesId != null and casesId != ''">
+        AND a.cases_id = #{casesId}
+    </if>
+    <if test="name != null and name != ''">
+        AND UPPER(a.name) LIKE CONCAT('%', UPPER(trim(#{name})), '%')
+    </if>
+    <if test="isReject != null ">
+        AND b.is_reject = #{isReject}
+    </if>
+    <if test="isUsed != null ">
+        AND  b.is_used =#{isUsed}
+    </if>
+    </select>
+</mapper>

+ 23 - 0
src/main/resources/mapper/QcCasesEntryMapper.xml

@@ -0,0 +1,23 @@
+<?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.QcCasesEntryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcCasesEntry">
+        <id column="id" property="id" />
+        <result column="cases_id" property="casesId" />
+        <result column="cases_name" property="casesName" />
+        <result column="mode_id" property="modeId" />
+        <result column="code" property="code" />
+        <result column="name" property="name" />
+        <result column="precond" property="precond" />
+        <result column="order_no" property="orderNo" />
+        <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>