医院废弃物信息化管理平台
“mitao”
2026-01-14 ce8e86e7045a6eadc2f06d3cd1af90d22b04fdd0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?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="cn.besteam.modules.medical.mapper.MwDisinfectRecordMapper">
 
 
    <select id="queryPageList" resultType="cn.besteam.modules.medical.vo.MwDisinfectRecordVo">
        select dr.*, da.name as disinfect_address
        from mw_disinfect_record dr
        left join mw_disinfect_address da on dr.disinfect_address_id = da.id and da.del_flag = 0
        <where>
            and dr.del_flag = 0
            <if test="dto.hospitalIdList != null and dto.hospitalIdList.size > 0 ">
                and dr.hospital_id in
                <foreach collection="dto.hospitalIdList" item="tempId" open="(" close=")" separator=",">
                    #{tempId}
                </foreach>
            </if>
            <if test="dto.disinfectTypeId!=null">
                and dr.disinfect_type_id = #{dto.disinfectTypeId}
            </if>
            <if test="dto.disinfectAddress != null and dto.disinfectAddress != ''">
                and da.name like concat('%', #{dto.disinfectAddress}, '%')
            </if>
            <if test="dto.startTime !=null">
                <![CDATA[
                  and date_format( dr.disinfect_time, '%Y-%m-%d %H:%i:%s' ) >= date_format( #{dto.startTime} , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
            <if test="dto.endTime !=null">
                <![CDATA[
                  and date_format( dr.disinfect_time, '%Y-%m-%d %H:%i:%s' ) <= date_format( #{dto.endTime}   , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
        </where>
        order by  dr.disinfect_time desc
    </select>
 
    <select id="queryExportList" resultType="cn.besteam.modules.medical.vo.MwDisinfectRecordVo">
        select dr.*, da.name as disinfect_address
        from mw_disinfect_record dr
        left join mw_disinfect_address da on dr.disinfect_address_id = da.id and da.del_flag = 0
        <where>
            and dr.del_flag = 0
            <if test="dto.hospitalIdList != null and dto.hospitalIdList.size > 0 ">
                and dr.hospital_id in
                <foreach collection="dto.hospitalIdList" item="tempId" open="(" close=")" separator=",">
                    #{tempId}
                </foreach>
            </if>
            <if test="dto.disinfectTypeId!=null">
                and dr.disinfect_type_id = #{dto.disinfectTypeId}
            </if>
            <if test="dto.disinfectAddress != null and dto.disinfectAddress != ''">
                and da.name like concat('%', #{dto.disinfectAddress}, '%')
            </if>
            <if test="dto.startTime !=null">
                <![CDATA[
                  and date_format( dr.disinfect_time, '%Y-%m-%d %H:%i:%s' ) >= date_format( #{dto.startTime} , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
            <if test="dto.endTime !=null">
                <![CDATA[
                  and date_format( dr.disinfect_time, '%Y-%m-%d %H:%i:%s' ) <= date_format( #{dto.endTime}   , '%Y-%m-%d %H:%i:%s' )
                ]]>
            </if>
        </where>
        order by  dr.disinfect_time desc
    </select>
</mapper>