package com.yeejoin.amos.boot.module.elevator.api.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.elevator.api.dto.*;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;

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

/**
 * 警情接警填报记录接口类
 *
 * @author litw
 * @date 2021-08-03
 */
public interface IAlertCalledService {

    /**
     *
     * 根据灾情id 查询灾情详情
     *
     * **/
    Object selectAlertCalledById(Long id);

    /**
     *
     * 根据警情返回信息，不读取缓存
     *
     * **/
    AlertCalledFormDto selectAlertCalledByIdNoCache(Long id);

    /**
     * 根据查询条件返回警情记录
     * @param workOrderNumber
     * @return
     */
    Page<AlertCalledQueryDto> queryAlertListByQueryDto(IPage<AlertCalledQueryDto> page,
                                                       String workOrderNumber,
                                                       String creator,
                                                       String emergency,
                                                       String emergencyTimeStart,
                                                       String emergencyTimeEnd,
                                                       String emergencyCall,
                                                       String deviceId,
                                                       String elevatorAddress,
                                                       String district,
                                                       String alertType,
                                                       String alertSource,
                                                       String alertStage,
                                                       String alertStatus,
                                                       String sortParam,
                                                       String sortRule,
                                                       List<String> ids,
                                                       AgencyUserModel userModel);

    /**
     * 更新警情阶段信息
     * @param alertCalledVo
     * @param stage
     * @return
     */
    Boolean updateAlertStage(AlertCalledDto alertCalledVo, DispatchPaperEnums stage,Long alertId);



    AlertHandlerDto getHandlerInfo(String alertId);

    Object getCalledInfo();

    WechatMyBussinessDto getBussinessInfoById(Long alertId);

    List<WechatMyBusinessListDto> getBussinessListByPhonePager(String phone, String bussinessCode, Long current);

    /**
     * 根据条件筛选 接警记录
     * @param callTimeStart
     * @param callTimeEnd
     * @param type
     * @param alertSource
     * @param alarmType
     * @return
     */
    List<AlertCalledRecordDto> queryAlertRecordListByQueryDto(String callTimeStart, String callTimeEnd, String type, String alertSource, String alarmType, String groupCode, List<String> ids);

    /**
     * 获取坐席信息
     * @return
     */
    List<TzsCitInfoDto> getSeatInfos();

    List<AlertPaperInfoDto> getEquipmentHistory(List<String> useRegionCode, String equipmentClassCode, Integer current, Integer pageNum, String equipmentCode);

    Integer getEquipmentHistoryCount(List<String> useRegionCode, String equipmentClassCode, String equipmentCode);

    /**
     * 生成工单号
     * @return
     */
    String nextId();

    AlarmStatisticsDto getAlertStatistics(ReginParams reginParams);
}
