68 lines
2.0 KiB
C#
68 lines
2.0 KiB
C#
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.Runtime.Remoting.Messaging;
|
|
|
|
|
|
namespace MesWork
|
|
{
|
|
|
|
public class FSSController : ApiController
|
|
{
|
|
readonly string headUrl = "Project/";
|
|
|
|
[HttpPost]
|
|
[Route("lx/ResponseEnterOrLeave")]
|
|
// FSS-接收允许进入或离开
|
|
public HttpResponseMessage ResponseEnterOrLeave([FromBody] JObject jobj)
|
|
{
|
|
|
|
var result = new msgResHeader();
|
|
result.Code = "200";
|
|
result.Message = "";
|
|
string retString = JsonConvert.SerializeObject(result);
|
|
return new HttpResponseMessage
|
|
{
|
|
Content = new StringContent(retString, Encoding.GetEncoding("UTF-8"), "application/json")
|
|
};
|
|
}
|
|
|
|
[HttpPost]
|
|
[Route("lx/FinishCall")]
|
|
// FSS-接收IPC下料请求
|
|
public HttpResponseMessage FinishCall([FromBody] JObject jobj)
|
|
{
|
|
var result = new msgResHeader();
|
|
result.Code = "200";
|
|
result.Message = "";
|
|
string retString = JsonConvert.SerializeObject(result);
|
|
return new HttpResponseMessage
|
|
{
|
|
Content = new StringContent(retString, Encoding.GetEncoding("UTF-8"), "application/json")
|
|
};
|
|
}
|
|
[HttpPost]
|
|
[Route("lx/DeviceStatus")]
|
|
// FSS-接收IPC状态变化
|
|
public HttpResponseMessage DeviceStatus([FromBody] JObject jobj)
|
|
{
|
|
var result = new msgResHeader();
|
|
result.Code = "200";
|
|
result.Message = "";
|
|
string retString = JsonConvert.SerializeObject(result);
|
|
return new HttpResponseMessage
|
|
{
|
|
Content = new StringContent(retString, Encoding.GetEncoding("UTF-8"), "application/json")
|
|
};
|
|
}
|
|
}
|
|
}
|