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 IpcController : ApiController { readonly string headUrl = "Project/"; [HttpPost] [Route("OnlineCheckData")] public HttpResponseMessage ReceiveMomPlanData([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(Analysis_MOM_Msg.OnlineCheckData(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("OnlineCheckDataCount")] public HttpResponseMessage OnlineCheckDataCount([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(Analysis_MOM_Msg.OnlineCheckDataCount(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("OnlineCheckDataCountBool")] public HttpResponseMessage OnlineCheckDataCountBool([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(Analysis_MOM_Msg.OnlineCheckDataCountBool(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("ReceivePrintTask")] public HttpResponseMessage ReceivePrintTask([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(Analysis_MOM_Msg.ReceivePrintTask(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("GetCharData")] public HttpResponseMessage GetCharData([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(Analysis_MOM_Msg.GetCharData(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } } }