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

import com.sw.mes.agv.dao.RechargeArtBagItemDao;
import com.sw.mes.agv.entity.RechargeArtBagItem;
import com.sw.mes.agv.service.RechargeArtBagItemService;
import com.sw.mes.core.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class RechargeArtBagItemServiceImpl extends BaseServiceImpl<RechargeArtBagItem> implements RechargeArtBagItemService {

    RechargeArtBagItemDao dao;

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

    @Override
    public List<RechargeArtBagItem> findByDeviceNo(String deviceNo) {
        return dao.findByDeviceNo(deviceNo);
    }

    @Override
    public void saveAll(List<RechargeArtBagItem> artBagItems) {
        dao.saveAll(artBagItems);
    }

    @Override
    public void deleteByDeviceNo(String deviceNo) {
        dao.deleteByDeviceNo(deviceNo);
    }

}
