diff --git a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/Common.Shared.Application.csproj b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/Common.Shared.Application.csproj index a35dcaa..66060be 100644 --- a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/Common.Shared.Application.csproj +++ b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/Common.Shared.Application.csproj @@ -7,7 +7,7 @@ Common.Shared.Application - 3.0.0 + 3.2.0 zrh-lx zrh-lx 包含所有公共使用的 DTO、契约、接口模型等,供微服务之间共享使用 diff --git a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/DaHua/RequestDto/DahuaVideoQueryDto.cs b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/DaHua/RequestDto/DahuaVideoQueryDto.cs index 46767cf..314e5fa 100644 --- a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/DaHua/RequestDto/DahuaVideoQueryDto.cs +++ b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/DaHua/RequestDto/DahuaVideoQueryDto.cs @@ -289,7 +289,7 @@ namespace Common.Shared.Application.DaHua /// 码流类型:1-主码流,2-子码流 /// [JsonPropertyName("streamType")] - public string StreamType { get; set; } = "2"; + public string StreamType { get; set; } = "1"; /// /// rtsp专用,有datatype没有type,有type没有datatype diff --git a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/RequestDto/SunPlaceBoardWorkOrderReqDto.cs b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/RequestDto/SunPlaceBoardWorkOrderReqDto.cs index e0d27f4..3321d8f 100644 --- a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/RequestDto/SunPlaceBoardWorkOrderReqDto.cs +++ b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/RequestDto/SunPlaceBoardWorkOrderReqDto.cs @@ -86,7 +86,7 @@ namespace Common.Shared.Application.SafetyFirePro.RequestDto /// 10 /// 不传则默认为10 [JsonPropertyName("page_size")] - public int? PageSize { get; set; } = 20; + public int? Page_size { get; set; } = 20; /// /// 作业状态 diff --git a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/ResponseDto/SunPlaceBoardWorkOrderResDto.cs b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/ResponseDto/SunPlaceBoardWorkOrderResDto.cs index 078b8fa..5220c2e 100644 --- a/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/ResponseDto/SunPlaceBoardWorkOrderResDto.cs +++ b/WeiCloud.Fusion/Common.SharedService/Common.Shared.Application/SafetyFirePro/ResponseDto/SunPlaceBoardWorkOrderResDto.cs @@ -526,6 +526,9 @@ namespace Common.Shared.Application.SafetyFirePro.ResponseDto [JsonPropertyName("status")] public int Status { get; set; } + [JsonPropertyName("sort")] + public int? Sort { get; set; } + /// /// 审批人信息 /// diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/RequestDto/ThirdPartyProviderQueryDto.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/RequestDto/ThirdPartyProviderQueryDto.cs index 498ea69..a364e3a 100644 --- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/RequestDto/ThirdPartyProviderQueryDto.cs +++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.Application/ShenZhouShengAn/RequestDto/ThirdPartyProviderQueryDto.cs @@ -68,6 +68,8 @@ namespace ThirdPartyServices.Application.ShenZhouShengAn.RequestDto public long? P_region_id { get; set; } public long? Region_id { get; set; } + + public int? Page_size { get; set; } } /// diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs index c603db1..c37d7d8 100644 --- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs +++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs @@ -548,7 +548,7 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn { dto.Status = statusNot[i].ToString(); dto.Page = 1; - dto.PageSize = 1; + dto.Page_size = 1; HttpClientResult riskResult = await _tokenProviderService .SendAndParseAsync>( "https://zrh.szdunan.cn/v1/api/ticket/safe/ledger", diff --git a/WeiCloud.Fusion/VideoService/Video.API/Controllers/DaHua/VideoManageController.cs b/WeiCloud.Fusion/VideoService/Video.API/Controllers/DaHua/VideoManageController.cs index a26a010..b37b30a 100644 --- a/WeiCloud.Fusion/VideoService/Video.API/Controllers/DaHua/VideoManageController.cs +++ b/WeiCloud.Fusion/VideoService/Video.API/Controllers/DaHua/VideoManageController.cs @@ -1,7 +1,13 @@ using Common.Shared.Application.DaHua; using Common.Shared.DomainService; using Microsoft.AspNetCore.Mvc; +using Microsoft.OpenApi.Models; +using Org.BouncyCastle.Ocsp; +using System.Text; +using System.Text.Json; using Video.DomainService; +using Video.DomainService.Dahvision; +using static QRCoder.PayloadGenerator.ShadowSocksConfig; namespace Video.API.Controllers.DaHua { @@ -44,6 +50,12 @@ namespace Video.API.Controllers.DaHua return await _dahGeneralCtlService.RecordVideoUrl(dto, ipaddress); } + // 全局设置(只在测试环境使用!) + private static readonly HttpClient _http = new HttpClient(new HttpClientHandler + { + ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator + }); + /// /// 大华的录像回放地址(rtsp) /// @@ -55,6 +67,17 @@ namespace Video.API.Controllers.DaHua return await _dahGeneralCtlService.RtspPlaybackByTime(dto, ipaddress); } + /// + /// 大华的录像信息列表 + /// + /// + /// + [HttpPost] + public async Task> QueryRecords([FromBody] RtspPlayBackReqDto dto) + { + return await _dahGeneralCtlService.QueryRecords(dto); + } + /// /// 大华hls视频的实时流地址 /// diff --git a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs index ca8e1a3..844275a 100644 --- a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs +++ b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/DahuaGeneralCtlService.cs @@ -4,6 +4,7 @@ using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Logging; using NPOI.XWPF.UserModel; using System.Net.Http.Json; +using System.Text; using System.Text.Json; using Video.DomainService.Dahvision; @@ -106,7 +107,7 @@ namespace Video.DomainService /// /// /// - public async Task> QueryRecords(PlaybackReqDto dto) + public async Task> QueryRecords(RtspPlayBackReqDto dto) { // 0) 参数校验 + 早退(按需增加更多必填校验) if (dto == null) @@ -126,7 +127,7 @@ namespace Video.DomainService using var req = new HttpRequestMessage(HttpMethod.Post, url) { - Content = JsonContent.Create(dto.Data) // 关键:把 dto 放进请求体 + Content = JsonContent.Create(dto) // 关键:把 dto 放进请求体 }; req.Headers.TryAddWithoutValidation("Authorization", token); @@ -352,7 +353,7 @@ namespace Video.DomainService return new DaHApiResult { Success = false, Code = "1007", Msg = "通道ID不能为空" }; } - // 先用缓存里的 token,不足5分钟过期再刷新(按你之前的口径来) + // 先用缓存里的 token,不足5分钟过期再刷新 var clientId = _configuration["DahuaAuth:ClientId"]; var token = await _tokenProviderService.GetTokenAsync(clientId!); if (!_tokenProviderService.IsTokenValid(token)) @@ -360,7 +361,7 @@ namespace Video.DomainService _logger.LogWarning("rtsp录像回放:token无效"); return new DaHApiResult { Success = false, Code = "1009", Msg = "token无效" }; } - dto.Data.StreamType = "2"; + var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/admin/API/SS/Playback/StartPlaybackByTime"; if (ipaddress != null) { @@ -396,6 +397,7 @@ namespace Video.DomainService _configuration, "Time" ) + "?token=" + result.Data.Token; + return result; } catch (Exception ex) @@ -428,7 +430,7 @@ namespace Video.DomainService _logger.LogWarning("rtsp实时预览接口方式:token无效"); return new DaHApiResult { Success = false, Code = "1009", Msg = "token无效" }; } - dto.Data.StreamType = "2"; + var url = $"https://{_configuration["DahuaAuth:Host"]}/evo-apigw/admin/API/MTS/Video/StartVideo"; if (ipaddress != null) { diff --git a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/IDahuaGeneralCtlService.cs b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/IDahuaGeneralCtlService.cs index 215e0b3..ce59bd5 100644 --- a/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/IDahuaGeneralCtlService.cs +++ b/WeiCloud.Fusion/VideoService/Video.DomainService/Dahvision/IDahuaGeneralCtlService.cs @@ -12,7 +12,7 @@ namespace Video.DomainService /// /// /// - Task> QueryRecords(PlaybackReqDto dto); + Task> QueryRecords(RtspPlayBackReqDto dto); /// /// HLS、RTMP录像回放(FLV不支持)