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.
 
 
 
 
 

66 lines
2.3 KiB

using System;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models
{
/// <summary>
/// 棧板供收狀態回報類別
/// </summary>
public class FP017PalletSupplyStatusReportDto : CommonMessage
{
/// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)]
public string StationID { get; set; }
/// <summary>
/// 棧板狀態
/// </summary>
/// <value>
/// 0 = Full <br/>
/// 1 = Empty <br/>
/// </value>
[Required, JsonPropertyName("pallet_status"), JsonPropertyOrder(102)]
public PalletSupplyStatus PalletStatus { get; set; }
}
/// <summary>
/// 棧板供應狀態回應類別
/// </summary>
public class TP018PalletSupplyStatusAckDto : CommonMessage
{
/// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)]
public string StationID { 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="stationID">站點編號</param>
/// <param name="replyCode">回應代碼</param>
/// <returns>棧板供應狀態回應</returns>
public static TP018PalletSupplyStatusAckDto Get(TransactionName transName, string softwareID, string stationID, ReplyCode replyCode)
{
return new TP018PalletSupplyStatusAckDto()
{
Timetick = DateTime.Now,
TransactionName = transName.ToTransactionName(),
SoftwareID = softwareID,
StationID = stationID,
ReplyCode = replyCode
};
}
}
}