using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Web;
using System.Web.Http;
using System.Collections.Concurrent;
using Newtonsoft.Json.Linq;
using System.Threading;
using System.Net;
using System.Net.Http.Headers;
using System.IO;
using MisDataSaveDate;
namespace MisDataSaveDate
{
///
/// AGV接口控制器
///
public class AGVController : ApiController
{
readonly string headUrl = "agv/";
///
/// AGV请求进入离开、下降举升接口(接收方)
/// 接收AGV的进入、离开、下降、举升请求并存储到数据库
///
/// AGV请求数据
/// 处理结果
[HttpPost]
[Route("agv/agvReqInOut")]
public HttpResponseMessage agvReqInOut([FromBody] JObject jobj)
{
return new HttpResponseMessage
{
Content = new StringContent(AGV_BusinessLogic.ProcessAGVEnterRequest(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
};
}
///
/// 临工AGV到达/离开状态回调接口。
///
/// 临工AGV状态回调数据
/// 处理结果
[HttpPost]
[Route("agv/lgagv/statusUpdate")]
public HttpResponseMessage LGAGV_StatusUpdate([FromBody] JObject jobj)
{
return new HttpResponseMessage
{
Content = new StringContent(LGAGV_BusinessLogic.ProcessStatusUpdate(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
};
}
///
/// 临工AGV任务结果回调接口。
///
/// 临工AGV任务结果数据
/// 处理结果
[HttpPost]
[Route("agv/lgagv/taskResult")]
public HttpResponseMessage LGAGV_TaskResult([FromBody] JObject jobj)
{
return new HttpResponseMessage
{
Content = new StringContent(LGAGV_BusinessLogic.ProcessTaskResult(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
};
}
}
}