package com.inspect.task.mapper;

import com.alibaba.fastjson.JSONObject;
import com.inspect.task.domain.DeviceConvert;

import com.inspect.task.domain.PatrolTask;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

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

@Mapper
public interface PatrolTaskMapper {
    PatrolTask selectPatrolTaskByTaskId(Long taskId);

    String selectConfigByKey(String key);

    List<PatrolTask> selectPatrolTaskList(PatrolTask patrolTask);

    List<Map<String, String>> selectBasedataBdConfigDeviceConvert(DeviceConvert deviceConvert);

    List<Map<String, Object>> selectBaseDevice(String key);

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

    List<Map<String, Object>> selectBasePoint(String key);

    List<Map<String, Object>> selectBasePointByBj(String key);

    List<Map<String, Object>> selectBasePointByPointId(String pointId);

    List<Map<String, Object>> selectBasePointPre(String key);

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

    int insertPatrolTask(PatrolTask patrolTask);

    int updatePatrolTask(PatrolTask patrolTask);

    int updatePatrolTaskTime(String taskTime);

    int deletePatrolTaskByTaskId(Long taskId);

    int deletePatrolTaskByTaskIds(Long[] taskIds);

    List<Map<String, Long>> selectTaskRationalGroupByType();

    Map<String, Object> selectChannelCodeByPatrolPointId(String patrolPointId);

    List<PatrolTask> selectPatrolTaskListByTaskAreaName(String taskAreaName);

    List<JSONObject> selectPatrolTaskStatus(@Param("taskCodes") Set<String> patrolTaskCodes);

    String selectStationNo();

    List<JSONObject> selectBasedataPatrolPointList(@Param("patrolPointIds") List<String> patrolPointIds);

    List<JSONObject> selectBasedataPatrolPointPresetList(@Param("patrolPointIds") List<String> patrolPointIds);

    List<JSONObject> selectPatrolPresetPosList(@Param("patrolPointIds") List<String> patrolPointIds);
}
