IotDayWorkMapper.xml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.xunmei.iot.mapper.IotDayWorkMapper">
  4. <select id="selectLoopList" resultType="com.xunmei.common.core.domain.work.vo.WorkControlVo">
  5. select d.device_product as productName,
  6. d.device_name AS object_name,
  7. d.`device_code` AS device_name,
  8. d.id AS zone_id,
  9. s.state AS object_status,
  10. s.state_update_time as object_time
  11. from iot_device_info d
  12. inner JOIN iot_device_status s ON d.device_product = s.device_product and d.device_code = s.device_code
  13. where d.device_product = 'FSU_DoPowerCollection'
  14. AND (d.`device_code` LIKE CONCAT('%', '41860001') OR d.`device_code` LIKE CONCAT('%', '41860002'))
  15. and d.org_id=#{orgId}
  16. and d.deleted = 0
  17. and s.org_id=#{orgId}
  18. </select>
  19. <select id="selectUPSList" resultType="com.xunmei.common.core.domain.work.vo.WorkControlVo">
  20. select
  21. a.device_product as productName,
  22. a.device_name,
  23. a.id as zone_id,
  24. a.object_name,
  25. b.state as object_status
  26. from
  27. (select id,device_product,`device_code` as device_name,`device_name` as object_name from iot_device_info where device_product = 'FSU_Ups' ) a
  28. LEFT JOIN iot_device_status b on a.device_product = b.device_product and a.device_name=b.device_code
  29. where b.info LIKE CONCAT('%','电池电压低告警','%')
  30. </select>
  31. </mapper>