package org.jeecg.modules.mdc.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Param; import org.jeecg.modules.mdc.dto.MdcAlarmListDto; import org.jeecg.modules.mdc.entity.MdcEquipmentRunningSection; import org.jeecg.modules.mdc.vo.MdcAlarmAnalyzeQueryVo; import java.util.Date; import java.util.List; /** * @Description: 设备运行时段状态表 * @Author: jeecg-boot * @Date: 2023-04-13 * @Version: V1.0 */ public interface MdcEquipmentRunningSectionMapper extends BaseMapper { /** * 获取计算段时间后的最后一条记录(非报警) */ MdcEquipmentRunningSection getMaxNormal(@Param("equipmentId") String equipmentId); /** * 获取计算段时间后的最后一条记录(报警) */ MdcEquipmentRunningSection getMaxError(@Param("equipmentId") String equipmentId); /** * 获取设备运行记录最早的数据 */ MdcEquipmentRunningSection getFirstData(@Param("equipmentId") String equipmentId); /** * 查询设备单日运行状态时间段记录 */ List listForEquipmentStatisticalInfo(@Param("equipmentId") String equipmentId, @Param("startDate") Date startDate, @Param("endDate") Date endDate); /** * 计算一段时间内的数据 */ List listEquipmentRunningSection(@Param("equipmentId") String equipmentid, @Param("startLong") long start, @Param("endLong") long end); /** * 计算一段时间内的运行数据 */ List listEquipmentRunningSectionRun(@Param("equipmentId") String equipmentid, @Param("startLong") long start, @Param("endLong") long end); /** * 计算一段时间内的故障数据 */ List listEquipmentRunningSectionError(@Param("equipmentId") String equipmentid, @Param("startLong") long start, @Param("endLong") long end); /** * 查询一段时间内的报警数据 */ List findAlarmList(@Param("vo") MdcAlarmAnalyzeQueryVo vo); /** * 查询数量 */ Integer findAlarmCount(@Param("equipmentId") String equipmentId, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("alarmCode") String alarmCode); /** * 根据日期查询数量 */ Integer findAlarmCountByDate(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("vo") MdcAlarmAnalyzeQueryVo vo); /** * 查询时间段内运行数据 */ List selectRunningData(@Param("equipmentId") String equipmentId, @Param("startDate") Date startDate, @Param("endDate") Date endDate); List selectAlarmList(@Param("vo") MdcAlarmAnalyzeQueryVo mdcAlarmAnalyzeQueryVo, @Param("startDate") String startDate, @Param("endDate") String endDate); List getDataList(@Param("equipmentId") String equipmentId, @Param("date") Date date); }