package com.jwipc.inquiry.convert;

import com.jwipc.inquiry.dto.PurchaseApplyBillClientDTO;
import com.jwipc.inquiry.dto.PurchaseApplyBillDetailClientDTO;
import com.jwipc.inquiry.dto.PurchaseApplyBillDetailDTO;
import com.jwipc.inquiry.dto.TenderDetailAllDTO;
import com.jwipc.inquiry.entity.PurchaseApplyBill;
import com.jwipc.inquiry.entity.PurchaseApplyBillDetail;
import com.jwipc.inquiry.model.po.InquiryMaterialPO;
import com.jwipc.inquiry.model.po.PurchaseApplyBillDetailPO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * @author shenyang.ou
 * @date 2024/2/29 13:26
 * @desc
 */
@Mapper(componentModel = "spring")
public interface PurchaseApplyBillDetailConvert {
    List<PurchaseApplyBillDetailDTO> po2DTOList(List<PurchaseApplyBillDetailPO> purchaseApplyBillDetailPOS);

    List<TenderDetailAllDTO> poMaterial2DetailDTOList(List<InquiryMaterialPO> inquiryMaterialPOS);

    List<TenderDetailAllDTO> poBillMaterial2DetailDTOList(List<PurchaseApplyBillDetailPO> purchaseApplyBillDetailPOS);
    @Mapping(target = "count", source = "requireNum")
    TenderDetailAllDTO poBillMaterial2DetailDTO(PurchaseApplyBillDetailPO purchaseApplyBillDetailPOS);


    PurchaseApplyBillDetailDTO entity2DTO(PurchaseApplyBillDetail urchaseApplyBillDetail);

    List<PurchaseApplyBillClientDTO> billEntity2DTOList(List<PurchaseApplyBill> billList);

    PurchaseApplyBillDetailClientDTO billDetailEntity2DTO(PurchaseApplyBillDetail applyBillDetail);

    List<PurchaseApplyBillDetail> clientDto2Entities(List<PurchaseApplyBillDetailClientDTO> applyBillDetailList);

    PurchaseApplyBillClientDTO entity2ClientDTO(PurchaseApplyBill bill);
    List<PurchaseApplyBillDetailClientDTO> entities2ClientDetailDTOList(List<PurchaseApplyBillDetail> applyBillDetailList);
}
