package com.jwipc.supplier.client.impl;

import com.jwipc.supplier.client.TenderBidDetailClient;
import com.jwipc.supplier.client.convert.TenderBidDetailClientConvert;
import com.jwipc.tender.client.dto.BidDetailClientDTO;
import com.jwipc.tender.dto.BidDetailDTO;
import com.jwipc.tender.logic.BidLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author Chen Tianshi
 * @since 2026/1/13 20:16
 */
@Service
@RequiredArgsConstructor
public class TenderBidDetailClientImpl implements TenderBidDetailClient {
    private final TenderBidDetailClientConvert tenderBidDetailClientConvert;
    private final BidLogic bidLogic;
    @Override
    public List<BidDetailClientDTO> getBidTenderListByPurchaseApplyCode(String purchaseApplyCode, String itemNo) {
        List<BidDetailDTO> bidTenderListByPurchaseApplyCode = bidLogic.getBidTenderListByPurchaseApplyCode(purchaseApplyCode, itemNo);
        return tenderBidDetailClientConvert.dtoList2ClientDtoList(bidTenderListByPurchaseApplyCode);
    }
}
