diff --git a/SlnMesnac.RfidUpload.Analysis/InstructionAdapter.cs b/SlnMesnac.RfidUpload.Analysis/InstructionAdapter.cs index 2d037d9..ae8b616 100644 --- a/SlnMesnac.RfidUpload.Analysis/InstructionAdapter.cs +++ b/SlnMesnac.RfidUpload.Analysis/InstructionAdapter.cs @@ -16,13 +16,8 @@ namespace SlnMesnac.RfidUpload.Analysis #region 单例实现 private static readonly Lazy _lazy = new Lazy(() => new InstructionAdapter()); - public static InstructionAdapter Instance - { - get - { - return _lazy.Value; - } - } + public static InstructionAdapter Instance => _lazy.Value; + #endregion private InstructionAdapter() { } diff --git a/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs b/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs index d76d2e3..aadd2bf 100644 --- a/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs +++ b/SlnMesnac.RfidUpload.Model/apiParam/CsbResult.cs @@ -43,7 +43,7 @@ namespace SlnMesnac.RfidUpload.Model.apiParam public List ToObjectList() { JObject job = JObject.Parse(body); - string str = job["retBody"]?["object"]?.ToString(); + string? str = job["retBody"]?["object"]?.ToString(); if (!string.IsNullOrEmpty(str)) { List institutionList = JsonConvert.DeserializeObject>(str); @@ -54,7 +54,19 @@ namespace SlnMesnac.RfidUpload.Model.apiParam return new List(); } - public string body { get; set; } + public string body { get; set; } + + public string GetRetBody() + { + JObject job = JObject.Parse(body); + string? str = job["retBody"]?.ToString(); + if (!string.IsNullOrEmpty(str)) + { + return str; + } + + return ""; + } public string code { get; set; } public string csbCode { get; set; }