新增接诊时间

This commit is contained in:
wucongxing 2023-03-27 09:28:30 +08:00
parent afc04c4026
commit 806a9e02c5
3 changed files with 60 additions and 5 deletions

View File

@ -601,7 +601,6 @@ class InquiryService extends BaseService
return fail();
}
$times_number = 0; // 沟通次数
$duration = 0; // 沟通时长
$follow = false; // 关注状态
@ -648,6 +647,7 @@ class InquiryService extends BaseService
$result['duration'] = $duration;
$result['follow'] = $follow;
$result['is_evaluation'] = $is_evaluation;
$result['reception_time'] = $order_inquiry['reception_time'] ?? ""; // 接诊时间
return success($result);
}

View File

@ -27,7 +27,21 @@ class MessageNoticeService extends BaseService
$params['notice_type'] = 1; // 消息类型1:医生服务通知 2:医生系统公告 3:患者系统消息
$params['send_status'] = 1;
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
$fields = [
'notice_id',
'read_status',
'from_name',
'notice_title',
'notice_send_time',
'notice_content',
'button_type',
'link_type',
'link_params',
'show_type',
'show_params',
];
$result = MessageNotice::getMessageNoticePage($params, $fields, $page, $per_page);
if (!empty($result['data'])) {
foreach ($result['data'] as &$item) {
if (!empty($item['link_params'])) {
@ -59,7 +73,21 @@ class MessageNoticeService extends BaseService
$params['notice_type'] = 2; // 消息类型1:医生服务通知 2:医生系统公告 3:患者系统消息
$params['send_status'] = 1;
$result = MessageNotice::getMessageNoticePage($params, ["*"], $page, $per_page);
$fields = [
'notice_id',
'read_status',
'from_name',
'notice_title',
'notice_send_time',
'notice_content',
'button_type',
'link_type',
'link_params',
'show_type',
'show_params',
];
$result = MessageNotice::getMessageNoticePage($params, $fields, $page, $per_page);
if (!empty($result['data'])) {
foreach ($result['data'] as &$item) {
if (!empty($item['link_params'])) {
@ -74,7 +102,34 @@ class MessageNoticeService extends BaseService
return success($result);
}
public function getDoctorMessageSystemInfo(){
/**
* 获取医生系统公告详情
* @return array
*/
public function getDoctorMessageSystemInfo(): array
{
$user_info = $this->request->getAttribute("userInfo") ?? [];
$notice_id = $this->request->route('notice_id');
$params = array();
$params['notice_id'] = $notice_id;
$params['user_id'] = $user_info['user_id'];
$params['notice_type'] = 2; // 消息类型1:医生服务通知 2:医生系统公告 3:患者系统消息)
$params['send_status'] = 1;
$message_notice = MessageNotice::getOne($params);
if (empty($message_notice)){
return fail();
}
if (!empty($message_notice['link_params'])) {
$message_notice['link_params'] = json_decode($message_notice['link_params'], true);
}
if (!empty($message_notice['show_params'])) {
$message_notice['show_params'] = json_decode($message_notice['show_params'], true);
}
return success($message_notice->toArray());
}
}

View File

@ -195,7 +195,7 @@ Router::addGroup('/doctor', function () {
// 获取医生系统公告列表-分页
Router::get('/system', [MessageNoticeController::class, 'getDoctorMessageSystem']);
// 获取医生系统公告列表-分页
// 获取医生系统公告详情
Router::get('/system/{notice_id:\d+}', [MessageNoticeController::class, 'getDoctorMessageSystemInfo']);
});
});