package com.inspect.analysis.service;

import com.inspect.analysis.domain.AlgPatrolPoint;
import com.inspect.analysis.domain.AnalyseSummaryAlarmModel;
import com.inspect.analysis.domain.ResultAnalysis;
import com.inspect.analysis.domain.ResultAnalysisSummaryDTO;
import com.inspect.partrolresult.domain.PatrolResult;
import com.inspect.task.domain.PatrolData;

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

public interface IResultAnalysisService {
    ResultAnalysis selectResultAnalysisByLineId(Long lineId);

    int selectResultAnalysisByMainId(Long mainId);

    int selectResultAnalysisByMainIds(List<Long> mainIds);

    List<ResultAnalysis> selectResultAnalysisList(ResultAnalysis resultAnalysis);

    List<ResultAnalysis> selectResultAnalysisListByMainId(ResultAnalysis mainId);

    List<PatrolResult> selectResultAnd(ResultAnalysis resultAnalysis);

    Map<String, String> selectAlgorithmInfo(String key);

    Map<String, String> selectDeviceInfo(String key);

    Map<String, String> selectPointInfoById(String id);

    List<Map<String, String>> selectChannelByEqId(String eqId);

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

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

    List<Map<String, Object>> selectEqInfoBySendCode(String sendCode);

    Map<String, String> selectStaPointInfoById(String id);

    int insertResultAnalysis(ResultAnalysis resultAnalysis);

    int updateResultAnalysis(ResultAnalysis resultAnalysis);

    int deleteResultAnalysisByLineIds(Long[] lineIds);

    int deleteResultAnalysisByLineId(Long lineId);

    ResultAnalysis selectTaskAbnormalData(ResultAnalysis resultAnalysis);

    Map<String, ResultAnalysis> selectTaskAbnormalDataBatch(List<String> taskPatrolledIds);

    List<AlgPatrolPoint> selectResultAnalyseForAlarm(AnalyseSummaryAlarmModel alarmModel);

    List<PatrolData> selectResultAnalysisListForAlarm(AnalyseSummaryAlarmModel alarmModel);

    List<ResultAnalysis> selectResultAnalysisListBatch(List<String> taskPatrolIds, String resultType);

    Long getDefectCountGroupByPoint(String defectFilter, String defectIsToday, String type);

    void updateResultAnalysisByCondition(ResultAnalysis analysis);

    List<ResultAnalysisSummaryDTO> countResultAnalysisSummary(List<String> taskPatrolIds);
}
