| | |
| | | |
| | | <!--查询设备在线数量--> |
| | | <select id="selectEqCz" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=1 |
| | | </select> |
| | | |
| | | <!--查询设备掉线数量--> |
| | | <select id="selectEqCd" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat < DATE_SUB(NOW(),INTERVAL 1 DAY) |
| | | select COUNT(*) from sys_equipment where heartbeat < DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=0 |
| | | </select> |
| | | |
| | | <!--查询预警设备数量--> |
| | |
| | | deviceNumber |
| | | </select> |
| | | |
| | | |
| | | <!--查询预警设备数量--> |
| | | <select id="selectEqCys" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=2 |
| | | </select> |
| | | |
| | | <!--查询设故障数量--> |
| | | <select id="selectEqCg" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and state!=null |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=3 |
| | | </select> |
| | | </mapper> |