dc/MQ/MQMessage.cs
13118993771@163.com 562bd7a7b8 新版
2023-02-23 11:33:23 +08:00

41 lines
1.0 KiB
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 = $"{Configurations.conf.connectSetting.name}_{System.DateTime.Now.ToString("yyyyMMddHHmmss")}" + new Random().Next(100).ToString();
equipmentId = Configurations.conf.connectSetting.equipmentName1;
}
}
}