package com.sw.mes.yb.production.service.impl;

import com.sw.mes.core.annotation.Jinko;
import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.yb.production.dao.ProductionMaterialReturnRecordDao;
import com.sw.mes.yb.production.entity.ProductionMaterialReturnRecord;
import com.sw.mes.yb.production.service.ProductionMaterialReturnRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Jinko(value = "退料记录", author = "wxl")
@Service
@Transactional
public class ProductionMaterialReturnRecordServiceImpl extends BaseServiceImpl<ProductionMaterialReturnRecord> implements ProductionMaterialReturnRecordService {

    ProductionMaterialReturnRecordDao dao;
    @Autowired
    public void setDao(ProductionMaterialReturnRecordDao dao) {
        super.setBaseDao(dao);
        this.dao=dao;
    }


    @Override
    public List<ProductionMaterialReturnRecord> findByAgainNumAndBatchNo(Integer againNum, String batchNo) {
        return dao.findByAgainNumAndBatchNo(againNum,batchNo);
    }

    @Override
    public List<ProductionMaterialReturnRecord> findByAgainNumAndBatchNoAndLotNo(Integer againNum, String batchNo, String lotNo) {
        return dao.findByAgainNumAndBatchNoAndLotNo(againNum,batchNo,lotNo);
    }
}
