医院废弃物信息化管理平台
“mitao”
2025-12-24 3763145f34d7706923d55edc32f5cfbc8bc08b92
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
<?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.MwTransitConfigMapper">
 
    <!-- 获取出库-运输配置数据列表 -->
    <select id="getMwTransitConfigList" resultType="cn.besteam.modules.medical.vo.MwTransitConfigVO">
        SELECT
          con.id,
          con.engine_driver,
          con.license_plate,
          con.transit_company,
          con.waste_type,
          con.waste_type as wasteTypeId,
          con.hospital_id,
          dep.parent_id as department_id,
          dep.depart_name AS hospitalName
        FROM
          mw_transit_config con
          LEFT JOIN sys_department dep ON dep.id = con.hospital_id
        WHERE
              1 = 1
          <if test="param.hospitalIdList != null and param.hospitalIdList.size > 0 ">
              and dep.id in
              <foreach collection="param.hospitalIdList" item="tempId" open="(" close=")" separator=",">
                  #{tempId}
              </foreach>
          </if>
          <if test="param.hospitalName != null and param.hospitalName != ''">
              AND dep.depart_name LIKE CONCAT('%', #{param.hospitalName}, '%')
          </if>
          <!--<if test="param.hospitalId != null">
              AND dep.id = #{param.hospitalId}
          </if>-->
          <if test="param.keyWord !=null and param.keyWord !='' ">
            and (
              con.engine_driver LIKE CONCAT('%', #{param.keyWord}, '%')
              or
              con.license_plate LIKE CONCAT('%', #{param.keyWord}, '%')
              or
              con.transit_company LIKE CONCAT('%', #{param.keyWord}, '%')
              )
          </if>
          <if test="param.engineDriver != null and param.engineDriver != ''">
              AND con.engine_driver LIKE CONCAT('%', #{param.engineDriver}, '%')
          </if>
          <if test="param.licensePlate != null and param.licensePlate != ''">
              AND con.license_plate LIKE CONCAT('%', #{param.licensePlate}, '%')
          </if>
          <if test="param.transitCompany != null and param.transitCompany != ''">
              AND con.transit_company LIKE CONCAT('%', #{param.transitCompany}, '%')
          </if>
        ORDER BY
          con.create_time DESC
    </select>
</mapper>