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.
106 lines
3.9 KiB
106 lines
3.9 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Text.Json.Serialization;
|
|
|
|
namespace Mirle.Component.API.WarehouseExecutionSystem.Models
|
|
{
|
|
/// <summary>
|
|
/// 建立命令請求類別
|
|
/// </summary>
|
|
public class FW001CreateCommandRequestDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 搬運命令序號
|
|
/// </summary>
|
|
/// <remarks>W[YYYYMMDDHH][Sequnece * 5]</remarks>
|
|
[Required, StringLength(16), JsonPropertyName("cmd_sno"), JsonPropertyOrder(101)]
|
|
public string CommandSequnceNumber { get; set; }
|
|
/// <summary>
|
|
/// 命令類別
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Store In <br/>
|
|
/// 1 = Store Out <br/>
|
|
/// 2 = Task Inventory <br/>
|
|
/// 3 = Station To Staion <br/>
|
|
/// 4 = Storage To Storage <br/>
|
|
/// 5 = Take Inventory Operation <br/>
|
|
/// 6 = Task Inventory Adjust <br/>
|
|
/// 7 = Maintenance Loc <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("cmd_mode"), JsonPropertyOrder(102)]
|
|
public CommandMode CommandMode { get; set; }
|
|
/// <summary>
|
|
/// 搬運命令優先權重
|
|
/// </summary>
|
|
/// <value>0 - 9</value>
|
|
/// <remarks>0 最優先</remarks>
|
|
[Required, JsonPropertyName("cmd_priority"), JsonPropertyOrder(103)]
|
|
public int CommandPriority { get; set; }
|
|
/// <summary>
|
|
/// 起始位置
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("from"), JsonPropertyOrder(104)]
|
|
public string From { get; set; }
|
|
/// <summary>
|
|
/// 目的位置
|
|
/// </summary>
|
|
[Required, StringLength(9), JsonPropertyName("to"), JsonPropertyOrder(105)]
|
|
public string To { get; set; }
|
|
/// <summary>
|
|
/// 路線清單
|
|
/// </summary>
|
|
[Required, JsonPropertyName("route"), JsonPropertyOrder(106)]
|
|
public List<string> Route { get; set; }
|
|
/// <summary>
|
|
/// 設備路線清單
|
|
/// </summary>
|
|
[Required, JsonPropertyName("eqpt_route"), JsonPropertyOrder(107)]
|
|
public List<string> EquipmemntRoute { get; set; }
|
|
/// <summary>
|
|
/// 載具編號
|
|
/// </summary>
|
|
[JsonPropertyName("carrier_id"), JsonPropertyOrder(108)]
|
|
public string CarrierID { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 建立命令回應類別
|
|
/// </summary>
|
|
public class TW002CreateCommandResponseDto : CommonMessage
|
|
{
|
|
/// <summary>
|
|
/// 搬運命令序號
|
|
/// </summary>
|
|
/// <remarks>W[YYYYMMDDHH][Sequence * 5]</remarks>
|
|
[Required, StringLength(16), JsonPropertyName("cmd_sno"), JsonPropertyOrder(3)]
|
|
public string CommandSequnceNumber { get; set; }
|
|
/// <summary>
|
|
/// 結果代碼
|
|
/// </summary>
|
|
/// <value>
|
|
/// 0 = Success <br/>
|
|
/// 1 = Reject <br/>
|
|
/// 2 = Dismantel Command Error <br/>
|
|
/// </value>
|
|
[Required, JsonPropertyName("result_code"), JsonPropertyOrder(102)]
|
|
public CreateCommandResultCode ResultCode { get; set; }
|
|
/// <summary>
|
|
/// 取得建立命令回應
|
|
/// </summary>
|
|
/// <param name="transName">交易名稱</param>
|
|
/// <param name="commandSequenceNumber">搬運命令序號</param>
|
|
/// <param name="resultCode">建立命令結果代碼</param>
|
|
/// <returns>建立命令回應</returns>
|
|
public static TW002CreateCommandResponseDto Get(TransactionName transName, string commandSequenceNumber, CreateCommandResultCode resultCode)
|
|
{
|
|
return new TW002CreateCommandResponseDto()
|
|
{
|
|
Timetick = DateTime.Now,
|
|
TransactionName = transName.ToTransactionName(),
|
|
CommandSequnceNumber = commandSequenceNumber,
|
|
ResultCode = resultCode
|
|
};
|
|
}
|
|
}
|
|
}
|