|
|
|
@ -9,6 +9,7 @@ using Elight.Utility;
|
|
|
|
|
using Elight.Utility.Code; |
|
|
|
|
using Elight.Utility.Extensions; |
|
|
|
|
using Elight.Utility.logs; |
|
|
|
|
using java.lang; |
|
|
|
|
using Microsoft.AspNetCore.Authorization; |
|
|
|
|
using Microsoft.AspNetCore.Mvc; |
|
|
|
|
using Newtonsoft.Json; |
|
|
|
@ -16,6 +17,7 @@ using SqlSugar;
|
|
|
|
|
using System.Net.WebSockets; |
|
|
|
|
using System.Text; |
|
|
|
|
using static com.sun.tools.@internal.xjc.reader.xmlschema.bindinfo.BIConversion; |
|
|
|
|
using Exception = System.Exception; |
|
|
|
|
using User = Elight.Utility.User; |
|
|
|
|
|
|
|
|
|
namespace _24Hour.Controllers.Common |
|
|
|
@ -99,7 +101,7 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
result.IsSucceed = true; |
|
|
|
|
result.result = model; |
|
|
|
|
} |
|
|
|
|
catch (Exception ex) |
|
|
|
|
catch (System.Exception ex) |
|
|
|
|
{ |
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
} |
|
|
|
@ -154,7 +156,7 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 同步外网预约信息(未完成) |
|
|
|
|
/// 同步外网预约信息(不需要调用此接口) |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="info"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
@ -334,11 +336,58 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
[HttpGet] |
|
|
|
|
[Route("QueryCaseFromtwenty")] |
|
|
|
|
public Task<Result> QueryCaseFromtwenty(string bmsah,string idcard,string name,string casename) |
|
|
|
|
public Task<Result> QueryCaseFromtwenty(string? bmsah, string? name, string? casename) |
|
|
|
|
{ |
|
|
|
|
result.IsSucceed = true; |
|
|
|
|
result.result = new[] |
|
|
|
|
{ |
|
|
|
|
new |
|
|
|
|
{ |
|
|
|
|
bmsah="安北检刑诉受[2023]433333333333号", |
|
|
|
|
casename="张三杀人案", |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
return Task.FromResult(result); |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 从2.0系统查询卷宗信息(未完成) |
|
|
|
|
/// </summary> |
|
|
|
|
/// <param name="info"></param> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
[HttpGet] |
|
|
|
|
[Route("QueryFileFromtwenty")] |
|
|
|
|
public Task<Result<JZJBXXDto>> QueryFileFromtwenty(string bmsah) |
|
|
|
|
{ |
|
|
|
|
Result<JZJBXXDto> res = new Result<JZJBXXDto>(); |
|
|
|
|
if (bmsah == "安北检刑诉受[2023]433333333333号") |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
res.IsSucceed = true; |
|
|
|
|
var a = GetInfo(); |
|
|
|
|
res.result = a; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
res.IsSucceed = false; |
|
|
|
|
} |
|
|
|
|
return Task.FromResult(res); |
|
|
|
|
} |
|
|
|
|
private JZJBXXDto GetInfo() |
|
|
|
|
{ |
|
|
|
|
var path = Path.Combine(Environment.CurrentDirectory, "datajson.txt"); |
|
|
|
|
var json = System.IO.File.ReadAllText(path); |
|
|
|
|
var convert = json.ConvertToModel<JZJBXXDto>(); |
|
|
|
|
convert.Id = Guid.NewGuid().ToString(); |
|
|
|
|
foreach (var ml in convert.jzml) |
|
|
|
|
{ |
|
|
|
|
ml.Id = Guid.NewGuid().ToString(); |
|
|
|
|
foreach (var item in ml.jzwj) |
|
|
|
|
{ |
|
|
|
|
item.Id = Guid.NewGuid().ToString(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return convert; |
|
|
|
|
} |
|
|
|
|
/// <summary> |
|
|
|
|
/// 添加卷宗信息 |
|
|
|
|
/// </summary> |
|
|
|
@ -346,10 +395,33 @@ namespace _24Hour.Controllers.Common
|
|
|
|
|
/// <returns></returns> |
|
|
|
|
[HttpPost] |
|
|
|
|
[Route("AddArchivesInfo")] |
|
|
|
|
public Task<Result<JZJBXXDto>> AddArchivesInfo(JZJBXXDto dto) |
|
|
|
|
public async Task<Result<JZJBXXDto>> AddArchivesInfo(JZJBXXDto dto) |
|
|
|
|
{ |
|
|
|
|
Result<JZJBXXDto> res = new Result<JZJBXXDto>(); |
|
|
|
|
return Task.FromResult(res); |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
var data = mapper.Map<JZJBXX>(dto); |
|
|
|
|
|
|
|
|
|
var mls = dto.jzml.ToList(); |
|
|
|
|
var vloum = mapper.Map<List<JZML>>(mls); |
|
|
|
|
|
|
|
|
|
var wjs = dto.jzml.SelectMany(x => x.jzwj).ToList(); |
|
|
|
|
var files = mapper.Map<List<JZWJItem>>(wjs); |
|
|
|
|
|
|
|
|
|
_db.BeginTran(); |
|
|
|
|
var num = await _db.Insertable(data).ExecuteCommandAsync(); |
|
|
|
|
var add = await _db.Insertable(vloum).ExecuteCommandAsync(); |
|
|
|
|
var addwj = await _db.Insertable(files).ExecuteCommandAsync(); |
|
|
|
|
_db.CommitTran(); |
|
|
|
|
res.result = dto; |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
catch(Exception ex) |
|
|
|
|
{ |
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#endregion |
|
|
|
|