package com.mosty.qwzx.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mosty.base.model.entity.qwzx.TbQwZbpbZq;
import com.mosty.base.model.vo.qwzx.TbQwZbpbZqMyVo;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @author dw
 * @since 2022/8/3
 **/
@Mapper
public interface TbQwZbpbZqMapper extends BaseMapper<TbQwZbpbZq> {

    @ApiOperation("根据排班ID删除排班周期信息")
    void deleteByPbId(@Param("pbId") String pbId);

    @ApiOperation("APP获取我的值班排班信息")
    TbQwZbpbZqMyVo getMyZbpbToday(String userId);

    @ApiOperation("根据时间查询用户的排班情况")
    List<TbQwZbpbZq> getMyZbpbByTime(@Param("kssj") Date kssj, @Param("userId") String userId);

    @ApiOperation("查询部门排班情况")
    List<TbQwZbpbZq> getDeptByMonth(@Param("kssj") Date kssj, @Param("ssbmid") String ssbmid);
}
