package com.yuchen.saas.park.service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuchen.saas.park.api.entity.park.FireInspectTaskEntity;
import com.yuchen.saas.park.api.response.FireInspectPointStatusResponse;
import com.yuchen.saas.park.api.response.FireInspectTaskPointResponse;
import com.yuchen.saas.park.api.response.FireTaskPartListResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName FireInspectTaskMapper
 * @Description 消防巡查任务
 * @Author 肖祥
 * @Date 2022/10/19 11:45
 * @Version 1.0。0
 **/
@Mapper
public interface FireInspectTaskMapper extends BaseMapper<FireInspectTaskEntity> {
    /**
     * 分页查询巡查点关联的计划任务数据
     * @param page
     * @param taskId
     * @return
     */
    IPage<FireInspectTaskPointResponse> queryPage(IPage<FireInspectTaskPointResponse> page, @Param("taskId") Long taskId, @Param("list") List<Long> parkIdList);

    /**
     * 分页查询巡查点关联的计划任务数据
     * @param page
     * @param taskId
     * @return
     */
    IPage<FireTaskPartListResponse> queryTaskPartPage(IPage<FireTaskPartListResponse> page, @Param("taskId") Long taskId, @Param("list") List<Long> parkIdList);


    /**
     * 查询巡查点关联的计划任务数据
     * @param taskId
     * @return
     */
    List<FireTaskPartListResponse> queryTaskPartList(@Param("taskId") Long taskId);

    /**
     * 根据任务id查询巡查点状态
     * @param taskId
     * @return
     */
    List<FireInspectPointStatusResponse> queryInspectStatusByTaskIdList(@Param("taskId") Long taskId);

}
