|
@@ -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
|
|
|
|
|
|
|
|
|
|
|
|
- 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>();
|
|
|
|
|
|
|
|
@@ -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
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|