package com.dxhy.core.job.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxhy.core.job.entity.TDxRecordInvoiceDetailJobEntity;
import com.dxhy.core.job.entity.TDxRecordInvoiceJobEntity;
import com.dxhy.core.job.entity.TDxSaleRecordInvoiceJobEntity;
import com.dxhy.core.job.pojo.InvoiceDetailInfo;

/**
 * @author user
 */
@SuppressWarnings({"AlibabaLowerCamelCaseVariableNaming", "AlibabaClassNamingShouldBeCamel"})
@Mapper
public interface TDxRecordInvoiceDetailJobDao extends BaseMapper<InvoiceDetailInfo> {

    /**
     * 保存底账明细
     *
     * @param recordInvoiceDetail
     */
    void insertRecordInvoiceDetail(TDxRecordInvoiceDetailJobEntity recordInvoiceDetail);

    /**
     * 删除底账明细
     *
     * @param uuid
     */
    void delDetail(String uuid);

    /**
     * 功能描述
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param uuid
     * @return int
     */
    int getDetailCount(String uuid);

    /**
     * 功能描述
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param uuid
     * @return void
     */
    void delDetailJd(@Param("uuid") String uuid);

    /**
     * 功能描述
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param uuid
     * @return void
     */
    void delDetailJdSales(@Param("uuid") String uuid);

    /**
     * 功能描述
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param uuid
     * @return int
     */
    int getDetailJd(@Param("uuid") String uuid);

    /**
     * 功能描述
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param uuid
     * @return int
     */
    int getDetailJdSales(@Param("uuid") String uuid);

    /**
     * 删除发票税率
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param invoiceCode
     *            发票代码
     * @param invoiceNo
     *            发票号码
     * @return void
     */
    void delDetailTaxRate(@Param("invoiceCode") String invoiceCode, @Param("invoiceNo") String invoiceNo);

    /**
     * 查询税率
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param invoiceCode
     *            发票代码
     * @param invoiceNo
     *            发票号码
     * @return int
     */
    int getTaxRate(@Param("invoiceCode") String invoiceCode, @Param("invoiceNo") String invoiceNo);

    /**
     * 更新底账明细状态
     *
     * @author 陈刚扬
     * @date 2020/10/30
     * @param invoiceInfo
     * @return void
     */
    void updateDetailYesorno(@Param("invoiceInfo") TDxRecordInvoiceJobEntity invoiceInfo);

    /**
     * 更新销方信息明细状态
     * 
     * @param invoice
     *            发票信息
     */
    void updateSaleDetailYesorno(@Param("invoiceInfo") TDxSaleRecordInvoiceJobEntity invoice);
}
