<?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>
|