package com.cf.imes.module.executor.service.manage.pack;


import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.executor.controller.admin.manage.pack.vo.*;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.OrderPackageVO;
import com.cf.imes.module.executor.controller.admin.manage.query.vo.pack.PackageDetailsRespVO;

import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;

public interface PackService {


    // 打包分页查询
    PageResult<PackRespVO> getPackPage(PackPageReqVO pageReqVO);


    /**
     * 查询生产单对应的包裹列表
     *
     * @param reqVO
     * @return
     */
    List<OrderPackageVO> getOrderPack(PackageDetailsReqVO reqVO);


    PageResult<OrderPackageVO> getPageOrderPack(PackageDetailsReqVO reqVO);

    /**
     * 拆包
     *
     * @param packageId
     * @return
     */
    OrderPackRespVO unpacking(Long packageId);


    /**
     * 封包
     *
     * @param packageVO
     * @return
     */
    OrderPackRespVO updatePack(OrderPackReqVO packageVO);


    // 查询包裹
    List<OrderPackRespVO> selectPack(Long orderId);


    /**
     * 删除包裹并还原包裹中的内容
     *
     * @param reqVO
     */
    void deleteOrderPack(PackReqVO reqVO);


    /**
     * 获取部件关联板件和配件id
     *
     * @param reqVO
     * @return
     */
    List<String> getComponentCorrelation(PackScanComponentCorrelationReqVO reqVO);

    /**
     * 获取订单列表下未打包的明细
     *
     * @param orderIds
     * @return
     */
    OrdersUnpackDetailRespVO getOrdersUnpackDetails(List<Long> orderIds);

    /**
     * 获取包裹板件、配件详情
     *
     * @param reqVO
     * @return
     */
    List<PackageDetailsRespVO> getOrdersPackageDetails(PackageDetailReqVO reqVO);

    /**
     * 获取包裹板件、配件详情
     *
     * @param packageNo
     * @return
     */
    List<PackageDetailsRespVO> getOrderPackageDetails(Long orderId, String packageNo);

    /**
     * 根据包裹编号列表获取对应订单编号
     *
     * @param packageNo
     * @return
     */
    Map<String, List<Long>> getOrderIdsByPackageNo(Collection<Long> packageNo);

    /**
     * 批量删除订单包裹
     *
     * @param orderId
     * @param packageNo
     */
    void deletePackageByPackageNo(Long orderId, Set<String> packageNo);
}
