| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?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.coffee.bus.mapper.BusDeviceManualMapper">
- <resultMap id="monitorResult" type="com.coffee.bus.service.dto.ManualMonitorResult">
- <result column="patient_code" property="patientCode"/>
- <result column="patient_name" property="patientName"/>
- <result column="patient_age" property="patientAge"/>
- <result column="patient_gender" property="patientGender"/>
- <result column="ward" property="ward"/>
- <result column="bed_no" property="bedNo"/>
- <result column="surgery_name" property="surgeryName"/>
- <result column="ana_doctor" property="anaDoctor"/>
- <result column="start_time" property="startTime"/>
- <result column="monitor_start_time" property="monitorStartTime"/>
- <result column="device_type" property="deviceType"/>
- <result column="clinic_id" property="clinicId"/>
- </resultMap>
- <select id="selectMonitor" resultMap="monitorResult" parameterType="com.coffee.bus.service.dto.ManualMonitorQuery">
- select
- c.patient_code as patient_code,
- c.patient_name as patient_name,
- c.patient_gender as patient_gender,
- c.patient_age as patient_age,
- c.monitor_start_time as monitor_start_time,
- c.id as clinic_id,
- c.ward as ward,
- c.bed_no as bed_no,
- c.`name` as surgery_name,
- c.ana_doctor as ana_doctor,
- c.start_time as start_time,
- IFNULL(dm.type,-1) as device_type
- from
- (select * from bus_clinic where monitor_type=0 and finished=0 ) as c
- left JOIN bus_device_manual as dm on c.id=dm.clinic_id
- <where>
- <if test="query.blurry != null">
- (
- c.`bed_no` like concat('%', #{query.blurry}, '%') or c.`patient_code` like concat('%', #{query.blurry}, '%') or c.ward LIKE concat('%', #{query.blurry}, '%') OR c.patient_name LIKE concat('%', #{query.blurry}, '%')
- )
- </if>
- <if test="query.types != null and query.types.size > 0">
- and type in
- <foreach item="type" index="index" collection="query.types" open="(" separator="," close=")">
- #{type, jdbcType=VARCHAR}
- </foreach>
- </if>
- </where>
- </select>
- </mapper>
|