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

import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.yb.pc.dao.QualityPrintDAO;
import com.sw.mes.yb.pc.entity.QualityPrint;
import com.sw.mes.yb.pc.service.QualityPrintService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class QualityPrintServiceImpl extends BaseServiceImpl<QualityPrint> implements QualityPrintService {
    QualityPrintDAO qualityPrintDAO;

    @Autowired
    public void setDao(QualityPrintDAO qualityPrintDAO) {
        this.qualityPrintDAO = qualityPrintDAO;
        super.setBaseDao(qualityPrintDAO);
    }

    @Override
    public List<QualityPrint> getInfoBatch(String sectionNos, Date date) {
        return qualityPrintDAO.getInfoBatch(sectionNos, date);
    }

    @Override
    public List<QualityPrint> getInfoBatchNew(List<String> sectionNos){
        return qualityPrintDAO.getInfoBatchNew(sectionNos);
    }

    @Override
    public List<QualityPrint> getInfoBatchFB(String sectionNos) {
        return qualityPrintDAO.getInfoBatchFB(sectionNos);
    }

    @Override
    public List<QualityPrint> getInfoBatchFBNew(List<String>  sectionNos){
        return qualityPrintDAO.getInfoBatchFBNew(sectionNos);
    }

    @Override
    public List<Map<String, Object>> getInfoBatchStatic(String sectionNos, Date date) {
        return qualityPrintDAO.getInfoBatchStatic(sectionNos, date);
    }

    @Override
    public List<Map<String,Object>> getInfoBatchStaticNew(List<String>  sectionNos){
        return qualityPrintDAO.getInfoBatchStaticNew(sectionNos);
    }

    @Override
    public List<QualityPrint> findBySectionNo(String sectionNo) {
        return qualityPrintDAO.findBySectionNo(sectionNo);
    }
}
