fixed
This commit is contained in:
@@ -28,6 +28,9 @@ class Reportty extends BaseHttpApi
|
||||
* desc:听译-生成听诊报告
|
||||
*
|
||||
* api/Reportty/createReport
|
||||
* 参数:ticket
|
||||
* from 来源
|
||||
* client_id
|
||||
*
|
||||
* author:wh
|
||||
*/
|
||||
@@ -52,15 +55,11 @@ class Reportty extends BaseHttpApi
|
||||
if(empty($ticket)){
|
||||
return json(Tools::set_fail('ticket必须'));
|
||||
}
|
||||
$username = input('username');
|
||||
if(empty($username)){
|
||||
return json(Tools::set_fail('username必须'));
|
||||
}
|
||||
$user = Db::table('fa_ty_users')->where('username',$username)->find();
|
||||
$user = Db::table('fa_ty_users')->where('ticket',$ticket)->find();
|
||||
if(empty($user)){
|
||||
return json(Tools::set_fail('医生不存在'));
|
||||
return json(Tools::set_fail('医生不存在,请确认ticket'));
|
||||
}
|
||||
|
||||
//$username = $user['username'];
|
||||
//查询历史聊天记录
|
||||
//$day3 = date('Y-m-d 00:00:00',strtotime('-3 day'));
|
||||
$his_record = Db::table('fa_ty_chathistory')
|
||||
@@ -124,13 +123,13 @@ class Reportty extends BaseHttpApi
|
||||
//'username'=>Db::table('fa_ty_users')->where('doctor',$user['username'])->value('username'),
|
||||
'report_content'=>$choice['message']['content'],
|
||||
'ticket'=>$ticket,
|
||||
//'from'=>input('from','ty'),//来源
|
||||
'from'=>input('from','ty'),//来源
|
||||
];
|
||||
$report_id = Db::table('fa_ty_medical_report')->insertGetId($data);
|
||||
//日期
|
||||
$data['date'] = date('Y-m-d');
|
||||
//来源
|
||||
$data['from'] = input('from','ty');
|
||||
//$data['from'] = input('from','ty');
|
||||
//统一存档
|
||||
Db::table(TabConf::$fa_hdrmedical_report)->insert($data);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user