package com.njcn.service.data;

import com.njcn.pojo.commons.EventEigDetail;
import com.njcn.pojo.commons.EventInfoDetail;
import com.njcn.pojo.commons.area.ReasonStatisc;
import com.njcn.pojo.data.EventDetail;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface EventDetailService {
    List<EventDetail> queryZj(String startTime,String endTime,
                             String start,String end,Long linesIndex);

    //获取暂降事件列表
    List<EventDetail> getVolList(Date startTime, Date endTime, String area, String type,BigDecimal minfuzhi,
                                 BigDecimal maxfuzhi, BigDecimal mintime, BigDecimal maxtime,
                                 BigDecimal minseverity, BigDecimal maxseverity, List<String> eventType, List<String> eventReason, List<Integer> triggerType, Integer fileflag);

   /* List<EventDetail> getVolList2(Date startTime, Date endTime, String area, String type, BigDecimal minfuzhi,
                                 BigDecimal maxfuzhi, BigDecimal mintime, BigDecimal maxtime,
                                 BigDecimal minseverity, BigDecimal maxseverity, String eventType, String eventReason, Integer triggerType, Integer fileflag);*/

    List<EventDetail> getVolListByType(Date startTime, Date endTime, String area,String type,String evnetType,BigDecimal minfuzhi,
                                       BigDecimal maxfuzhi, BigDecimal mintime, BigDecimal maxtime,
                                       BigDecimal minseverity, BigDecimal maxseverity, List<String> eventType, List<String> eventReason, List<Integer> triggerType, Integer fileflag);

    EventDetail selectByIndex(String index);

    //统计时间段内的暂降原因次数、暂降类型次数
    ReasonStatisc getVolStatisticsCounts(String area,Date startTime, Date endTime);

    //首页获取终端异常
    List<List> getrunevent();

    //离线数据获取，指定条件范围内的暂降事件详细内容
    Boolean getEventDetailList(String area, Date startTime, Date endTime) throws FileNotFoundException;

    //离线数据获取，获取文件路径
    Map<String,List<String>> getEventDetailIndexList(String area, Date startTime, Date endTime);

    //将文件流转为数据存入库中
    Boolean dealWithData(MultipartFile inputStream);

    //根据上传的波形文件，解析并绑定到传入进来的监测点索引
    Boolean dealWithWaveData(MultipartFile file, String lineIndex);

    //将路径中的文件，根据监测点保存暂降日志入库
    void saveEventDetail(String lineIndex, List<String> paths);
    
    List<EventEigDetail> eventDetailEigenvalue(String eventDetailIndex) throws Exception;
    EventInfoDetail eventDetailBaseInfoByIndex(String eventdetailIndex);
}
