浏览代码

医嘱缺陷类别查询/检查信息新增

chengyao 4 年之前
父节点
当前提交
fa5eb6ee1e

+ 2 - 1
src/main/java/com/diagbot/config/security/UrlAccessDecisionManager.java

@@ -199,6 +199,7 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
                 || matchers("/qc/data/sendHomeOperation", request)
                 || matchers("/qc/data/sendCrisis", request)
                 || matchers("/qc/doctoradvice/getPage", request)
+                || matchers("/qc/medPacsInfo/getCheckPage", request)
                 || matchers("/", request)) {
             return true;
         }
@@ -212,4 +213,4 @@ public class UrlAccessDecisionManager implements AccessDecisionManager {
         }
         return false;
     }
-}
+}

+ 73 - 0
src/main/java/com/diagbot/dto/CheckInfoDTO.java

@@ -0,0 +1,73 @@
+package com.diagbot.dto;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/03 15:00
+ */
+@Getter
+@Setter
+public class CheckInfoDTO {
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 检查项类型缺陷判别(0-全部检查项 1缺陷检查项  2非缺陷检查项 )
+     */
+    private Integer checkType = 0;
+
+    /**
+     * 病历号
+     */
+    @NotBlank(message = "请输入病历号")
+    private String behospitalCode;
+
+    /**
+     * 检查类型判别
+     */
+    private String checkItemType;
+
+    /**
+     * 检查项目名称
+     */
+    private String checkItemName;
+
+    /**
+     * 检查结果
+     */
+    private String checkResult;
+
+
+    /**
+     * 检查时间
+     */
+    private Date cTime;
+
+    /**
+     * 报告时间
+     */
+    private Date rTime;
+
+    /**
+     * 开单医生
+     */
+    private String doctorName;
+
+    /**
+     * 质检提示信息
+     */
+    @JsonIgnore
+    private String info;
+}

+ 4 - 4
src/main/java/com/diagbot/facade/BehospitalInfoFacade.java

@@ -420,7 +420,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
         return queryVo;
     }
 
-    private List<MedLisResult> getMedLisResultList(BehospitalInfo behospitalInfo) {
+   /* private List<MedLisResult> getMedLisResultList(BehospitalInfo behospitalInfo) {
         String behospitalDate = null, leaveHospitalDate = null;
         try {
             behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
@@ -469,9 +469,9 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             });
         }
         return medLisResultList;
-    }
+    }*/
 
-    private List<MedPacsResult> getMedPacsResultList(BehospitalInfo behospitalInfo) {
+/*    private List<MedPacsResult> getMedPacsResultList(BehospitalInfo behospitalInfo) {
         String behospitalDate = null, leaveHospitalDate = null;
         try {
             behospitalDate = DateUtil.format(behospitalInfo.getBehospitalDate(), DateUtil.DATE_TIME_FORMAT);
@@ -513,7 +513,7 @@ public class BehospitalInfoFacade extends BehospitalInfoServiceImpl {
             );
         }
         return medPacsResultList;
-    }
+    }*/
 
     /**
      * 评分-终末质控

+ 31 - 2
src/main/java/com/diagbot/facade/MedPacsInfoFacade.java

@@ -1,13 +1,42 @@
 package com.diagbot.facade;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.CheckInfoDTO;
+import com.diagbot.dto.DoctorAdviceDTO;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
 import com.diagbot.service.impl.MedPacsInfoServiceImpl;
+import com.diagbot.util.DateUtil;
+import com.diagbot.util.SysUserUtils;
+import com.diagbot.vo.CheckInfoVO;
 import org.springframework.stereotype.Component;
 
 /**
  * @Description:
- * @author: rengb
- * @time: 2020/7/28 15:49
+ * @author: cy
+ * @time: 2020/9/04 15:49
  */
 @Component
 public class MedPacsInfoFacade extends MedPacsInfoServiceImpl {
+    /**
+     * 获取检查信息翻页
+     * @param checkInfoVO 获取检查信息入参
+     * @return 医嘱翻页信息
+     */
+    public IPage<CheckInfoDTO> getCheckPage(CheckInfoVO checkInfoVO) {
+        checkInfoVO.setHospitalId(Long.valueOf(SysUserUtils.getCurrentHospitalID()));
+
+        if (null != checkInfoVO.getJxDateStart()) {
+            checkInfoVO.setJxDateStart(DateUtil.getFirstTimeOfDay(checkInfoVO.getJxDateStart()));
+        }
+        if (null != checkInfoVO.getJxDateEnd()) {
+            checkInfoVO.setJxDateEnd(DateUtil.getFirstTimeOfDay(DateUtil.addDay(checkInfoVO.getJxDateEnd(), 1)));
+        }
+        if (null != checkInfoVO.getJxDateStart() && null != checkInfoVO.getJxDateEnd()) {
+            if (DateUtil.after(checkInfoVO.getJxDateStart(), checkInfoVO.getJxDateEnd())) {
+                throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "开始时间必须小于结束时间!");
+            }
+        }
+        return this.getCheckInfo(checkInfoVO);
+    }
 }

+ 1 - 0
src/main/java/com/diagbot/mapper/DoctorAdviceMapper.java

@@ -22,4 +22,5 @@ public interface DoctorAdviceMapper extends BaseMapper<DoctorAdvice> {
     public void updateBatchByKey(List<DoctorAdvice> list);
     IPage<DoctorAdviceDTO> getPage(@Param("doctorAdviceVO")DoctorAdviceVO doctorAdviceVO, @Param("infos") Set<String> infos);
     List<String> getInfo(@Param("hospitalId")Long hospitalId, @Param("behospitalCode")String behospitalCode);
+
 }

+ 14 - 2
src/main/java/com/diagbot/mapper/MedPacsInfoMapper.java

@@ -1,16 +1,28 @@
 package com.diagbot.mapper;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.CheckInfoDTO;
+import com.diagbot.dto.DoctorAdviceDTO;
+import com.diagbot.entity.DoctorAdvice;
 import com.diagbot.entity.MedPacsInfo;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.diagbot.vo.CheckInfoVO;
+import com.diagbot.vo.DoctorAdviceVO;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Set;
 
 /**
  * <p>
  *  Mapper 接口
  * </p>
  *
- * @author zhoutg
- * @since 2020-07-28
+ * @author cy
+ * @since 2020-09-04
  */
 public interface MedPacsInfoMapper extends BaseMapper<MedPacsInfo> {
+    IPage<CheckInfoDTO> getCheckInfo(@Param("checkInfoVO") CheckInfoVO checkInfoVO, @Param("infos") Set<String> infos);
+    List<String> getInfo(@Param("hospitalId")Long hospitalId, @Param("behospitalCode")String behospitalCode);
 
 }

+ 10 - 9
src/main/java/com/diagbot/service/impl/DoctorAdviceServiceImpl.java

@@ -26,28 +26,29 @@ import java.util.Set;
 public class DoctorAdviceServiceImpl extends ServiceImpl<DoctorAdviceMapper, DoctorAdvice> implements DoctorAdviceService {
     /**
      * 根据医嘱ID和医院编码-批量更新数据
+     *
      * @param list
      */
-    public void updateBatchByKey(List<DoctorAdvice> list){
+    public void updateBatchByKey(List<DoctorAdvice> list) {
         this.baseMapper.updateBatchByKey(list);
     }
 
 
-
-
-    public IPage<DoctorAdviceDTO> getPage(DoctorAdviceVO doctorAdviceVO){
+    public IPage<DoctorAdviceDTO> getPage(DoctorAdviceVO doctorAdviceVO) {
 
         List<String> infos = this.baseMapper.getInfo(doctorAdviceVO.getHospitalId(), doctorAdviceVO.getBehospitalCode());
 
         Set<String> infoSet = new HashSet<>();
+
         for (String s : infos) {
-            if(s.contains("医嘱")){
-                String[] split = s.split(",");
+            if (s.contains("医嘱")) {
+                String[] split = s.split("");
                 for (String info : split) {
                     String[] targetInfos = info.split(":");
                     for (String targetInfo : targetInfos) {
-                        if(!targetInfo.contains("医嘱")){
-                            infoSet.add(targetInfo);
+                        if (!targetInfo.contains("医嘱")) {
+                            String[] target = targetInfo.split(",");
+                            infoSet.add(target[0] + ")");
                         }
 
                     }
@@ -56,7 +57,7 @@ public class DoctorAdviceServiceImpl extends ServiceImpl<DoctorAdviceMapper, Doc
             }
         }
 
-        IPage<DoctorAdviceDTO> page = this.baseMapper.getPage(doctorAdviceVO,infoSet);
+        IPage<DoctorAdviceDTO> page = this.baseMapper.getPage(doctorAdviceVO, infoSet);
         return page;
     }
 }

+ 37 - 3
src/main/java/com/diagbot/service/impl/MedPacsInfoServiceImpl.java

@@ -1,20 +1,54 @@
 package com.diagbot.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.dto.CheckInfoDTO;
+import com.diagbot.dto.DoctorAdviceDTO;
 import com.diagbot.entity.MedPacsInfo;
 import com.diagbot.mapper.MedPacsInfoMapper;
 import com.diagbot.service.MedPacsInfoService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.diagbot.vo.CheckInfoVO;
 import org.springframework.stereotype.Service;
 
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
 /**
  * <p>
- *  服务实现类
+ * 服务实现类
  * </p>
  *
- * @author zhoutg
- * @since 2020-07-28
+ * @author cy
+ * @since 2020-09-04
  */
 @Service
 public class MedPacsInfoServiceImpl extends ServiceImpl<MedPacsInfoMapper, MedPacsInfo> implements MedPacsInfoService {
 
+
+    public IPage<CheckInfoDTO> getCheckInfo(CheckInfoVO checkInfoVO) {
+
+        List<String> infos = this.baseMapper.getInfo(checkInfoVO.getHospitalId(), checkInfoVO.getBehospitalCode());
+
+        Set<String> infoSet = new HashSet<>();
+        for (String s : infos) {
+            if (s.contains("检查")) {
+                String[] split = s.split("、");
+                for (String info : split) {
+                    String[] targetInfos = info.split(":");
+                    for (String targetInfo : targetInfos) {
+                        if (!targetInfo.contains("检查")) {
+                            String[] target = targetInfo.split(",");
+                            infoSet.add(target[0] + ")");
+                        }
+
+                    }
+
+                }
+            }
+        }
+
+        IPage<CheckInfoDTO> page = this.baseMapper.getCheckInfo(checkInfoVO, infoSet);
+        return page;
+    }
 }

+ 62 - 0
src/main/java/com/diagbot/vo/CheckInfoVO.java

@@ -0,0 +1,62 @@
+package com.diagbot.vo;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import javax.validation.constraints.NotBlank;
+import java.util.Date;
+
+/**
+ * @Description:
+ * @author: cy
+ * @time: 2020/9/4 14:59
+ */
+@Getter
+@Setter
+public class CheckInfoVO extends Page {
+    /**
+     * 医院id
+     */
+    @ApiModelProperty(hidden = true)
+    private Long hospitalId;
+
+    /**
+     * 检查项类型缺陷判别(0-全部检查项 1缺陷检查项  2非缺陷检查项 )
+     */
+    private Integer checkType = 0;
+
+    /**
+     * 病历号
+     */
+    @NotBlank(message = "请输入病历号")
+    private String behospitalCode;
+
+    /**
+     * 检查类型判别
+     */
+    private String checkItemType;
+
+    /**
+     * 检查项目名称
+     */
+    private String checkItemName;
+
+    /**
+     * 检查时间开始
+     */
+    private Date jxDateStart;
+
+    /**
+     * 检查时间结束
+     */
+    private Date jxDateEnd;
+    /**
+     * 提示信息
+     */
+    @JsonIgnore
+    private String info;
+
+}

+ 47 - 0
src/main/java/com/diagbot/web/MedPacsInfoController.java

@@ -0,0 +1,47 @@
+package com.diagbot.web;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.CheckInfoDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.MedPacsInfoFacade;
+import com.diagbot.vo.CheckInfoVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+import javax.validation.Valid;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author cy
+ * @since 2020-09-04
+ */
+@Controller
+@RequestMapping("qc/medPacsInfo")
+@Api(value = "检查信息API", tags = { "检查信息API" })
+public class MedPacsInfoController {
+    @Autowired
+    private MedPacsInfoFacade medPacsInfoFacade;
+
+    @ApiOperation(value = "获取检查信息[by:cy]",
+            notes = "behospitalCode:病人住院序号<br>" +
+                    "checkItemType:检查类型(模糊搜索)<br>" +
+                    "checkItemName:检查项目名称(模糊搜索)<br>" +
+                    "jxDateStart:检查时间开始<br>" +
+                    "jxDateEnd:检查时间结束<br>")
+    @PostMapping("/getCheckPage")
+    @SysLogger("getCheckPage")
+    public RespDTO<IPage<CheckInfoDTO>> getCheckPage(@RequestBody @Valid CheckInfoVO checkInfoVO) {
+        return RespDTO.onSuc(medPacsInfoFacade.getCheckPage(checkInfoVO));
+    }
+
+}

+ 65 - 59
src/main/resources/mapper/DoctorAdviceMapper.xml

@@ -4,61 +4,61 @@
 
     <!-- 通用查询映射结果 -->
     <resultMap id="BaseResultMap" type="com.diagbot.entity.DoctorAdvice">
-        <id column="doctor_advice_id" property="doctorAdviceId" />
-        <result column="hospital_id" property="hospitalId" />
-        <result column="behospital_code" property="behospitalCode" />
-        <result column="order_doctor_name" property="orderDoctorName" />
-        <result column="frequency" property="frequency" />
-        <result column="parent_type_id" property="parentTypeId" />
-        <result column="doctor_advice_type" property="doctorAdviceType" />
-        <result column="usage_num" property="usageNum" />
-        <result column="usage_unit" property="usageUnit" />
-        <result column="dose" property="dose" />
-        <result column="dose_unit" property="doseUnit" />
-        <result column="med_mode_type" property="medModeType" />
-        <result column="da_frequency" property="daFrequency" />
-        <result column="da_deal_type" property="daDealType" />
-        <result column="da_start_date" property="daStartDate" />
-        <result column="da_item_name" property="daItemName" />
-        <result column="da_status" property="daStatus" />
-        <result column="da_stop_date" property="daStopDate" />
-        <result column="da_group_no" property="daGroupNo" />
-        <result column="da_prescription_type" property="daPrescriptionType" />
-        <result column="medicine_type" property="medicineType" />
-        <result column="da_med_type" property="daMedType" />
-        <result column="doctor_notice" property="doctorNotice" />
-        <result column="doctor_id" property="doctorId" />
-        <result column="doctor_name" property="doctorName" />
-        <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" />
+        <id column="doctor_advice_id" property="doctorAdviceId"/>
+        <result column="hospital_id" property="hospitalId"/>
+        <result column="behospital_code" property="behospitalCode"/>
+        <result column="order_doctor_name" property="orderDoctorName"/>
+        <result column="frequency" property="frequency"/>
+        <result column="parent_type_id" property="parentTypeId"/>
+        <result column="doctor_advice_type" property="doctorAdviceType"/>
+        <result column="usage_num" property="usageNum"/>
+        <result column="usage_unit" property="usageUnit"/>
+        <result column="dose" property="dose"/>
+        <result column="dose_unit" property="doseUnit"/>
+        <result column="med_mode_type" property="medModeType"/>
+        <result column="da_frequency" property="daFrequency"/>
+        <result column="da_deal_type" property="daDealType"/>
+        <result column="da_start_date" property="daStartDate"/>
+        <result column="da_item_name" property="daItemName"/>
+        <result column="da_status" property="daStatus"/>
+        <result column="da_stop_date" property="daStopDate"/>
+        <result column="da_group_no" property="daGroupNo"/>
+        <result column="da_prescription_type" property="daPrescriptionType"/>
+        <result column="medicine_type" property="medicineType"/>
+        <result column="da_med_type" property="daMedType"/>
+        <result column="doctor_notice" property="doctorNotice"/>
+        <result column="doctor_id" property="doctorId"/>
+        <result column="doctor_name" property="doctorName"/>
+        <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>
 
     <select id="getPage" parameterType="com.diagbot.vo.DoctorAdviceVO" resultType="com.diagbot.dto.DoctorAdviceDTO">
         select b.*
         from(
-            SELECT
-            t.doctor_advice_id,
-            t.hospital_id,
-            t.behospital_code,
-            t.doctor_advice_type,
-            t.da_start_date,
-            t.da_stop_date,
-            t.da_item_name,
-            CONCAT( t.da_item_name, '(',DATE_FORMAT( t.da_start_date,'%Y-%m-%d'),')')as info,
-            t.da_prescription_type,
-            t.medicine_type,
-            t.dose,
-            t.dose_unit,
-            t.med_mode_type,
-            t.da_frequency,
-            t.doctor_name
-            FROM
-            `med_doctor_advice` t
-            where
-            t.is_deleted = 'N'
+        SELECT
+        t.doctor_advice_id,
+        t.hospital_id,
+        t.behospital_code,
+        t.doctor_advice_type,
+        t.da_start_date,
+        t.da_stop_date,
+        t.da_item_name,
+        CONCAT( t.da_item_name, '(',DATE_FORMAT( t.da_start_date,'%Y-%m-%d'),')')as info,
+        t.da_prescription_type,
+        t.medicine_type,
+        t.dose,
+        t.dose_unit,
+        t.med_mode_type,
+        t.da_frequency,
+        t.doctor_name
+        FROM
+        `med_doctor_advice` t
+        where
+        t.is_deleted = 'N'
         <if test="doctorAdviceVO.hospitalId != null">
             and t.hospital_id = #{doctorAdviceVO.hospitalId}
         </if>
@@ -77,29 +77,33 @@
         <if test="doctorAdviceVO.daStartDateEnd != null">
             <![CDATA[ and t.da_start_date < #{doctorAdviceVO.daStartDateEnd}]]>
         </if>) b
-         where 1=1
+        where 1=1
         <if test="doctorAdviceVO.adviceType != null and doctorAdviceVO.adviceType == 1">
-            <if test="infos != null and infos.size() != 0">
+            <if test="infos != null and infos.size() > 0">
                 and b.info in
                 <foreach collection="infos" open="(" separator="," close=")" item="item">
                     '${item}'
                 </foreach>
             </if>
-            and b.info in('000000ASDQWEZXC')
+            <if test="infos = null and infos.size() == 0">
+                and b.info in('000000ASDQWEZXC@#$%')
+            </if>
         </if>
         <if test="doctorAdviceVO.adviceType != null and doctorAdviceVO.adviceType == 2 ">
-            <if test="infos != null and infos.size() != 0">
-                and b.info in
+            <if test="infos != null and infos.size() > 0">
+                and b.info not in
                 <foreach collection="infos" open="(" separator="," close=")" item="item">
                     '${item}'
                 </foreach>
             </if>
-            and 1=1
+            <if test="infos = null and infos.size() == 0">
+                and 1=1
+            </if>
         </if>
     </select>
 
 
-
+    <!--    获取质控提示信息-->
     <select id="getInfo" resultType="java.lang.String">
         select b.info
         from
@@ -117,8 +121,9 @@
             and a.behospital_code = #{behospitalCode}
         </if>
     </select>
+
     <update id="updateBatchByKey">
-        <foreach collection="list" item="item"  separator=";">
+        <foreach collection="list" item="item" separator=";">
             update med_doctor_advice
             <set>
                 <if test="item.orderDoctorName != null">
@@ -194,7 +199,8 @@
                     modifier = #{item.modifier},
                 </if>
             </set>
-            where doctor_advice_id = #{item.doctorAdviceId} and hospital_id = #{item.hospitalId} and behospital_code = #{item.behospitalCode}
+            where doctor_advice_id = #{item.doctorAdviceId} and hospital_id = #{item.hospitalId} and behospital_code =
+            #{item.behospitalCode}
         </foreach>
     </update>
 

+ 84 - 0
src/main/resources/mapper/MedPacsInfoMapper.xml

@@ -26,5 +26,89 @@
         <result column="creator" property="creator" />
         <result column="modifier" property="modifier" />
     </resultMap>
+    <select id="getCheckInfo"  resultType="com.diagbot.dto.CheckInfoDTO">
+        select b.*
+        from(
+        SELECT
+        t1.rep_name as checkItemName,
+        t1.rep_type_name as checkItemType,
+        CONCAT( t1.rep_name, '(',DATE_FORMAT( t1.check_date,'%Y-%m-%d'),')')as info,
+        t1.rep_date as rTime,
+        t1.check_date as cTime,
+        t1.apply_doctor as doctorName,
+        t2.hospital_id as hospitalId,
+        t2.behospital_code as behospitalCode,
+        t2.rept_diag as checkResult
+        FROM
+        med_pacs_info t1,
+        med_pacs_result t2
+        WHERE
+        t1.is_deleted = "N"
+        AND t2.is_deleted = "N"
+        AND t1.check_date IS NOT NULL
+        and t1.hospital_id = t2.hospital_id
+        and t1.behospital_code = t2.behospital_code
+        and t1.rep_no = t2.rep_no
+        <if test="checkInfoVO.hospitalId != null">
+            and t1.hospital_id = #{checkInfoVO.hospitalId}
+        </if>
+        <if test="checkInfoVO.behospitalCode != null and checkInfoVO.behospitalCode != ''">
+            and t1.behospital_code = #{checkInfoVO.behospitalCode}
+        </if>
+        <if test="checkInfoVO.checkItemType != null and checkInfoVO.checkItemType != ''">
+            and t1.rep_type_name like CONCAT('%',#{checkInfoVO.checkItemType},'%')
+        </if>
+        <if test="checkInfoVO.checkItemName != null and checkInfoVO.checkItemName != ''">
+            and t1.rep_name like CONCAT('%',#{checkInfoVO.checkItemName},'%')
+        </if>
+        <if test="checkInfoVO.jxDateStart != null">
+            <![CDATA[ AND t1.check_date >= #{checkInfoVO.jxDateStart}]]>
+        </if>
+        <if test="checkInfoVO.jxDateEnd != null">
+            <![CDATA[ AND t1.check_date <= #{checkInfoVO.jxDateEnd}]]>
+        </if>) b
+        where 1=1
+        <if test="checkInfoVO.checkType != null and checkInfoVO.checkType == 1">
+            <if test="infos != null and infos.size() > 0">
+                and b.info in
+                <foreach collection="infos" open="(" separator="," close=")" item="item">
+                    '${item}'
+                </foreach>
+            </if>
+            <if test="infos = null and infos.size() == 0">
+                and b.info in('000000ASDQWEZXC@#$%')
+            </if>
+        </if>
+        <if test="checkInfoVO.checkType != null and checkInfoVO.checkType == 2 ">
+            <if test="infos != null and infos.size() > 0">
+                and b.info not in
+                <foreach collection="infos" open="(" separator="," close=")" item="item">
+                    '${item}'
+                </foreach>
+            </if>
+            <if test="infos = null and infos.size() == 0">
+                and 1=1
+            </if>
+        </if>
+    </select>
+
+    <!--    获取质控提示信息-->
+    <select id="getInfo" resultType="java.lang.String">
+        select b.info
+        from
+        med_behospital_info a,
+        med_qcresult_detail b
+        where
+        a.is_deleted = 'N'
+        and b.is_deleted = 'N'
+        and a.hospital_id = b.hospital_id
+        and a.behospital_code = b.behospital_code
+        <if test="hospitalId != null">
+            and a.hospital_id = #{hospitalId}
+        </if>
+        <if test="behospitalCode != null and behospitalCode != ''">
+            and a.behospital_code = #{behospitalCode}
+        </if>
+    </select>
 
 </mapper>