|
|
@ -52,15 +52,18 @@ namespace _24Hour.Controllers.Common |
|
|
|
private readonly ILogger<LawyerArchivesController> logger;//日志 |
|
|
|
private readonly ILogger<LawyerArchivesController> logger;//日志 |
|
|
|
Result result = new Result(); |
|
|
|
Result result = new Result(); |
|
|
|
private readonly TwentySystemProxyClient twentyClient; |
|
|
|
private readonly TwentySystemProxyClient twentyClient; |
|
|
|
|
|
|
|
private readonly IConfiguration configuration; |
|
|
|
private readonly IMapper mapper; |
|
|
|
private readonly IMapper mapper; |
|
|
|
public LawyerArchivesController(ILogger<LawyerArchivesController> _logger, SqlSugarClient db, WriteSysLog logs, User user, IMapper _mapper, TwentySystemProxyClient _twentyClient) |
|
|
|
public LawyerArchivesController(ILogger<LawyerArchivesController> _logger, SqlSugarClient db, WriteSysLog logs, User user, IMapper _mapper, TwentySystemProxyClient _twentyClient, IConfiguration _configuration) |
|
|
|
{ |
|
|
|
{ |
|
|
|
this.logger = _logger; |
|
|
|
this.logger = _logger; |
|
|
|
_db = db; |
|
|
|
_db = db; |
|
|
|
_logs = logs; |
|
|
|
_logs = logs; |
|
|
|
this.mapper = _mapper; |
|
|
|
this.mapper = _mapper; |
|
|
|
this.twentyClient = _twentyClient; |
|
|
|
this.twentyClient = _twentyClient; |
|
|
|
|
|
|
|
this.configuration = _configuration; |
|
|
|
_userdata = user.Userdata(); |
|
|
|
_userdata = user.Userdata(); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
#endregion |
|
|
|
#endregion |
|
|
|
#region 律师阅卷 |
|
|
|
#region 律师阅卷 |
|
|
@ -578,7 +581,7 @@ namespace _24Hour.Controllers.Common |
|
|
|
|
|
|
|
|
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("QueryDsrList")] |
|
|
|
[Route("QueryDsrList")] |
|
|
|
public async Task<Result> QueryDsrList(string bmsah, string unitcode, string PartyIdCard) |
|
|
|
public async Task<Result<AjgldsrxxDto>> QueryDsrList(string bmsah, string unitcode, string PartyIdCard) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await twentyClient.QueryDsrList(bmsah, unitcode, PartyIdCard); |
|
|
|
return await twentyClient.QueryDsrList(bmsah, unitcode, PartyIdCard); |
|
|
|
} |
|
|
|
} |
|
|
@ -785,7 +788,7 @@ namespace _24Hour.Controllers.Common |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[HttpPost] |
|
|
|
[Route("ApplyMarKing")] |
|
|
|
[Route("ApplyMarKing")] |
|
|
|
public async Task<Result> ApplyMarKing(ApplyMarKingDto input) |
|
|
|
public async Task<Result<ApplyMarKingBackDto>> ApplyMarKing(ApplyMarKingDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await twentyClient.ApplyMarKing(input); |
|
|
|
return await twentyClient.ApplyMarKing(input); |
|
|
|
} |
|
|
|
} |
|
|
@ -820,6 +823,175 @@ namespace _24Hour.Controllers.Common |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await twentyClient.Arrange(input); |
|
|
|
return await twentyClient.Arrange(input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public async Task<Result> UploadDataToTwentyfourSys(string lawyerarchivesId) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
try |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var lawyerArchives = await _db.Queryable<LawyerArchives>().Where(x => x.Id == lawyerarchivesId).FirstAsync(); |
|
|
|
|
|
|
|
var lawyersvc = await _db.Queryable<App_LawyerServicesModel>().Where(x => x.Id == lawyerArchives.Id).FirstAsync(); |
|
|
|
|
|
|
|
var lawyer = await _db.Queryable<App_Sys_UserModel>().Where(x => x.Id == lawyerArchives.lawyerId).FirstAsync(); |
|
|
|
|
|
|
|
var departmenginfo = await _db.Queryable<App_Sys_UnitModel>().Where(x => x.unitCode == _userdata.unitCode).FirstAsync(); |
|
|
|
|
|
|
|
var UnitCode = _userdata.unitCode; |
|
|
|
|
|
|
|
var UnitName = departmenginfo.unitjc; |
|
|
|
|
|
|
|
var querylawyer = await QueryLsList(lawyer.identitycardId); |
|
|
|
|
|
|
|
if (querylawyer.IsSucceed == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (querylawyer.result.content.Count <= 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "案管系统不存在该律师信息,请注意核实律师信息"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败,查询律师信息失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var querydsr = await QueryDsrList(lawyerArchives.bmsah, UnitCode, lawyersvc.partyIDcard); |
|
|
|
|
|
|
|
if (querydsr.IsSucceed == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (querydsr.result.list.Count <= 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "案管系统不存在该律师信息,请注意核实律师信息"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败,查询当事人信息失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lawyerArchives == null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "分配数据不存在"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lawyersvc == null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "预约数据不存在"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (lawyer == null) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "律师数据不存在"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var registerinforequest = await Register(new RegisterDto() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
Bmsah = lawyerArchives.bmsah, |
|
|
|
|
|
|
|
UnitCode = UnitCode, |
|
|
|
|
|
|
|
UnitName = UnitName, |
|
|
|
|
|
|
|
PartyIdCard = lawyersvc.partyIDcard, |
|
|
|
|
|
|
|
PartyConsignor = lawyersvc.party, |
|
|
|
|
|
|
|
ProposerZJHM = lawyer.identitycardId, |
|
|
|
|
|
|
|
ProposerType = "", |
|
|
|
|
|
|
|
ProposerTel = lawyer.phone, |
|
|
|
|
|
|
|
ProposerSCC = lawyer.departmentUnifiedSocialCreditCode, |
|
|
|
|
|
|
|
Wtr = lawyersvc.mandator, |
|
|
|
|
|
|
|
Wtrydsrgxdm = lawyersvc.relationship switch |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"监护人" => "1424000000300", |
|
|
|
|
|
|
|
"近亲属" => "1424000000200", |
|
|
|
|
|
|
|
_ => "" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
Wtrydsrgxmc = lawyersvc.relationship switch |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"监护人" => "监护人", |
|
|
|
|
|
|
|
"近亲属" => "近亲属", |
|
|
|
|
|
|
|
_ => "本人" |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
Zbls = "", |
|
|
|
|
|
|
|
Lxdh = "", |
|
|
|
|
|
|
|
Lxdz = "" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (registerinforequest.IsSucceed == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var registerinfo = registerinforequest.result; |
|
|
|
|
|
|
|
var applymarkingrequest = await ApplyMarKing(new() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
bhdlbh = registerinfo.bhdlbh, |
|
|
|
|
|
|
|
bmsah = registerinfo.bmsah, |
|
|
|
|
|
|
|
clqkbm = "", |
|
|
|
|
|
|
|
clqkmc = "", |
|
|
|
|
|
|
|
czr = registerinfo.czr, |
|
|
|
|
|
|
|
czrybm = registerinfo.czrybm, |
|
|
|
|
|
|
|
dwbm = registerinfo.dwbm, |
|
|
|
|
|
|
|
jwgksxid = "", |
|
|
|
|
|
|
|
sqrlxdm = registerinfo.bhdlYxSqrInsertInputDto.sqrlxdm, |
|
|
|
|
|
|
|
sqrmc = registerinfo.bhdlYxSqrInsertInputDto.sqrxm, |
|
|
|
|
|
|
|
sqrq = DateTime.Now.ToString("yyyy-MM-dd"), |
|
|
|
|
|
|
|
sqrsfdm = registerinfo.bhdlYxSqrInsertInputDto.sqrsfdm, |
|
|
|
|
|
|
|
sxlxdm = "1405187400001", |
|
|
|
|
|
|
|
sxlxmc = "申请阅卷", |
|
|
|
|
|
|
|
zrrmc = lawyersvc.party |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (applymarkingrequest.IsSucceed == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var applymarkinginfo = applymarkingrequest.result; |
|
|
|
|
|
|
|
var Arrangerequest = await Arrange(new ArrangeDto() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
bhdlbh = registerinfo.bhdlbh, |
|
|
|
|
|
|
|
bmsah = registerinfo.bmsah, |
|
|
|
|
|
|
|
dwbm = registerinfo.dwbm, |
|
|
|
|
|
|
|
fydysl = "", |
|
|
|
|
|
|
|
fzfsdm = "", |
|
|
|
|
|
|
|
fzfsmc = "", |
|
|
|
|
|
|
|
jzztxsdm = "", |
|
|
|
|
|
|
|
jzztxsmc = "", |
|
|
|
|
|
|
|
sxbh = applymarkinginfo.sxbh, |
|
|
|
|
|
|
|
yjfsdm = "", |
|
|
|
|
|
|
|
yjfsmc = "", |
|
|
|
|
|
|
|
yjjzsj = lawyerArchives.permissibleStartTime?.ToString("yyyy-MM-dd"), |
|
|
|
|
|
|
|
yjkssj = lawyerArchives.permissibleEndTime?.ToString("yyyy-MM-dd"), |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
if (Arrangerequest.IsSucceed == true) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = true; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统成功"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败,申请阅卷添加失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败,申请添加失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败,登记添加失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
logger.LogInformation(ex.Message); |
|
|
|
|
|
|
|
result.IsSucceed = false; |
|
|
|
|
|
|
|
result.Message = "数据上传案管系统失败"; |
|
|
|
|
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// PC端根据卷宗id获取卷宗信息 |
|
|
|
/// PC端根据卷宗id获取卷宗信息 |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
@ -1650,7 +1822,7 @@ namespace _24Hour.Controllers.Common |
|
|
|
var legalAidPhotoDir = Path.Combine(lawyerdir, "legalAidPhoto"); |
|
|
|
var legalAidPhotoDir = Path.Combine(lawyerdir, "legalAidPhoto"); |
|
|
|
if (Directory.Exists(legalAidPhotoDir) == false) Directory.CreateDirectory(legalAidPhotoDir); |
|
|
|
if (Directory.Exists(legalAidPhotoDir) == false) Directory.CreateDirectory(legalAidPhotoDir); |
|
|
|
|
|
|
|
|
|
|
|
foreach (var legalphotot in legalphotots.Where(x=>x!=null)) |
|
|
|
foreach (var legalphotot in legalphotots.Where(x => x != null)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
logger.LogInformation(legalphotot); |
|
|
|
logger.LogInformation(legalphotot); |
|
|
|
var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + legalphotot.Replace("/", @"\"); |
|
|
|
var filepath = Path.Combine(Environment.CurrentDirectory, "wwwroot") + legalphotot.Replace("/", @"\"); |
|
|
|