package com.cpp.web.service.alarm;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cpp.web.domain.Alarm.AbnormalAlarm;
import com.cpp.web.domain.enums.AlarmEnum;

import java.util.Date;
import java.util.Map;

/**
 * 告警信息业务层接口
 *
 * @author tl
 * @date 2022-05-11 09:51:21
 */
public interface AbnormalAlarmService extends IService<AbnormalAlarm> {

    QueryWrapper<AbnormalAlarm> findByTimeBetweenAndAlarmTypeAndStationCode(Date startTime, Date endTime, AlarmEnum alarmType, String stationCode);

    Boolean updateStationStatus1(String stationCode);

    Long countByStatusAndStationCode(Integer status, String stationCode);


    /**
     * 提供给首页告警的方法
     * @return
     */
    QueryWrapper<AbnormalAlarm> dashboard(AlarmEnum alarmType);

    /**
     * 提供给首页得告警未确认数量
     * @return
     */
    Long alarmCountStatus1();


    Boolean updateAllStatus1();

    Boolean updateStatus1ById(Long id);
}
