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.

172 lines
4.6 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

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>
/// 请求操作类型
/// </summary>
/// <example>Add</example>
[Required(ErrorMessage = "必填")]
public string RequestAction { get; set; } = "Add";
}
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 RecvUserId { get; set; }
/// <summary>
/// 任务对应接收操作人名称
/// </summary>
public string RecvUserName { get; set; }
/// <summary>
/// 状态列表
/// </summary>
public List<TrackingMessageMainStatusInfo> StatusList { get; set; }
}
public class TrackingMessageMainStatusInfo
{
/// <summary>
/// 状态代码
/// </summary>
[Required(ErrorMessage = "必填")]
public string StatusCode { get; set; }
/// <summary>
/// 状态名称
/// </summary>
[Required(ErrorMessage = "必填")]
public string StatusName { get; set; }
/// <summary>
/// 状态产生时间
/// </summary>
public DateTime StatusDate { get; set; }
/// <summary>
/// 状态产生值
/// </summary>
public string StatusVal { get; set; }
}
}