package com.cf.imes.module.executor.service.assemblylist;

import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.executor.controller.admin.assemblylist.vo.AssemblyListComponentPageReqVO;
import com.cf.imes.module.executor.controller.admin.assemblylist.vo.AssemblyListComponentFlatReqVO;
import com.cf.imes.module.executor.controller.admin.assemblylist.vo.AssemblyListComponentFlatRespVO;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderPageReqVO;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrdersViewCadViewInfoRespVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.AssemblyComponentChildPrintReqVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.AssemblyComponentChildPrintRespVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrderComponentRespVO;
import com.cf.imes.module.executor.controller.admin.ordercomponent.vo.OrdersTopComponentListReqVO;
import com.cf.imes.module.executor.dal.dataobject.order.OrderDO;

import java.util.List;

/**
 * 装配清单 Service
 *
 * @author Gqr
 * @since 2026/2/28 11:16
 */
public interface AssemblyListService {
    /**
     * 查询装配清单订单分页
     *
     * @param pageReqVO
     * @return
     */
    PageResult<OrderDO> getMainOrderPage(OrderPageReqVO pageReqVO);

    /**
     * 获取部件列表，根据装配设置对应加工状态
     *
     * @param reqVO
     * @return
     */
    List<OrderComponentRespVO> getComponentList(AssemblyListComponentPageReqVO reqVO);

    /**
     * 获取按名称汇总的平铺部件层级列表
     *
     * @param reqVO
     * @return
     */
    List<AssemblyListComponentFlatRespVO> getComponentFlatList(AssemblyListComponentFlatReqVO reqVO);

    /**
     * 获取部件的直接下级列表。
     *
     * @param assemblyComponentChildPrintReqVO
     * @return 当前部件及其直接下级列表
     */
    List<AssemblyComponentChildPrintRespVO> getDirectChildComponentList(AssemblyComponentChildPrintReqVO assemblyComponentChildPrintReqVO);

    /**
     * 获取部件和下级所有的板件视图列表
     * @param reqVO
     * @return
     */
    OrdersViewCadViewInfoRespVO getViewComponentPlatesCadInfo(AssemblyListComponentPageReqVO reqVO);

    /**
     * 加工部件
     *
     * @param id
     */
    void processComponent(Long id);

    /**
     * 恢复部件未加工状态
     * @param id
     */
    void restoreComponent(Long id);

    /**
     * 查询订单顶级部件列表
     *
     * @param reqVO
     * @return
     */
    List<OrderComponentRespVO> getOrderTopComponentList(OrdersTopComponentListReqVO reqVO);
}
