/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.buydetails.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.modules.oabuy.entity.OaBuy;
import com.jeeplus.common.persistence.Page;
import com.jeeplus.common.service.CrudService;
import com.jeeplus.modules.buydetails.entity.BuyDetails;
import com.jeeplus.modules.buydetails.dao.BuyDetailsDao;

/**
 * 采购明细Service
 * @author liuw
 * @version 2018-01-16
 */
@Service
@Transactional(readOnly = true)
public class BuyDetailsService extends CrudService<BuyDetailsDao, BuyDetails> {

	public BuyDetails get(String id) {
		return super.get(id);
	}
	
	public List<BuyDetails> findList(BuyDetails buyDetails) {
		return super.findList(buyDetails);
	}
	
	public Page<BuyDetails> findPage(Page<BuyDetails> page, BuyDetails buyDetails) {
		return super.findPage(page, buyDetails);
	}
	
	@Transactional(readOnly = false)
	public void save(BuyDetails buyDetails) {
		super.save(buyDetails);
	}
	
	@Transactional(readOnly = false)
	public void delete(BuyDetails buyDetails) {
		super.delete(buyDetails);
	}
	
	public Page<OaBuy> findPageByoaBuy(Page<OaBuy> page, OaBuy oaBuy) {
		oaBuy.setPage(page);
		page.setList(dao.findListByoaBuy(oaBuy));
		return page;
	}
	
	
	
}