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.

225 lines
6.0 KiB
C#

using Furion.DistributedIDGenerator;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 追踪报文
/// </summary>
public class TrackingMessageInfo
{
/// <summary>
/// 表头
/// </summary>
public TrackingMessageHeadInfo Head { get; set; }
/// <summary>
/// 表体
/// </summary>
public TrackingMessageMainInfo Main { get; set; }
}
public class TrackingMessageHeadInfo
{
/// <summary>
/// 报文惟一主键
/// </summary>
///<example>08dabd4e-dcc3-471a-8031-cf066ed0a8f4</example>
public string GID { get; set; } = IDGen.NextID().ToString();
/// <summary>
/// 报文类型 TASK-任务
/// </summary>
/// <example>TASK</example>
[Required(ErrorMessage = "必填")]
public string MessageType { get; set; }
/// <summary>
/// 发送方代码
/// </summary>
/// <example>MAIL_PARSE</example>
[Required(ErrorMessage = "必填")]
public string SenderId { get; set; }
/// <summary>
/// 发送方名称
/// </summary>
/// <example>邮件解析</example>
[Required(ErrorMessage = "必填")]
public string SenderName { get; set; }
/// <summary>
/// 接收方代码
/// </summary>
/// <example>TaskManage</example>
[Required(ErrorMessage = "必填")]
public string ReceiverId { get; set; }
/// <summary>
/// 接收方名称
/// </summary>
/// <example>任务管理平台</example>
[Required(ErrorMessage = "必填")]
public string ReceiverName { get; set; }
/// <summary>
/// 请求方登录TOKEN可以是真实的登录人TOKEN或者是服务模拟登录人TOKEN
/// </summary>
/// <example>eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ1RTkxMDI5OUU0RURFNUZEM0EwNTJBMEFDRDUzMUQzIiwidHlwIjoiYXQrand0In0</example>
public string Token { get; set; }
/// <summary>
/// 版本号 默认1.0
/// </summary>
/// <example>1.0</example>
[Required(ErrorMessage = "必填")]
public string Version { get; set; } = "1.0";
/// <summary>
/// 请求时间
/// </summary>
/// <example>2022-12-23 14:29:11</example>
public string RequestDate { get; set; }
/// <summary>
/// 请求授权KEY
/// </summary>
/// <example>testkey</example>
public string SenderKey { get; set; }
/// <summary>
/// 请求操作类型 AddOrModify-新增或更新 Cancel-取消
/// </summary>
/// <example>Add</example>
[Required(ErrorMessage = "必填")]
public string RequestAction { get; set; } = "AddOrModify";
}
public class TrackingMessageMainInfo
{
/// <summary>
/// 业务系统代码
/// </summary>
[Required(ErrorMessage = "必填")]
public string BusiSystemCode { get; set; }
/// <summary>
/// 业务主键
/// </summary>
public string BusiId { get; set;}
/// <summary>
/// 提单号
/// </summary>
public string MBlNo { get; set; }
/// <summary>
/// 船名航次
/// </summary>
public string VesselVoyno { get; set; }
/// <summary>
/// 订舱编号
/// </summary>
public string OrderNo { get; set; }
/// <summary>
/// 操作触发人用户ID
/// </summary>
public string OperUserId { get; set; }
/// <summary>
/// 操作触发人用户名称
/// </summary>
public string OperUserName { get; set; }
/// <summary>
/// 操作触发人租户ID
/// </summary>
public long OperTenantId { get; set; }
/// <summary>
/// 操作触发人租户名称
/// </summary>
public string OperTenantName { get; set; }
/// <summary>
/// 状态操作类型 MANUAL-手工 AUTO-自动
/// </summary>
public TrackingOperTypeEnum OpertType { get; set; }
/// <summary>
/// 推送类型
/// </summary>
public TrackingPushTypeEnum PushType { get; set; }
/// <summary>
/// 服务项目列表
/// </summary>
public List<TrackingMessageMainProjectInfo> ProjectList { get; set; }
/// <summary>
/// 服务状态列表
/// </summary>
public List<TrackingMessageMainStatusInfo> StatusList { get; set; }
}
/// <summary>
/// 服务状态详情
/// </summary>
public class TrackingMessageMainStatusInfo
{
/// <summary>
/// 服务项目代码
/// </summary>
public string ServiceProjectCode { get; set; }
/// <summary>
/// 服务项目名称
/// </summary>
public string ServiceProjectName { get; set; }
/// <summary>
/// 状态代码
/// </summary>
public string StatusCode { get; set; }
/// <summary>
/// 状态名称
/// </summary>
public string StatusName { get; set; }
/// <summary>
/// 状态产生时间
/// </summary>
public DateTime StatusDate { get; set; }
/// <summary>
/// 状态产生值
/// </summary>
public string StatusVal { get; set; }
}
/// <summary>
/// 服务详情
/// </summary>
public class TrackingMessageMainProjectInfo
{
/// <summary>
/// 服务项目代码
/// </summary>
public string ServiceProjectCode { get; set; }
/// <summary>
/// 服务项目名称
/// </summary>
public string ServiceProjectName { get; set; }
}
}