lgy 5 年之前
父节点
当前提交
cb373b8d00
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 1
      application/inter/controller/Application.php
  2. 2 2
      application/inter/controller/Writereport.php

+ 1 - 1
application/inter/controller/Application.php

@@ -502,7 +502,7 @@ class Application extends Base
         $d = $re['req_doctor_id'];
         $type = '4';
         $exam_class = DB::table('exams')->where('id',$re['exam_id'])->field('exam_class')->find();
-        $report = DB::table('report')->where('remote_application_id',$id)->field('id')->find();
+        $report = DB::table('report')->where('exam_id',$re['exam_id'])->where('type',1)->field('id')->find();
         $url = Message::url($sessionid,$re['exam_id'],0,$exam_class['exam_class'],$report['id'],$id);
         Message::insert($t,$c,$d,$type,$url,1,$id);
         return json_encode(['status'=>'ok','code'=>'0000','sessionid'=>$sessionid]);

+ 2 - 2
application/inter/controller/Writereport.php

@@ -310,7 +310,7 @@ class Writereport extends Base
             $log['id'] = UUIDs::uuid16();
             $log['impression'] = isset($param['impression']) ? $param['impression'] : '';
             $log['description'] = isset($param['description']) ? $param['description'] : '';
-            $log['report_id'] = $id;
+            $log['report_id'] = $rid;
             $log['createdAt'] = date('Y-m-d H:i:s',time());
             $log['doctor_id'] = $doctor['id'];
             $log['type'] = 1;  //写报告
@@ -318,7 +318,7 @@ class Writereport extends Base
             $report_log = DB::table('report_record')->insert($log);
             log::record($report_log);
             log::record('----日志写入成功----');
-            $application = DB::table('remote_application')->where('exam_id',$id)->find();
+            $application = DB::table('remote_application')->where('exam_id',$param['id'])->find();
             if($application['req_doctor_id'] == 'c44663d6d3c0b535'){
                 $tel = '18910184804';
                 $type = '保存报告';