package com.tuoheng.admin.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tuoheng.admin.entity.domain.ThMission;
import com.tuoheng.admin.entity.request.MissionQuery;
import com.tuoheng.admin.entity.request.MissionRequest;
import com.tuoheng.admin.entity.request.MissionStatusRequest;
import com.tuoheng.admin.entity.request.airport.ExecuteTaskStatusRequest;
import com.tuoheng.admin.entity.request.emergency.QueryEmergencyListRequest;
import com.tuoheng.admin.entity.request.emergency.QueryMissionListRequest;
import com.tuoheng.admin.entity.vo.MissionLiveVO;
import com.tuoheng.admin.entity.vo.MissionVO;
import com.tuoheng.common.common.IBaseService;
import com.tuoheng.common.exception.ServiceException;
import com.tuoheng.common.utils.JsonResult;

import java.util.List;

/**
 * @author qiujinyang
 * @date 2022/7/26 4:08 下午
 */
public interface IMissionService extends IBaseService<ThMission> {


    List<ThMission> getList(LambdaQueryWrapper<ThMission> lambdaQueryWrapper);

    /**
     * 被硬件调用，执行任务后，回调执行状态
     */
    JsonResult updateExecuteTaskStatus(ExecuteTaskStatusRequest executeTaskStatusRequest);

    /**
     * 更新巡检任务
     *
     * @author: zhu_zishuang
     * @date: 2021/9/1
     */
    boolean updateStatus(MissionStatusRequest missionStatusRequest);


    /**
     * 查询巡检任务列表
     */
    IPage<MissionVO> findList(MissionQuery queryInspectionRequest);

    /**
     * 查询巡检任务
     */
    MissionVO findById(Integer id);

    /**
     * 新增巡检任务
     *
     * @author: zhu_zishuang
     * @date: 2021/9/1
     */
    Integer addMission(MissionRequest request) throws ServiceException;

    /**
     * 删除巡检任务
     *
     * @author: zhu_zishuang
     * @date: 2021/9/2
     */
    boolean deleteBatch(List<Integer> idList);

    MissionLiveVO live(Integer id);

    JsonResult getVideoById(String id);

    /**
     * 查询任务列表
     *
     * @return
     */
    JsonResult getList(QueryMissionListRequest request);

    /**
     * 查询应急任务列表
     *
     * @return
     */
    JsonResult getEmergencyList(QueryEmergencyListRequest request);
}
