| | |
| | | update sys_equipment SET state=#{state},reason=#{reason} where deviceNumber=#{deviceNumber} |
| | | </update> |
| | | |
| | | <!--查询设备在线数量--> |
| | | <select id="selectEqCz" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) |
| | | </select> |
| | | |
| | | <!--查询设备掉线数量--> |
| | | <select id="selectEqCd" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat < DATE_SUB(NOW(),INTERVAL 1 DAY) |
| | | </select> |
| | | |
| | | <!--查询预警设备数量--> |
| | | <select id="selectEqCy" resultType="java.util.HashMap"> |
| | | SELECT COUNT(deviceNumber) as cou,deviceNumber FROM `sys_alarm` WHERE alarmTime like concat(concat('%', #{time}), '%') and waringType NOT IN("系统测试","主机重新上电") group by deviceNumber |
| | | </select> |
| | | |
| | | <!--查询设故障数量--> |
| | | <select id="selectEqCg" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and state!=null |
| | | </select> |
| | | </mapper> |