package com.yeejoin.equipmanage.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.equipmanage.common.datasync.entity.FireEquipmentFireAlarm;
import com.yeejoin.equipmanage.common.dto.OrgUsrDto;
import com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarm;
import com.yeejoin.equipmanage.common.entity.dto.AlarmDTO;
import com.yeejoin.equipmanage.common.entity.dto.EquipSpecificAlarmDTO;
import com.yeejoin.equipmanage.common.utils.CommonPageInfoParam;
import com.yeejoin.equipmanage.common.vo.AlarmDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmEquipMockDataVO;
import com.yeejoin.equipmanage.common.vo.AlarmListDataVO;
import com.yeejoin.equipmanage.common.vo.TopographyAlarmVo;

import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author keyong
 * @title: IEquipmentSpecificAlarmService
 * <pre>
 * @description: TODO
 * </pre>
 * @date 2020/11/2 15:13
 */
public interface IEquipmentSpecificAlarmService extends IService<EquipmentSpecificAlarm> {

    Page<Map<String, Object>> listPage(CommonPageInfoParam param);

    void handleExport(HttpServletResponse response, List<Long> ids, String alarmType);

    List<HashMap<String, Object>> getColumn(String alarmType);

    List<AlarmDataVO> getAlarmDetailById(Long id, String alarmType);

    AlarmEquipMockDataVO getEquipmentDetailById(Long id, String alarmType);

    Map<String, Object> detail(Long id);

    List<FireEquipmentFireAlarm> getFireEquipAlarmDetailsByAlarmId(List<Long> specificAlarmIds, List<Long> equipIndexIds);

    org.springframework.data.domain.Page<AlarmListDataVO> listAlarmsPage(CommonPageInfoParam param);


    org.springframework.data.domain.Page<TopographyAlarmVo> listAlarmsPageForTopography(CommonPageInfoParam param);

    Map<String, Object> getSpecificInfoById(Long id);

    Map<String, Object> getSpecificInfoByCode(String code);

    int getCountAlarmEquipment();

    int getCountEquipment();

    List<Map<String, Object>> getCountAlarm();

    Page<EquipSpecificAlarmDTO> getAlarmPage(Page page, AlarmDTO dto);

    Page<EquipSpecificAlarmDTO> getEqPage(Page page, AlarmDTO dto);

    List<OrgUsrDto> getConfirmUser();



    //各种类型统计
    Integer getcountAlarmtype(String tyep);

    //统计已处理和未处理
    Integer getcountAlarmHandle(String tyep);
    
    /**
     * 
     * <pre>
     * 根据装备id和查询指定状态告警数据
     * </pre>
     *
     * @param status
     * @param equipmentSpecificId
     * @return
     */
    List<EquipmentSpecificAlarm> getEquipListBySpecific(Boolean status, Long equipmentSpecificId);

}
