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

import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.yb.production.dao.FillingTaskRecipeDao;
import com.sw.mes.yb.production.dao.LoadingTaskRecipeDao;
import com.sw.mes.yb.production.entity.FillingTaskRecipe;
import com.sw.mes.yb.production.entity.LoadingTaskRecipe;
import com.sw.mes.yb.production.service.FillingTaskRecipeService;
import com.sw.mes.yb.production.service.LoadingTaskRecipeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: xushu
 * @Date: 2022/11/26/15:41
 * @Description:
 */
@Service
@Slf4j
public class LoadingTaskRecipeServiceImpl extends BaseServiceImpl<LoadingTaskRecipe> implements LoadingTaskRecipeService {
    LoadingTaskRecipeDao dao;
    @Autowired
    public void setDao(LoadingTaskRecipeDao dao) {
        super.setBaseDao(dao);
        this.dao = dao;
    }

    @Override
    public void deleteByLoadingTaskId(Long loadingTaskId) {
        dao.deleteByLoadingTaskId(loadingTaskId);
    }

    @Override
    public List<LoadingTaskRecipe> findByLoadingTaskId(Long loadingTaskId) {
        return dao.findByLoadingTaskId(loadingTaskId);
    }
}
