|
|
|
|
@ -402,9 +402,9 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
/// </summary> |
|
|
|
|
/// <returns></returns> |
|
|
|
|
/// <exception cref="NotImplementedException"></exception> |
|
|
|
|
public async Task<ApiResult<InjureResDto>> GetInjureInfo() |
|
|
|
|
public async Task<ApiResult<List<InjureResDto>>> GetInjureInfo() |
|
|
|
|
{ |
|
|
|
|
ApiResult<InjureResDto> result = new ApiResult<InjureResDto>() { Code = 200, Msg = "接口调用成功", Data = null }; |
|
|
|
|
ApiResult<List<InjureResDto>> result = new ApiResult<List<InjureResDto>>() { Code = 200, Msg = "接口调用成功", Data = null }; |
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
@ -413,7 +413,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
if (string.IsNullOrWhiteSpace(token)) |
|
|
|
|
{ |
|
|
|
|
_logger.LogWarning("GetInjureInfo接口获取token失败"); |
|
|
|
|
return ApiResult<InjureResDto>.IsFail("GetInjureInfo接口获取token失败"); |
|
|
|
|
return ApiResult<List<InjureResDto>>.IsFail("GetInjureInfo接口获取token失败"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//获取用户配置 |
|
|
|
|
@ -421,7 +421,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
if (loginUsers.Code == "Error") |
|
|
|
|
{ |
|
|
|
|
_logger.LogWarning("GetInjureInfo接口获取用户配置失败"); |
|
|
|
|
return ApiResult<InjureResDto>.IsFail("GetInjureInfo接口获取用户配置失败"); |
|
|
|
|
return ApiResult<List<InjureResDto>>.IsFail("GetInjureInfo接口获取用户配置失败"); |
|
|
|
|
} |
|
|
|
|
InjureReqDto dto = new() |
|
|
|
|
{ |
|
|
|
|
@ -431,12 +431,12 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
|
|
|
|
|
HttpClientResult<object> riskResult = await _tokenProviderService |
|
|
|
|
.SendAndParseAsync<InjureReqDto, HttpClientResult<object>>( |
|
|
|
|
"https://zrh.szdunan.cn/v1/api/danger/rectification/check/detail", |
|
|
|
|
"https://zrh.szdunan.cn/v1/api/risk/init/injure", |
|
|
|
|
token, dto, HttpMethod.Post); |
|
|
|
|
|
|
|
|
|
if (riskResult != null && riskResult.Data != null && riskResult.Data.ToString()!.Length > 10) |
|
|
|
|
{ |
|
|
|
|
InjureResDto httpClientResult = JsonSerializer.Deserialize<InjureResDto>(riskResult.Data.ToString()!)!; |
|
|
|
|
List<InjureResDto> httpClientResult = JsonSerializer.Deserialize<List<InjureResDto>>(riskResult.Data.ToString()!)!; |
|
|
|
|
if (httpClientResult != null) |
|
|
|
|
{ |
|
|
|
|
result.Data = httpClientResult; |
|
|
|
|
@ -446,7 +446,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
catch (Exception ex) |
|
|
|
|
{ |
|
|
|
|
_logger.LogWarning(ex, "GetInjureInfo接口出错"); |
|
|
|
|
return ApiResult<InjureResDto>.IsFail($"GetInjureInfo接口出错{ex.Message}"); |
|
|
|
|
return ApiResult<List<InjureResDto>>.IsFail($"GetInjureInfo接口出错{ex.Message}"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return result; |
|
|
|
|
@ -482,7 +482,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn |
|
|
|
|
|
|
|
|
|
HttpClientResult<object> riskResult = await _tokenProviderService |
|
|
|
|
.SendAndParseAsync<RegionRootInfoReqDto, HttpClientResult<object>>( |
|
|
|
|
"https://zrh.szdunan.cn/v1/api/danger/rectification/check/detail", |
|
|
|
|
"https://zrh.szdunan.cn/v1/api/region/index_no_check_region", |
|
|
|
|
token, dto, HttpMethod.Post); |
|
|
|
|
|
|
|
|
|
if (riskResult != null && riskResult.Data != null && riskResult.Data.ToString()!.Length > 10) |
|
|
|
|
|