|
@@ -25,6 +25,7 @@ using WingInterfaceLibrary.DTO.DiagnosisModule;
|
|
|
using WingServerCommon.Config.Parameters;
|
|
|
using WingServerCommon.Interfaces.Cache;
|
|
|
using WingInterfaceLibrary.LiveConsultation;
|
|
|
+using WingInterfaceLibrary.Result.Languge;
|
|
|
|
|
|
namespace WingDeviceService.Service
|
|
|
{
|
|
@@ -655,7 +656,7 @@ namespace WingDeviceService.Service
|
|
|
/// </summary>
|
|
|
/// <param name="request">Token验证</param>
|
|
|
/// <returns>服务器配置信息结果:key:字段,value:数据值,复杂类型可为json</returns>
|
|
|
- public async Task<Dictionary<string, string>> QueryServerConfigAsync(TokenRequest request)
|
|
|
+ public async Task<DeviceServerSettingResult> QueryServerConfigAsync(TokenRequest request)
|
|
|
{
|
|
|
var deviceCode = await GetClientIdByTokenAsync(request.Token);
|
|
|
var deviceInfo = await _deviceInfoDBServiceProxy.FindDeviceInfoByCodeAsync(deviceCode);
|
|
@@ -667,7 +668,12 @@ namespace WingDeviceService.Service
|
|
|
if (!string.IsNullOrWhiteSpace(deviceInfo.OrganizationCode))
|
|
|
{
|
|
|
org = await _organizationDBService.GetOrganizationDetailAsync(new GetOrganizationDBRequest { OrganizationCode = deviceInfo.OrganizationCode });
|
|
|
+ if (org == null)
|
|
|
+ {
|
|
|
+ org = new OrganizationDTO();
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
var dictionary = new Dictionary<string, string>();
|
|
|
//定义配置字段 并扩充字段,返回数据可持续更新接口文档,如果数据是复杂类型可以转成json
|
|
|
//TODO 配置信息: 直播配置、存储配置、
|
|
@@ -679,10 +685,20 @@ namespace WingDeviceService.Service
|
|
|
dictionary.Add("NotificationUrl", _webSocketUrl);
|
|
|
dictionary.Add("MergedChannel", deviceInfo.MergedChannel.ToString());
|
|
|
dictionary.Add("LiveConsultationRateSeconds", _liveConsultationRateSeconds.ToString());
|
|
|
- return dictionary;
|
|
|
+ return new DeviceServerSettingResult()
|
|
|
+ {
|
|
|
+ ServerConfigList = dictionary,
|
|
|
+ IsUploadThumbnail = isUploadThumbnail,
|
|
|
+ PatientType = org.PatientType,
|
|
|
+ HeartRateSeconds = _heartRateSeconds,
|
|
|
+ NotificationUrl = _webSocketUrl,
|
|
|
+ MergedChannel = deviceInfo.MergedChannel,
|
|
|
+ LiveConsultationRateSeconds = _liveConsultationRateSeconds
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 添加或迁移设备到医院请求
|
|
|
/// </summary>
|