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 3321d8f..75c15b3 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
@@ -169,8 +169,8 @@ namespace Common.Shared.Application.SafetyFirePro.RequestDto
public int Total { get; set; }
///
- ///
+ /// 类型名:0待核查,1待整改,2待验收,3治理完毕,4不是隐患,
///
- public string Name { get; set; }
+ public required string Name { get; set; }
}
}
\ No newline at end of file
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
index 91655c6..9009b54 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.API/Controllers/ShenZhouShengAn/SunPalaceBoardSafetyController.cs
@@ -132,10 +132,10 @@ namespace ThirdPartyServices.API.Controllers.ShenZhouShengAn
/// 获得本月隐患数据
///
///
- [HttpGet]
- public async Task>> GetDangerHome()
+ [HttpPost]
+ public async Task>> GetDangerHome(DangerInfoQueryDto dto)
{
- return await _secSituationService.GetDangerHome();
+ return await _secSituationService.GetDangerHome(dto);
}
}
}
\ No newline at end of file
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ISunPalaceBoardSafetyService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ISunPalaceBoardSafetyService.cs
index c222557..e8846c3 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ISunPalaceBoardSafetyService.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/ISunPalaceBoardSafetyService.cs
@@ -42,6 +42,6 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
Task>> GetStatistics(WorkTaskQueryParamsDto dto);
- Task>> GetDangerHome();
+ Task>> GetDangerHome(DangerInfoQueryDto regionId);
}
}
\ No newline at end of file
diff --git a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
index 5346348..d7b72b7 100644
--- a/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
+++ b/WeiCloud.Fusion/ThirdPartyServices/ThirdPartyServices.DomainService/ShenZhouShengAn/SunPalaceBoardSafetyService.cs
@@ -1,6 +1,7 @@
using Common.Shared.Application.BaseModels;
using Common.Shared.Application.SafetyFirePro.RequestDto;
using Common.Shared.Application.SafetyFirePro.ResponseDto;
+using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using System.Text.Json;
@@ -211,13 +212,6 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
return ApiResult.IsFail("GetDangerInfos接口获取用户配置失败");
}
- //获取单位信息
- HttpClientResult branchs = await _tokenProviderService.GetBranchPermissions(token, loginUsers.Data.Uid);
- if (branchs.Code == "Error")
- {
- _logger.LogWarning("GetDangerInfos接口获取单位信息失败");
- return ApiResult.IsFail("GetDangerInfos接口获取单位信息失败");
- }
dto.Ubpid = loginUsers.Data.Ubpid;
// dto.Branch_id = branchs.Data.BranchPermissionIds[0];
@@ -651,69 +645,44 @@ namespace ThirdPartyServices.DomainService.ShenZhouShengAn
];
}
- public async Task>> GetDangerHome()
+ ///
+ /// 获取
+ ///
+ ///
+ ///
+ public async Task>> GetDangerHome(DangerInfoQueryDto dto)
{
- ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = [] };
+ ApiResult> result = new ApiResult>() { Code = 200, Msg = "接口调用成功", Data = new List() };
- try
+ Dictionary statusTotal = new Dictionary
{
- //获取token
- var token = await _tokenProviderService.GetTokenAsync(_configuration["ThirdParty:SzdunanCode"]!);
- if (string.IsNullOrWhiteSpace(token))
- {
- _logger.LogWarning("GetRegionRootInfo接口获取token失败");
- return ApiResult>.IsFail("GetRegionRootInfo接口获取token失败");
- }
+ { "待核查隐患数", 0 },
+ { "待整改隐患数", 0 },
+ { "待验收隐患数", 0 },
+ { "整改完毕隐患数", 0 }
+ };
- //获取用户配置
- HttpClientResult loginUsers = await _tokenProviderService.GetUserConfiguration(token);
- if (loginUsers.Code == "Error")
+ foreach (var item in statusTotal)
+ {
+ dto.Status = item.Key switch
{
- _logger.LogWarning("GetRegionRootInfo接口获取用户配置失败");
- return ApiResult>.IsFail("GetRegionRootInfo接口获取用户配置失败");
- }
- Params dto = new();
- dto.Ubpid = loginUsers.Data.Ubpid;
-
- HttpClientResult