package com.ozs.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ozs.entity.MsgAlarm;
import com.ozs.entity.vo.AlarmFreqArea;
import com.ozs.entity.vo.AlarmStatisticDto;
import com.ozs.entity.vo.AlarmStatisticMonthDto;
import com.ozs.entity.vo.MsgAlarmVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 报警信息表 Mapper 接口
 * </p>
 *
 * @author ozs
 * @since 2023-02-22
 */
@Mapper
public interface MsgAlarmMapper extends BaseMapper<MsgAlarm> {
    //报警数据详情
    List<AlarmStatisticDto> list(@Param("railwayCode") String railwayCode, @Param("currentYear") Integer currentYear, @Param("currentMonth") Integer currentMonth);

    //报警月统计数据导出数据集合
    List<AlarmStatisticMonthDto> listDtoMonth(@Param("railwayCode") String railwayCode, @Param("currentYear") Integer currentYear, @Param("currentMonth") Integer currentMonth);

    //报警月统计数据导出数据集合（天）
    List<AlarmStatisticMonthDto> listDtoDay(@Param("railwayCode") String railwayCode, @Param("currentYear") Integer currentYear, @Param("currentMonth") Integer currentMonth);

    //数据统计-灾害占比
    List<AlarmStatisticMonthDto> alarmTypeCount(@Param("railwayCode") String railwayCode, @Param("currentYear") Integer currentYear, @Param("currentMonth") Integer currentMonth);

    //数据统计-频繁出现灾害地点排名
    List<AlarmFreqArea> alarmTypeAreaCount(@Param("railwayCode") String railwayCode, @Param("currentYear") Integer currentYear, @Param("currentMonth") Integer currentMonth);

    Long getAlarmNum();

    Integer selectCameraCode(@Param("cameraCode") String cameraCode);

    MsgAlarm selectByCameraCode(@Param("cameraCode") String cameraCode);


    List<MsgAlarm> selectMsgAlarmList(MsgAlarmVo msgAlarmVo);

    MsgAlarm getByAlarmId(@Param("alarmId") String alarmId);

    Integer countMsg(MsgAlarmVo msgAlarmVo);

    Integer countJC(MsgAlarmVo msgAlarmVo);

    Integer countWJC(MsgAlarmVo msgAlarmVo);
}
