package com.foreverwin.mesnac.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.common.model.ProdReadyTask;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 生产准备任务主表 Mapper 接口
 * </p>
 *
 * @author Philip
 * @since 2021-06-23
 */
@Repository
public interface ProdReadyTaskMapper extends BaseMapper<ProdReadyTask> {

    List<ProdReadyTask> getTaskList(@Param("entity")ProdReadyTask prodReadyTask, @Param("locale") String locale,@Param("admin") Integer admin,@Param("user") String user);

    ProdReadyTask loadProExecute(@Param("site")String site,  @Param("taskBo")String taskBo, @Param("locale") String language);

    List<Map<String, Object>> getItemDetail(@Param("site")String site, @Param("locale")String locale, @Param("dispatchNo")String dispatchNo);

    List<Map<String, Object>> getToolDetail(@Param("site")String site, @Param("locale")String locale, @Param("dispatchNo")String dispatchNo);

    List<ProdReadyTask> getUnreadyTasks(@Param("site")String site, @Param("startTime")LocalDateTime now, @Param("endTime")LocalDateTime endTime);
}