|
|
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization;
namespace Mirle.Component.API.ProgrammableLogicController.Models { /// <summary>
/// 確認載具編號及物料編號請求類別
/// </summary>
public class FP015CheckCarrierIDRequest : CommonMessage { /// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// <summary>
/// 載具編號
/// </summary>
/// <remarks>棧板編號/物流箱號</remarks>
[JsonPropertyName("carrier_id"), JsonPropertyOrder(102)] public string CarrierID { get; set; } /// <summary>
/// 物料編號清單
/// </summary>
[JsonPropertyName("material_id"), JsonPropertyOrder(103)] public List<string> MaterialID { get; set; } /// <summary>
/// 物料重量
/// </summary>
/// <remarks>單位: kgs</remarks>
[JsonPropertyName("material_weigth"), JsonPropertyOrder(104)] public int MaterialWeight { get; set; } } /// <summary>
/// 檢查載具編號及物料編號回應類別
/// </summary>
public class TP016CheckCarrierIDResponseDto : CommonMessage { /// <summary>
/// 站點編號
/// </summary>
[Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(101)] public string StationID { get; set; } /// <summary>
/// 載具編號
/// </summary>
/// <remarks>棧板編號/物流箱編號</remarks>
[JsonPropertyName("carrier_id"), JsonPropertyOrder(102)] public string CarrierID { get; set; } /// <summary>
/// 物料編號
/// </summary>
[JsonPropertyName("material_id"), JsonPropertyOrder(103)] public List<string> MaterialID { get; set; } /// <summary>
/// 結果代碼
/// </summary>
/// <value>
/// 0 = Success <br/>
/// 1 = CarrierID Error <br/>
/// 2 = MaterialID Error <br/>
/// </value>
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(104)] public CarrierIDInsepectResultCode ResultCode { get; set; } /// <summary>
/// 取得檢查載具編號及物料編號回應
/// </summary>
/// <param name="transName">交易名稱</param>
/// <param name="softwareID">軟體編號</param>
/// <param name="TaskID">任務編號</param>
/// <param name="stationID">站點編號</param>
/// <param name="carrierID">載具編號</param>
/// <param name="resultcode">檢查結果代碼</param>
/// <param name="materialID">物料編號清單</param>
/// <returns>檢查載具編號及物料編號回應</returns>
public static TP016CheckCarrierIDResponseDto Get(TransactionName transName, string softwareID, string TaskID, string stationID, string carrierID, CarrierIDInsepectResultCode resultcode, List<string> materialID = null) { return new TP016CheckCarrierIDResponseDto() { Timetick = DateTime.Now, TransactionName = transName.ToTransactionName(), SoftwareID = softwareID, TaskID = TaskID, StationID = stationID, CarrierID = carrierID, MaterialID = materialID, ResultCode = resultcode }; } } }
|