package com.jwipc.finance.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.AccountStatement;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.finance.model.po.AccountStatementPO;
import com.jwipc.finance.model.po.ImgCodePO;
import com.jwipc.finance.model.query.AccountStatementQuery;
import com.jwipc.finance.model.query.ImgCodeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 对账模块-对账单主表 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-03-04
 */
public interface AccountStatementMapper extends BaseMapper<AccountStatement> {

    List<AccountStatementPO> findPageByQuery(@Param("query") AccountStatementQuery query);

    List<AccountStatementPO> findPageByQuery(Page<AccountStatement> dbPage, @Param("query") AccountStatementQuery query);

    List<AccountStatement> checkAccountStatementStatus(@Param("idList") List<Long> idList);

    AccountStatementPO selectPoById(@Param("id") Long id);

    List<AccountStatementPO> accountOrApplyList(@Param("query") AccountStatementQuery query);

    List<AccountStatementPO> accountOrApplyList(Page<AccountStatement> dbPage, @Param("query") AccountStatementQuery query);
    List<AccountStatementPO> accountOrApplyListByNo(@Param("query") AccountStatementQuery query);

    List<AccountStatementPO> findAccountStatementByYM(@Param("query") AccountStatementQuery query);
    List<AccountStatementPO> findAccountStatementBySupplierCodeS(@Param("query") AccountStatementQuery query);
    List<AccountStatementPO> findAccountStatementBySupplierCodeS2(@Param("query") AccountStatementQuery query);
    List<AccountStatementPO> findAccountStatementBySupplierCodeD(@Param("query") AccountStatementQuery query);

    List<ImgCodePO> findImgCodePage(Page<AccountStatement> dbPage, @Param("query") ImgCodeQuery query);

    List<ImgCodePO> findImgCodePage(@Param("query") ImgCodeQuery query);
}
