| | |
| | | <select id="selectEqCg" resultType="Integer"> |
| | | select COUNT(*) from sys_equipment where heartbeat >= DATE_SUB(NOW(),INTERVAL 1 DAY) and dtype=3 |
| | | </select> |
| | | |
| | | <!--查询所有的设备,不包含故障和警情状态--> |
| | | <select id="selAllEq" resultType="org.springblade.jfpt.equipment.entity.Equipment"> |
| | | select id,dtype,heartbeat from sys_equipment where dtype!=2 and dtype!=3 |
| | | </select> |
| | | |
| | | <!--批量更新设备状态改为在线--> |
| | | <update id="updateEqListz" parameterType="java.util.Map"> |
| | | UPDATE sys_equipment |
| | | SET dtype = 1 |
| | | WHERE id IN |
| | | <foreach collection="equipmentListz" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <!--批量更新设备状态改为离线--> |
| | | <update id="updateEqListl" parameterType="java.util.Map"> |
| | | UPDATE sys_equipment |
| | | SET dtype = 0 |
| | | WHERE id IN |
| | | <foreach collection="equipmentListl" index="index" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </update> |
| | | </mapper> |