package com.fjhx.mes.service.work;

import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.fjhx.mes.entity.bom.po.BomDetail;
import com.fjhx.mes.entity.work.po.WorkOrder;
import com.fjhx.mes.entity.work.po.WorkOrderProductionProcesses;
import com.ruoyi.common.core.service.BaseService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.mes.entity.work.vo.WorkOrderVo;
import com.fjhx.mes.entity.work.dto.WorkOrderSelectDto;
import com.fjhx.mes.entity.work.dto.WorkOrderDto;

import java.util.List;


/**
 * <p>
 * 工单 服务类
 * </p>
 *
 * @author
 * @since 2023-03-29
 */
public interface WorkOrderService extends BaseService<WorkOrder> {

    /**
     * 工单分页
     */
    Page<WorkOrderVo> getPage(WorkOrderSelectDto dto);

    /**
     * 工单明细
     */
    WorkOrderVo detail(Long id);

    /**
     * 工单新增
     */
    void add(WorkOrderDto workOrderDto);

    /**
     * 工单编辑
     */
    void edit(WorkOrderDto workOrderDto);

    /**
     * 工单删除
     */
    void delete(Long id);


    Page<WorkOrderVo> getPageByJxst(WorkOrderSelectDto dto);

    List<WorkOrderProductionProcesses> getProductionProcessesList(WorkOrder workOrder);

    /**
     * 检查定制工单BOM 工艺配置状态 如果配置完成则发送消息
     */
    void checkCustomizedInfo(Long workOrderId);

    /**
     * 给下发生产计划的人发消息
     */
    void sendPlanInfo();

    /**
     * 下发需要人工干预的工单
     */
    void distribute(WorkOrderDto dto);

    /**
     * 获取工单BOM信息
     */
    List<BomDetail> getBomInfo(WorkOrder workOrder);

    /**
     * 研发上传附件
     */
    void research(WorkOrderDto dto);

//    /**
//     * 冻结工单BOM
//     */
//    void freezeMaterial(WorkOrder workOrder);
}
