医院废弃物信息化管理平台
“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
<?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.MwWarningConfigItemPlatformMapper">
 
    <select id="listByType" resultType="cn.besteam.modules.medical.vo.MwWarningConfigItemPlatformVO">
        SELECT
        wc.id,
        wc.type,
        wc.custom_value,
        wc.update_time AS updateTime,
        wc.expiration_time AS expirationTime,
        CASE
        WHEN wc.apply_type = 2 THEN
        de.item_text ELSE wc.custom_value
        END AS customValueText,
        de.item_value AS description,
        wc.waste_type,
        wc.custom_department_id,
        wc.apply_type AS applyType,
        wc.remarks,
        sh.depart_name AS customDepartmentName,
        di.item_text AS wasteTypeName
        FROM
        mw_warning_config_item_platform wc
        LEFT JOIN sys_department sh ON sh.id = wc.custom_department_id
        LEFT JOIN sys_dict_item di ON di.id = wc.waste_type
        LEFT JOIN sys_dict_item de ON de.id = wc.custom_value
        where wc.type = #{type} and wc.status = 1
        <if test="departmentIdList != null and departmentIdList.size > 0">
            and wc.custom_department_id in
            <foreach collection="departmentIdList" open="(" close=")" separator="," item="temp">
                #{temp}
            </foreach>
        </if>
        order by wc.create_time desc
    </select>
</mapper>