diff --git a/24Hour/TwentySystemProxyClient.cs b/24Hour/TwentySystemProxyClient.cs index 5c54610..8cdc244 100644 --- a/24Hour/TwentySystemProxyClient.cs +++ b/24Hour/TwentySystemProxyClient.cs @@ -53,7 +53,7 @@ namespace _24Hour var response = await Task.Run(async () => { - + if (UseOfflineData == "true") { var json = "{\"data\":{\"endRow\":1,\"firstPage\":1,\"hasNextPage\":false,\"isFirstPage\":true,\"isLastPage\":true,\"lastPage\":1,\"list\":[{\"bmsah\":\"安北检刑诉受[2023]410503000002号\",\"gjdm\":\"9911180200001\",\"gjmc\":\"中国\",\"mzdm\":\"9912180100001\",\"mzmc\":\"汉族\",\"xbdm\":\"9909180000001\",\"xbmc\":\"男性\",\"xm\":\"李四\",\"zjhm\":\"410502199606164872\",\"zjlxdm\":\"9910180300001\",\"zjlxmc\":\"居民身份证\",\"zrrbm\":\"4105030323000001\",\"zrrlxdm\":\"0009000900001\",\"zrrlxmc\":\"嫌疑人\"}],\"navigateFirstPage\":1,\"navigateLastPage\":1,\"navigatePages\":8,\"navigatepageNums\":[1],\"nextPage\":0,\"pageNum\":1,\"pageSize\":20,\"pages\":1,\"prePage\":0,\"size\":1,\"startRow\":1,\"total\":1},\"code\":\"0\",\"success\":true,\"message\":\"操作成功\"}"; @@ -84,13 +84,41 @@ namespace _24Hour result.IsSucceed = false; result.Message = data?.message ?? "操作失败"; } - if (UseOfflineData=="true") + if (UseOfflineData == "true") { result.Message = "操作成功(测试数据)"; } return result; } + public async Task> GetAllLsList() + { + var response = await Task.Run(async () => + { + var request = await httpCliet.GetAsync($"/TwentySystem/GetAllLsList"); + return await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); + }); + var data = response.ConvertToAnonymousType(new + { + message = default(string), + success = default(bool), + code = default(string), + data = default(FindSqrxxDto) + }); + Result result = new Result(); + if (data?.success == true) + { + result.IsSucceed = true; + result.Message = "操作成功"; + result.result = data?.data; + } + else + { + result.IsSucceed = false; + result.Message = data?.message ?? "操作失败"; + } + return result; + } public async Task> QueryLsList(string ProposerZJHM) { var UseOfflineData = configuration.GetSection("CaseTwenty:UseOfflineData").Value; @@ -100,7 +128,7 @@ namespace _24Hour }.ConvertToGetParam(); var response = await Task.Run(async () => { - + if (UseOfflineData == "true") { var json = "{\"data\":{\"content\":[{\"cjsj\":\"2021-01-12T16:12:34.004+0800\",\"djdwbm\":\"410403\",\"djdwmc\":\"卫东区院\",\"jmsfzh\":\"123345666777778\",\"lxdh\":null,\"lxdz\":null,\"sfsc\":\"N\",\"sjbsbh\":\"8cdbeb3ce3da483780b4e1acf60677e0\",\"sjly\":\"3\",\"sqrbh\":\"42b84c481b734f52b37d5b99157057f4\",\"sqrlxdm\":\"1403187300001\",\"sqrlxmc\":\"辩护人\",\"sqrsfdm\":\"1404187300003\",\"sqrsfmc\":\"律师\",\"sqrxm\":\"张能能\",\"szlssws\":\"河南千会律师事务所\",\"tyshxydm\":null,\"zbls\":null,\"zhxgsj\":\"2021-01-21T15:10:51.982+0800\",\"zjhm\":\"123445788876677\",\"zjlxdm\":\"9910180300010\",\"zjlxmc\":\"律师执业证\",\"zyzh\":null}],\"empty\":false,\"first\":true,\"last\":true,\"number\":0,\"numberOfElements\":1,\"pageable\":{\"offset\":0,\"pageNumber\":0,\"pageSize\":20,\"paged\":true,\"unpaged\":false,\"sort\":{\"empty\":false,\"sorted\":true,\"unsorted\":false}},\"size\":20,\"sort\":{\"empty\":false,\"sorted\":true,\"unsorted\":false},\"totalPages\":1,\"totalElements\":1},\"code\":\"0\",\"success\":true,\"message\":\"操作成功\"}"; @@ -131,7 +159,7 @@ namespace _24Hour result.IsSucceed = false; result.Message = data?.message ?? "操作失败"; } - if (UseOfflineData=="true") + if (UseOfflineData == "true") { result.Message = "操作成功(测试数据)"; } @@ -140,7 +168,7 @@ namespace _24Hour public async Task> ApplyMarKing(ApplyMarKingDto dto) { var UseOfflineData = configuration.GetSection("CaseTwenty:UseOfflineData").Value; - + var response = await Task.Run(async () => { @@ -152,7 +180,7 @@ namespace _24Hour else { var request = await httpCliet.PostAsJsonAsync($"/TwentySystem/ApplyMarKing", dto); - var res= await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); + var res = await request.EnsureSuccessStatusCode().Content.ReadAsStringAsync(); return res; } }); @@ -162,7 +190,7 @@ namespace _24Hour public async Task Arrange(ArrangeDto dto) { var UseOfflineData = configuration.GetSection("CaseTwenty:UseOfflineData").Value; - + var response = await Task.Run(async () => { @@ -183,8 +211,8 @@ namespace _24Hour return response.ConvertToModel(); } - - public async Task>> GetCaseList(string? casename, string? bmsah, string? dwbm, DateTime? starttime, DateTime? endtime, int page, int size) + + public async Task>> GetCaseList(string? casename, string? bmsah, string? dwbm, DateTime? starttime, DateTime? endtime, int page, int size) { Result> Result = new(); var param = new @@ -270,7 +298,7 @@ namespace _24Hour var json = await Task.Run(async () => { - + if (connectionString == "false") { var request = await httpCliet.GetAsync($"/TwentySystem/GetJZXX{param}"); @@ -323,7 +351,7 @@ namespace _24Hour result.IsSucceed = false; result.Message = res.Message; } - + return result; }