package com.inspect.partrolresult.mapper;

import com.inspect.analysis.domain.ResultAnalysis;
import com.inspect.partrolresult.domain.*;
import com.inspect.statistics.domain.TaskStatisticsConfig;
import com.inspect.system.base.openDomain.BasedataEqpBookMoMain;

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

import com.inspect.task.domain.PatrolData;
import com.inspect.taskstatus.domain.PatrolTaskStatus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PatrolResultMapper {
    PatrolResult selectPatrolResultByLineId(Long lineId);

    Map<String, Object> selectBaseInfoByPointId(String pointId);

    List<Map<String, String>> selectAlgTypeByAlaName(String key);

    Map<String, Object> selectBaseByPointId(String pointId);

    List<PatrolResult> selectPatrolResultList(PatrolResult patrolResult);

    PatrolResult selectPatrolResultByDeviceName(String deviceName);

    List<PatrolResult> selectPatrolResultListOrderBy(PatrolResult patrolResult);

    List<PatrolData> selectPatrolDataResultByTaskCode(PatrolResult patrolResult);

    List<PatrolData> selectPatrolDataResultByTaskCodeV2(ResultAnalysis resultAnalysis);

    List<PatrolData> selectPatrolDataResultByTaskCodeList(PatrolTaskStatus patrolTaskStatus);

    List<BasedataEqpBookMoMain> selectBasedataEqpBookList(BasedataEqpBookMoMain basedataEqpBookMoMain);

    List<BasedataEqpBookMoMain> selectCamera(BasedataEqpBookMoMain basedataEqpBook);

    List<PatrolResult> selectPatroByAllDev(PatrolResult patrolResult);

    List<PatrolResult> selectPatroByAllDevByMainIds(PatrolResult patrolResult);

    List<AlgInfo> selectAlgInfo(PatrolResult patrolResult);

    List<PatrolResult> queryPatrolResultByPointID(String key, Date date, Date date2);

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

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

    List<PatrolPresetPosModule> selectAlgorithmTypeList(String key);

    Map<String, String> selectPatrolPresetParam(String pointId);

    Map<String, String> selectThresholdByPointId(String pointId);

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

    Map<String, String> selectAlgTypeByCode(String code);

    Map<String, String> selectBasedataStation();

    List<Map<String, String>> selectEvnData(String key);

    Map<String, Object> selectDevInfoById(String id);

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

    Map<String, Object> selectAreInfo(String key);

    List<Map<String, Object>> selectAreInfoByParentId(String parentId);

    int insertPatrolResult(PatrolResult patrolResult);

    int updatePatrolResult(PatrolResult patrolResult);

    int updatePatrolResultByMainId(String mainId);

    int deletePatrolResultByLineId(Long lineId);

    int deletePatrolResultByLineIds(Long[] lineIds);

    int updatePatrolResultValue(PatrolResult patrolResult);

    List<ResultValue> selectOilResultValue(PatrolResult patrolResult);

    List<ResultValue> select6FsResultValue(PatrolResult patrolResult);

    List<PatrolResult> queryOneTaskResult(PatrolResult patrolResult);

    Integer queryTaskDeviceNum(String key);

    TaskStatisticsConfig selectStatisticsTaskConfigList(String key);

    List<PatrolResult> queryDiffTimeResult(@Param("taskCode") String taskCode, @Param("time") Long time);

    List<PatrolResult> queryNumTypeResult(@Param("num") Integer num, @Param("deviceId") String deviceId, @Param("patrolDeviceCode") String patrolDeviceCode);

    List<PatrolResultRef> selectResultRefByLineId(String lineId);

    List<BasePointAreaInfo> selectBaseInfoByMainId(String mainId);

    List<InspectionPointResultVo> inspectResult(InspectionPointParam inspectionPointParam);

    BasedataEqpBookChannel selectChannelName(@Param("channelCode") String channelCode);

    List<PatrolResult> selectPatrolResultListByMainIds(@Param("mainIds") List<Long> mainIds);

    List<PatrolResultRef> selectResultRefByLineIds(@Param("mainIds") List<Long> mainIds, @Param("filter") String filter);

    List<BasePointAreaInfo> selectBaseInfoByMainIds(@Param("mainIds") List<Long> mainIds);

    List<PatrolResultRef> selectResultDoc(PatrolResult patrolResult);

    List<BasePointAreaInfo> selectBaseInfoByMainIdByReport(String report);

    Map<String, String> selectDeviceNameById(BasePointAreaInfo basePointAreaInfo);

    List<String> selectAlgList(@Param("taskCode") String taskCode, @Param("sendCode") String sendCode, @Param("devType") String devType);

    List<PatrolData> selectPatrolDataResultByTaskCodeV3(ResultAnalysis resultAnalysis);

    List<AlgInfo> selectPointAlgInfo(String patrolPointId);

    List<AlgInfo> selectAlgInfoByCode(String codes);
}
