package com.foreverwin.mesnac.dispatch.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.foreverwin.mesnac.dispatch.dto.ProductionCalendarDTO;
import com.foreverwin.mesnac.dispatch.dto.WorkCenterWorkTimeDTO;
import com.foreverwin.mesnac.dispatch.model.ProductionCalendar;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 生产日历  Mapper 接口
 * </p>
 *
 * @author syngna
 * @since 2020-08-18
 */
@Repository
public interface ProductionCalendarMapper extends BaseMapper<ProductionCalendar> {

    List<ProductionCalendarDTO> listByWorkCenterYearMonth(@Param("site") String site, @Param("workCenter") String workCenter, @Param("year") String year, @Param("month") String month);

    List<WorkCenterWorkTimeDTO> listWorkCenterWorkTimeByDateRange(@Param("site") String site, @Param("workCenter") String workCenter, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<WorkCenterWorkTimeDTO> listWorkTimeByRange(@Param("site") String site, @Param("startDate") String startDate, @Param("endDate") String endDate);

    List<WorkCenterWorkTimeDTO> listWorkTime(@Param("site") String site, @Param("workCenterList") Set<String> workCenterList, @Param("startDate") String startDate, @Param("endDate") String endDate);
}