package com.qmth.qrzk.dao.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.qmth.qrzk.dao.IPaperBatchDao;
import com.qmth.qrzk.repository.common.mapper.PaperBatchMapper;
import com.qmth.qrzk.repository.service.query.PaperBatchParams;
import com.qmth.qrzk.repository.service.query.QueryParams;
import com.qmth.qrzk.repository.user.model.PaperBatch;

@Repository("paperBatchDaoImpl")
@Transactional
public class PaperBatchDaoImpl implements IPaperBatchDao {

	@Autowired
	@Qualifier("paperBatchMapper")
	private PaperBatchMapper paperBatchMapper;
	
	public List<PaperBatch> queryBatch(QueryParams params) {
		return paperBatchMapper.queryBatch(params);
	}
	
	public List<PaperBatch> queryBatch(PaperBatchParams params) {
		return paperBatchMapper.queryBatch(params);
	}

	
	public int insertBatch(PaperBatch pb) {
		// TODO Auto-generated method stub
		return paperBatchMapper.insertBatch(pb);
	}

	
	public int getCount(QueryParams params) {
		// TODO Auto-generated method stub
		return paperBatchMapper.getCount(params);
	}
	
	public int getCount(PaperBatchParams params) {
		// TODO Auto-generated method stub
		return paperBatchMapper.getCount(params);
	}
	
	public int getCount(PaperBatch params) {
		// TODO Auto-generated method stub
		return paperBatchMapper.getCount(params);
	}

	
	public List<PaperBatch> findByCondition(PaperBatch pb) {
		// TODO Auto-generated method stub
		return paperBatchMapper.findByCondition(pb);
	}

	
	public List<PaperBatch> findByType(PaperBatch pb, String type1,
			String type2, String type3) {
		// TODO Auto-generated method stub
		return paperBatchMapper.findByType(pb, type1, type2, type3);
	}

	
	public PaperBatch findById(int batchId) {
		// TODO Auto-generated method stub
		return paperBatchMapper.findById(batchId);
	}

	
	public PaperBatch findTypeById(int id) {
		// TODO Auto-generated method stub
		return paperBatchMapper.findTypeById(id);
	}

	
	public List<PaperBatch> findAllBatch() {
		// TODO Auto-generated method stub
		return paperBatchMapper.findAllBatch();
	}

	
	public int isSameCode(String code) {
		// TODO Auto-generated method stub
		return paperBatchMapper.isSameCode(code);
	}


	@Override
	public int deleteBatch(int id) {
		// TODO Auto-generated method stub
		return paperBatchMapper.deleteBatch(id);
	}


	@Override
	public int updateTime(PaperBatch pb) {
		// TODO Auto-generated method stub
		return paperBatchMapper.updateTime(pb);
	}

}
