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

import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.production.dao.FormulaMaterialClassDao;
import com.sw.mes.production.entity.FormulaMaterialClass;
import com.sw.mes.production.service.FormulaMaterialClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @Author
 * @Description：
 * @Date: Create in
 * @Modified By:
 */
@Service
@Transactional
public class FormulaMaterialClassServiceImpl extends BaseServiceImpl<FormulaMaterialClass> implements FormulaMaterialClassService {
    FormulaMaterialClassDao dao;

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

    @Override
    public FormulaMaterialClass findByName(String name) {
        return dao.findByName(name);
    }

    @Override
    public List<FormulaMaterialClass> findFormulaMaterialClassByMaterialCode(String materialCode) {
        return dao.findFormulaMaterialClassByMaterialCode(materialCode);
    }
}
