package vip.xiaonuo.quality.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import vip.xiaonuo.quality.entity.ErpBdQuail;
import vip.xiaonuo.quality.mapper.ErpBdQuailMapper;
import vip.xiaonuo.quality.param.QualityBdParam;
import vip.xiaonuo.quality.service.IErpBdQuailService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2025-03-11
 */
@Service
public class ErpBdQuailServiceImpl extends ServiceImpl<ErpBdQuailMapper, ErpBdQuail> implements IErpBdQuailService {

    @Autowired
    private ErpBdQuailMapper bdQuailMapper;

    @Override
    public List<ErpBdQuail> getBdList(QualityBdParam bdParam) {
        String orgId = bdParam.getOrgId();
        String erpFnumber = bdParam.getErpFnumber();
        String fname = bdParam.getFname();
        QueryWrapper<ErpBdQuail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("org_id", orgId).eq("fname", fname).eq("fnumber", erpFnumber);
        return bdQuailMapper.selectList(queryWrapper);
    }

}
