Parcourir la source

Merge remote-tracking branch 'origin/master'

zhoutg il y a 5 ans
Parent
commit
63f70f0b4b
43 fichiers modifiés avec 1905 ajouts et 1 suppressions
  1. 22 0
      src/main/java/com/diagbot/dto/QcCasesAllDTO.java
  2. 24 0
      src/main/java/com/diagbot/dto/QcCasesEntryHospitalDTO.java
  3. 111 0
      src/main/java/com/diagbot/entity/MedRecordType.java
  4. 201 0
      src/main/java/com/diagbot/entity/QcCasesEntry.java
  5. 198 0
      src/main/java/com/diagbot/entity/QcCasesEntryHospital.java
  6. 139 0
      src/main/java/com/diagbot/entity/QcType.java
  7. 153 0
      src/main/java/com/diagbot/entity/QcTypeCasesEntry.java
  8. 167 0
      src/main/java/com/diagbot/entity/QcTypeDoc.java
  9. 9 0
      src/main/java/com/diagbot/facade/BasHospitalInfoFaccade.java
  10. 118 0
      src/main/java/com/diagbot/facade/ConsoleFacade.java
  11. 81 0
      src/main/java/com/diagbot/facade/QcCasesEntryHospitalFacade.java
  12. 18 0
      src/main/java/com/diagbot/facade/QcCasesFacade.java
  13. 13 0
      src/main/java/com/diagbot/facade/QcresultInfoFacade.java
  14. 16 0
      src/main/java/com/diagbot/mapper/MedRecordTypeMapper.java
  15. 21 0
      src/main/java/com/diagbot/mapper/QcCasesEntryHospitalMapper.java
  16. 16 0
      src/main/java/com/diagbot/mapper/QcCasesEntryMapper.java
  17. 16 0
      src/main/java/com/diagbot/mapper/QcTypeCasesEntryMapper.java
  18. 16 0
      src/main/java/com/diagbot/mapper/QcTypeDocMapper.java
  19. 16 0
      src/main/java/com/diagbot/mapper/QcTypeMapper.java
  20. 16 0
      src/main/java/com/diagbot/service/MedRecordTypeService.java
  21. 22 0
      src/main/java/com/diagbot/service/QcCasesEntryHospitalService.java
  22. 16 0
      src/main/java/com/diagbot/service/QcCasesEntryService.java
  23. 16 0
      src/main/java/com/diagbot/service/QcTypeCasesEntryService.java
  24. 16 0
      src/main/java/com/diagbot/service/QcTypeDocService.java
  25. 16 0
      src/main/java/com/diagbot/service/QcTypeService.java
  26. 20 0
      src/main/java/com/diagbot/service/impl/MedRecordTypeServiceImpl.java
  27. 28 0
      src/main/java/com/diagbot/service/impl/QcCasesEntryHospitalServiceImpl.java
  28. 20 0
      src/main/java/com/diagbot/service/impl/QcCasesEntryServiceImpl.java
  29. 20 0
      src/main/java/com/diagbot/service/impl/QcTypeCasesEntryServiceImpl.java
  30. 20 0
      src/main/java/com/diagbot/service/impl/QcTypeDocServiceImpl.java
  31. 20 0
      src/main/java/com/diagbot/service/impl/QcTypeServiceImpl.java
  32. 24 0
      src/main/java/com/diagbot/vo/QcCasesEntryHospitalVO.java
  33. 29 0
      src/main/java/com/diagbot/vo/QcCasesEntryUpdataVO.java
  34. 36 0
      src/main/java/com/diagbot/web/ConsoleController.java
  35. 20 0
      src/main/java/com/diagbot/web/QcCasesEntryController.java
  36. 63 0
      src/main/java/com/diagbot/web/QcCasesEntryHospitalController.java
  37. 16 0
      src/main/resources/mapper/MedRecordTypeMapper.xml
  38. 54 0
      src/main/resources/mapper/QcCasesEntryHospitalMapper.xml
  39. 23 0
      src/main/resources/mapper/QcCasesEntryMapper.xml
  40. 18 0
      src/main/resources/mapper/QcTypeCasesEntryMapper.xml
  41. 19 0
      src/main/resources/mapper/QcTypeDocMapper.xml
  42. 17 0
      src/main/resources/mapper/QcTypeMapper.xml
  43. 1 1
      src/test/java/com/diagbot/CodeGeneration.java

+ 22 - 0
src/main/java/com/diagbot/dto/QcCasesAllDTO.java

@@ -0,0 +1,22 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-04-13 19:32
+ */
+@Setter
+@Getter
+public class QcCasesAllDTO {
+    /**
+     * 主键
+     */
+    private Long id;
+    /**
+     * 模块名称
+     */
+    private String name;
+}

+ 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;
+}

+ 111 - 0
src/main/java/com/diagbot/entity/MedRecordType.java

@@ -0,0 +1,111 @@
+package com.diagbot.entity;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public class MedRecordType implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 类别ID
+     */
+    private String typeId;
+
+    /**
+     * 医院ID
+     */
+    private Long hospitalId;
+
+    /**
+     * 类别名称
+     */
+    private String typeName;
+
+    /**
+     * 上级类别
+     */
+    private String parentTypeId;
+
+    /**
+     * 服务对象(全院、科室、个人)
+     */
+    private String objName;
+
+    /**
+     * 拼音
+     */
+    private String spell;
+
+    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 +
+        "}";
+    }
+}

+ 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 +
+        "}";
+    }
+}

+ 139 - 0
src/main/java/com/diagbot/entity/QcType.java

@@ -0,0 +1,139 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 质控类型标准
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public class QcType implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 质控类型名称
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    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 String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    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 "QcType{" +
+                "id=" + id +
+                ", name=" + name +
+                ", remark=" + remark +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                "}";
+    }
+}

+ 153 - 0
src/main/java/com/diagbot/entity/QcTypeCasesEntry.java

@@ -0,0 +1,153 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 质控类型和质控条目关联表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public class QcTypeCasesEntry implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 质控类型ID
+     */
+    private Long typeId;
+
+    /**
+     * 条目数据ID
+     */
+    private Long caseEntryId;
+
+    /**
+     * 备注
+     */
+    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 getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(Long typeId) {
+        this.typeId = typeId;
+    }
+
+    public Long getCaseEntryId() {
+        return caseEntryId;
+    }
+
+    public void setCaseEntryId(Long caseEntryId) {
+        this.caseEntryId = caseEntryId;
+    }
+
+    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 "QcTypeCasesEntry{" +
+                "id=" + id +
+                ", typeId=" + typeId +
+                ", caseEntryId=" + caseEntryId +
+                ", remark=" + remark +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                "}";
+    }
+}

+ 167 - 0
src/main/java/com/diagbot/entity/QcTypeDoc.java

@@ -0,0 +1,167 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 质控类型和医院文书类型关联表
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public class QcTypeDoc implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 质控类型ID(qc_type.id)
+     */
+    private Long typeId;
+
+    /**
+     * 医院文书类型的类型id(med_record_type.type_id)
+     */
+    private Long hospitalTypeId;
+
+    /**
+     * 医院文书类型的医院ID(med_record_type.hospital_id)
+     */
+    private Long hospitalId;
+
+    /**
+     * 备注
+     */
+    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 getTypeId() {
+        return typeId;
+    }
+
+    public void setTypeId(Long typeId) {
+        this.typeId = typeId;
+    }
+
+    public Long getHospitalTypeId() {
+        return hospitalTypeId;
+    }
+
+    public void setHospitalTypeId(Long hospitalTypeId) {
+        this.hospitalTypeId = hospitalTypeId;
+    }
+
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+
+    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 "QcTypeDoc{" +
+                "id=" + id +
+                ", typeId=" + typeId +
+                ", hospitalTypeId=" + hospitalTypeId +
+                ", hospitalId=" + hospitalId +
+                ", remark=" + remark +
+                ", isDeleted=" + isDeleted +
+                ", gmtCreate=" + gmtCreate +
+                ", gmtModified=" + gmtModified +
+                ", creator=" + creator +
+                ", modifier=" + modifier +
+                "}";
+    }
+}

+ 9 - 0
src/main/java/com/diagbot/facade/BasHospitalInfoFaccade.java

@@ -0,0 +1,9 @@
+package com.diagbot.facade;
+
+/**
+ * @Description:
+ * @author: gaodm
+ * @time: 2020/4/12 11:39
+ */
+public class BasHospitalInfoFaccade {
+}

+ 118 - 0
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -0,0 +1,118 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.entity.BehospitalInfo;
+import com.diagbot.entity.QcresultInfo;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.util.SysUserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/13 16:45
+ */
+@Component
+public class ConsoleFacade {
+
+    @Autowired
+    private QcresultInfoFacade qcresultInfoFacade;
+    @Autowired
+    private BehospitalInfoFacade behospitalInfoFacade;
+
+
+    /**
+     * 病历相关统计
+     *
+     * @return
+     */
+    public Map<String, Object> mrStatistics() {
+        Map<String, Object> retMap = new HashMap<>();
+        retMap.put("本月病历数", 0);
+        retMap.put("本月质控数-人工", 0);
+        retMap.put("本月质控数-机器", 0);
+        retMap.put("本月甲级病历-人工", 0);
+        retMap.put("本月甲级病历-机器", 0);
+        retMap.put("本月乙级病历-人工", 0);
+        retMap.put("本月乙级病历-机器", 0);
+        retMap.put("本月不合格病历-人工", 0);
+        retMap.put("本月不合格病历-机器", 0);
+
+        String hospitalId = SysUserUtils.getCurrentHospitalID();
+
+        Date date = new Date();
+        String year = DateUtil.getYear(date);
+        int month = DateUtil.getMonth(date);
+        String startDate = year + "-" + month + "-01";
+        QueryWrapper<BehospitalInfo> behospitalInfoQueryWrapper = new QueryWrapper<>();
+        behospitalInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId)
+                .gt("leave_hospital_date", startDate);
+        List<BehospitalInfo> behospitalInfoList = behospitalInfoFacade.list(behospitalInfoQueryWrapper);
+        if (ListUtil.isNotEmpty(behospitalInfoList)) {
+            //本月病历数
+            retMap.put("本月病历数", behospitalInfoList.size());
+        }
+
+        QueryWrapper<QcresultInfo> qcresultInfoQueryWrapper = new QueryWrapper<>();
+        qcresultInfoQueryWrapper.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", hospitalId)
+                .gt("gmt_create", startDate);
+        List<QcresultInfo> qcresultInfoList = qcresultInfoFacade.list(qcresultInfoQueryWrapper);
+        if (ListUtil.isNotEmpty(qcresultInfoList)) {
+            retMap.put("本月质控数-人工", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(2))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月质控数-机器", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(1))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月甲级病历-人工", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(2) && i.getLevel().equals("甲级"))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月甲级病历-机器", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(1) && i.getLevel().equals("甲级"))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月乙级病历-人工", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(2) && i.getLevel().equals("乙级"))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月乙级病历-机器", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(1) && i.getLevel().equals("乙级"))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月不合格病历-人工", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(2) && i.getLevel().equals("丙级"))
+                    .collect(Collectors.toList())
+                    .size());
+            retMap.put("本月不合格病历-机器", qcresultInfoList
+                    .stream()
+                    .filter(i -> i.getGradeType().equals(1) && i.getLevel().equals("丙级"))
+                    .collect(Collectors.toList())
+                    .size());
+        }
+
+        return retMap;
+
+    }
+
+}

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

@@ -0,0 +1,81 @@
+package com.diagbot.facade;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.diagbot.dto.QcCasesAllDTO;
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.entity.QcCasesEntryHospital;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.service.QcCasesEntryHospitalService;
+import com.diagbot.service.impl.QcCasesEntryHospitalServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.StringUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.util.UserUtils;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+import com.diagbot.vo.QcCasesEntryUpdataVO;
+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;
+    @Autowired
+    private QcCasesFacade qcCasesFacade;
+
+    /**
+     *
+     * @param qcCasesEntryHospitalVO
+     * @return
+     */
+    public List<QcCasesEntryHospitalDTO> QcCasesEntryHospitals(QcCasesEntryHospitalVO qcCasesEntryHospitalVO) {
+        List<QcCasesEntryHospitalDTO> data = qcCasesEntryHospitalService.getQcCasesEntryAlls(qcCasesEntryHospitalVO);
+        return data;
+    }
+
+    /**
+     *
+     * @param qcCasesEntryUpdataVO
+     * @return
+     */
+    public boolean updataQcCasesEntrys(QcCasesEntryUpdataVO qcCasesEntryUpdataVO) {
+        //1.先判断数据是否存在有效
+        QueryWrapper<QcCasesEntryHospital> qc = new QueryWrapper<>();
+        qc.eq("id", qcCasesEntryUpdataVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+        int sum = count(qc);
+        if (sum == 0) {
+            throw new CommonException(CommonErrorCode.NOT_EXISTS, "该条目不存在");
+        }
+        UpdateWrapper<QcCasesEntryHospital> qcCasesEntry = new UpdateWrapper<>();
+        qcCasesEntry.eq("id", qcCasesEntryUpdataVO.getId())
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("hospital_id", Long.valueOf(SysUserUtils.getCurrentHospitalID()))
+                .set("modifier", SysUserUtils.getCurrentPrincipleID())
+                .set("gmt_modified", DateUtil.now());
+        qcCasesEntry.set(qcCasesEntryUpdataVO.getScore() != null,"score", qcCasesEntryUpdataVO.getScore());
+        qcCasesEntry.set(qcCasesEntryUpdataVO.getMsg() != null,"msg", qcCasesEntryUpdataVO.getMsg());
+        qcCasesEntry.set(qcCasesEntryUpdataVO.getIsUsed() != null,"is_used", qcCasesEntryUpdataVO.getIsUsed());
+        qcCasesEntry.set(qcCasesEntryUpdataVO.getIsReject() != null,"is_reject", qcCasesEntryUpdataVO.getIsReject());
+        return update(new QcCasesEntryHospital(), qcCasesEntry);
+    }
+
+    /**
+     *
+     * @return
+     */
+    public List<QcCasesAllDTO> getQcCasesAlls() {
+        return  qcCasesFacade.getQcCasesAlls();
+    }
+}

+ 18 - 0
src/main/java/com/diagbot/facade/QcCasesFacade.java

@@ -1,9 +1,15 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.dto.QcCasesAllDTO;
 import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+import com.diagbot.entity.QcCasesEntryHospital;
+import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.QcCasesServiceImpl;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.DateUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.SysUserUtils;
@@ -11,7 +17,10 @@ import com.diagbot.vo.QcCasesQueryVO;
 import com.diagbot.vo.QcCasesSaveVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
+import org.springframework.util.FileCopyUtils;
 
+import javax.rmi.CORBA.Util;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -47,4 +56,13 @@ public class QcCasesFacade extends QcCasesServiceImpl {
         return true;
 
     }
+
+    public List<QcCasesAllDTO> getQcCasesAlls() {
+        QueryWrapper<QcCases> qc = new QueryWrapper<>();
+        qc.eq("is_deleted", IsDeleteEnum.N.getKey());
+        List<QcCases> data = list(qc);
+        List<QcCasesAllDTO> dataNew = new ArrayList<QcCasesAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcCasesAllDTO.class);
+        return dataNew;
+    }
 }

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

@@ -0,0 +1,13 @@
+package com.diagbot.facade;
+
+import com.diagbot.service.impl.QcresultInfoServiceImpl;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/13 17:22
+ */
+@Component
+public class QcresultInfoFacade extends QcresultInfoServiceImpl {
+}

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

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

+ 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> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QcTypeCasesEntry;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 质控类型和质控条目关联表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeCasesEntryMapper extends BaseMapper<QcTypeCasesEntry> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QcTypeDoc;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 质控类型和医院文书类型关联表 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeDocMapper extends BaseMapper<QcTypeDoc> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.QcType;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ * 质控类型标准 Mapper 接口
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeMapper extends BaseMapper<QcType> {
+
+}

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

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

+ 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> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QcTypeCasesEntry;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 质控类型和质控条目关联表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeCasesEntryService extends IService<QcTypeCasesEntry> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QcTypeDoc;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 质控类型和医院文书类型关联表 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeDocService extends IService<QcTypeDoc> {
+
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.QcType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ * 质控类型标准 服务类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+public interface QcTypeService extends IService<QcType> {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.MedRecordType;
+import com.diagbot.mapper.MedRecordTypeMapper;
+import com.diagbot.service.MedRecordTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+@Service
+public class MedRecordTypeServiceImpl extends ServiceImpl<MedRecordTypeMapper, MedRecordType> implements MedRecordTypeService {
+
+}

+ 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 {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QcTypeCasesEntry;
+import com.diagbot.mapper.QcTypeCasesEntryMapper;
+import com.diagbot.service.QcTypeCasesEntryService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 质控类型和质控条目关联表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+@Service
+public class QcTypeCasesEntryServiceImpl extends ServiceImpl<QcTypeCasesEntryMapper, QcTypeCasesEntry> implements QcTypeCasesEntryService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QcTypeDoc;
+import com.diagbot.mapper.QcTypeDocMapper;
+import com.diagbot.service.QcTypeDocService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 质控类型和医院文书类型关联表 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+@Service
+public class QcTypeDocServiceImpl extends ServiceImpl<QcTypeDocMapper, QcTypeDoc> implements QcTypeDocService {
+
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.QcType;
+import com.diagbot.mapper.QcTypeMapper;
+import com.diagbot.service.QcTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 质控类型标准 服务实现类
+ * </p>
+ *
+ * @author gaodm
+ * @since 2020-04-13
+ */
+@Service
+public class QcTypeServiceImpl extends ServiceImpl<QcTypeMapper, QcType> implements QcTypeService {
+
+}

+ 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;
+}

+ 29 - 0
src/main/java/com/diagbot/vo/QcCasesEntryUpdataVO.java

@@ -0,0 +1,29 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.annotation.FieldStrategy;
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-04-13 18:22
+ */
+@Setter
+@Getter
+public class QcCasesEntryUpdataVO {
+
+    @NotNull(message = "请输条目id")
+    private Long id;
+    @NotNull(message = "请输提示信息")
+    private String msg;
+    @NotNull(message = "请输分值")
+    private Double score;
+    @NotNull(message = "请输单项否决")
+    private Integer isReject;
+    @NotNull(message = "请输启用标志")
+    private Integer isUsed;
+}

+ 36 - 0
src/main/java/com/diagbot/web/ConsoleController.java

@@ -0,0 +1,36 @@
+package com.diagbot.web;
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.ConsoleFacade;
+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.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+/**
+ * @Description:
+ * @Author:zhaops
+ * @time: 2020/4/13 16:45
+ */
+@RequestMapping("/console")
+@RestController
+@Api(value = "控制台统计相关API", tags = { "控制台统计相关API" })
+public class ConsoleController {
+
+    @Autowired
+    private ConsoleFacade consoleFacade;
+
+    @ApiOperation(value = "病历相关统计[by:zhaops]",
+            notes = "")
+    @PostMapping("/mrStatistics")
+    @SysLogger("mrStatistics")
+    public RespDTO<Map<String, Object>> mrStatistics() {
+        Map<String, Object> data = consoleFacade.mrStatistics();
+        return RespDTO.onSuc(data);
+    }
+}

+ 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 {
+
+}

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

@@ -0,0 +1,63 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.QcCasesAllDTO;
+import com.diagbot.dto.QcCasesEntryHospitalDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.QcCasesEntryHospitalFacade;
+import com.diagbot.vo.QcCasesEntryHospitalVO;
+import com.diagbot.vo.QcCasesEntryUpdataVO;
+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));
+    }
+    @ApiOperation(value = "修改医院条目数据信息[by:wangfeng]",
+            notes = "hospitalId:医院id 必传</br>casesName:类别名称</br>name:条目名" +
+                    "isReject:单项否决 1-单项否决 0-非</br>isUsed:是否启用 0-未启用 1-启用")
+    @PostMapping("/updataQcCasesEntry")
+    @SysLogger("updataQcCasesEntry")
+    public RespDTO<Boolean> updataQcCasesEntry(@RequestBody @Valid QcCasesEntryUpdataVO qcCasesEntryUpdataVO) {
+        return RespDTO.onSuc(qcCasesEntryHospitalFacade.updataQcCasesEntrys(qcCasesEntryUpdataVO));
+    }
+
+    @ApiOperation(value = "获取医院模块数据列表[by:wangfeng]",
+            notes = "")
+    @PostMapping("/getQcCasesAll")
+    @SysLogger("getQcCasesAll")
+    public RespDTO<List<QcCasesAllDTO>> getQcCasesAlls() {
+        return RespDTO.onSuc(qcCasesEntryHospitalFacade.getQcCasesAlls());
+    }
+}

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

@@ -0,0 +1,16 @@
+<?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.MedRecordTypeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.MedRecordType">
+        <id column="type_id" property="typeId" />
+        <result column="hospital_id" property="hospitalId" />
+        <result column="type_name" property="typeName" />
+        <result column="parent_type_id" property="parentTypeId" />
+        <result column="obj_name" property="objName" />
+        <result column="spell" property="spell" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 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>

+ 18 - 0
src/main/resources/mapper/QcTypeCasesEntryMapper.xml

@@ -0,0 +1,18 @@
+<?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.QcTypeCasesEntryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcTypeCasesEntry">
+        <id column="id" property="id" />
+        <result column="type_id" property="typeId" />
+        <result column="case_entry_id" property="caseEntryId" />
+        <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>

+ 19 - 0
src/main/resources/mapper/QcTypeDocMapper.xml

@@ -0,0 +1,19 @@
+<?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.QcTypeDocMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcTypeDoc">
+        <id column="id" property="id" />
+        <result column="type_id" property="typeId" />
+        <result column="hospital_type_id" property="hospitalTypeId" />
+        <result column="hospital_id" property="hospitalId" />
+        <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>

+ 17 - 0
src/main/resources/mapper/QcTypeMapper.xml

@@ -0,0 +1,17 @@
+<?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.QcTypeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcType">
+        <id column="id" property="id" />
+        <result column="name" property="name" />
+        <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>

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

@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "sys_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "qc_cases","qc_cases_hospital" }); // 需要生成的表
+        strategy.setInclude(new String[] { "qc_type","qc_type_cases_entry","qc_type_doc","med_record_type" }); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);