24 lines
1.3 KiB
XML
24 lines
1.3 KiB
XML
<?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="com.securitycontrol.screen.mapper.SjTwoPageMapper">
|
|
|
|
<!--环境检测数据数值-->
|
|
<select id="getEnvironmentList" resultType="com.securitycontrol.entity.screen.vo.DeviceValueVo">
|
|
select bd.bd_name bdName,dev.device_name deviceName ,detail.mode_name modelName,
|
|
detail.device_code,his.val,his.create_time createTime,his.is_warn isWarn,his.unit unit,his.change_val changeVal
|
|
from tb_pro_bd bd
|
|
left join tb_bd_device dev on dev.bd_id=bd.id
|
|
left join tb_device_detail detail on detail.device_id=dev.device_id
|
|
LEFT join tb_his_device_value his on his.attribute_id=detail.id
|
|
where dev.devic_type=#{deviceType} and bd.bid_code=#{bidCode}
|
|
<if test="modelName!=null and modelName!=''">
|
|
and detail.mode_name like concat('%',#{modelName},'%')
|
|
</if>
|
|
<if test="modelName!=null and modelName!=''">
|
|
and his.create_time between #{startTime} and #{endTime}
|
|
</if>
|
|
<if test="deviceName!=null and deviceName!=''">
|
|
and dev.device_name like concat('%',#{deviceName},'%')
|
|
</if>
|
|
</select>
|
|
</mapper> |