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.

69 lines
2.6 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 TP059CancelLifterCommandRequestDto : CommonMessage
  10. {
  11. /// <summary>
  12. /// 當下任務編號
  13. /// </summary>
  14. /// <remarks>A[YYYYMMDDHH][Sequnce * 5]/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="staionID">站點編號</param>
  29. /// <returns>取消電梯命令請求</returns>
  30. public static TP059CancelLifterCommandRequestDto Get(TransactionName transName, string softwareID, string currentTaskID, string staionID)
  31. {
  32. return new TP059CancelLifterCommandRequestDto()
  33. {
  34. Timetick = DateTime.Now,
  35. TransactionName = transName.ToTransactionName(),
  36. SoftwareID = softwareID,
  37. CurrentTaskID = currentTaskID,
  38. StationID = staionID
  39. };
  40. }
  41. }
  42. /// <summary>
  43. /// 取消電梯命令回應類別
  44. /// </summary>
  45. public class FP060CancelLifterResponseDto : CommonMessage
  46. {
  47. /// <summary>
  48. /// 當下任務編號
  49. /// </summary>
  50. /// <remarks>A[YYYYMMDDHH][Sequnce * 5]/S[YYYYMMDDHH][Sequnce * 5]</remarks>
  51. [Required, StringLength(16), JsonPropertyName("current_task_id"), JsonPropertyOrder(101)]
  52. public string CurrentTaskID { get; set; }
  53. /// <summary>
  54. /// 站點編號
  55. /// </summary>
  56. [Required, StringLength(9), JsonPropertyName("station_id"), JsonPropertyOrder(102)]
  57. public string StationID { get; set; }
  58. /// <summary>
  59. /// 結果代碼
  60. /// </summary>
  61. /// <value>
  62. /// 0 = Success <br/>
  63. /// 1 = Reject <br/>
  64. /// </value>
  65. [Required, JsonPropertyName("result_code"), JsonPropertyOrder(103)]
  66. public CancelLifterCommandResultCode ResultCode { get; set; }
  67. }
  68. }