Files
16-Xikai-MesProjectNew/Interface_WebAPI/SlMesDbIterface/WebAPI/Controller/MomController.cs
2026-05-29 09:34:04 +08:00

253 lines
9.3 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.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
/// <summary>
///
/// </summary>
namespace WebApi
{
/// <summary>
///
/// </summary>
public class MomController : ApiController
{
readonly string headUrl = "/";
/// <summary>
/// 工艺信息接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 生产任务接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 生产工单接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 员工信息下发接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 生产组织信息下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 工作中心信息下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 物料信息下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 计量单位下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 员工排班信息下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 报警关闭
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// AGV送料交互接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 缓存位置查询
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 点检计划下发
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
/// <summary>
/// 删除派工订单接口
/// </summary>
/// <param name="jobj"></param>
/// <returns></returns>
[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")
};
}
}
}