dc/MQ/MQMessage.cs
13118993771@163.com 5e9d0f1e2d EAP
2022-04-01 17:03:54 +08:00

41 lines
1015 B
C#

using ARI.EAP.HOST.SRD;
using Glorysoft.SECS.EQP;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ARI.EAP.HOST.MQ
{
[Serializable]
public class MQMessage
{
public Header header;
public object body;
public MQMessage() => header = new Header();
}
[Serializable]
public class Header
{
public string transactionId;
public string messageName;
public string messageType;
public string from;
public string to;
public string equipmentId;
public string sendTimestamp;
public Header()
{
messageType = "Request";
from = "EAP";
to = "MES";
transactionId = $"{Configuration.conf.connectSetting.name}_{System.DateTime.Now.ToString("yyyyMMddHHmmss")}" + new Random().Next(100).ToString();
equipmentId = Configuration.conf.connectSetting.name;
}
}
}