package digital.laboratory.platform.reagent.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import digital.laboratory.platform.reagent.entity.CatalogueDetails;
import digital.laboratory.platform.reagent.mapper.CatalogueDetailsMapper;
import digital.laboratory.platform.reagent.service.CatalogueDetailsService;
import digital.laboratory.platform.reagent.vo.CatalogueDetailsVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * (采购目录明细)服务实现类
 *
 * @author Zhang Xiaolong created at  2023-03-10
 * @describe (采购目录明细) 服务实现类
 */
@Service
public class CatalogueDetailsServiceImpl extends ServiceImpl<CatalogueDetailsMapper, CatalogueDetails> implements CatalogueDetailsService {

    @Autowired
    private CatalogueDetailsService catalogueDetailsService;

    @Override
    public List<CatalogueDetails> getCatalogueDetailsList(String purchaseCatalogueId) {

        LambdaQueryWrapper<CatalogueDetails> catalogueDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();

        List<CatalogueDetails> list = catalogueDetailsService.list(catalogueDetailsLambdaQueryWrapper.eq(CatalogueDetails::getPurchaseCatalogueId, purchaseCatalogueId));

        return list;

    }
}
