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.
98 lines
3.8 KiB
98 lines
3.8 KiB
using System;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Mirle.Component.API.ProgrammableLogicController.Models
|
|
{
|
|
/// <summary>
|
|
/// 檢查電梯貨物回報類別
|
|
/// </summary>
|
|
public class TP025CheckLifterItemReportDto : 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("floor"), JsonPropertyOrder(103)]
|
|
public int Floor { get; set; }
|
|
/// <summary>
|
|
/// 電梯內貨物狀態
|
|
/// </summary>
|
|
[Required, JsonPropertyName("lifter_item_status"), JsonPropertyOrder(104)]
|
|
public LifterItemStatus LifterItemStatus { get; set; }
|
|
/// <summary>
|
|
/// 取得檢查電梯貨物回報
|
|
/// </summary>
|
|
/// <param name="transName">交易名稱</param>
|
|
/// <param name="softwareID">軟體編號</param>
|
|
/// <param name="currentTaskID">當下任務編號</param>
|
|
/// <param name="stationID">站點編號</param>
|
|
/// <param name="floor">所在樓層</param>
|
|
/// <param name="lifterItemStatus">電梯內貨物狀態</param>
|
|
/// <returns>檢查電梯貨物回報</returns>
|
|
public static TP025CheckLifterItemReportDto Get(TransactionName transName, string softwareID,
|
|
string currentTaskID, string stationID, int floor, LifterItemStatus lifterItemStatus)
|
|
{
|
|
return new TP025CheckLifterItemReportDto()
|
|
{
|
|
Timetick = DateTime.Now,
|
|
TransactionName = transName.ToTransactionName(),
|
|
SoftwareID = softwareID,
|
|
CurrentTaskID = currentTaskID,
|
|
StationID = stationID,
|
|
Floor = floor,
|
|
LifterItemStatus = lifterItemStatus
|
|
};
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 檢查電梯貨物回應類別
|
|
/// </summary>
|
|
public class FP026CheckLifterItemAckDto : 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("floor"), JsonPropertyOrder(103)]
|
|
public int Floor { get; set; }
|
|
/// <summary>
|
|
/// 電梯貨物狀態
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Have Item <br/>
|
|
/// 1 = Haven't Item <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("lifter_item_status"), JsonPropertyOrder(104)]
|
|
public LifterItemStatus LiftItemStatus { get; set; }
|
|
/// <summary>
|
|
/// 回應代碼
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = OK <br/>
|
|
/// 1 = NG <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("reply_code"), JsonPropertyOrder(105)]
|
|
public ReplyCode ReplyCode { get; set; }
|
|
}
|
|
}
|