package com.casic.missiles.modular.system.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.casic.missiles.modular.system.dto.AlarmNowView;
import com.casic.missiles.core.datascope.DataScope;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author casic123
 * @since 2019-05-17
 */
public interface AlarmNowViewMapper extends BaseMapper<AlarmNowView> {

    List<AlarmNowView> getNowAlarmRecords(@Param("scope") DataScope dataScope, @Param("alarmType") String alarmType,
                                          @Param("deviceType") Long deviceType);

    List<AlarmNowView> getAlarmsByWell(@Param("id") Long id);

    List<Map<String, Object>> staticsAlarmsByDay(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("deptIds") String deptIds);

    Map<String, Object> countAlarmsByDay(@Param("date") String date, @Param("deptIds") String deptIds);
}
