You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.6 KiB
71 lines
2.6 KiB
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Mirle.Component.API.ProgrammableLogicController.Models
|
|
{
|
|
/// <summary>
|
|
/// 允許取放貨回報類別
|
|
/// </summary>
|
|
public class FP013PermitLoadUnloadReportDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 當下任務編號
|
|
/// </summary>
|
|
/// <remarks>A[YYYYMMDDHH][Sequnce * 5]/S[YYYYMMSSHH][Sequnce * 5]</remarks>
|
|
[Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)]
|
|
public string CurrentTaskID { get; set; }
|
|
/// <summary>
|
|
/// 結果代碼
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Permit <br/>
|
|
/// 1 = Not Permit <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(102)]
|
|
public PermitLoadUnloadResultCode ResultCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 允許取放貨回應類別
|
|
/// </summary>
|
|
public class TP014PermitLoadUnloadAckDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 當下任務編號
|
|
/// </summary>
|
|
/// <remarks>A[YYYYMMDDHH][Sequnce * 5]/S[YYYYMMSSHH][Sequnce * 5]</remarks>
|
|
[Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)]
|
|
public string CurrentTaskID { get; set; }
|
|
/// <summary>
|
|
/// 回應代碼
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = OK <br/>
|
|
/// 1 = NG <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(102)]
|
|
public ReplyCode ReplyCode { get; set; }
|
|
/// <summary>
|
|
/// 取得允許取放貨回應
|
|
/// </summary>
|
|
/// <param name="transName">交易名稱</param>
|
|
/// <param name="softwareID">軟體編號</param>
|
|
/// <param name="taskID">任務編號</param>
|
|
/// <param name="currentTaskID">當下任務編號</param>
|
|
/// <param name="replyCode">回應代碼</param>
|
|
/// <returns>允許取放貨回應</returns>
|
|
public static TP014PermitLoadUnloadAckDto Get(TransactionName transName, string softwareID, string taskID,
|
|
string currentTaskID, ReplyCode replyCode)
|
|
{
|
|
return new TP014PermitLoadUnloadAckDto()
|
|
{
|
|
Timetick = DateTime.Now,
|
|
TransactionName = transName.ToTransactionName(),
|
|
SoftwareID = softwareID,
|
|
TaskID = taskID,
|
|
CurrentTaskID = currentTaskID,
|
|
ReplyCode = replyCode
|
|
};
|
|
}
|
|
}
|
|
}
|