|
@@ -67,6 +67,7 @@ namespace WingDeviceService.Service
|
|
|
private int _remoteControlAskTimeoutSec = 0;
|
|
|
private int _reportStateIntervalSeconds = 0;
|
|
|
private int _reportStateTimeout = 0;
|
|
|
+ private ILiveConsultationService _liveConsultationService;
|
|
|
|
|
|
|
|
|
|
|
@@ -84,6 +85,7 @@ namespace WingDeviceService.Service
|
|
|
_diagnosisModuleService = GetProxy<IDiagnosisModuleDBService>();
|
|
|
_remedicalService = GetProxy<IRemedicalService>();
|
|
|
_rtcService = GetProxy<IWingRtcService>();
|
|
|
+ _liveConsultationService = GetProxy<ILiveConsultationService>();
|
|
|
_heartRateSeconds = ConfigurationManager.GetParammeter<IntParameter>("Device", "HeartRateSeconds").Value;
|
|
|
_deviceHeartRateManager = new DeviceHeartRateManager(SetOnlineState);
|
|
|
_webSocketUrl = ConfigurationManager.GetParammeter<StringParameter>("Notification", "WebSocketUrl").Value;
|
|
@@ -1365,13 +1367,15 @@ namespace WingDeviceService.Service
|
|
|
};
|
|
|
await _notificationService.PostMessageAsync(notificationRequest);
|
|
|
|
|
|
- var getRoomRequest = new FindRoomByCodeRequest { DeviceCode = deviceCode, UserCode = userCode };
|
|
|
- var room = await _rtcService.GetLiveRoomByCodeAsync(getRoomRequest);
|
|
|
- if (room != null && !string.IsNullOrWhiteSpace(room.RoomId))
|
|
|
- {
|
|
|
- var changeControllingParameterStateRequest = new SetLiveParamsRequest { UserCode = userCode, RoomId = room.RoomId, IsControllingParameter = false };
|
|
|
- await _rtcService.ChangeControllingParameterStateAsync(changeControllingParameterStateRequest);
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var roomRequest = new ChangeConsultationControllingStateRequest { DeviceCode = deviceCode, UserCode = userCode, IsControllingParameter = false };
|
|
|
+ await _liveConsultationService.ChangeConsultationControllingStateAsync(roomRequest);
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -1410,13 +1414,15 @@ namespace WingDeviceService.Service
|
|
|
};
|
|
|
await _notificationService.PostMessageAsync(notificationRequest);
|
|
|
|
|
|
- var getRoomRequest = new FindRoomByCodeRequest { DeviceCode = deviceCode, UserCode = userCode };
|
|
|
- var room = await _rtcService.GetLiveRoomByCodeAsync(getRoomRequest);
|
|
|
- if (room != null && !string.IsNullOrWhiteSpace(room.RoomId))
|
|
|
- {
|
|
|
- var changeControllingParameterStateRequest = new SetLiveParamsRequest { UserCode = userCode, RoomId = room.RoomId, IsControllingParameter = false };
|
|
|
- await _rtcService.ChangeControllingParameterStateAsync(changeControllingParameterStateRequest);
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var roomRequest = new ChangeConsultationControllingStateRequest { DeviceCode = deviceCode, UserCode = userCode, IsControllingParameter = false };
|
|
|
+ await _liveConsultationService.ChangeConsultationControllingStateAsync(roomRequest);
|
|
|
return true;
|
|
|
}
|
|
|
}
|