package com.yn.bftl.thirdparty.common.repository;

import com.yn.bftl.common.modules.relation.entity.ElectronicReceiptItem;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * @Author：Vance
 * @Description：收据查看repository
 * @Date：2022/11/11 09:36
 */
public interface ElectronicReceiptItemRepository extends JpaRepository<ElectronicReceiptItem, Long>, JpaSpecificationExecutor<ElectronicReceiptItem> {

    /**
     * 查询未作废且第三方编号为空的收据单（未到契约锁去盖章的）
     *
     * @return
     */
    List<ElectronicReceiptItem> findByInvalidIsFalseAndThirdpartyNoIsNull();

    /**
     * 通过第三方编号查询
     *
     * @param thirdpartyNo
     * @return
     */
    ElectronicReceiptItem findByThirdpartyNo(String thirdpartyNo);
}
