package com.uas.platform.b2b.dao;


import com.uas.platform.b2b.model.PurchaseProofingApproval;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface PurchaseProofingApprovalDao extends JpaSpecificationExecutor<PurchaseProofingApproval>, JpaRepository<PurchaseProofingApproval, Long> {

	/**
	 * 通过供应商UU和下载状态查询认定单
	 *
	 * @param vendUU 供应商UU
	 * @param sendStatus 下载状态
	 * @return
	 */
	List<PurchaseProofingApproval> findByVendUUAndSendStatus(Long vendUU, Short sendStatus);

	/**
	 * 通过企业UU和编号查询认定单
	 *
	 * @param enUU 企业UU
	 * @param code 认定单编号
	 * @return
	 */
	List<PurchaseProofingApproval> findByEnUUAndCode(Long enUU, String code);

	/**
	 * 通过企业UU和erpId查询单据
	 *
	 * @param enUU 企业UU
	 * @param erpId erpId
	 * @return
	 */
	List<PurchaseProofingApproval> findByEnUUAndErpId(Long enUU, Long erpId);
}
