| | |
| | | |
| | | <!--查询单台设备最后时间段记录(非报警)--> |
| | | <select id="getMaxNormal" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection"> |
| | | SELECT TOP 1 * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} AND status <![CDATA[ <> ]]> '22' ORDER BY end_time DESC |
| | | SELECT * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} AND status <![CDATA[ <> ]]> '22' ORDER BY end_time DESC LIMIT 1 |
| | | </select> |
| | | |
| | | <!--获取计算段时间后的最后一条记录(报警)--> |
| | | <select id="getMaxError" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection"> |
| | | SELECT TOP 1 * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} AND status = '22' ORDER BY end_time DESC |
| | | SELECT * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} AND status = '22' ORDER BY end_time DESC LIMIT 1 |
| | | </select> |
| | | |
| | | <!--获取设备运行记录最早的数据--> |
| | | <select id="getFirstData" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection"> |
| | | SELECT TOP 1 * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} ORDER BY start_time |
| | | SELECT * FROM mdc_equipment_running_section WHERE equipment_id = #{equipmentId} ORDER BY start_time LIMIT 1 |
| | | </select> |
| | | |
| | | <!--查询设备单日运行状态时间段记录--> |