using System.Text.Json.Serialization; using Newtonsoft.Json; namespace WcsMain.ApiClient.AGV.Dto; /// /// AGV 接口响应数据模板类 /// /// public class AGVResponseLayout where T : class, new() { /// /// 头部 /// [JsonProperty("header")] [JsonPropertyName("header")] public AGVResponseHeader? Header { get; set; } /// /// 数据 /// [JsonProperty("body")] [JsonPropertyName("body")] public AGVResponseBody? Body { get; set; } } /// /// AGV 报文响应头 /// public class AGVResponseHeader { /// /// 请求ID /// [JsonProperty("requestId")] [JsonPropertyName("requestId")] public string? RequestId { get; set; } /// /// 时间戳 /// [JsonProperty("timestamp")] [JsonPropertyName("timestamp")] public string? TimeStamp { get; set; } /// /// 版本号 /// [JsonProperty("version")] [JsonPropertyName("version")] public string? Version { get; set; } } // {"code":"ERR_PARTIAL_FAILURE","message":"Partial failure","success":false,"data":[{"code":"ERR_ILLEGAL_WHI","message":"ERR_ILLEGAL_WHI","robotJobId":"1731831975323001000"}]} /// /// AGV 响应体 /// /// public class AGVResponseBody where T : class, new() { /// /// 是否成功 /// [JsonProperty("success")] [JsonPropertyName("success")] public bool? Success { get; set; } /// /// 条码 /// [JsonProperty("code")] [JsonPropertyName("code")] public string? Code { get; set; } /// /// 响应信息 /// [JsonProperty("message")] [JsonPropertyName("message")] public string? Message { get; set; } /// /// 响应数据 /// [JsonProperty("data")] [JsonPropertyName("data")] public T? Data { get; set; } }