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

import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.executor.controller.admin.order.vo.order.OrderRespVO;
import com.cf.imes.module.executor.controller.admin.plan.vo.OrderPlanLockReqVO;
import com.cf.imes.module.executor.controller.admin.plan.bo.OrderRoomBodyList;
import com.cf.imes.module.executor.controller.admin.plan.vo.*;

import com.cf.imes.module.executor.controller.admin.plate.vo.OrderViewPlatePageRespVO;
import jakarta.validation.Valid;
import java.util.List;

/**
 * 订单开料排单 Service 接口
 *
 * @author 晨丰科技
 */
public interface PlanService {

    /**
     * 创建订单开料排单
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    void createPlan(@Valid PlanSaveReqVO createReqVO);

    /**
     * 更新订单开料排单
     *
     * @param updateReqVO 更新信息
     */
    void updatePlan(@Valid PlanSaveReqVO updateReqVO);

    /**
     * 删除订单开料排单
     *
     * @param planIds 编号
     */
    void deletePlan(List<Long> planIds);

    /**
     * 获得订单开料排单
     *
     * @param id 编号
     * @return 订单开料排单
     */
    PlanRespVO getPlan(Long id);

    /**
     * 获得订单开料排单分页
     *
     * @param pageReqVO 分页查询
     * @return 订单开料排单分页
     */
    PageResult<PlanRespVO> getPlanPage(PlanPageReqVO pageReqVO);

    /**
     * 获取排单优先级列表
     *
     * @return
     */
    List<PlanRespVO> getPlanSortPage();

    /**
     * 未排订单分页查询
     *
     * @param pageReqVO
     * @return
     */
    PageResult<OrderRespVOCopy> getOrderPage(OrderPageReqVOCopy pageReqVO);

    /**
     * 未排订单大板分页查询
     *
     * @param pageReqVO
     * @return
     */
    PageResult<OrderGoodsResp> getOrderGoodsPage(OrderPageReqVOCopy pageReqVO);

    /**
     * 查询排单板件分页
     *
     * @param vo
     * @return
     */
    PageResult<OrderViewPlatePageRespVO> getPlateByPlanId(GetPlateByPlanIdVO vo);

    PageResult<OrderRespVO> getOrderByPlanId(PlanOrderPageReqVO pageReqVO);

    void setSort(List<SortVO> sortVos);

    List<PlateResList> getPlateList(List<Long> planIds);


    List<OrderRoomBodyList> getOrderRoomBody(List<Long> orderIds);

    List<PlanActualGoodsResp> getPlanGoodsList(SavePlanPlateList savePlanPlateList);

    List<PlateResList> getPlanPlateList(Long planId);

    /**
     * 获取排单锁
     *
     * @param orderPlanLockReqVO
     */
    void getPlanLock(OrderPlanLockReqVO orderPlanLockReqVO);

    /**
     * 释放排单锁
     *
     * @param orderPlanLockReqVO
     */
    void releasePlanLock(OrderPlanLockReqVO orderPlanLockReqVO);
}