|
@@ -225,10 +225,13 @@ class Application extends Base
|
|
|
$application_info['createdAt'] = date('Y-m-d H:i:s',time());
|
|
|
DB::table('remote_application')->insert($application_info);
|
|
|
$aid = $application_info['id'];
|
|
|
- $report = array();
|
|
|
- $report['id'] = UUIDs::uuid16();
|
|
|
- $report['exam_id'] = $param['id'];
|
|
|
- DB::table('report')->insert($report);
|
|
|
+ $r_info = DB::table('report')->where('exam_id',$param['id'])->find();
|
|
|
+ if(empty($r_info)){
|
|
|
+ $report = array();
|
|
|
+ $report['id'] = UUIDs::uuid16();
|
|
|
+ $report['exam_id'] = $param['id'];
|
|
|
+ DB::table('report')->insert($report);
|
|
|
+ }
|
|
|
}else{
|
|
|
log::record('修改远程申请');
|
|
|
DB::table('remote_application')->where('exam_id',$param['id'])->update($application_info);
|
|
@@ -366,7 +369,7 @@ class Application extends Base
|
|
|
$x_name = DB::table('doctors')->where('id',$application['req_doctor_id'])->field('realname')->find();
|
|
|
$tel = '18910184804';
|
|
|
$type = '驳回申请';
|
|
|
- $content = $s_institution['name'].'医院的'.$doctor['realname'].'医生驳回了下级'.$x_institution['name'].'医院的'.$x_name['realname'].'医生发起的申请,单子的申请单id是'.$did['id'].',驳回的理由是'.$param['description'];
|
|
|
+ $content = $s_institution['name'].'医院的'.$doctor['realname'].'医生驳回了下级'.$x_institution['name'].'医院的'.$x_name['realname'].'医生发起的申请,单子的申请单id是'.$application['id'].',驳回的理由是'.$param['description'];
|
|
|
send_message::sendSms2Self($tel,$type,$content);
|
|
|
}
|
|
|
return json_encode(['status'=>'ok','code'=>'0000','sessionid'=>$sessionid]);
|