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