| | |
| | | |
| | | <!--查询单台设备最后时间段记录(非报警)--> |
| | | <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> |
| | | |
| | | <!--查询设备单日运行状态时间段记录--> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!--查询时间段内运行数据--> |
| | | <select id="selectRunningData" resultType="org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | mdc_equipment_running_section |
| | | WHERE |
| | | equipment_id = #{ equipmentId } |
| | | AND status = '3' |
| | | AND (start_time <= #{ endDate } AND end_time >= #{ startDate }) |
| | | ORDER BY |
| | | start_time |
| | | </select> |
| | | |
| | | <!--查询报警号报警详细信息--> |
| | | <select id="selectAlarmList" resultType="org.jeecg.modules.mdc.dto.MdcAlarmListDto"> |
| | | SELECT |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getDataList" resultType="java.lang.Integer"> |
| | | SELECT |
| | | status |
| | | FROM |
| | | mdc_equipment_running_section |
| | | WHERE |
| | | equipment_id = #{ equipmentId } |
| | | AND start_time > #{date} |
| | | AND status IS NOT NULL |
| | | </select> |
| | | |
| | | |
| | | </mapper> |