|
@@ -522,14 +522,26 @@ class Application extends Base
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ // 撤回
|
|
|
public function revoke(){
|
|
|
+ $sessionid = $_REQUEST['sessionid'];
|
|
|
+ $doctor = Cache::get($sessionid);
|
|
|
$id = $_REQUEST['id'];
|
|
|
- $status = DB::table('remote_application')->where('exam_id',$id)->field('report_status')->find();
|
|
|
+ $status = DB::table('remote_application')->where('exam_id',$id)->field('id,report_status')->find();
|
|
|
if($status['report_status'] == 4){
|
|
|
DB::table('remote_application')->where('exam_id',$id)->update(['report_status'=>12]);
|
|
|
}else{
|
|
|
return json_encode(['status'=>'ok','code'=>'0100','msg'=>'只能撤回申请中状态的申请单']);
|
|
|
}
|
|
|
+ $binfo = array();
|
|
|
+ $binfo['id'] = UUIDs::uuid16();
|
|
|
+ $binfo['initiator'] = $doctor['id'];
|
|
|
+// $info['reply'] = $param['reply']; // 回复人
|
|
|
+ $binfo['remote_application_id'] = $status['id']; //申请单id
|
|
|
+ $binfo['content'] = '已撤回了该申请';
|
|
|
+ $binfo['createdAt'] = date('Y-m-d H:i:s',time());
|
|
|
+ DB::table('bbs')->insert($binfo);
|
|
|
return json_encode(['status'=>'ok','code'=>'0000','msg'=>'撤回成功']);
|
|
|
}
|
|
|
}
|