init: 北航大学BH-DAS项目首次入库
This commit is contained in:
67
CCYQ_JieFang/webApi/Controller/FSSController.cs
Normal file
67
CCYQ_JieFang/webApi/Controller/FSSController.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
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")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user