init: 北航大学BH-DAS项目首次入库
This commit is contained in:
719
CCYQ_JieFang/webApi/AnalysisMsg.cs
Normal file
719
CCYQ_JieFang/webApi/AnalysisMsg.cs
Normal file
@@ -0,0 +1,719 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.Http;
|
||||
using NPOI.POIFS.Properties;
|
||||
using Robots;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using Opc.Ua;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace MesWork
|
||||
{
|
||||
public class AnalysisMsg
|
||||
{
|
||||
/// <summary>
|
||||
/// UUID生成
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string UuidUtil()
|
||||
{
|
||||
string result = Guid.NewGuid().ToString();
|
||||
|
||||
return result;
|
||||
}
|
||||
/// <summary>
|
||||
/// IPC-接收装配信息
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string product(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
string MsgId = "";
|
||||
var result = new msgResHeader();
|
||||
result.Code = "200";
|
||||
result.Message = "";
|
||||
|
||||
int AID = -1;
|
||||
string errorMessage = "";
|
||||
if (jobj == null)
|
||||
{
|
||||
throw new Exception("参数格式不正确!");
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
publicCore.LogInsert("product", "Info", str);
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param1 = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref param1, out DataTable dt, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_IOT接口交互日志_请求记录】调用失败!");
|
||||
}
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
IPC_product productDataList = JsonConvert.DeserializeObject<IPC_product>(str);
|
||||
List<IPC_product_AssemblyInformation> product_AssemblyInformation = productDataList.AssemblyInformation;
|
||||
string Location = productDataList.Location;
|
||||
MsgId = productDataList.MsgId;
|
||||
if (MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
if (Location == "")
|
||||
{
|
||||
throw new Exception("参数Location为空!");
|
||||
}
|
||||
var parsingParam1 = new SqlParameter[] {
|
||||
new SqlParameter("@Location",Location),
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_工位装配信息_删除", MesWorkForm.ConnectionString, ref parsingParam1, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_工位装配信息_删除】调用失败!");
|
||||
}
|
||||
|
||||
foreach (var assemblyInformation in product_AssemblyInformation)
|
||||
{
|
||||
if (assemblyInformation.productPosition <= 0)
|
||||
{
|
||||
throw new Exception("参数productPosition不正确!");
|
||||
}
|
||||
if (assemblyInformation.productNo == "")
|
||||
{
|
||||
throw new Exception("参数productNo不正确!");
|
||||
}
|
||||
var parsingParam = new SqlParameter[] {
|
||||
new SqlParameter("@Location",Location),
|
||||
new SqlParameter("@productNo",assemblyInformation.productNo),
|
||||
new SqlParameter("@MsgId",MsgId),
|
||||
new SqlParameter("@productName",assemblyInformation.productName),
|
||||
new SqlParameter("@productPosition",assemblyInformation.productPosition)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_工位装配信息", MesWorkForm.ConnectionString, ref parsingParam, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_工位装配信息】调用失败!");
|
||||
}
|
||||
}
|
||||
publicCore.SolveAgvTaskNum(Location, "10");
|
||||
publicCore.JudgeMaterialFull(Location, product_AssemblyInformation);
|
||||
publicCore.FixedAllow(Location, true);
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",JsonConvert.SerializeObject(result))
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
result.MsgId = MsgId;
|
||||
}
|
||||
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
publicCore.LogInsert("product", "Info", "IPC-接收装配信息:" + retString);
|
||||
return retString;
|
||||
}
|
||||
/// <summary>
|
||||
/// IPC-查询设备可进入或可离开状态
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string RequestEnterOrLeave(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
string MsgId = "";
|
||||
var result = new msgResHeader();
|
||||
result.Code = "200";
|
||||
result.Message = "";
|
||||
|
||||
int AID = -1;
|
||||
string errorMessage = "";
|
||||
if (jobj == null)
|
||||
{
|
||||
throw new Exception("参数格式不正确!");
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
publicCore.LogInsert("RequestEnterOrLeave", "Info", str);
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param1 = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref param1, out DataTable dt, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_IOT接口交互日志_请求记录】调用失败!");
|
||||
}
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
IPC_RequestEnterOrLeave requestEnterOrLeave = JsonConvert.DeserializeObject<IPC_RequestEnterOrLeave>(str);
|
||||
string Location = requestEnterOrLeave.Location;
|
||||
int RequestType = requestEnterOrLeave.RequestType;
|
||||
MsgId = requestEnterOrLeave.MsgId;
|
||||
if (MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
if (Location == "")
|
||||
{
|
||||
throw new Exception("参数Location为空!");
|
||||
}
|
||||
if (RequestType != 1 && RequestType != 2)
|
||||
{
|
||||
throw new Exception("参数RequestType错误!");
|
||||
}
|
||||
// 1:查询是否可以进入
|
||||
if (RequestType == 1)
|
||||
{
|
||||
// 这块有问题,需要区分下是送 还是取 的请求进入
|
||||
// 如果是上料的请求进入 执行11
|
||||
// 1.AGV已到达上料区
|
||||
// 如果是下料的请求进入 执行31
|
||||
// 1.AGV已到达下料区
|
||||
publicCore.FSSRequestMsgId = MsgId;
|
||||
publicCore.SolveAgvTaskNum(Location, "11");
|
||||
}
|
||||
// 2:查询是否可以离开
|
||||
if (RequestType == 2)
|
||||
{
|
||||
// 这块有问题,需要区分下是送 还是取 的请求离开
|
||||
// 如果是上料的请求离开 执行21
|
||||
// 1:AGV 上料完成
|
||||
// 如果是下料的请求离开 执行41
|
||||
// AGV正在离开
|
||||
// 里面判断
|
||||
publicCore.FSSRequestMsgId = MsgId;
|
||||
publicCore.SolveAgvTaskNum(Location, "21");
|
||||
}
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",JsonConvert.SerializeObject(result))
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
result.MsgId = MsgId;
|
||||
}
|
||||
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
publicCore.LogInsert("RequestEnterOrLeave", "Info", "IPC-查询设备可进入或可离开状态:" + retString);
|
||||
return retString;
|
||||
}
|
||||
/// <summary>
|
||||
/// IPC-上下料完成AGV离开
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
/// <returns></returns>
|
||||
public static string WorkFinsih(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
|
||||
string MsgId = "";
|
||||
var result = new msgResHeader();
|
||||
result.Code = "200";
|
||||
result.Message = "";
|
||||
|
||||
int AID = -1;
|
||||
string errorMessage = "";
|
||||
if (jobj == null)
|
||||
{
|
||||
throw new Exception("参数格式不正确!");
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
publicCore.LogInsert("WorkFinsih", "Info", str);
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param1 = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref param1, out DataTable dt, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_IOT接口交互日志_请求记录】调用失败!");
|
||||
}
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
IPC_WorkFinsih WorkFinsih = JsonConvert.DeserializeObject<IPC_WorkFinsih>(str);
|
||||
string Location = WorkFinsih.Location;
|
||||
int finishType = WorkFinsih.FinishType;
|
||||
|
||||
MsgId = WorkFinsih.MsgId;
|
||||
if (MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
if (Location == "")
|
||||
{
|
||||
throw new Exception("参数Location为空!");
|
||||
}
|
||||
if (finishType != 1 && finishType != 2)
|
||||
{
|
||||
throw new Exception("参数FinishType错误!");
|
||||
}
|
||||
if (finishType == 1)
|
||||
{
|
||||
// 1.AGV上料完成 已离开
|
||||
publicCore.SolveAgvTaskNum(Location, "51");
|
||||
}
|
||||
if (finishType == 2)
|
||||
{
|
||||
// 1.AGV下料完成 已离开
|
||||
publicCore.SolveAgvTaskNum(Location, "51");
|
||||
publicCore.FixedAllow(Location, false);
|
||||
}
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",JsonConvert.SerializeObject(result))
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
result.MsgId = MsgId;
|
||||
}
|
||||
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
publicCore.LogInsert("WorkFinsih", "Info", "IPC-上下料完成AGV离开res:" + retString);
|
||||
return retString;
|
||||
}
|
||||
public static string IPCDeviceStatus(string url, [FromBody] JObject jobj)
|
||||
{
|
||||
|
||||
string MsgId = "";
|
||||
var result = new msgResHeader();
|
||||
result.Code = "200";
|
||||
result.Message = "";
|
||||
|
||||
int AID = -1;
|
||||
string errorMessage = "";
|
||||
if (jobj == null)
|
||||
{
|
||||
throw new Exception("参数格式不正确!");
|
||||
}
|
||||
int isError = 0;
|
||||
string str = jobj.ToString();
|
||||
publicCore.LogInsert("WorkFinsih", "Info", str);
|
||||
try
|
||||
{
|
||||
//存储日志
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var param1 = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",url),
|
||||
new SqlParameter("@接口类型",2), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",str),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref param1, out DataTable dt, out errorMessage);
|
||||
if (errorMessage != "")
|
||||
{
|
||||
throw new Exception("数据库存储过程【接口_IOT接口交互日志_请求记录】调用失败!");
|
||||
}
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
// 解析订单内容,存储数据库,根据实际业务来写
|
||||
IPC_DeviceStatus WorkFinsih = JsonConvert.DeserializeObject<IPC_DeviceStatus>(str);
|
||||
string Location = WorkFinsih.Location;
|
||||
MsgId = WorkFinsih.MsgId;
|
||||
if (MsgId == "")
|
||||
{
|
||||
throw new Exception("参数MsgId为空!");
|
||||
}
|
||||
if (Location == "")
|
||||
{
|
||||
throw new Exception("参数Location为空!");
|
||||
}
|
||||
// 调用接口 发送当前工位 状态
|
||||
MesWork.publicCore.SolveDeviceStatus_WebApi_Use(Location);
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",JsonConvert.SerializeObject(result))
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
if (dt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(dt.Rows[0]["AID"]);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
result.Code = "500";
|
||||
result.Message = err.Message;
|
||||
result.MsgId = MsgId;
|
||||
}
|
||||
|
||||
string retString = JsonConvert.SerializeObject(result);
|
||||
publicCore.LogInsert("WorkFinsih", "Info", "IPC-上下料完成AGV离开res:" + retString);
|
||||
return retString;
|
||||
}
|
||||
/// <summary>
|
||||
/// FSS-接收允许进入或离开
|
||||
/// </summary>
|
||||
/// <param name="Location"></param>
|
||||
/// <param name="ResponseType"></param>
|
||||
public static void ResponseEnterOrLeave(string Location, int ResponseType)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 创建父集合
|
||||
FSS_ResponseEnterOrLeave responseEnterOrLeave = new FSS_ResponseEnterOrLeave();
|
||||
// 将管控传递来的MsgId 返回回去
|
||||
responseEnterOrLeave.MsgId = publicCore.FSSRequestMsgId; //UuidUtil();
|
||||
if (publicCore.FSSRequestMsgId == "")
|
||||
{
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Info", "接口【FSS-接收允许进入或离开】未获取到请求时的MsgId 已使用随机UUID 请确认请求是否有误:" );
|
||||
responseEnterOrLeave.MsgId = UuidUtil();
|
||||
}
|
||||
responseEnterOrLeave.ResponseType = ResponseType;
|
||||
responseEnterOrLeave.Location = Location;
|
||||
responseEnterOrLeave.MsgSource = 1;
|
||||
responseEnterOrLeave.SendTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//准备上传的数据 反序列化
|
||||
string bodydata = JsonConvert.SerializeObject(responseEnterOrLeave);
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Info", bodydata);
|
||||
|
||||
string urlstr = MesWorkForm.ResponseEnterOrLeaveUrl;
|
||||
string retString;
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlstr);
|
||||
request.Method = "post";
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(bodydata);
|
||||
request.Accept = "*/*";
|
||||
request.ContentType = "application/json;charset=utf-8";
|
||||
|
||||
// 反序列化后先把JSON做接口记录
|
||||
//存储日志
|
||||
int AID = -1;
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var reqParam = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",urlstr),
|
||||
new SqlParameter("@接口类型",1), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",bodydata),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref reqParam, out DataTable reqDt, out string errorMessage);
|
||||
if (reqDt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(reqDt.Rows[0]["AID"]);
|
||||
}
|
||||
|
||||
request.ContentLength = bytes.Length;
|
||||
|
||||
// 准备请求体
|
||||
Stream myResponseStream = request.GetRequestStream();
|
||||
myResponseStream.Write(bytes, 0, bytes.Length);
|
||||
//发送webapi请求 等待相应
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
StreamReader myStreamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
|
||||
retString = myStreamReader.ReadToEnd();
|
||||
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",retString)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
|
||||
// 序列化响应内容
|
||||
msgResHeader mrh = JsonConvert.DeserializeObject<msgResHeader>(retString);
|
||||
int statusCode = (int)response.StatusCode;
|
||||
// 对响应内容进行处理 更新数据库标志
|
||||
if (statusCode == 200)
|
||||
{
|
||||
// 清空FSS 请求MsgId
|
||||
publicCore.FSSRequestMsgId = "";
|
||||
myStreamReader.Close();
|
||||
myResponseStream.Close();
|
||||
if (response != null)
|
||||
{
|
||||
// 失败
|
||||
if (mrh.Code != "200")
|
||||
{
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Error", "接口【FSS-接收允许进入或离开】失败:" + mrh.Message);
|
||||
}
|
||||
response.Close();
|
||||
}
|
||||
if (request != null)
|
||||
{
|
||||
request.Abort();
|
||||
}
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Info", retString);
|
||||
}
|
||||
else
|
||||
{
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Info", "接口【FSS-接收允许进入或离开】失败:"+ statusCode);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
publicCore.LogInsert("ResponseEnterOrLeave", "Info", "接口【FSS-接收允许进入或离开】失败:" + err.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// FSS-接收IPC下料请求
|
||||
/// </summary>
|
||||
/// <param name="Location"></param>
|
||||
/// <param name="ResponseType"></param>
|
||||
public static void FinishCall(string Location)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 创建父集合
|
||||
FSS_FinishCall finishCall = new FSS_FinishCall();
|
||||
finishCall.MsgId = UuidUtil();
|
||||
finishCall.Location = Location;
|
||||
finishCall.MsgSource = 1;
|
||||
finishCall.SendTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//准备上传的数据 反序列化
|
||||
string bodydata = JsonConvert.SerializeObject(finishCall);
|
||||
publicCore.LogInsert("FinishCall", "Info", bodydata);
|
||||
|
||||
string urlstr = MesWorkForm.FinishCallUrl;
|
||||
string retString;
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlstr);
|
||||
request.Method = "post";
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(bodydata);
|
||||
request.Accept = "*/*";
|
||||
request.ContentType = "application/json;charset=utf-8";
|
||||
|
||||
// 反序列化后先把JSON做接口记录
|
||||
//存储日志
|
||||
int AID = -1;
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var reqParam = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",urlstr),
|
||||
new SqlParameter("@接口类型",1), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",bodydata),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref reqParam, out DataTable reqDt, out string errorMessage);
|
||||
if (reqDt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(reqDt.Rows[0]["AID"]);
|
||||
}
|
||||
|
||||
request.ContentLength = bytes.Length;
|
||||
|
||||
// 准备请求体
|
||||
Stream myResponseStream = request.GetRequestStream();
|
||||
myResponseStream.Write(bytes, 0, bytes.Length);
|
||||
//发送webapi请求 等待相应
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
StreamReader myStreamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
|
||||
retString = myStreamReader.ReadToEnd();
|
||||
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",retString)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
|
||||
// 序列化响应内容
|
||||
msgResHeader mrh = JsonConvert.DeserializeObject<msgResHeader>(retString);
|
||||
int statusCode = (int)response.StatusCode;
|
||||
// 对响应内容进行处理 更新数据库标志
|
||||
if (statusCode == 200)
|
||||
{
|
||||
myStreamReader.Close();
|
||||
myResponseStream.Close();
|
||||
if (response != null)
|
||||
{
|
||||
// 失败
|
||||
if (mrh.Code != "200")
|
||||
{
|
||||
publicCore.LogInsert("FinishCall", "Error", "接口【FSS-接收IPC下料请求】失败:" + mrh.Message);
|
||||
}
|
||||
response.Close();
|
||||
}
|
||||
if (request != null)
|
||||
{
|
||||
request.Abort();
|
||||
}
|
||||
publicCore.LogInsert("FinishCall", "Info", retString);
|
||||
}
|
||||
else
|
||||
{
|
||||
publicCore.LogInsert("FinishCall", "Error", "接口【FSS-接收IPC下料请求】失败:" + statusCode);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
publicCore.LogInsert("FinishCall", "Error", "接口【FSS-接收IPC下料请求】失败:" + err.Message);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// FSS-接收IPC状态变化
|
||||
/// </summary>
|
||||
/// <param name="Location"></param>
|
||||
/// <param name="ResponseType"></param>
|
||||
public static void DeviceStatus(string Location, int DeviceStatus)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 创建父集合
|
||||
FSS_DeviceStatus deviceStatus = new FSS_DeviceStatus();
|
||||
deviceStatus.MsgId = UuidUtil();
|
||||
deviceStatus.Location = Location;
|
||||
deviceStatus.DeviceStatus = DeviceStatus;
|
||||
deviceStatus.MsgSource = 1;
|
||||
deviceStatus.SendTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
//准备上传的数据 反序列化
|
||||
string bodydata = JsonConvert.SerializeObject(deviceStatus);
|
||||
publicCore.LogInsert("DeviceStatus", "Info", bodydata);
|
||||
|
||||
string urlstr = MesWorkForm.DeviceStatusUrl;
|
||||
string retString;
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(urlstr);
|
||||
request.Method = "post";
|
||||
byte[] bytes = Encoding.UTF8.GetBytes(bodydata);
|
||||
request.Accept = "*/*";
|
||||
request.ContentType = "application/json;charset=utf-8";
|
||||
|
||||
// 反序列化后先把JSON做接口记录
|
||||
//存储日志
|
||||
int AID = -1;
|
||||
var CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
//Event_MOM_Log_Insert,@创建时间,@内容
|
||||
var reqParam = new SqlParameter[] {
|
||||
new SqlParameter("@接口地址",urlstr),
|
||||
new SqlParameter("@接口类型",1), // 1. 主动调用接口 2. 被调用接口
|
||||
new SqlParameter("@请求内容",bodydata),
|
||||
new SqlParameter("@请求时间",CreateTime)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_请求记录", MesWorkForm.ConnectionString, ref reqParam, out DataTable reqDt, out string errorMessage);
|
||||
if (reqDt.Rows.Count > 0)
|
||||
{
|
||||
AID = Convert.ToInt32(reqDt.Rows[0]["AID"]);
|
||||
}
|
||||
|
||||
request.ContentLength = bytes.Length;
|
||||
|
||||
// 准备请求体
|
||||
Stream myResponseStream = request.GetRequestStream();
|
||||
myResponseStream.Write(bytes, 0, bytes.Length);
|
||||
//发送webapi请求 等待相应
|
||||
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
|
||||
StreamReader myStreamReader = new StreamReader(response.GetResponseStream(), Encoding.UTF8);
|
||||
retString = myStreamReader.ReadToEnd();
|
||||
|
||||
//响应结果
|
||||
CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
|
||||
var resParam = new SqlParameter[] {
|
||||
new SqlParameter("@AID",AID),
|
||||
new SqlParameter("@响应时间",CreateTime),
|
||||
new SqlParameter("@响应内容",retString)
|
||||
};
|
||||
DataLinkMesWork.SQLCommon.ExecuteStoredProcedure("接口_IOT接口交互日志_响应记录", MesWorkForm.ConnectionString, ref resParam, out errorMessage);
|
||||
|
||||
// 序列化响应内容
|
||||
msgResHeader mrh = JsonConvert.DeserializeObject<msgResHeader>(retString);
|
||||
int statusCode = (int)response.StatusCode;
|
||||
// 对响应内容进行处理 更新数据库标志
|
||||
if (statusCode == 200)
|
||||
{
|
||||
myStreamReader.Close();
|
||||
myResponseStream.Close();
|
||||
if (response != null)
|
||||
{
|
||||
// 失败
|
||||
if (mrh.Code != "200")
|
||||
{
|
||||
publicCore.LogInsert("DeviceStatus", "Error", "接口【FSS-接收IPC状态变化】失败" + mrh.Message);
|
||||
}
|
||||
response.Close();
|
||||
}
|
||||
if (request != null)
|
||||
{
|
||||
request.Abort();
|
||||
}
|
||||
publicCore.LogInsert("DeviceStatus", "Info", retString);
|
||||
}
|
||||
else
|
||||
{
|
||||
publicCore.LogInsert("DeviceStatus", "Error", "接口【FSS-接收IPC状态变化】失败" + statusCode);
|
||||
}
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
publicCore.LogInsert("DeviceStatus", "Error", "接口【FSS-接收IPC状态变化】失败" + err.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
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")
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
78
CCYQ_JieFang/webApi/Controller/IpcController.cs
Normal file
78
CCYQ_JieFang/webApi/Controller/IpcController.cs
Normal file
@@ -0,0 +1,78 @@
|
||||
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("IPC/product")]
|
||||
// IPC-接收装配信息
|
||||
public HttpResponseMessage product([FromBody] JObject jobj)
|
||||
{
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(AnalysisMsg.product(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Route("IPC/RequestEnterOrLeave")]
|
||||
// IPC-设备可进入或可离开状态
|
||||
public HttpResponseMessage RequestEnterOrLeave([FromBody] JObject jobj)
|
||||
{
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(AnalysisMsg.RequestEnterOrLeave(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("IPC/WorkFinsih")]
|
||||
// IPC-上下料完成AGV离开
|
||||
public HttpResponseMessage WorkFinsih([FromBody] JObject jobj)
|
||||
{
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(AnalysisMsg.WorkFinsih(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
[HttpPost]
|
||||
[Route("IPC/DeviceStatus")]
|
||||
// IPC-设备状态
|
||||
public HttpResponseMessage DeviceStatus([FromBody] JObject jobj)
|
||||
{
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(AnalysisMsg.IPCDeviceStatus(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
[HttpGet]
|
||||
[Route("getInfo")]
|
||||
public HttpResponseMessage getInfo()
|
||||
{
|
||||
string pp = @"{\""Result\"":\""OK\""}";
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
// GlobalVar.log.Error(err.Message);
|
||||
}
|
||||
return new HttpResponseMessage { Content = new StringContent(pp, Encoding.GetEncoding("UTF-8"), "application/json") };
|
||||
}
|
||||
}
|
||||
}
|
||||
126
CCYQ_JieFang/webApi/IPC_product.cs
Normal file
126
CCYQ_JieFang/webApi/IPC_product.cs
Normal file
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using System.Data;
|
||||
|
||||
namespace MesWork
|
||||
{
|
||||
public class IPC_product
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
public List<IPC_product_AssemblyInformation> AssemblyInformation = new List<IPC_product_AssemblyInformation>();
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
public class IPC_product_AssemblyInformation
|
||||
{
|
||||
public string productNo = string.Empty;
|
||||
public string productName = string.Empty;
|
||||
public int productPosition = 0;
|
||||
}
|
||||
|
||||
public class IPC_RequestEnterOrLeave
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
/// <summary>
|
||||
/// 1:查询是否可以进入
|
||||
/// 2:查询是否可以离开
|
||||
/// </summary>
|
||||
public int RequestType = 0;
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
|
||||
public class IPC_WorkFinsih
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
/// <summary>
|
||||
/// 1:上料完成离开
|
||||
/// 2:下料完成离开
|
||||
/// </summary>
|
||||
public int FinishType = 0;
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// IPC提供WEBAPI接口,接收FSS发过来的请求设备状态 会调用FSS接口放回指定工位状态
|
||||
/// </summary>
|
||||
public class IPC_DeviceStatus
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// FSS提供WEBAPI接口,接收IPC发过来的AGV可进入或离开设备的接口
|
||||
/// </summary>
|
||||
public class FSS_ResponseEnterOrLeave
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
/// <summary>
|
||||
/// 1:可以进入
|
||||
/// 2:可以离开
|
||||
/// </summary>
|
||||
public int ResponseType = 0;
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
/// <summary>
|
||||
/// FSS提供WEBAPI接口,接收IPC发过来的请求下料接口
|
||||
/// </summary>
|
||||
public class FSS_FinishCall
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
/// <summary>
|
||||
/// FSS提供WEBAPI接口,接收IPC发过来的设备状态信息
|
||||
/// </summary>
|
||||
public class FSS_DeviceStatus
|
||||
{
|
||||
public string MsgId = "";
|
||||
/// <summary>
|
||||
/// 1:IPC、2:FSS、3:AGV
|
||||
/// </summary>
|
||||
public int MsgSource = 0;
|
||||
public string Location = "";
|
||||
/// <summary>
|
||||
/// 1:运行(既不可以上料也不可以下料)
|
||||
/// 2:空闲(可以上料)
|
||||
/// 3:完成(可以下料)
|
||||
/// 4:报警(设备报警)
|
||||
/// </summary>
|
||||
public int DeviceStatus = 0;
|
||||
public string SendTime = string.Empty;
|
||||
}
|
||||
}
|
||||
68
CCYQ_JieFang/webApi/InitServer.cs
Normal file
68
CCYQ_JieFang/webApi/InitServer.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Net.Http.Formatting;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Web.Http;
|
||||
using System.Web.Http.Cors;
|
||||
using System.Web.Http.SelfHost;
|
||||
|
||||
namespace MesWork
|
||||
{
|
||||
|
||||
|
||||
public class InitServer
|
||||
{
|
||||
HttpSelfHostConfiguration config = null;
|
||||
HttpSelfHostServer server = null;
|
||||
public InitServer(string Url_WebApi)
|
||||
{
|
||||
// var Url_WebApi = System.Configuration.ConfigurationManager.AppSettings["Url_WebApi"];
|
||||
Init(Url_WebApi);
|
||||
}
|
||||
public void Init(string url)
|
||||
{
|
||||
config = new HttpSelfHostConfiguration(url);
|
||||
|
||||
// 启用跨域
|
||||
config.EnableCors(new EnableCorsAttribute("*", "*", "*"));
|
||||
// 启用特性路由
|
||||
config.MapHttpAttributeRoutes();
|
||||
|
||||
//config.Routes.MapHttpRoute(
|
||||
// name: "DefaultApi",
|
||||
// routeTemplate: "api/{controller}/{id}",
|
||||
// defaults: new { id = RouteParameter.Optional }
|
||||
//);
|
||||
|
||||
// 自定义路由匹配到action
|
||||
config.Routes.MapHttpRoute(
|
||||
name: "API Default",
|
||||
routeTemplate: "api/{controller}/{action}/{id}",
|
||||
defaults: new { id = RouteParameter.Optional }
|
||||
);
|
||||
|
||||
|
||||
|
||||
server = new HttpSelfHostServer(config);
|
||||
|
||||
server.OpenAsync().Wait();
|
||||
|
||||
|
||||
}
|
||||
public class JsonContentNegotiator : IContentNegotiator
|
||||
{
|
||||
private readonly JsonMediaTypeFormatter _jsonFormatter;
|
||||
|
||||
public JsonContentNegotiator(JsonMediaTypeFormatter formatter)
|
||||
{
|
||||
_jsonFormatter = formatter;
|
||||
}
|
||||
public ContentNegotiationResult Negotiate(Type type, HttpRequestMessage request, IEnumerable<MediaTypeFormatter> formatters)
|
||||
{
|
||||
var result = new ContentNegotiationResult(_jsonFormatter, new MediaTypeHeaderValue("application/json"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
CCYQ_JieFang/webApi/msgResHeader.cs
Normal file
15
CCYQ_JieFang/webApi/msgResHeader.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MesWork
|
||||
{
|
||||
public class msgResHeader
|
||||
{
|
||||
public string Code = string.Empty;
|
||||
public string Message = string.Empty;
|
||||
public string MsgId = string.Empty;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user