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.IPaperPaperBatchDao;
import com.qmth.qrzk.repository.common.mapper.PaperPaperBatchMapper;
import com.qmth.qrzk.repository.service.query.PaperBatchParams;
import com.qmth.qrzk.repository.service.query.PaperParams;
import com.qmth.qrzk.repository.user.model.PaperPaperBatch;

@Repository("paperPaperBatchDaoImpl")
@Transactional
public class PaperPaperBatchDaoImpl implements IPaperPaperBatchDao {

	@Autowired
	@Qualifier("paperPaperBatchMapper")
	private PaperPaperBatchMapper paperPaperBatchMapper;
	
	
	public void insert(PaperPaperBatch ppb) {
		// TODO Auto-generated method stub
		paperPaperBatchMapper.insert(ppb);
	}

	
	public int updateBatchIdWithPaperId(int batchId, int paperId) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.updateBatchIdWithPaperId(batchId, paperId);
	}

	
	public List<PaperPaperBatch> findPaperIdByBatchId(int batchId) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.findPaperIdByBatchId(batchId);
	}

	
	public int removeFromBatch(PaperParams pp) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.removeFromBatch(pp);
	}

	
	public PaperPaperBatch findPaperPaperBatch(int batchId, int paperId) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.findPaperPaperBatch(batchId, paperId);
	}

	
	public int updateInfo(PaperBatchParams pbp ) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.updateInfo(pbp);
	}

	
	public int updateRevocation(PaperBatchParams pbp) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.updateRevocation(pbp);
	}


	@Override
	public void deleteByBatchId(int batchId) {
		// TODO Auto-generated method stub
		paperPaperBatchMapper.deleteByBatchId(batchId);
	}


	@Override
	public void updateIsAnswerSheetReturn(PaperParams pp) {
		// TODO Auto-generated method stub
		paperPaperBatchMapper.updateIsAnswerSheetReturn(pp);
	}


	@Override
	public List<PaperPaperBatch> findPaperIdByIsStorageScanned(int batchId) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.findPaperIdByIsStorageScanned(batchId);
	}


	@Override
	public int getCountIsStorageScanned(PaperParams pp) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.getCountIsStorageScanned(pp);
	}


	@Override
	public int getCountIsOutBoundScanned(PaperParams pp) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.getCountIsOutBoundScanned(pp);
	}


	@Override
	public int removePaperFromBatch(PaperParams pp) {
		// TODO Auto-generated method stub
		return paperPaperBatchMapper.removePaperFromBatch(pp);
	}


	
}
