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

import com.sw.mes.core.base.BaseServiceImpl;
import com.sw.mes.yb.production.dao.RecycledMaterialManageDetailDao;
import com.sw.mes.yb.production.entity.RecycledMaterialManageDetail;
import com.sw.mes.yb.production.service.RecycledMaterialManageDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: xushu
 * @Date: 2022/08/17/16:27
 * @Description:
 */
@Service
@Transactional
public class RecycledMaterialManageDetailServiceImpl extends BaseServiceImpl<RecycledMaterialManageDetail> implements RecycledMaterialManageDetailService {
    RecycledMaterialManageDetailDao dao;
    @Autowired
    public void setDao(RecycledMaterialManageDetailDao dao) {
        super.setBaseDao(dao);
        this.dao=dao;
    }


    @Override
    public List<RecycledMaterialManageDetail> getDetailByManageId(Long manageId) {
        return dao.getDetailByManageId(manageId);
    }

    @Override
    public void deleteByManageId(Long manageId) {
         dao.deleteByManageId(manageId);
    }

    @Override
    public List<String> findUsedRecycleNos(Long manageId) {
        return dao.findUsedRecycleNos(manageId);
    }

    @Override
    public List<String> getDetailByRecycleNos(List<String> recycleNos) {
        return dao.getDetailByRecycleNos(recycleNos);
    }

    @Override
    public BigDecimal findSumWeightByWorkOrderNo(String orderNo) {
        return dao.findSumWeightByWorkOrderNo(orderNo);
    }

    @Override
    public List<String> getWorkOrderNosByRecycleNos(List<String> recycleNos) {
        return dao.getWorkOrderNosByRecycleNos(recycleNos);
    }
}
