package com.rongwei.bscommon.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.rongwei.bscommon.sys.dao.EquPartsSetoutStandardDao;
import com.rongwei.bscommon.sys.service.EquPartsSetoutStandardService;
import com.rongwei.bsentity.domain.EquPartsSetoutStandardDo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author shangmi
 * @title EquPartsSetoutStandardServiceImpl
 * @date 2023/11/28 15:16
 * @description 备品备件标准库业务实现类
 */
@Service
public class EquPartsSetoutStandardServiceImpl extends ServiceImpl<EquPartsSetoutStandardDao,EquPartsSetoutStandardDo> implements EquPartsSetoutStandardService {

    @Autowired
    private EquPartsSetoutStandardDao partsSetoutStandardDao;

    /**
     * 通过主表ID查询所有的备品备件信息
     *
     * @param collect
     * @return {@link List< EquPartsSetoutStandardDo>}
     * @date 2023/11/28 18:06
     * @author shangmi
     *
     */
    @Override
    public List<EquPartsSetoutStandardDo> getMasterIdByList(List<String> collect) {
        LambdaQueryWrapper<EquPartsSetoutStandardDo> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(EquPartsSetoutStandardDo::getDeleted,0)
                .in(EquPartsSetoutStandardDo::getMasterid,collect);
        return partsSetoutStandardDao.selectList(queryWrapper);
    }

}
