| 1234567891011121314151617181920212223242526272829303132333435 |
- <?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.xunmei.iot.mapper.IotDayWorkMapper">
- <select id="selectLoopList" resultType="com.xunmei.common.core.domain.work.vo.WorkControlVo">
- select d.device_product as productName,
- d.device_name AS object_name,
- d.`device_code` AS device_name,
- d.id AS zone_id,
- s.state AS object_status,
- s.state_update_time as object_time
- from iot_device_info d
- inner JOIN iot_device_status s ON d.device_product = s.device_product and d.device_code = s.device_code
- where d.device_product = 'FSU_DoPowerCollection'
- AND (d.`device_code` LIKE CONCAT('%', '41860001') OR d.`device_code` LIKE CONCAT('%', '41860002'))
- and d.org_id=#{orgId}
- and d.deleted = 0
- and s.org_id=#{orgId}
- </select>
- <select id="selectUPSList" resultType="com.xunmei.common.core.domain.work.vo.WorkControlVo">
- select
- a.device_product as productName,
- a.device_name,
- a.id as zone_id,
- a.object_name,
- b.state as object_status
- from
- (select id,device_product,`device_code` as device_name,`device_name` as object_name from iot_device_info where device_product = 'FSU_Ups' ) a
- LEFT JOIN iot_device_status b on a.device_product = b.device_product and a.device_name=b.device_code
- where b.info LIKE CONCAT('%','电池电压低告警','%')
- </select>
- </mapper>
|