wangfeng před 5 roky
rodič
revize
d1d3238120
35 změnil soubory, kde provedl 1619 přidání a 0 odebrání
  1. 53 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesAllDTO.java
  2. 19 0
      mrman-service/src/main/java/com/diagbot/dto/QcCasesDTO.java
  3. 61 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesAllDTO.java
  4. 43 0
      mrman-service/src/main/java/com/diagbot/dto/QcInputcasesMappingDTO.java
  5. 132 0
      mrman-service/src/main/java/com/diagbot/entity/QcCases.java
  6. 145 0
      mrman-service/src/main/java/com/diagbot/entity/QcCasesEntry.java
  7. 132 0
      mrman-service/src/main/java/com/diagbot/entity/QcInputcases.java
  8. 169 0
      mrman-service/src/main/java/com/diagbot/entity/QcInputcasesMapping.java
  9. 69 0
      mrman-service/src/main/java/com/diagbot/facade/QcCasesFacade.java
  10. 175 0
      mrman-service/src/main/java/com/diagbot/facade/QcInputcasesFacade.java
  11. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/QcCasesEntryMapper.java
  12. 20 0
      mrman-service/src/main/java/com/diagbot/mapper/QcCasesMapper.java
  13. 16 0
      mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMapper.java
  14. 20 0
      mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMappingMapper.java
  15. 18 0
      mrman-service/src/main/java/com/diagbot/service/QcCasesEntryService.java
  16. 22 0
      mrman-service/src/main/java/com/diagbot/service/QcCasesService.java
  17. 22 0
      mrman-service/src/main/java/com/diagbot/service/QcInputcasesMappingService.java
  18. 18 0
      mrman-service/src/main/java/com/diagbot/service/QcInputcasesService.java
  19. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcCasesEntryServiceImpl.java
  20. 27 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcCasesServiceImpl.java
  21. 26 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesMappingServiceImpl.java
  22. 20 0
      mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesServiceImpl.java
  23. 35 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputMappingSaveVO.java
  24. 15 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesAllVO.java
  25. 15 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesByIdVO.java
  26. 28 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesSaveVO.java
  27. 11 0
      mrman-service/src/main/java/com/diagbot/vo/QcInputcasesVO.java
  28. 53 0
      mrman-service/src/main/java/com/diagbot/web/QcCasesController.java
  29. 22 0
      mrman-service/src/main/java/com/diagbot/web/QcCasesEntryController.java
  30. 64 0
      mrman-service/src/main/java/com/diagbot/web/QcInputcasesController.java
  31. 22 0
      mrman-service/src/main/java/com/diagbot/web/QcInputcasesMappingController.java
  32. 18 0
      mrman-service/src/main/resources/mapper/QcCasesEntryMapper.xml
  33. 35 0
      mrman-service/src/main/resources/mapper/QcCasesMapper.xml
  34. 17 0
      mrman-service/src/main/resources/mapper/QcInputcasesMapper.xml
  35. 41 0
      mrman-service/src/main/resources/mapper/QcInputcasesMappingMapper.xml

+ 53 - 0
mrman-service/src/main/java/com/diagbot/dto/QcCasesAllDTO.java

@@ -0,0 +1,53 @@
+package com.diagbot.dto;
+
+import com.diagbot.entity.QcCasesEntry;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 16:45
+ */
+@Setter
+@Getter
+public class QcCasesAllDTO {
+
+    private Long id;
+
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<QcCasesEntry> qcCasesEntry;
+}

+ 19 - 0
mrman-service/src/main/java/com/diagbot/dto/QcCasesDTO.java

@@ -0,0 +1,19 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:00
+ */
+@Getter
+@Setter
+public class QcCasesDTO {
+    private Long Id ;
+    private String casesName;
+    private Long entryId;
+    private String entryName;
+    private Long casesId;
+}

+ 61 - 0
mrman-service/src/main/java/com/diagbot/dto/QcInputcasesAllDTO.java

@@ -0,0 +1,61 @@
+package com.diagbot.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 18:58
+ */
+@Setter
+@Getter
+public class QcInputcasesAllDTO {
+    /**
+     * 主键
+     */
+    @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;
+
+    /**
+     * 病历文本
+     */
+    private String text;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    private List<QcInputcasesMappingDTO> qcInputcasesMapping;
+}

+ 43 - 0
mrman-service/src/main/java/com/diagbot/dto/QcInputcasesMappingDTO.java

@@ -0,0 +1,43 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 19:02
+ */
+@Setter
+@Getter
+public class QcInputcasesMappingDTO {
+
+
+    private Long id;
+
+    /**
+     * 病历文本id
+     */
+    private Long textId;
+
+
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+    private String casesName;
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+    private String EntryName;
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+
+}

+ 132 - 0
mrman-service/src/main/java/com/diagbot/entity/QcCases.java

@@ -0,0 +1,132 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 病历
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcCases implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private LocalDateTime gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private LocalDateTime gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 病历
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCases{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", name=" + name +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 145 - 0
mrman-service/src/main/java/com/diagbot/entity/QcCasesEntry.java

@@ -0,0 +1,145 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 病历条目
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcCasesEntry 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 casesId;
+
+    /**
+     * 条目
+     */
+    private String name;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public LocalDateTime getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(LocalDateTime gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public LocalDateTime getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(LocalDateTime gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public Long getCasesId() {
+        return casesId;
+    }
+
+    public void setCasesId(Long casesId) {
+        this.casesId = casesId;
+    }
+    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;
+    }
+
+    @Override
+    public String toString() {
+        return "QcCasesEntry{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", casesId=" + casesId +
+            ", name=" + name +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 132 - 0
mrman-service/src/main/java/com/diagbot/entity/QcInputcases.java

@@ -0,0 +1,132 @@
+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 wangfeng
+ * @since 2020-03-10
+ */
+public class QcInputcases 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;
+
+    /**
+     * 病历文本
+     */
+    private String text;
+
+    /**
+     * 备注
+     */
+    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 String getText() {
+        return text;
+    }
+
+    public void setText(String text) {
+        this.text = text;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcInputcases{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", text=" + text +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 169 - 0
mrman-service/src/main/java/com/diagbot/entity/QcInputcasesMapping.java

@@ -0,0 +1,169 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * <p>
+ * 病历录入关系
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public class QcInputcasesMapping 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 textId;
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+    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 getTextId() {
+        return textId;
+    }
+
+    public void setTextId(Long textId) {
+        this.textId = textId;
+    }
+    public Long getCasesId() {
+        return casesId;
+    }
+
+    public void setCasesId(Long casesId) {
+        this.casesId = casesId;
+    }
+    public Long getCasesEntryId() {
+        return casesEntryId;
+    }
+
+    public void setCasesEntryId(Long casesEntryId) {
+        this.casesEntryId = casesEntryId;
+    }
+    public Integer getPass() {
+        return pass;
+    }
+
+    public void setPass(Integer pass) {
+        this.pass = pass;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "QcInputcasesMapping{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", textId=" + textId +
+            ", casesId=" + casesId +
+            ", casesEntryId=" + casesEntryId +
+            ", pass=" + pass +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 69 - 0
mrman-service/src/main/java/com/diagbot/facade/QcCasesFacade.java

@@ -0,0 +1,69 @@
+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.QcCasesEntry;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.service.QcCasesEntryService;
+import com.diagbot.service.QcCasesService;
+import com.diagbot.service.impl.QcCasesServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 16:32
+ */
+@Component
+public class QcCasesFacade extends QcCasesServiceImpl {
+
+    @Autowired
+    QcCasesService qcCasesService;
+    @Autowired
+    QcCasesEntryService qcCasesEntryService;
+
+    public List<QcCasesAllDTO> getAlls() {
+        //查出所有病例
+        QueryWrapper<QcCases> qcCasesQuery = new QueryWrapper<>();
+        qcCasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        List<QcCases> data = list(qcCasesQuery);
+        List<QcCasesAllDTO> dataNew = new ArrayList<QcCasesAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcCasesAllDTO.class);
+        // 查出所有病例病例类型
+        QueryWrapper<QcCasesEntry> qcCasesEntryQuery = new QueryWrapper<>();
+        qcCasesEntryQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        List<QcCasesEntry> dataEntry = qcCasesEntryService.list(qcCasesEntryQuery);
+       // 然后把所有病例类型放进去
+        Map<Long, List<QcCasesEntry>> map
+                = EntityUtil.makeEntityListMap(dataEntry, "casesId");
+      //List<QcCases> data = qcCasesService.list();
+        //把模板放进文件夹中
+        if (dataNew.size() > 0) {
+            for (QcCasesAllDTO ts : dataNew) {
+                List<QcCasesEntry> tmp = map.get(ts.getId());
+                if (ListUtil.isNotEmpty(tmp)) {
+                    ts.setQcCasesEntry(tmp);
+                }
+            }
+        }
+        return dataNew;
+    }
+
+    public List<QcCasesDTO> getCasesAll(Long casesId) {
+         List<QcCasesDTO> data=  qcCasesService.getCasesLists(casesId);
+        return data;
+    }
+}

+ 175 - 0
mrman-service/src/main/java/com/diagbot/facade/QcInputcasesFacade.java

@@ -0,0 +1,175 @@
+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.QcInputcasesAllDTO;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcCasesEntry;
+import com.diagbot.entity.QcInputcases;
+import com.diagbot.entity.QcInputcasesMapping;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.mapper.QcInputcasesMappingMapper;
+import com.diagbot.service.QcInputcasesMappingService;
+import com.diagbot.service.QcInputcasesService;
+import com.diagbot.service.impl.QcInputcasesServiceImpl;
+import com.diagbot.util.BeanUtil;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.EntityUtil;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.QcInputMappingSaveVO;
+import com.diagbot.vo.QcInputcasesSaveVO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
+import org.springframework.stereotype.Component;
+
+import javax.swing.text.Utilities;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:17
+ */
+@Component
+public class QcInputcasesFacade extends QcInputcasesServiceImpl {
+
+    @Autowired
+    QcInputcasesService qcInputcasesService;
+    @Autowired
+    QcInputcasesMappingService qcInputcasesMappingService;
+
+    public List<QcInputcasesAllDTO> getInputcasesAlls(Long textId) {
+        //查出所有病例
+        QueryWrapper<QcInputcases> qcInputcasesQuery = new QueryWrapper<>();
+        qcInputcasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .orderByDesc("gmt_modified");
+        if (textId != null && textId != 0) {
+            qcInputcasesQuery.eq("id", textId);
+        }
+        List<QcInputcases> data = list(qcInputcasesQuery);
+        List<QcInputcasesAllDTO> dataNew = new ArrayList<QcInputcasesAllDTO>();
+        dataNew = BeanUtil.listCopyTo(data, QcInputcasesAllDTO.class);
+        // 查出所有病例病例类型
+        List<QcInputcasesMappingDTO> qcInputcasesMapping = qcInputcasesMappingService.getQcInputMappings(textId);
+        // 然后把所有病例类型放进去
+        Map<Long, List<QcInputcasesMappingDTO>> map
+                = EntityUtil.makeEntityListMap(qcInputcasesMapping, "textId");
+        if (dataNew.size() > 0) {
+            for (QcInputcasesAllDTO ts : dataNew) {
+                List<QcInputcasesMappingDTO> tmp = map.get(ts.getId());
+                if (ListUtil.isNotEmpty(tmp)) {
+                    ts.setQcInputcasesMapping(tmp);
+                }
+            }
+        }
+        return dataNew;
+    }
+
+    /**
+     * @param qcInputcasesSaveVO
+     * @return
+     */
+    public boolean saveAndUpdatas(QcInputcasesSaveVO qcInputcasesSaveVO) {
+        boolean res = false;
+        if (qcInputcasesSaveVO.getId() != null && qcInputcasesSaveVO.getId() != 0) {
+            //校验数据是否存在
+            QueryWrapper<QcInputcases> qcQuery = new QueryWrapper<>();
+            Map<String, Object> mapAll = new HashMap<>();
+            mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAll.put("id", qcInputcasesSaveVO.getId());
+            qcQuery.allEq(mapAll);
+            int sum = count(qcQuery);
+            if (sum == 0) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病例不存在");
+            }
+            UpdateWrapper<QcInputcases> qcInputcasesQuery = new UpdateWrapper<>();
+            qcInputcasesQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("id", qcInputcasesSaveVO.getId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("text", qcInputcasesSaveVO.getText());
+            res = update(qcInputcasesQuery);
+            UpdateWrapper<QcInputcasesMapping> qcMappingQuery = new UpdateWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("text_id", qcInputcasesSaveVO.getId())
+                    .set("gmt_modified", DateUtil.now())
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = qcInputcasesMappingService.update(qcMappingQuery);
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+
+            List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+            for (QcInputMappingSaveVO t : inputMapping) {
+                QcInputcasesMapping qcList = new QcInputcasesMapping();
+                qcList.setCasesEntryId(t.getCasesEntryId());
+                qcList.setCasesId(t.getCasesId());
+                qcList.setPass(t.getPass());
+                qcList.setTextId(qcInputcasesSaveVO.getId());
+                qcList.setGmtModified(DateUtil.now());
+                qcMappingList.add(qcList);
+            }
+            res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+        } else {
+            QueryWrapper<QcInputcases> qcInputcasesQuery = new QueryWrapper<>();
+            Map<String, Object> mapAll = new HashMap<>();
+            mapAll.put("is_deleted", IsDeleteEnum.N.getKey());
+            mapAll.put("text", qcInputcasesSaveVO.getText());
+            qcInputcasesQuery.allEq(mapAll);
+            int sum = count(qcInputcasesQuery);
+            if (sum != 0) {
+                throw new CommonException(CommonErrorCode.NOT_EXISTS, "该病例存在");
+            }
+            QcInputcases qcInputcases = new QcInputcases();
+            qcInputcases.setText(qcInputcasesSaveVO.getText());
+            res = save(qcInputcases);
+            List<QcInputMappingSaveVO> inputMapping = qcInputcasesSaveVO.getQcInputMappingSaveVO();
+            if (res) {
+                List<QcInputcasesMapping> qcMappingList = new ArrayList<>();
+                for (QcInputMappingSaveVO t : inputMapping) {
+                    QcInputcasesMapping qcList = new QcInputcasesMapping();
+                    qcList.setCasesEntryId(t.getCasesEntryId());
+                    qcList.setCasesId(t.getCasesId());
+                    qcList.setPass(t.getPass());
+                    qcList.setTextId(qcInputcases.getId());
+                    qcMappingList.add(qcList);
+                }
+                res = qcInputcasesMappingService.saveBatch(qcMappingList);
+
+            }
+        }
+
+        return res;
+    }
+
+    /**
+     * @param id
+     * @return
+     */
+    public boolean cancelByIds(Long id) {
+        boolean res = false;
+        UpdateWrapper<QcInputcases> qcInputcasesQuery = new UpdateWrapper<>();
+        qcInputcasesQuery
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq("id", id)
+                .set("is_deleted", IsDeleteEnum.Y.getKey());
+        res = update(qcInputcasesQuery);
+        if (res) {
+            UpdateWrapper<QcInputcasesMapping> qcMappingQuery = new UpdateWrapper<>();
+            qcMappingQuery
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .eq("text_id", id)
+                    .set("is_deleted", IsDeleteEnum.Y.getKey());
+            res = qcInputcasesMappingService.update(qcMappingQuery);
+        }
+        return res;
+    }
+}

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

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

+ 20 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcCasesMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcCasesMapper extends BaseMapper<QcCases> {
+
+    List<QcCasesDTO> getCasesList(Long casesId);
+}

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

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * <p>
+ * 病历录入 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcInputcasesMapper extends BaseMapper<QcInputcases> {
+
+}

+ 20 - 0
mrman-service/src/main/java/com/diagbot/mapper/QcInputcasesMappingMapper.java

@@ -0,0 +1,20 @@
+package com.diagbot.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 Mapper 接口
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+public interface QcInputcasesMappingMapper extends BaseMapper<QcInputcasesMapping> {
+
+    public List<QcInputcasesMappingDTO> getQcInputMapping(Long textId);
+}

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

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

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

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcCasesService extends IService<QcCases> {
+
+    public  List<QcCasesDTO>  getCasesLists(Long casesId);
+}

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

@@ -0,0 +1,22 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcInputcasesMappingService extends IService<QcInputcasesMapping> {
+
+    public List<QcInputcasesMappingDTO> getQcInputMappings(Long textId);
+}

+ 18 - 0
mrman-service/src/main/java/com/diagbot/service/QcInputcasesService.java

@@ -0,0 +1,18 @@
+package com.diagbot.service;
+
+import com.baomidou.dynamic.datasource.annotation.DS;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * <p>
+ * 病历录入 服务类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+public interface QcInputcasesService extends IService<QcInputcases> {
+
+}

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

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

+ 27 - 0
mrman-service/src/main/java/com/diagbot/service/impl/QcCasesServiceImpl.java

@@ -0,0 +1,27 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.entity.QcCases;
+import com.diagbot.mapper.QcCasesMapper;
+import com.diagbot.service.QcCasesService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcCasesServiceImpl extends ServiceImpl<QcCasesMapper, QcCases> implements QcCasesService {
+
+
+    public List<QcCasesDTO> getCasesLists(Long casesId) {
+        return baseMapper.getCasesList(casesId);
+    }
+}

+ 26 - 0
mrman-service/src/main/java/com/diagbot/service/impl/QcInputcasesMappingServiceImpl.java

@@ -0,0 +1,26 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.dto.QcInputcasesMappingDTO;
+import com.diagbot.entity.QcInputcasesMapping;
+import com.diagbot.mapper.QcInputcasesMappingMapper;
+import com.diagbot.service.QcInputcasesMappingService;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ * 病历录入关系 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcInputcasesMappingServiceImpl extends ServiceImpl<QcInputcasesMappingMapper, QcInputcasesMapping> implements QcInputcasesMappingService {
+
+    public List<QcInputcasesMappingDTO> getQcInputMappings(Long textId){
+        return  baseMapper.getQcInputMapping(textId);
+    }
+}

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

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.entity.QcInputcases;
+import com.diagbot.mapper.QcInputcasesMapper;
+import com.diagbot.service.QcInputcasesService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ * 病历录入 服务实现类
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+@Service
+public class QcInputcasesServiceImpl extends ServiceImpl<QcInputcasesMapper, QcInputcases> implements QcInputcasesService {
+
+}

+ 35 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputMappingSaveVO.java

@@ -0,0 +1,35 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 9:01
+ */
+@Setter
+@Getter
+public class QcInputMappingSaveVO {
+
+    /**
+     * 病历文本id
+     */
+    private Long textId;
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 病历条目id
+     */
+    private Long casesEntryId;
+
+    /**
+     * 是否通过
+     */
+    private Integer pass;
+
+}

+ 15 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesAllVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 10:43
+ */
+@Setter
+@Getter
+public class QcInputcasesAllVO {
+    private  Long textId;
+}

+ 15 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesByIdVO.java

@@ -0,0 +1,15 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 11:13
+ */
+@Setter
+@Getter
+public class QcInputcasesByIdVO {
+    private  Long textId;
+}

+ 28 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesSaveVO.java

@@ -0,0 +1,28 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-11 8:57
+ */
+@Setter
+@Getter
+public class QcInputcasesSaveVO {
+
+    /**
+     * 病例id
+     */
+    private Long id;
+    /**
+     * 病历文本
+     */
+    private String text;
+
+    private List<QcInputMappingSaveVO> qcInputMappingSaveVO;
+
+}

+ 11 - 0
mrman-service/src/main/java/com/diagbot/vo/QcInputcasesVO.java

@@ -0,0 +1,11 @@
+package com.diagbot.vo;
+
+import com.diagbot.entity.QcInputcases;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-03-10 17:19
+ */
+public class QcInputcasesVO extends QcInputcases {
+}

+ 53 - 0
mrman-service/src/main/java/com/diagbot/web/QcCasesController.java

@@ -0,0 +1,53 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.QcCasesAllDTO;
+import com.diagbot.dto.QcCasesDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.QcCasesFacade;
+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-03-10
+ */
+@RestController
+@RequestMapping("/qcCases")
+@Api(value = "病历模块相关接口", tags = { "病历模块相关接口" })
+public class QcCasesController {
+
+    @Autowired
+    private QcCasesFacade qcCasesFacade;
+
+    @ApiOperation(value = "获取全部模块及条目[by:wangfeng]",
+            notes = "获取全部模块及条目")
+    @PostMapping("/getAll")
+    @SysLogger("getAll")
+    public RespDTO<List<QcCasesAllDTO>> getAll() {
+        List<QcCasesAllDTO> data =qcCasesFacade.getAlls();
+        return RespDTO.onSuc(data);
+    }
+
+    /*@ApiOperation(value = "获取全部病历条目详情[by:wangfeng]",
+            notes = "获取全部病历条目详情")
+    @PostMapping("/getCasesAlls")
+    @SysLogger("getCasesAlls")
+    public RespDTO<List<QcCasesDTO>> getCasesAlls(@Valid @RequestBody Long casesId) {
+
+        return RespDTO.onSuc(qcCasesFacade.getCasesAll(casesId));
+    }*/
+}

+ 22 - 0
mrman-service/src/main/java/com/diagbot/web/QcCasesEntryController.java

@@ -0,0 +1,22 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 病历条目 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+@RestController
+@RequestMapping("/qcCasesEntry")
+@Api(value = "病历条目相关接口", tags = { "病历条目相关接口" })
+public class QcCasesEntryController {
+
+}

+ 64 - 0
mrman-service/src/main/java/com/diagbot/web/QcInputcasesController.java

@@ -0,0 +1,64 @@
+package com.diagbot.web;
+
+
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.QcInputcasesAllDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.QcInputcasesFacade;
+import com.diagbot.vo.QcInputcasesAllVO;
+import com.diagbot.vo.QcInputcasesByIdVO;
+import com.diagbot.vo.QcInputcasesSaveVO;
+import com.diagbot.vo.QcInputcasesVO;
+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-03-10
+ */
+@RestController
+@RequestMapping("/qcInputcases")
+@Api(value = "病历录入相关接口", tags = { "病历录入相关接口" })
+public class QcInputcasesController{
+
+    @Autowired
+    QcInputcasesFacade qcInputcasesFacade;
+    @ApiOperation(value = "获取全部病历录入[by:wangfeng]",
+            notes = "获取全部病历录入")
+    @PostMapping("/getInputcasesAll")
+    @SysLogger("getInputcasesAll")
+    public RespDTO<List<QcInputcasesAllDTO>> getInputcasesAll(@Valid @RequestBody QcInputcasesAllVO qcInputcasesAllVO) {
+        List<QcInputcasesAllDTO> data = qcInputcasesFacade.getInputcasesAlls(qcInputcasesAllVO.getTextId());
+        return RespDTO.onSuc(data);
+    }
+    @ApiOperation(value = "保存和修改全部病历录入[by:wangfeng]",
+            notes = "id; 病历id(保存不传,修改必传)text;病历文本qcInputMappingSaveVO{textId: 病历文本id ;casesId: 模块id;casesEntryId: 条目id ;pass:是否通过"+
+                    "}")
+    @PostMapping("/getInputcasesAlls")
+    @SysLogger("getInputcasesAlls")
+    public RespDTO<Boolean> saveAndUpdata(@Valid @RequestBody QcInputcasesSaveVO qcInputcasesSaveVO) {
+        boolean res = qcInputcasesFacade.saveAndUpdatas(qcInputcasesSaveVO);
+        return RespDTO.onSuc(res);
+    }
+
+    @ApiOperation(value = "删除病历录入[by:wangfeng]",
+            notes = "删除病历录入病历录入")
+    @PostMapping("/cancelById")
+    @SysLogger("cancelById")
+    public RespDTO<Boolean> cancelById(@Valid @RequestBody QcInputcasesByIdVO qcInputcasesByIdVO) {
+        boolean res = qcInputcasesFacade.cancelByIds(qcInputcasesByIdVO.getId());
+        return RespDTO.onSuc(res);
+    }
+}

+ 22 - 0
mrman-service/src/main/java/com/diagbot/web/QcInputcasesMappingController.java

@@ -0,0 +1,22 @@
+package com.diagbot.web;
+
+
+import io.swagger.annotations.Api;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * <p>
+ * 病历录入关系 前端控制器
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-03-10
+ */
+
+@RestController
+@RequestMapping("/qcInputcasesMapping")
+@Api(value = "病历录入关系相关接口", tags = { "病历录入关系相关接口" })
+public class QcInputcasesMappingController {
+
+}

+ 18 - 0
mrman-service/src/main/resources/mapper/QcCasesEntryMapper.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.QcCasesEntryMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcCasesEntry">
+        <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_id" property="casesId" />
+        <result column="name" property="name" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 35 - 0
mrman-service/src/main/resources/mapper/QcCasesMapper.xml

@@ -0,0 +1,35 @@
+<?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.QcCasesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcCases">
+        <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="name" property="name"/>
+        <result column="remark" property="remark"/>
+    </resultMap>
+
+    <select id="getCasesList" parameterType="Long" resultType="com.diagbot.dto.QcCasesDTO">
+        SELECT
+        a.id as id,
+        a.name as casesName,
+        b.id as entryId,
+        b.name as entryName,
+        b.cases_id as casesId
+        FROM
+        qc_cases a
+        JOIN qc_cases_entry b
+        ON a.id = b.cases_id
+        WHERE a.is_deleted = "N"
+        AND b.is_deleted = "N"
+        <if test="casesId !=null">
+            AND a.id = #{casesId}
+        </if>
+
+    </select>
+</mapper>

+ 17 - 0
mrman-service/src/main/resources/mapper/QcInputcasesMapper.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.QcInputcasesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcInputcases">
+        <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="text" property="text" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>

+ 41 - 0
mrman-service/src/main/resources/mapper/QcInputcasesMappingMapper.xml

@@ -0,0 +1,41 @@
+<?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.QcInputcasesMappingMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.QcInputcasesMapping">
+        <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="text_id" property="textId"/>
+        <result column="cases_id" property="casesId"/>
+        <result column="cases_entry_id" property="casesEntryId"/>
+        <result column="pass" property="pass"/>
+        <result column="remark" property="remark"/>
+    </resultMap>
+
+    <select id="getQcInputMapping" parameterType="Long" resultType="com.diagbot.dto.QcInputcasesMappingDTO">
+
+        SELECT
+        a.id AS Id,
+        a.text_id AS textId,
+        a.cases_id AS casesId,
+        c.name AS casesName,
+        a.cases_entry_id AS casesEntryId,
+        b.name AS EntryName,
+        a.pass AS pass
+        FROM qc_inputcases_mapping a
+        JOIN qc_cases_entry b ON a.cases_entry_id = b.id
+        JOIN qc_cases c ON a.cases_id = c.id
+        WHERE a.is_deleted ="N"
+        AND b.is_deleted ="N"
+        AND c.is_deleted ="N"
+        <if test="textId != null ">
+            AND a.text_id = #{textId}
+        </if>
+
+    </select>
+</mapper>