package com.jwipc.inquiry.logic;

import com.jwipc.inquiry.dto.*;
import com.jwipc.inquiry.model.query.PurchaseApplyBillDetailQuery;
import com.jwipc.page.PageView;

import java.io.Serializable;
import java.util.Collection;
import java.util.List;

/**
 * @author shenyang.ou
 * @date 2024/2/29 13:25
 * @desc
 */
public interface PurchaseApplyBillDetailLogic {
    PageView findByPage(PurchaseApplyBillDetailQuery query);

    List<PurchaseApplyBillDetailDTO> listAll(PurchaseApplyBillDetailQuery query);

    List<InquiryMaterialDTO> makeInquiryMaterial(String purchaseBillDetailIds);

    /**
     * 采购申请明细分配采购组
     * @param ids 采购申请明细id集合
     * @param purchaseGroupCode 采购组编码
     */
    void updatePurchaseGroupCode(String ids, String purchaseGroupCode);

    void updateDetailRemark(Long id, String detailRemark);
    void updateDetailMethod(PurchaseApplyBillDetailDTO detailDTO);

    /**
     * 修改行采购路径
     */
    void updateDetailWayMethod(String ids , String purchaseWay);

    PurchaseApplyBillDetailDTO selectById(PurchaseApplyBillDetailQuery query);

    /**
     * 转招标查询采购单数据
     * @param query
     * @return
     */
    TenderSaveDTO transferTender(PurchaseApplyBillDetailQuery query);

    List<PurchaseApplyBillClientDTO> listByBillCodeList(Collection<? extends Serializable> billCodeList);

    PurchaseApplyBillDetailClientDTO getByBillCodeAndItemCode(String billCode, String itemCode);
    PurchaseApplyBillDetailClientDTO getByBillCode(String billCode);

    /**
     * 通过采购申请单号获取采购申请单信息
     * @param billCode 采购申请单号
     * @return 采购申请单信息
     */
    PurchaseApplyBillClientDTO getPurchaseApplyBill(String billCode);
    /**
     * 获取采购申请单明细通过采购申请单号
     * @param billCode 采购申请单号
     * @return 采购申请单明细列表
     */
    List<PurchaseApplyBillDetailClientDTO> getPurchaseApplyBillDetail(String billCode, String itemCode);

    PageView selectPurchaseForContractList(PurchaseApplyBillDetailQuery query);

}
