From 944197ff7de66e76b10f9e81045d2181eb1645d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BD=87=E9=98=B3=20=E9=82=B9?= Date: Tue, 24 Oct 2023 00:37:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E8=B1=A1=E5=8C=96=E5=AF=B92.0?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E7=9A=84=E5=AF=B9=E6=8E=A5=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 24Hour/CaseServiceTwentyClient.cs | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 24Hour/CaseServiceTwentyClient.cs diff --git a/24Hour/CaseServiceTwentyClient.cs b/24Hour/CaseServiceTwentyClient.cs new file mode 100644 index 0000000..946bca6 --- /dev/null +++ b/24Hour/CaseServiceTwentyClient.cs @@ -0,0 +1,43 @@ +using com.sun.xml.@internal.xsom; +using Elight.Entity.APPDto.Lawyer; +using Elight.Utility.Extensions; +using Microsoft.AspNetCore.DataProtection; + +namespace _24Hour +{ + public class CaseServiceTwentyClient + { + private readonly HttpClient httpCliet; + public CaseServiceTwentyClient(HttpClient _httpCliet) + { + this.httpCliet = _httpCliet; + + httpCliet.DefaultRequestHeaders.Add("Accept", "application/json"); + httpCliet.DefaultRequestHeaders.Add("User-Agent", "HttpClientFactory-Sample"); + httpCliet.DefaultRequestHeaders.ConnectionClose = true; + } + public object GetCaseList() + { + return null; + } + public async Task GetArchivesInfo(string bmsah) + { + var path = Path.Combine(Environment.CurrentDirectory, "datajson.txt"); + var json = await System.IO.File.ReadAllTextAsync(path); + var convert = json.ConvertToModel(); + convert.Id = Guid.NewGuid().ToString(); + foreach (var ml in convert.jzml) + { + ml.Id = Guid.NewGuid().ToString(); + ml.jzId = convert.Id; + foreach (var item in ml.jzwj) + { + item.jzmlId = ml.Id; + item.Id = Guid.NewGuid().ToString(); + } + } + return convert; + } + + } +}