diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
index 7259f6c..91655c6 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
@@ -20,6 +20,11 @@ namespace ThirdPartyServices.API.Controllers.ShenZhouShengAn
private readonly ISunPalaceBoardSafetyService _secSituationService;
+ ///
+ ///
+ ///
+ ///
+ ///
public SunPalaceBoardSafetyController(ILogger logger, ISunPalaceBoardSafetyService secSituationService)
{
_logger = logger;
@@ -82,7 +87,7 @@ namespace ThirdPartyServices.API.Controllers.ShenZhouShengAn
///
/// 14、获得隐患详情数据
///
- ///
+ ///
///
[HttpPost("GetDangerDetail")]
public async Task> GetDangerDetail(DangerDetailReqDto dto)
@@ -126,7 +131,6 @@ namespace ThirdPartyServices.API.Controllers.ShenZhouShengAn
///
/// 获得本月隐患数据
///
- ///
///
[HttpGet]
public async Task>> GetDangerHome()
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/ResponseDto/ThirdPartyProviderResDto.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/ResponseDto/ThirdPartyProviderResDto.cs
index 545ad09..5ecdaac 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/ResponseDto/ThirdPartyProviderResDto.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/ResponseDto/ThirdPartyProviderResDto.cs
@@ -99,7 +99,7 @@ namespace ThirdPartyServices.Application.ShenZhouShengAn.ResponseDto
break;
case "message":
- case "msg": // 👈 支持两个字段名
+ case "msg":
result.Message = reader.GetString();
break;
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/PuTianSuYuan/SunPalaceBoardFacilityService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/PuTianSuYuan/SunPalaceBoardFacilityService.cs
index 8d8e0cd..d9dba40 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/PuTianSuYuan/SunPalaceBoardFacilityService.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/PuTianSuYuan/SunPalaceBoardFacilityService.cs
@@ -29,9 +29,15 @@ namespace ThirdPartyServices.DomainService.PuTianSuYuan
switch (dto.QueryTimeType)
{
case (int)QueryTimeEnum.Custom:
+ if (dto.StartTime != null)
+ {
+ start = dto.StartTime.Value;
+ }
+ if (dto.EndTime != null)
+ {
+ end = dto.EndTime.Value;
+ }
- start = dto.StartTime.Value;
- end = dto.EndTime.Value;
break;
case (int)QueryTimeEnum.Monthly:
@@ -156,8 +162,14 @@ namespace ThirdPartyServices.DomainService.PuTianSuYuan
{
case (int)QueryTimeEnum.Custom:
- start = dto.StartTime.Value;
- end = dto.EndTime.Value;
+ if (dto.StartTime != null)
+ {
+ start = dto.StartTime.Value;
+ }
+ if (dto.EndTime != null)
+ {
+ end = dto.EndTime.Value;
+ }
break;
case (int)QueryTimeEnum.Monthly:
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
index 2cc6ed6..5346348 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
@@ -30,7 +30,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task> GetListFloor()
{
- ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -244,7 +244,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task> GetRiskMapInfo(int floorId)
{
- ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -300,7 +300,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task> GetLedger(WorkTaskQueryParamsDto dto)
{
- ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -361,7 +361,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task> GetDangerDetail(DangerDetailReqDto dto)
{
- ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -403,7 +403,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task>> GetInjureInfo()
{
- ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = [] };
try
{
@@ -458,7 +458,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task> GetRegionRootInfo(RegionRootInfoReqDto dto)
{
- ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult result = new ApiResult() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -510,7 +510,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
///
public async Task>> GetStatistics(WorkTaskQueryParamsDto dto)
{
- ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = new() };
try
{
@@ -653,7 +653,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
public async Task>> GetDangerHome()
{
- ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = null };
+ ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = [] };
try
{
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ThirdPartyProviderService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ThirdPartyProviderService.cs
index 21fa02a..9bc8dd6 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ThirdPartyProviderService.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ThirdPartyProviderService.cs
@@ -74,7 +74,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
result = await SendAndParseAsync>(
"https://zrh.szdunan.cn/v1/api/users",
token,
- HttpMethod.Post);
+ HttpMethod.Post) ?? new();
return result;
}
diff --git a/WeiCloud.Fusion/VideoService/Video.Application/IdentityClientConfig.cs b/WeiCloud.Fusion/VideoService/Video.Application/IdentityClientConfig.cs
index 15f74ba..530b4fd 100644
--- a/WeiCloud.Fusion/VideoService/Video.Application/IdentityClientConfig.cs
+++ b/WeiCloud.Fusion/VideoService/Video.Application/IdentityClientConfig.cs
@@ -6,27 +6,27 @@ namespace Video.Application
{
public class IdentityClientConfig
{
- public string Scheme { get; set; }
- public string Authority { get; set; }
+ public string Scheme { get; set; } = string.Empty;
+ public string Authority { get; set; } = string.Empty;
public bool RequireHttpsMetadata { get; set; }
- public string ApiName { get; set; }
- public string[] CorsWithOrigins { get; set; }
- public string ClientSecret { get; set; }
- public string ClientId { get; set; }
- public string Scope { get; set; }
- public string GrantType { get; set; }
+ public string ApiName { get; set; } = string.Empty;
+ public string[] CorsWithOrigins { get; set; } = [];
+ public string ClientSecret { get; set; } = string.Empty;
+ public string ClientId { get; set; } = string.Empty;
+ public string Scope { get; set; } = string.Empty;
+ public string GrantType { get; set; } = string.Empty;
}
public class IdentityClientConfigV4
{
- public string PolicyScheme { get; set; }
- public List Items { get; set; }
+ public string PolicyScheme { get; set; } = string.Empty;
+ public List Items { get; set; } = [];
}
public class IdentityClientConfigItemV4
{
- public string Scheme { get; set; }
- public string Authority { get; set; }
+ public string Scheme { get; set; } = string.Empty;
+ public string Authority { get; set; } = string.Empty;
public bool RequireHttpsMetadata { get; set; }
}
}
\ No newline at end of file
diff --git a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs
index c808fe1..4d5c52c 100644
--- a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs
+++ b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs
@@ -316,7 +316,7 @@ namespace Video.DomainService
var result = await resp.Content.ReadFromJsonAsync>();
- if (!result.Success || result.Code != "0")
+ if (result != null && (result.Success || result.Code != "0"))
{
result.Success = false;
result.Code = "1011";
@@ -339,7 +339,6 @@ namespace Video.DomainService
///
/// rtsp录像回放
- /// TODO:后续增加一个调用视频信息接口,去得到里面recordType=多少
/// (播放命令:ffplay -rtsp_transport tcp -i "rtsp://demo.weienergy.cn:15210/dss/monitor/param/cameraid=1000021%24104%26substream=1?token=430")强制走tcp
///
///
diff --git a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/RootVideoPlaybackService.cs b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/RootVideoPlaybackService.cs
index 1008408..0de8435 100644
--- a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/RootVideoPlaybackService.cs
+++ b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/RootVideoPlaybackService.cs
@@ -2,6 +2,7 @@
using Common.Shared.Application.DaHua;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
+using WeiCloud.Utils.FileTools;
namespace Video.DomainService
{
@@ -43,11 +44,11 @@ namespace Video.DomainService
if (!urlReult.Success)
{
result.Code = 500;
- result.Msg = urlReult.Msg;
- _logger.LogWarning("大华录像回放接口调用失败:{Msg}", urlReult.Msg);
+ result.Msg = urlReult.Msg ?? "" ?? "";
+ _logger.LogWarning("大华录像回放接口调用失败:{Msg}", urlReult.Msg ?? "");
}
- result.Data = urlReult.Data;
+ result.Data = urlReult.Data ?? new();
return result;
}
@@ -65,10 +66,10 @@ namespace Video.DomainService
if (!urlReult.Success)
{
result.Code = 500;
- result.Msg = urlReult.Msg;
- _logger.LogWarning("大华实时视频接口调用失败:{Msg}", urlReult.Msg);
+ result.Msg = urlReult.Msg ?? "";
+ _logger.LogWarning("大华实时视频接口调用失败:{Msg}", urlReult.Msg ?? "");
}
- result.Data = urlReult.Data;
+ result.Data = urlReult.Data ?? new();
return result;
}
@@ -84,10 +85,10 @@ namespace Video.DomainService
if (!pageResult.Success)
{
result.Code = 500;
- result.Msg = pageResult.Msg;
+ result.Msg = pageResult.Msg ?? "";
_logger.LogWarning("大华设备通道分页查询接口调用失败:{Msg}", pageResult.Msg);
}
- result.Data = pageResult.Data;
+ result.Data = pageResult.Data ?? new();
return result;
}
@@ -106,7 +107,7 @@ namespace Video.DomainService
if (!logoutResult.Success)
{
result.Code = 500;
- result.Msg = logoutResult.Msg;
+ result.Msg = logoutResult.Msg ?? "";
_logger.LogWarning("大华登出接口调用失败:{Msg}", logoutResult.Msg);
}
else
@@ -130,10 +131,10 @@ namespace Video.DomainService
if (!urlReult.Success)
{
result.Code = 500;
- result.Msg = urlReult.Msg;
- _logger.LogWarning("大华实时视频接口调用失败:{Msg}", urlReult.Msg);
+ result.Msg = urlReult.Msg ?? "";
+ _logger.LogWarning("大华实时视频接口调用失败:{Msg}", urlReult.Msg ?? "");
}
- result.Data = urlReult.Data;
+ result.Data = urlReult.Data ?? new();
return result;
}
@@ -150,11 +151,11 @@ namespace Video.DomainService
if (!urlReult.Success)
{
result.Code = 500;
- result.Msg = urlReult.Msg;
- _logger.LogWarning("大华录像回放接口调用失败:{Msg}", urlReult.Msg);
+ result.Msg = urlReult.Msg ?? "";
+ _logger.LogWarning("大华录像回放接口调用失败:{Msg}", urlReult.Msg ?? "");
}
- result.Data = urlReult.Data;
+ result.Data = urlReult.Data ?? new();
return result;
}