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