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.
 
 
 
 
 

84 lines
3.1 KiB

using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models
{
/// <summary>
/// 建立電梯命令請求類別
/// </summary>
public class TP055CreateLifterCommandRequestDto : CommonMessage
{
/// <summary>
/// 當下任務編號
/// </summary>
/// <remarks>A[YYYYMMDDHH][Sequnce * 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>
[Required, JsonPropertyName("from"), JsonPropertyOrder(103)]
public int From { get; set; }
/// <summary>
/// 目標樓層
/// </summary>
[Required, JsonPropertyName("to"), JsonPropertyOrder(104)]
public int To { get; set; }
/// <summary>
/// 取得建立電梯命令請求
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="currentTaskID">當前任務編號</param>
/// <param name="staionID">站點編號</param>
/// <param name="from">起始樓層</param>
/// <param name="to">目標樓層</param>
/// <returns>建立電梯命令請求</returns>
public static TP055CreateLifterCommandRequestDto Get(TransactionName transName, string softwareID,
string currentTaskID, string staionID, int from, int to)
{
return new TP055CreateLifterCommandRequestDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID,
CurrentTaskID = currentTaskID,
StationID = staionID,
From = from,
To = to
};
}
}
/// <summary>
/// 建立電梯命令回應類別
/// </summary>
public class FP056CreateLifterCommandResponseDto : CommonMessage
{
/// <summary>
/// 當下任務編號
/// </summary>
/// <remarks>AGVC 任務編號/SHTC 任務編號</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 = Success <br/>
/// 1 = Reject <br/>
/// </value>
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(103)]
public CreateLifterCommandResultCode ResultCode { get; set; }
}
}