package com.jwipc.order.logic;

import cn.hutool.core.lang.Pair;
import com.jwipc.order.dto.PurchaseOrderDetailLabelPrintDTO;
import com.jwipc.order.dto.PurchaseOrderDetailListDTO;
import com.jwipc.order.dto.PurchaseOrderDetailUnlockDTO;
import com.jwipc.order.model.query.PurchaseOrderDetailQuery;
import com.jwipc.order.model.query.PurchaseOrderDetailsQuery;
import com.jwipc.page.PageView;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * <p> </p>
 *
 * @author BOGON
 * @version 1.0
 * @since JDK 1.8
 */
public interface PurchaseOrderDetailLogic {

    PageView getList(PurchaseOrderDetailQuery query);

    PageView details(PurchaseOrderDetailsQuery query);

    List<PurchaseOrderDetailListDTO> listAll(PurchaseOrderDetailQuery purchaseOrderQuery);

    Pair< List<PurchaseOrderDetailListDTO>,Long> getListForDeliveryCreate(PurchaseOrderDetailQuery query);

    Pair<List<PurchaseOrderDetailListDTO>, Long> getListForDeliveryCreate(PurchaseOrderDetailQuery query,
                                                                          boolean exportFlag);

    List<PurchaseOrderDetailListDTO> getListUnlockForDeliveryCreate(List<String> idList);

    PurchaseOrderDetailLabelPrintDTO getInfoForLabelPrint(String orderCode, String materialCode);

    PageView getPlanList(String orderCode, String row);

    PageView getComponentList(String orderCode, String row, String planLine);

    PageView getCostList(String orderCode, String row);

    void unlock(List<PurchaseOrderDetailUnlockDTO> unlockDTO);

    void importUnlock(MultipartFile file) throws IOException;
}