package com.yeejoin.amos.patrol.business.dao.mapper;

import com.yeejoin.amos.boot.module.common.api.dto.ESTaskDetailDto;
import com.yeejoin.amos.patrol.dao.entity.PlanTaskDetail;
import org.apache.ibatis.annotations.Param;

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

public interface PlanTaskDetailMapper extends BaseMapper {
	void finishTaskDetail(@Param(value="planTaskDetailId") long planTaskDetailId, @Param(value="pointId") long pointId, @Param(value="planTaskId") long planTaskId
						, @Param(value="executorId") String executorId);

	Map findPlanTaskByTaskIdAndPointId(@Param(value="planTaskId") long planTaskId,@Param(value="pointId") long pointId);


	List<PlanTaskDetail> findAllByIdInAndStatus(@Param("planTaskIds") List<Long> planTaskNo, @Param("status") String status);

	List<ESTaskDetailDto> findAllByTaskNos(@Param("taskNos") List<String> taskNos);

	void deleteAllByTaskNos(@Param("taskNos") List<String> taskNos);

	PlanTaskDetail selectOne(Long planTaskId, Long pointId);

	List<PlanTaskDetail> findAllByIdIn(@Param("planTaskIds") List<Long> planTaskNo);
}
