package com.jwipc.finance.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.InvoicedApply;
import com.jwipc.finance.mapper.InvoicedApplyMapper;
import com.jwipc.finance.model.po.CreatePcaDetailPO;
import com.jwipc.finance.model.po.InvoicedApplyPO;
import com.jwipc.finance.model.po.InvoicedApplyPrintPO;
import com.jwipc.finance.model.query.InvoicedApplyQuery;
import com.jwipc.finance.model.query.PaymentApplyItemQuery;
import com.jwipc.finance.service.IInvoicedApplyService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 对账模块-开票申请 服务实现类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-03-04
 */
@Service
public class InvoicedApplyServiceImpl extends ServiceImpl<InvoicedApplyMapper, InvoicedApply> implements IInvoicedApplyService {

    @Override
    public List<InvoicedApplyPO> selectDataByQuery(Page<InvoicedApply> dbPage, InvoicedApplyQuery query) {
        if (dbPage==null){
            return baseMapper.findPageByQuery(query);
        }
        return baseMapper.findPageByQuery(dbPage,query);
    }

    @Override
    public InvoicedApplyPrintPO selectPrintDataById(Long id) {
        return baseMapper.selectPrintDataById(id);
    }

    @Override
    public String findInvoiceVoucher(Long id) {
        return baseMapper.findInvoiceVoucher(id);
    }

    @Override
    public List<CreatePcaDetailPO> readCodPaymentInvoiceData(PaymentApplyItemQuery query) {
        return baseMapper.readCodPaymentInvoiceData(query);
    }

    @Override
    public List<InvoicedApplyPO> selectDataByAccountStatementNo(List<String> StatementNoList) {
        return baseMapper.selectDataByAccountStatementNo(StatementNoList);
    }
}
