package com.jeeplus.business.finance.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jeeplus.business.finance.domain.JyFinanceInvoice;

import com.jeeplus.business.finance.service.dto.JyFinanceInvoiceDTO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper

public interface JyFinanceInvoiceMapper extends BaseMapper<JyFinanceInvoice> {

    public IPage<JyFinanceInvoiceDTO> findList(Page<JyFinanceInvoiceDTO> page, @Param(Constants.WRAPPER) QueryWrapper<JyFinanceInvoice> queryWrapper);
    @InterceptorIgnore(tenantLine = "true")
    public JyFinanceInvoiceDTO queryById(@Param("id") String id);

    public List<String> getIdByProjectId(@Param("id") String id);

    public List<JyFinanceInvoiceDTO> getByIds(@Param(Constants.WRAPPER) QueryWrapper<JyFinanceInvoice> queryWrapper);

    public List<String> getIdByContractId(@Param("id") String id);

    public List<String> getIdByClientId(@Param("id") String id);

    /**
     * 根据发票id清空发票的收款日期
     * @param id
     */
    void setReceivablesDateNull(@Param("id") String id);

    /**
     * 根据发票id清空发票的收款日期
     * @param cwFinanceInvoice
     */
    @InterceptorIgnore(tenantLine = "true")
    void updateInfoById(JyFinanceInvoice cwFinanceInvoice);

    List<JyFinanceInvoiceDTO> queryByProjectId(@Param(Constants.WRAPPER)QueryWrapper<JyFinanceInvoice> queryWrapper);
}




