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 PLMTEST; using System.Net; using System.Net.Http.Headers; using System.IO; using MisDataSaveDate; /////http://127.0.0.1:9981/api/IOrder/InsertOrder /// /// /// namespace WebApi { /// /// /// public class MomController : ApiController { readonly string headUrl = "/"; /// /// 工艺信息接口 /// /// /// [HttpPost] [Route("ProcessInfo")] public HttpResponseMessage ProcessInfo([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.ProcessInfo(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 生产任务接口 /// /// /// [HttpPost] [Route("DispatchOrder")] public HttpResponseMessage DispatchOrder([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.DispatchOrder(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 生产工单接口 /// /// /// [HttpPost] [Route("ProductionOrder")] public HttpResponseMessage ProductionOrder([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.ProductionOrder(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 员工信息下发接口 /// /// /// [HttpPost] [Route("EmployeeSave")] public HttpResponseMessage EmployeeSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_Employee(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 生产组织信息下发 /// /// /// [HttpPost] [Route("OrgInfoSave")] public HttpResponseMessage OrgInfoSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_OrgInfo(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 工作中心信息下发 /// /// /// [HttpPost] [Route("WorkCenterSave")] public HttpResponseMessage WorkCenterSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_WorkCenterSave(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 物料信息下发 /// /// /// [HttpPost] [Route("MaterialSave")] public HttpResponseMessage MaterialSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_MaterialSave(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 计量单位下发 /// /// /// [HttpPost] [Route("UnitInfoSave")] public HttpResponseMessage UnitInfoSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_UnitInfoSave(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 员工排班信息下发 /// /// /// [HttpPost] [Route("ShiftScheduleSave")] public HttpResponseMessage ShiftScheduleSave([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_ShiftScheduleSave(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 报警关闭 /// /// /// [HttpPost] [Route("AlarmClosed")] public HttpResponseMessage AlarmClosed([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.MES_To_AMS_AlarmClosed(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// AGV送料交互接口 /// /// /// [HttpPost] [Route("AGV_To_AMS_InterAction")] public HttpResponseMessage AGV_To_AMS_InterAction([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.AGV_To_AMS_Interaction(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 缓存位置查询 /// /// /// [HttpPost] [Route("LineSideStock")] public HttpResponseMessage LineSideStock([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.AGV_To_AMS_LineSideStock(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 点检计划下发 /// /// /// [HttpPost] [Route("InspectionPlan")] public HttpResponseMessage InspectionPlan([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.InspectionPlan(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("QTTemplateInfo")] public HttpResponseMessage QTTemplateInfo([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.QTItemTemplateInfo(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } [HttpPost] [Route("QTStandardInfo")] public HttpResponseMessage QTStandardInfo([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.QTStandardInfo(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } /// /// 删除派工订单接口 /// /// /// [HttpPost] [Route("DeleteDispatchOrder")] public HttpResponseMessage DeleteDispatchOrder([FromBody] JObject jobj) { return new HttpResponseMessage { Content = new StringContent(AnalysisMomMsg.DeleteDispatchOrder(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json") }; } } }