package com.jwipc.order.client;

import com.jwipc.order.clent.dto.*;

import java.util.List;
import java.util.Set;

/**
 * <p>
 *
 * </p>
 *
 * @author wt
 * @version 1.0
 * @since 2024/3/8
 */

public interface PurchaseOrderClient {
    /**
     * 查询采购订单数据
     *
     * @param orderCode 采购订单代码
     * @return 采购订单数据
     */
    PurchaseOrderDTO getOrderByCode(String orderCode);

    List<PurchaseOrderDTO> getOrderListById(Long id);

    /**
     * 查询采购订单明细数据
     *
     * @param orderCode   采购订单代码
     * @param orderRow    采购订单行项目
     * @param factoryCode 工厂
     * @return 采购订单明细数据
     */
    PurchaseDetailDTO getOrderDetailByCodeAndItemNoAndFactoryCode(String orderCode, String orderRow,
                                                                         String factoryCode);

    PurchaseDetailDTO getOrderDetailByCodeAndItemNo(String orderCode, String orderRow);
    PurchaseDetailDTO getOrderDetailByCodeAndMaterialCode(String orderCode, String materialCode);

    /**
     * 查询采购订单明细数据
     *
     * @param detailQuery 查询条件
     * @return
     */

    List<PurchaseDetailDTO> getOrderDetailInfo(List<PurchaseDetailDTO> detailQuery);

    void updatePurchaseDetail(List<UpdateOrderDetailDTO> updateOrderDetailDTOS,
                                     List<PurchaseOrderDevPlanDTO> planDTOS);

    void updateOrderFin(Long id);
    void updateFinConf(Set<String> orderCode, Long userId);

    void updateOrderFinAndFileState(List<Long> id,Integer finConf,Integer fileState);

    void updateOrderFileState(List<Long> id);

    List<PurchaseDetailDTO> getOrderDetaiBySupplierCodeAndMaterial(String supplierCode,List<String> material);

    String findMonthNGconfirmOrderList(String accountStatementId,String year, String month, String supplierCode);

    Integer getEsignTotalPage(Long fileId) ;

    List<PurchaseDetailDTO> getOrderDetailBysupplierCodeAndFactoryCode(String supplierCode,String factoryCode,String orderCode);

    List<PurchaseOrderDTO> getListByCodes( List<String> nos);

    List<PurchaseOrderAttachmentDTO> getAttachmentList(List<String> ids);

}
