You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
3.2 KiB
C#

using DS.Module.Core.Extensions;
namespace DS.Module.DjyRulesEngine
{
/// <summary>
/// 规则引擎封装请求
/// </summary>
public class RuleEngineReq
{
/// <summary>
/// 请求报文表头head
/// </summary>
public HeadInfo Head { get; set; }
/// <summary>
/// 请求报文表体main
/// </summary>
public MainInfo Main { get; set; }
public RuleEngineReq()
{
Head = new HeadInfo();
Main = new MainInfo();
}
}
public class HeadInfo {
public HeadInfo()
{
GID = DateTime.Now.DateToTimeStamp();
MessageType = "SHIP_ORDER_COMPARE";
SenderId = "Dongsheng8";
SenderName = "东胜8平台";
ReceiverId = "RulesEngine";
ReceiverName = "大简云规则引擎";
Version = "1.0";
RequestDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
RequestAction = "Compare";
}
/// <summary>
/// 报文惟一主键
/// </summary>
public string GID { get; set; } = DateTime.Now.DateToTimeStamp();
/// <summary>
/// 报文类型
/// </summary>
public string MessageType { get; set; } = "SHIP_ORDER_COMPARE";
/// <summary>
/// 发送方代码
/// </summary>
public string SenderId { get; set; } = "Dongsheng8";
/// <summary>
/// 发送方名称
/// </summary>
public string SenderName { get; set; } = "东胜8平台";
/// <summary>
/// 接收方代码
/// </summary>
public string ReceiverId { get; set; } = "RulesEngine";
/// <summary>
/// 接收方名称 大简云规则引擎
/// </summary>
public string ReceiverName { get; set; } = "大简云规则引擎";
/// <summary>
/// 请求方登录TOKEN
/// </summary>
public string Token { get; set; } = "";
/// <summary>
/// 版本号
/// </summary>
public string Version { get; set; } = "1.0";
/// <summary>
/// 请求时间
/// </summary>
public string RequestDate { get; set; } = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
/// <summary>
/// 请求操作类型
/// </summary>
public string RequestAction { get; set; } = "Compare";
/// <summary>
/// 请求授权KEY
/// </summary>
public string SenderKey { get; set; }
}
public class MainInfo
{
public MainInfo() {
ProjectCode = [ "OCEAN_BOOKING" ];
BusinessInfo = new RulesEngineOrderBookingMainBusinessInfo();
}
/// <summary>
/// 项目代码 项目代码可以传多个具体按照业务分类来定义默认传OCEAN_BOOKING
/// </summary>
public string[] ProjectCode { get; set; } = { "OCEAN_BOOKING" };
/// <summary>
/// 请求报文表体的海运主业务信息main.businessInfo
/// </summary>
public RulesEngineOrderBookingMainBusinessInfo BusinessInfo { get; set; }
}
}