package org.nl.acs.agv.server;

import cn.hutool.http.HttpResponse;
import com.alibaba.fastjson.JSONObject;
import org.nl.acs.agv.server.dto.AgvDto;
import org.nl.acs.instruction.domain.Instruction;

import java.util.Map;

/**
 * @Author: lyd
 * @Description:
 * @Date: 2022-08-15
 */
public interface XianGongAgvService {
    Map<String, AgvDto> findAllAgvFromCache();
    /**
     * 查询自动门状态
     *
     * @param device
     * @return
     */
    public String queryDoorStatus(String device);

    /**
     * 先工agv 等待点请求
     *AGV->ACS
     * @param
     * @return
     */
    public String waitPointRequest(String param);

    /**
     * acs->agv
     * 关闭运单系列
     * @param code
     * @return
     * @throws Exception
     */
    public HttpResponse markComplete(String code) throws Exception;

    /**
     * 查询AGV状态
     * @return
     */
    public HttpResponse queryXZAgvDeviceStatus();

    public HttpResponse queryXZAgvInstStatus(String instCode);

    /**
     * 删除先知任务
     *
     * @param instCode
     * @return
     */
    public HttpResponse deleteXZAgvInst(String instCode);


    /**
     * 下发运单序列
     *
     * @param inst
     * @return
     * @throws Exception
     */
    public HttpResponse sendOrderSequencesToXZ(Instruction inst) throws Exception;

    public HttpResponse addOrderSequences(Instruction inst) throws Exception;

    /**
     * 组织json数据
     *
     * @param
     * @return
     * @throws Exception
     */
    public String sendOrderSequencesParam(Instruction inst) throws Exception;


    public JSONObject createOrederData(Instruction inst, String type);

}
