package com.inspect.job.client;

import com.alibaba.fastjson.JSONObject;
import com.inspect.base.core.domain.maintain.MaintainRegion;
import com.inspect.base.core.web.domain.AjaxResult;
import com.inspect.job.domain.task.*;
import com.inspect.system.base.domain.SysDictData;
import feign.Headers;
import java.util.List;
import java.util.Map;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "inspect-main", contextId = "inspect-task-exec")
public interface TaskExecClient {
   @PostMapping({"/exec/selectTaskList"})
   List<PatrolTask> selectTaskList(PatrolTask task);

   @PostMapping({"/exec/selectPatrolTaskList"})
   List<PatrolTask> selectPatrolTaskList(PatrolTask task);

   @PostMapping({"/exec/selectTaskInfoList"})
   List<PatrolTaskInfo> selectTaskInfoList(PatrolTaskInfo taskInfo);

   @PostMapping({"/exec/getConfigByKey"})
   String getConfigByKey(String key);

   @PostMapping({"/exec/selectPatrolPresetPosList"})
   List<PatrolPresetPos> selectPatrolPresetPosList(PatrolPresetPos presetPos);

   @PostMapping({"/exec/selectPresetCodeSlimByPatrolPointId"})
   PatrolPresetPosSlim selectPresetCodeSlimByPatrolPointId(PatrolPresetPosSlim presetPosSlim);

   @PostMapping({"/exec/selectPatrolPresetActionList"})
   List<PatrolPresetAction> selectPatrolPresetActionList(PatrolPresetAction presetAction);

   @PostMapping({"/exec/selectMaintainRegionList"})
   List<MaintainRegion> selectMaintainRegionList(MaintainRegion region);

   @PostMapping({"/exec/addPatrolTaskExecRecord"})
   int addPatrolTaskExecRecord(PatrolTaskExecRecord record);

   @PostMapping({"/exec/selectCameraPatrolTaskExecRecordList"})
   List<PatrolTaskExecRecord> selectCameraPatrolTaskExecRecordList(@RequestParam("devNo") String devNo, @RequestParam(value = "taskStates",required = false) List<String> states);

   @PostMapping({"/exec/selectPatrolTaskExecRecordByTaskPatrolId"})
   PatrolTaskExecRecord selectPatrolTaskExecRecordByTaskPatrolId(String id);

   @PostMapping({"/exec/addPatrolTaskPointExecRecord"})
   int addPatrolTaskPointExecRecord(PatrolTaskPointExecRecord record);

   @PostMapping({"/exec/updatePatrolTaskPointExecRecord"})
   int updatePatrolTaskPointExecRecord(PatrolTaskPointExecRecord record);

   @PostMapping({"/exec/selectPatrolPresetParamList"})
   List<PatrolPresetParam> selectPatrolPresetParamList(PatrolPresetParam param);

   @PostMapping({"/exec/selectPatrolTaskPointExecRecordList"})
   List<PatrolTaskPointExecRecord> selectPatrolTaskPointExecRecordList(PatrolTaskPointExecRecord record);

   @PostMapping({"/exec/updatePatrolTaskExecRecord"})
   int updatePatrolTaskExecRecord(PatrolTaskExecRecord record);

   @PostMapping({"/exec/selectPatrolTaskStatusByTaskPatrolledId"})
   PatrolTaskStatus selectPatrolTaskStatusByTaskPatrolledId(@RequestParam("taskPatrolledId") String taskPatrolledId);

   @PostMapping({"/exec/selectPatrolTaskStatusList"})
   List<PatrolTaskStatus> selectPatrolTaskStatusList(PatrolTaskStatus taskStatus);

   @PostMapping({"/exec/selectPatrolTaskExecRecordList"})
   List<PatrolTaskExecRecord> selectPatrolTaskExecRecordList(PatrolTaskExecRecord execRecord);

   @PostMapping({"/exec/selectPatrolTaskExecRecordAbeyanceList"})
   List<PatrolTaskExecRecord> selectAbeyancePatrolTaskExecRecordList(PatrolTaskExecRecord execRecord);

   @PostMapping({"/exec/addSilenceTaskPointExecRecord"})
   int addSilenceTaskPointExecRecord(SilenceTaskPointExecRecord execRecord);

   @PostMapping({"/exec/updatePatrolTask"})
   @Headers({"acceptEncoding: gzip", "contentType: application/json"})
   int updatePatrolTask(@RequestBody PatrolTask patrolTask);

   @PostMapping({"/partrolresult/sendMessage"})
   AjaxResult getInfo(@RequestParam("type") String type, @RequestBody String messageBody);

   @PostMapping({"/exec/selectBasedataEqpbookList"})
   List<EqpBook> selectBasedataEqpBookList(EqpBook book);

   @PostMapping({"/exec/selectBasedataEqpbookChannelList"})
   List<EqpBookChannel> selectBasedataEqpbookChannelList(EqpBookChannel channel);

   @PostMapping({"/exec/selectBasedataPatrolpointByPatrolpointId"})
   DBPatrolPoint selectBasedataPatrolPointByPatrolPointId(Long pointId);

   @PostMapping({"/exec/selectDictDataList"})
   List<SysDictData> selectDictDataList(SysDictData dictData);

   @PostMapping({"/exec/updatePatrolTaskStatus"})
   int updatePatrolTaskStatus(@RequestBody PatrolTask patrolTask);

   @PostMapping({"/taskExecuteScheduler/immediatelyExecTask"})
   void immediatelyExecTask(@RequestParam("patrolTask") JSONObject patrolTask);

   @PostMapping({"/exec/taskResultExised"})
   boolean taskResultExited(@RequestParam("patrolDeviceCode") String deviceCode, @RequestParam("taskPatrolledId") String patrolId);

   @GetMapping({"/exec/getFilterPatrolTaskList"})
   List<PatrolTask> getFilterPatrolTaskList(@RequestParam("taskCode") String taskCode);

   @PostMapping({"/exec/makeCurrentDayTask"})
   Map<String, List<PatrolTask>> makeCurrentDayTask();

   @PostMapping({"/exec/execDeviceTask"})
   void execDeviceTask(@RequestBody List<PatrolTask> patrolTaskListEx);

   @PostMapping({"/getPatrolTaskStatusByTaskPatrolledId"})
   PatrolTaskStatus getPatrolTaskStatusByTaskPatrolledId(String patrolId);

   @PostMapping({"/exec/getAlgTypeListByPatrolPointId"})
   Map<String, String> getAlgTypeListByPatrolPointId(final String patrolPointId);

   @PostMapping({"/exec/getAlgSubtypeIdsByPatrolPointId"})
   String getAlgSubtypeIdsByPatrolPointId(final String patrolPointId);
}
