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.DecentralizeDetails;
import digital.laboratory.platform.reagent.mapper.DecentralizeDetailsMapper;
import digital.laboratory.platform.reagent.service.DecentralizeDetailsService;
import digital.laboratory.platform.reagent.vo.DecentralizeDetailsVO;
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 DecentralizeDetailsServiceImpl extends ServiceImpl<DecentralizeDetailsMapper, DecentralizeDetails> implements DecentralizeDetailsService {

    @Autowired
    private  DecentralizeDetailsService decentralizeDetailsService;

    @Override
    public List<DecentralizeDetails> getDecentralizeDetailsList(String decentralizedRequestId) {

        LambdaQueryWrapper<DecentralizeDetails> decentralizeDetailsLambdaQueryWrapper = new LambdaQueryWrapper<>();

        LambdaQueryWrapper<DecentralizeDetails> eq = decentralizeDetailsLambdaQueryWrapper.eq(DecentralizeDetails::getDecentralizedRequestId, decentralizedRequestId);

        List<DecentralizeDetails> decentralizeDetailsList = decentralizeDetailsService.list(decentralizeDetailsLambdaQueryWrapper);

        return decentralizeDetailsList;
    }
}
