新增功能
This commit is contained in:
@@ -28,7 +28,7 @@ class TcmController extends BaseApiController
|
||||
* @notes 不需要登录的方法
|
||||
* @var array
|
||||
*/
|
||||
public array $notNeedLogin = ['getPatientSignature', 'diagnosisDetail', 'getDict', 'confirmDiagnosis', 'getCardList', 'getOrderByNo'];
|
||||
public array $notNeedLogin = ['getPatientSignature', 'diagnosisDetail', 'getDict', 'confirmDiagnosis', 'getCardList', 'getOrderByNo', 'patientHangupVideo'];
|
||||
|
||||
/**
|
||||
* @notes 获取患者签名(供小程序调用)
|
||||
@@ -51,7 +51,32 @@ class TcmController extends BaseApiController
|
||||
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 患者挂断视频:后端 DeleteCloudRecording + 结束通话记录(与诊单 patient_id 校验)
|
||||
* @return \think\response\Json
|
||||
*/
|
||||
public function patientHangupVideo()
|
||||
{
|
||||
$params = [
|
||||
'diagnosis_id' => (int)$this->request->post('diagnosis_id', 0),
|
||||
'patient_id' => (int)$this->request->post('patient_id', 0),
|
||||
'room_id' => trim((string)$this->request->post('room_id', '')),
|
||||
];
|
||||
if ($params['patient_id'] <= 0) {
|
||||
return $this->fail('患者ID不能为空');
|
||||
}
|
||||
if ($params['diagnosis_id'] <= 0 && $params['room_id'] === '') {
|
||||
return $this->fail('诊单ID或房间号须至少传一项');
|
||||
}
|
||||
$result = DiagnosisLogic::patientHangupVideoCall($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(DiagnosisLogic::getError());
|
||||
}
|
||||
|
||||
return $this->success('已结束通话');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取诊单详情(供小程序调用)
|
||||
* @return \think\response\Json
|
||||
|
||||
Reference in New Issue
Block a user