智慧厨房
This commit is contained in:
parent
285c18aa05
commit
edd2a6053d
|
|
@ -46,16 +46,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="subPlace != null "> and kdsr.sub_place = #{subPlace}</if>
|
<if test="subPlace != null "> and kdsr.sub_place = #{subPlace}</if>
|
||||||
<if test="canteenId != null "> and kdsr.canteen_id = #{canteenId}</if>
|
<if test="canteenId != null "> and kdsr.canteen_id = #{canteenId}</if>
|
||||||
<if test="areaId != null "> and kdsr.area_id = #{areaId}</if>
|
<if test="areaId != null "> and kdsr.area_id = #{areaId}</if>
|
||||||
|
|
||||||
<if test="sensorResultTypeList != null and sensorResultTypeList.size() > 0">
|
<if test="sensorResultTypeList != null and sensorResultTypeList.size() > 0">
|
||||||
and (
|
and (
|
||||||
<foreach item="type" collection="sensorResultTypeList" open="(" separator="," close=")">
|
<foreach item="type" collection="sensorResultTypeList" separator=" or ">
|
||||||
case when
|
<choose>
|
||||||
|
<when test="type == 1">
|
||||||
|
((kdsm.measure_code = 'temperature'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value)
|
||||||
|
or (kdsm.measure_code = 'humidity'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data between kdsm.measure_min_value and kdsm.measure_max_value)
|
||||||
|
or (kdsm.measure_code = 'smoke'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ <= ]]> kdsm.measure_max_value)
|
||||||
|
)
|
||||||
|
</when>
|
||||||
|
<when test="type == 2">
|
||||||
|
(kdsm.measure_code = 'temperature'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||||
|
</when>
|
||||||
|
<when test="type == 3">
|
||||||
|
(kdsm.measure_code = 'temperature'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ < ]]> kdsm.measure_min_value)
|
||||||
|
</when>
|
||||||
|
<when test="type == 4">
|
||||||
|
(kdsm.measure_code = 'humidity'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||||
|
</when>
|
||||||
|
<when test="type == 5">
|
||||||
|
(kdsm.measure_code = 'humidity'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ < ]]> kdsm.measure_min_value)
|
||||||
|
</when>
|
||||||
|
<when test="type == 6">
|
||||||
|
(kdsm.measure_code = 'smoke'
|
||||||
|
and kdsm.measure_type = 1
|
||||||
|
and kdsr.measure_data <![CDATA[ > ]]> kdsm.measure_max_value)
|
||||||
|
</when>
|
||||||
|
</choose>
|
||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
|
|
||||||
<if test="searchValue != null and searchValue != ''">
|
<if test="searchValue != null and searchValue != ''">
|
||||||
and (kdsr.device_id like CONCAT('%',#{searchValue},'%')
|
and (kdsr.device_id like CONCAT('%',#{searchValue},'%')
|
||||||
or kdi.device_name like CONCAT('%',#{searchValue},'%')
|
or kdi.device_name like CONCAT('%',#{searchValue},'%')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue