dc/MQ/MQMessage.cs

41 lines
1.0 KiB
C#
Raw Normal View History

2022-04-01 17:03:54 +08:00
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";
2022-12-16 13:01:24 +08:00
transactionId = $"{Configurations.conf.connectSetting.name}_{System.DateTime.Now.ToString("yyyyMMddHHmmss")}" + new Random().Next(100).ToString();
2023-02-23 11:33:23 +08:00
equipmentId = Configurations.conf.connectSetting.equipmentName1;
2022-04-01 17:03:54 +08:00
}
}
}