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.

79 lines
2.9 KiB

8 months ago
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.Text.Json.Serialization;
  4. namespace Mirle.Component.API.ProgrammableLogicController.Models
  5. {
  6. /// <summary>
  7. /// 移動台車狀態請求類別
  8. /// </summary>
  9. public class TP019MoveCarStatusRequestDto : CommonMessage
  10. {
  11. /// <summary>
  12. /// 當下任務編號
  13. /// </summary>
  14. /// <remarks>S[YYYYMMDDHH][Sequnce * 5]</remarks>
  15. [Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)]
  16. public string CurrentTaskID { get; set; }
  17. /// <summary>
  18. /// 站點編號
  19. /// </summary>
  20. [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)]
  21. public string StationID { get; set; }
  22. /// <summary>
  23. /// 取得移動台車狀態請求
  24. /// </summary>
  25. /// <param name="transName">交易名稱</param>
  26. /// <param name="softwareID">軟體編號</param>
  27. /// <param name="currentTaskID">當下任務編號</param>
  28. /// <param name="stationID">站點編號</param>
  29. /// <returns>移動台車狀態請求</returns>
  30. public static TP019MoveCarStatusRequestDto Get(TransactionName transName, string softwareID,
  31. string currentTaskID, string stationID)
  32. {
  33. return new TP019MoveCarStatusRequestDto()
  34. {
  35. Timetick = DateTime.Now,
  36. TransactionName = transName.ToTransactionName(),
  37. SoftwareID = softwareID,
  38. CurrentTaskID = currentTaskID,
  39. StationID = stationID
  40. };
  41. }
  42. }
  43. /// <summary>
  44. /// 移動台車狀態回應類別
  45. /// </summary>
  46. public class FP020MoveCarStatusResponseDto : CommonMessage
  47. {
  48. /// <summary>
  49. /// 當下任務編號
  50. /// </summary>
  51. /// <remarks>SHTC 任務編號</remarks>
  52. [Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)]
  53. public string CurrentTaskID { get; set; }
  54. /// <summary>
  55. /// 站點編號
  56. /// </summary>
  57. [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)]
  58. public string StationID { get; set; }
  59. /// <summary>
  60. /// 移動台車狀態
  61. /// </summary>
  62. /// <value>
  63. /// 0 = Ready <br/>
  64. /// 1 = Not Ready <br/>
  65. /// </value>
  66. [Required, JsonPropertyName("move_car_status"), JsonPropertyOrder(103)]
  67. public MoveCarStatus MoveCarStatus { get; set; }
  68. /// <summary>
  69. /// 結果代碼
  70. /// </summary>
  71. /// <value>
  72. /// 0 = Success <br/>
  73. /// 1 = Reject <br/>
  74. /// </value>
  75. [Required, JsonPropertyName("result_code"), JsonPropertyOrder(104)]
  76. public MoveCarResultCode ResultCode { get; set; }
  77. }
  78. }