|
|
using System; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models { /// <summary>
/// 完成取放貨回報類別
/// </summary>
public class TP011FinishLoadUnloadReportDto : CommonMessage { /// <summary>
/// 當下任務編號
/// </summary>
/// <remarks>A[YYYYMMDDHH][Sequence * 5]/S[YYYYMMDDHH][Sequnce * 5]</remarks>
[Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)] public string CurrentTaskID { get; set; } /// <summary>
/// 站點名稱
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)] public string StationID { get; set; } /// <summary>
/// 任務模式
/// </summary>
/// <value>
/// 0 = Store In
/// 1 = Store Out
/// </value>
[Required, JsonPropertyName("task_mode"), JsonPropertyOrder(103)] public TaskActionMode TaskMode { get; set; } /// <summary>
/// 事件類別
/// </summary>
/// <value>
/// 0 = Load <br/>
/// 1 = Unload <br/>
/// </value>
[Required, JsonPropertyName("event_type"), JsonPropertyOrder(104)] public LoadUnloadEvent EventType { get; set; } /// <summary>
/// 取得完成取放貨回報
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="taskId">任務編號</param>
/// <param name="currentTaskID">當前任務編號</param>
/// <param name="stationID">站點編號</param>
/// <param name="taskMod">任務模式</param>
/// <param name="eventType">事件類別</param>
/// <returns>完成取放貨回報</returns>
public static TP011FinishLoadUnloadReportDto Get(TransactionName transName, string softwareID, string taskId, string currentTaskID, string stationID, TaskActionMode taskMod, LoadUnloadEvent eventType) { return new TP011FinishLoadUnloadReportDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, TaskID = taskId, CurrentTaskID = currentTaskID, StationID = stationID, TaskMode = taskMod, EventType = eventType }; } } /// <summary>
/// 完成取放貨回應類別
/// </summary>
public class FP012FinishLoadUnloadAckDto : CommonMessage { /// <summary>
/// 當下任務編號
/// </summary>
/// <remarks>A[YYYYMMDDHH][Sequence * 5]/S[YYYYMMDDHH][Sequnce * 5]</remarks>
[Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)] public string CurrentTaskID { get; set; } /// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)] public string StationID { get; set; } /// <summary>
/// 任務模式
/// </summary>
/// <value>
/// 0 = Store In <br/>
/// 1 = Store Out <br/>
/// </value>
[Required, JsonPropertyName("task_mode"), JsonPropertyOrder(103)] public TaskActionMode TaskMode { get; set; } /// <summary>
/// 事件類別
/// </summary>
/// <value>
/// 0 = Load <br/>
/// 1 = Unload <br/>
/// </value>
[Required, JsonPropertyName("event_type"), JsonPropertyOrder(104)] public LoadUnloadEvent EventType { get; set; } /// <summary>
/// 回應代碼
/// </summary>
/// <value>
/// 0 = OK <br/>
/// 1 = NG <br/>
/// </value>
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(105)] public ReplyCode ReplyCode { get; set; } } }
|