zhoutg 5 роки тому
батько
коміт
820e9b61ec

+ 12 - 1
mrman-service/src/main/java/com/diagbot/facade/QcCacesEntryFacade.java

@@ -9,12 +9,12 @@ import com.diagbot.dto.QcCasesEntryAllDTO;
 import com.diagbot.dto.QcHospitalInfoAllDTO;
 import com.diagbot.entity.CasesEntryHospital;
 import com.diagbot.entity.QcCasesEntry;
-import com.diagbot.entity.QcInputcasesMapping;
 import com.diagbot.enums.IsDeleteEnum;
 import com.diagbot.service.impl.QcCasesEntryServiceImpl;
 import com.diagbot.util.BeanUtil;
 import com.diagbot.vo.GetUpdateInfoVO;
 import com.diagbot.vo.QcCasesEntryAllVO;
+import com.diagbot.vo.QcCasesEntryIndexVO;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -36,6 +36,7 @@ public class QcCacesEntryFacade extends QcCasesEntryServiceImpl {
     private CasesEntryHospitalFacade casesEntryHospitalFacade;
     @Autowired
     private BasHospitalInfoFacade qcHospitalInfoFacade;
+
     /**
      * 分页获取病例条目
      *
@@ -46,6 +47,16 @@ public class QcCacesEntryFacade extends QcCasesEntryServiceImpl {
         return this.getAllQcCasesEntry(qcCasesEntryAllVO);
     }
 
+    /**
+     * 分页获取病例条目
+     *
+     * @param qcCasesEntryIndexVO
+     * @return
+     */
+    public IPage<QcCasesEntryAllDTO> getAllQcCasesEntryIndexFac(QcCasesEntryIndexVO qcCasesEntryIndexVO){
+        return this.getAllQcCasesEntryIndex(qcCasesEntryIndexVO);
+    }
+
     /**
      * 修改时获取病例条目信息
      *

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

@@ -6,6 +6,7 @@ import com.diagbot.dto.QcCasesEntryAllDTO;
 import com.diagbot.dto.QcCasesEntryDTO;
 import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.vo.QcCasesEntryAllVO;
+import com.diagbot.vo.QcCasesEntryIndexVO;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -28,6 +29,8 @@ public interface QcCasesEntryMapper extends BaseMapper<QcCasesEntry> {
      */
     IPage<QcCasesEntryAllDTO> getAllQcCasesEntry(QcCasesEntryAllVO qcCasesEntryAllVO);
 
+    IPage<QcCasesEntryAllDTO> getQcCasesEntryIndex(QcCasesEntryIndexVO qcCasesEntryIndexVO);
+
     List<QcCasesEntryDTO> getByCasesEntryId( @Param("ids") List<Long> ids);
 
     List<QcCasesEntryDTO> getQcCasesEntryAll();

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

@@ -6,6 +6,7 @@ import com.diagbot.dto.QcCasesEntryAllDTO;
 import com.diagbot.dto.QcCasesEntryDTO;
 import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.vo.QcCasesEntryAllVO;
+import com.diagbot.vo.QcCasesEntryIndexVO;
 
 import java.util.List;
 
@@ -28,6 +29,8 @@ public interface QcCasesEntryService extends IService<QcCasesEntry> {
      */
     IPage<QcCasesEntryAllDTO> getAllQcCasesEntry(QcCasesEntryAllVO qcCasesEntryAllVO);
 
+    IPage<QcCasesEntryAllDTO> getAllQcCasesEntryIndex(QcCasesEntryIndexVO qcCasesEntryIndexVO);
+
     List<QcCasesEntryDTO> getByCasesEntryId(List<Long> ids);
 
     List<QcCasesEntryDTO> getQcCasesEntryAll();

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

@@ -8,6 +8,7 @@ import com.diagbot.entity.QcCasesEntry;
 import com.diagbot.mapper.QcCasesEntryMapper;
 import com.diagbot.service.QcCasesEntryService;
 import com.diagbot.vo.QcCasesEntryAllVO;
+import com.diagbot.vo.QcCasesEntryIndexVO;
 import org.springframework.stereotype.Service;
 
 import java.util.List;
@@ -28,6 +29,11 @@ public class QcCasesEntryServiceImpl extends ServiceImpl<QcCasesEntryMapper, QcC
         return baseMapper.getAllQcCasesEntry(qcCasesEntryAllVO);
     }
 
+    @Override
+    public IPage<QcCasesEntryAllDTO> getAllQcCasesEntryIndex(QcCasesEntryIndexVO qcCasesEntryIndexVO) {
+        return baseMapper.getQcCasesEntryIndex(qcCasesEntryIndexVO);
+    }
+
     @Override
     public List<QcCasesEntryDTO> getByCasesEntryId(List<Long> ids) {
         return baseMapper.getByCasesEntryId(ids);

+ 52 - 0
mrman-service/src/main/java/com/diagbot/vo/QcCasesEntryIndexVO.java

@@ -0,0 +1,52 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @Description:
+ * @author: zhoutg
+ * @time: 2020/3/30 16:55
+ */
+@Getter
+@Setter
+public class QcCasesEntryIndexVO extends Page {
+
+    /**
+     * 病历id
+     */
+    private Long casesId;
+
+    /**
+     * 用于层级定义,由操作人控制录入,需按该列排序
+     */
+    private Long modeId;
+
+    /**
+     * 条目
+     */
+    private String name;
+
+    /**
+     * 条目编码
+     */
+    private String code;
+
+    /**
+     * 医院Id
+     */
+    private Long hospitalId;
+
+    /**
+     * 指定ids
+     */
+    private List<Long> ids;
+
+    /**
+     * notIds
+     */
+    private List<Long> notIds;
+}

+ 17 - 1
mrman-service/src/main/java/com/diagbot/web/QcCasesEntryController.java

@@ -9,6 +9,7 @@ import com.diagbot.dto.RespDTO;
 import com.diagbot.facade.QcCacesEntryFacade;
 import com.diagbot.vo.GetUpdateInfoVO;
 import com.diagbot.vo.QcCasesEntryAllVO;
+import com.diagbot.vo.QcCasesEntryIndexVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,7 +41,22 @@ public class QcCasesEntryController {
     @PostMapping("/getAll")
     @SysLogger("getAll")
     public RespDTO<IPage<QcCasesEntryAllDTO>> getAll(@RequestBody QcCasesEntryAllVO qcCasesEntryAllVO) {
-        IPage<QcCasesEntryAllDTO> data =qcCacesEntryFacade.getAll(qcCasesEntryAllVO);
+        IPage<QcCasesEntryAllDTO> data = qcCacesEntryFacade.getAll(qcCasesEntryAllVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "搜索质控条目[by:zhoutg]",
+            notes = "hospitalId:医院ID<br>" +
+                    "code:编码<br>" +
+                    "modeId:模块ID<br>" +
+                    "casesId:病历模块<br>" +
+                    "name:条目名称<br>" +
+                    "ids:指定ids<br>" +
+                    "notIds:排除ids<br>")
+    @PostMapping("/indexCaseEntry")
+    @SysLogger("indexCaseEntry")
+    public RespDTO<IPage<QcCasesEntryAllDTO>> indexCaseEntry(@RequestBody QcCasesEntryIndexVO qcCasesEntryIndexVO) {
+        IPage<QcCasesEntryAllDTO> data = qcCacesEntryFacade.getAllQcCasesEntryIndexFac(qcCasesEntryIndexVO);
         return RespDTO.onSuc(data);
     }
 

+ 36 - 0
mrman-service/src/main/resources/mapper/QcCasesEntryMapper.xml

@@ -38,6 +38,42 @@
         </if>
         ORDER BY a.cases_id,a.id
     </select>
+
+    <select id="getQcCasesEntryIndex" resultType="com.diagbot.dto.QcCasesEntryAllDTO">
+        SELECT distinct a.*,b.name as modeName
+        FROM qc_cases_entry a, qc_mode b, qc_cases_entry_hospital c
+        WHERE a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N '
+        and b.id= a.mode_id and a.id = c.cases_entry_id
+        <if test="hospitalId != null">
+            AND c.hospital_id = #{hospitalId}
+        </if>
+        <if test="casesId != null and casesId != ''">
+            AND a.cases_id = #{casesId}
+        </if>
+        <if test="modeId != null and modeId != ''">
+            AND b.id = #{modeId}
+        </if>
+        <if test="name != null and name != ''">
+            AND a.name LIKE CONCAT('%',#{name},'%')
+        </if>
+        <if test="code != null and code != ''">
+            AND a.code = #{code}
+        </if>
+        <if test="ids != null and ids.size() > 0 ">
+            and a.id in
+            <foreach  collection="ids" item="item" open="("  separator=","  close=")">
+                #{item}
+            </foreach>
+        </if>
+        <if test="notIds != null and notIds.size() > 0 ">
+            and a.id not in
+            <foreach  collection="notIds" item="item" open="("  separator=","  close=")">
+                #{item}
+            </foreach>
+        </if>
+        ORDER BY a.cases_id,a.id
+    </select>
+
     <select id="getByCasesEntryId"  resultType="com.diagbot.dto.QcCasesEntryDTO">
         SELECT a.*,b.name as modeName FROM qc_cases_entry a
         LEFT JOIN  qc_mode b ON b.id= a.mode_id