package com.uas.platform.b2b.dao;

import com.uas.platform.b2b.model.PurchaseProofing;
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 PurchaseProofingDao
		extends JpaSpecificationExecutor<PurchaseProofing>, JpaRepository<PurchaseProofing, Long> {

	/**
	 * @param enUU
	 *            买家uu
	 * @param code
	 *            打样申请编号
	 * @return
	 */
	public List<PurchaseProofing> findByEnUUAndCode(long enUU, String code);

    List<PurchaseProofing> findByErpId(long l);

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