package com.ruoyi.project.invoice.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticket;
import com.ruoyi.project.invoice.domain.TInvoiceBookingworkticketVo;
import com.ruoyi.project.invoice.domain.TInvoiceWorkcontent;

import java.util.List;

/**
 * 预约作业票台账Mapper接口
 *
 * @author ruoyi
 * @date 2022-08-25
 */
public interface TInvoiceBookingworkticketMapper  extends BaseMapper<TInvoiceBookingworkticket>
{
    /**
     * 查询预约作业票台账
     *
     * @param id 预约作业票台账ID
     * @return 预约作业票台账
     */
    public TInvoiceBookingworkticket selectTInvoiceBookingworkticketById(Long id);
    public TInvoiceBookingworkticket selectBookingworkticketById(Long id);
    public List<TInvoiceBookingworkticketVo> selectDetailById(Long id);

    /**
     * 查询预约作业票台账列表
     *
     * @param tInvoiceBookingworkticket 预约作业票台账
     * @return 预约作业票台账集合
     */
    @DataScope(deptAlias = "d")
    public List<TInvoiceBookingworkticket> selectTInvoiceBookingworkticketList(TInvoiceBookingworkticket tInvoiceBookingworkticket);

    /**
     * 新增预约作业票台账
     *
     * @param tInvoiceBookingworkticket 预约作业票台账
     * @return 结果
     */
    public int insertTInvoiceBookingworkticket(TInvoiceBookingworkticket tInvoiceBookingworkticket);

    /**
     * 修改预约作业票台账
     *
     * @param tInvoiceBookingworkticket 预约作业票台账
     * @return 结果
     */
    public int updateTInvoiceBookingworkticket(TInvoiceBookingworkticket tInvoiceBookingworkticket);

    /**
     * 删除预约作业票台账
     *
     * @param id 预约作业票台账ID
     * @return 结果
     */
    public int deleteTInvoiceBookingworkticketById(Long id);

    /**
     * 批量删除预约作业票台账
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteTInvoiceBookingworkticketByIds(Long[] ids);

    /**
     * 关联ID查询预约作业票台账信息
     *
     * @param bookingticketId 预约作业票台账关联id
     * @return 结果
     */
    List<TInvoiceWorkcontent> selectTInvoiceWorkcontentBybookingticketId(Long bookingticketId);

    @DataScope(deptAlias = "b")
    List<TInvoiceWorkcontent> selectTInvoiceWorkcontentList(TInvoiceBookingworkticket tInvoiceBookingworkticket);

    int cancelTInvoiceBookingworkticketById(Long id);
}
