package com.uas.platform.b2b.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.uas.platform.b2b.model.PurchaseBadOut;

@Repository
public interface PurchaseBadOutDao extends JpaSpecificationExecutor<PurchaseBadOut>, JpaRepository<PurchaseBadOut, Long> {

	/**
	 * 按所属企业及编号查找不良品出库单
	 * 
	 * @param enUU
	 * @param code
	 * @return
	 */
	public List<PurchaseBadOut> findPurchaseBadOutByEnUUAndCode(Long enUU, String code);
	
	/**
	 * 卖家根据卖家UU号和下载状态获取需要下载的客户不良品出库单
	 * @return
	 */
	public List<PurchaseBadOut> findPurchaseBadOutByVendUUAndSendStatus(Long vendUU, Short sendStatus);

}
