package com.sw.mes.itemclean.clean.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sw.mes.itemclean.clean.domain.CleanReworkingDetail;
import com.sw.mes.itemclean.clean.mapper.CleanReworkingDetailMapper;
import com.sw.mes.itemclean.clean.service.CleanReworkingDetailService;
import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CleanReworkingDetailServiceImpl extends ServiceImpl<CleanReworkingDetailMapper, CleanReworkingDetail> implements CleanReworkingDetailService {

    @Autowired
    private CleanReworkingDetailMapper materialReworkingDetailMapper;

    @Autowired
    ModelMapper modelMapper;


    @Override
    public List<CleanReworkingDetail> getByRid(Integer rid) {

        LambdaQueryWrapper<CleanReworkingDetail> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(CleanReworkingDetail::getRid, rid);
        return getBaseMapper().selectList(queryWrapper);
    }
}
