|
@@ -510,7 +510,7 @@ class Writereport extends Base
|
|
|
// 添加messages消息
|
|
|
$t = '您的报告已确认';
|
|
|
$institution = DB::table('institution')->where('id',$doctor['institution_id'])->field('name')->find();
|
|
|
- $c = '您的远程诊断申请报告,已被'.$institution['name'].$doctor['realname'].'医师确认';
|
|
|
+ $c = '您的远程诊断报告,已被'.$institution['name'].$doctor['realname'].'医师确认';
|
|
|
$d = $status['remote_doctor_id'];
|
|
|
$type = '6';
|
|
|
$url = '';
|
|
@@ -541,18 +541,18 @@ class Writereport extends Base
|
|
|
DB::startTrans();
|
|
|
try{
|
|
|
DB::table('remote_application')->where('id', $application_id)->update(['report_status'=>'9']);
|
|
|
+ DB::table('remote_application')->where('id',$application_id)->update(['report_status'=>'9']);
|
|
|
$remote_order = DB::table('remote_order')
|
|
|
->where('status', Application::ORDER_STATUS['PAYCOMPLTET'])
|
|
|
->where('application_id', $application_id)
|
|
|
->field('order_money, id, super_hospital_id')
|
|
|
->find();
|
|
|
+ $hospital = DB::table('institution')->where('id', $remote_order['super_hospital_id'])->field('current_money')->find();
|
|
|
if(!$remote_order) {
|
|
|
DB::commit();
|
|
|
// todo 微信消息推送
|
|
|
return true;
|
|
|
}
|
|
|
- $hospital = DB::table('institution')->where('id', $remote_order['super_hospital_id'])->field('current_money')->find();
|
|
|
- DB::table('remote_application')->where('id',$application_id)->update(['report_status'=>'9']);
|
|
|
DB::table('institution')->where('id', $remote_order['super_hospital_id'])->update(['current_money' => $hospital['current_money'] + $remote_order['order_money']]);
|
|
|
DB::table('remote_order')->where('id', $remote_order['id'])->update(['status' => Application::ORDER_STATUS['CONFIRM']]);
|
|
|
DB::table('remote_water')->insert([
|
|
@@ -570,6 +570,8 @@ class Writereport extends Base
|
|
|
return true;
|
|
|
} catch (\Exception $e) {
|
|
|
// 回滚事务
|
|
|
+ Log::record("-----错误-----");
|
|
|
+ Log::record($e);
|
|
|
DB::rollback();
|
|
|
}
|
|
|
return json_encode(['status'=>'fail','code'=>'2110','确认报告失败']);
|