新增功能
This commit is contained in:
@@ -314,6 +314,7 @@ class DiagnosisController extends BaseAdminController
|
||||
return $this->fail('房间号不能为空');
|
||||
}
|
||||
|
||||
$params['admin_id'] = (int)$this->adminId;
|
||||
$result = DiagnosisLogic::bindCallRoom($params);
|
||||
if ($result) {
|
||||
return $this->success('绑定成功', [], 1, 1);
|
||||
@@ -321,6 +322,69 @@ class DiagnosisController extends BaseAdminController
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 接通后发起腾讯云云端混流录制(需配置 CAM 与云点播)
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function startCloudRecording()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
if (empty($params['diagnosis_id'])) {
|
||||
return $this->fail('诊单ID不能为空');
|
||||
}
|
||||
$params['admin_id'] = (int)$this->adminId;
|
||||
$result = DiagnosisLogic::startCloudRecording($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 浏览器本地上传通话录制后,关联到通话记录(合并 recording_urls)
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function attachLocalCallRecording()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
if (empty($params['diagnosis_id'])) {
|
||||
return $this->fail('诊单ID不能为空');
|
||||
}
|
||||
if (empty($params['file_url'])) {
|
||||
return $this->fail('文件地址不能为空');
|
||||
}
|
||||
$params['admin_id'] = (int)$this->adminId;
|
||||
$result = DiagnosisLogic::attachLocalCallRecording($params);
|
||||
if ($result) {
|
||||
return $this->success('已关联录制', [], 1, 1);
|
||||
}
|
||||
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 医助旁观诊单当前视频通话(TRTC 进房参数,仅拉流)
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function watchCall()
|
||||
{
|
||||
$diagnosisId = (int)$this->request->get('diagnosis_id', 0);
|
||||
if ($diagnosisId <= 0) {
|
||||
return $this->fail('诊单ID不能为空');
|
||||
}
|
||||
|
||||
$result = DiagnosisLogic::getAssistantWatchRoomParams([
|
||||
'diagnosis_id' => $diagnosisId,
|
||||
'admin_id' => (int)$this->adminId,
|
||||
]);
|
||||
if ($result === false) {
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取患者通话签名(用于测试)
|
||||
* @return \think\response\Json
|
||||
|
||||
Reference in New Issue
Block a user