Reciveremote.php 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <?php
  2. namespace app\inter\controller;
  3. use app\common\library\UUIDs;
  4. use think\Cache;
  5. use think\Controller;
  6. use think\Db;
  7. use think\Log;
  8. // select count(*) from remote_application ra left join remote_order ro on ro.id = (select id from remote_order rot where rot.application_id = ra.id order by timestamp desc limit 1) where ra.remote_institution_id='09b4765b26ba8b7c' and (report_status = '4' or report_status = '6' or report_status = '7' or report_status = '8' or report_status = '9') and (ra.remote_doctor_id='b5bed8f973852c22' or ra.remote_doctor_id = '') and (ro.status is null or ro.status = 2 or ro.status = 3)
  9. // select is_urgent, report_status, req_date_time from remote_application ra left join remote_order ro on ro.id = (select id from remote_order rot where rot.application_id = ra.id order by timestamp desc limit 1) where ra.remote_institution_id='09b4765b26ba8b7c' and (report_status = '4' or report_status = '6' or report_status = '7' or report_status = '8' or report_status = '9') and (ra.remote_doctor_id='b5bed8f973852c22' or ra.remote_doctor_id = '') and (ro.status is null or ro.status = 2 or ro.status = 3) order by (ra.is_urgent = '1' and ra.report_status = '4') desc, (ra.is_urgent = '1' and ra.report_status = '6') desc, (ra.is_urgent = '1' and ra.report_status = '7'), ra.req_date_time desc limit 20
  10. class Reciveremote extends Base
  11. {
  12. /**
  13. * 远程申请列表
  14. *
  15. * @ApiTitle (远程申请列表)
  16. * @ApiSummary (远程申请列表)
  17. * @ApiSector (远程诊断)
  18. * @ApiMethod (POST)
  19. * @ApiRoute (/inter/reciveremote/index)
  20. * @ApiHeaders (name="sign", type="string", required=true, description="请求头-校验key")
  21. * @ApiHeaders (name="nonce", type="string", required=true, description="请求头-随机数")
  22. * @ApiHeaders (name="timestamp", type=string, required=true, description="请求头-时间戳s")
  23. * @ApiParams (name="sessionid", type="string", required=true, description="参数json字符串")
  24. * @ApiParams (name="param", type="string", required=true, description="参数json字符串")
  25. * @ApiParams (name="page", type="string", required=true, description="当前页")
  26. * @ApiParams (name="num", type="string", required=true, description="每页显示条数")
  27. * @ApiParams (name="param[patient_num]", type="string", sample="", description="预约登记exams表id值<选填>")
  28. * @ApiParams (name="param[exam_class]", type="string", sample="", description="检查类<选填>")
  29. * @ApiParams (name="param[name]", type="string", sample="", description="患者姓名<选填>")
  30. * @ApiParams (name="param[applicationtime]", type="string", sample="", description="申请时间<选填>")
  31. * @ApiParams (name="param[is_urgent]", type="string", sample="", description="是否急诊<选填>")
  32. * @ApiParams (name="param[report_result]", type="string", sample="", description="检查结果<选填>")
  33. * @ApiParams (name="param[exam_status]", type="string", sample="", description="检查状态<选填>")
  34. * @ApiReturnParams (name="status", type="integer", required=true, sample="0", description="返回码 fail 失败 ok成功"))
  35. * @ApiReturnParams (name="code", type="integer", required=true, sample="0", description="返回状态码")
  36. * @ApiReturnParams (name="info", type="string", required=true, sample="返回成功", description="返回信息")
  37. * @ApiReturnParams (name="sessionid", type="object", sample="{}", description="缓存的数据key")
  38. * @ApiReturnParams (name="count", type="object", sample="{}", description="总条数")
  39. * @ApiReturn (data="
  40. {
  41. 'status': ok,
  42. 'code': '0000',
  43. 'sessionid': 'a17z7a7a8f9g9rh9d89jio',
  44. 'info' : ''
  45. 'count' : '110'
  46. }
  47. *")
  48. **/
  49. // public function index()
  50. // {
  51. // try{
  52. // log::record('---------工作列表--------');
  53. // log::record($_REQUEST);
  54. // $sessionid = $_REQUEST['sessionid'];
  55. // $doctor = Cache::get($sessionid);
  56. // log::record($doctor);
  57. // $app_info = DB::table('remote_application')->where('remote_institution_id', $doctor['institution_id'])->select();
  58. // foreach ($app_info as $k => $v) {
  59. // $exam_id = $v['exam_id'];
  60. // $report = DB::table('report')->where('exam_id', $exam_id)->where('remote_application_id',$v['id'])->find();
  61. // if (!$report) {
  62. // $data = array();
  63. // $data['id'] = UUIDs::uuid16();
  64. // $data['exam_id'] = $exam_id;
  65. // $data['remote_application_id'] = $v['id'];
  66. // $data['type'] = 2;
  67. // $data['createdAt'] = date('Y-m-d H:i:s',time());
  68. // DB::table('report')->insert($data);
  69. // }
  70. // }
  71. // $where = '';
  72. // if(isset($_REQUEST['param'])){
  73. // $param = $_REQUEST['param'];
  74. // foreach ($param as $k => $v) {
  75. // switch ($k) {
  76. // case 'patient_num':
  77. // $where .= " and e." . $k . "='" . $v . "' ";
  78. // break;
  79. // case 'exam_class' :
  80. // if(empty($v)){
  81. // break;
  82. // }
  83. // $ex = implode('\',\'',$v);
  84. // $where .= " and e.exam_class in ('".$ex."')";
  85. // break;
  86. // case 'name':
  87. // $where .= " and p.name like '".$v."%' ";
  88. // break;
  89. // case 'applicationtime':
  90. // if(empty($v)){
  91. // break;
  92. // }
  93. // $where .= " and ra.req_date_time between '$v[0]' and '$v[1]'";
  94. // break;
  95. // case 'is_urgent':
  96. // if($v == 0){
  97. // break;
  98. // }
  99. // $where .= " and ra.is_urgent=".$v;
  100. // break;
  101. // case 'report_result':
  102. // if($v == 2){
  103. // $where .= " and r.report_result=2";
  104. // }elseif($v == 1){
  105. // $where .= " and r.report_result=1";
  106. // }{
  107. // break;
  108. // }
  109. // break;
  110. // case 'exam_status':
  111. // if($v != 10){
  112. // $where .= " and ra.report_status=".$v;
  113. // }
  114. // break;
  115. // }
  116. // }
  117. // }
  118. // $doc_class = DB::table('doctor_class')->where('doctor_id',$doctor['id'])->value('doctor_class');
  119. // if(strpos('8',$doc_class) !== false){
  120. // $dwhere = ' or ra.report_status=7 ';
  121. // }else{
  122. // $dwhere = '';
  123. // }
  124. // log::record($where);
  125. // $page = $_REQUEST['page'];
  126. // $num = $_REQUEST['num'];
  127. // $fnum = ($page-1)*$num;
  128. // $limit = " limit ".$fnum.",".$num;
  129. // /*if(empty($where)){
  130. // $dclass = DB::table('doctor_class')->where('doctor_id',$doctor['id'])->cache(300)->field('doctor_class')->find();
  131. // if(empty($dclass['doctor_class'])){
  132. // $dclass['doctor_class'] = 0;
  133. // }
  134. // log::record($dclass);
  135. // $sql1 = "SELECT e.exam_status,e.exam_class,e.body_part,e.device,e.exam_sub_class,e.exam_datetime,p.name,p.sex,p.temp_patient_id,p.age,ra.*,r.report_doctor_id,r.report_datetime,r.report_result,e.id from exams as e,remote_application as ra,patient_infos as p,report as r where ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id'] . "' and ra.is_urgent=1 and e.exam_status in (".$dclass['doctor_class'].")";
  136. // $sql2 = "SELECT e.exam_status,e.exam_class,e.body_part,e.device,e.exam_sub_class,e.exam_datetime,p.name,p.sex,p.temp_patient_id,p.age,ra.*,r.report_doctor_id,r.report_datetime,r.report_result,e.id from exams as e,remote_application as ra,patient_infos as p,report as r where ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id'] . "' and ra.is_urgent=0 and e.exam_status in (".$dclass['doctor_class'].")";
  137. // $sql3 = "SELECT e.exam_status,e.exam_class,e.body_part,e.device,e.exam_sub_class,e.exam_datetime,p.name,p.sex,p.temp_patient_id,p.age,ra.*,r.report_doctor_id,r.report_datetime,r.report_result,e.id from exams as e,remote_application as ra,patient_infos as p,report as r where ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id'] . "'and e.exam_status not in (".$dclass['doctor_class'].")";
  138. // $sql = '('.$sql1.') union ('.$sql2.') union ('.$sql3.')'.$limit; //ra.report_status,6,7,8,4,9,5,12
  139. // }else{*/
  140. // $sql = "SELECT e.id,e.severe,e.exam_status,e.exam_class,e.exam_sub_class,e.body_part,e.device,e.exam_datetime,p.name,p.sex,p.temp_patient_id,p.age,ra.id as ra_id,ra.*,r.id as report_id,r.report_doctor_id,r.report_datetime,r.report_result,e.id from exams as e,remote_application as ra,patient_infos as p,report as r where (ra.remote_doctor_id='".$doctor['id']."' or ra.remote_doctor_id=''".$dwhere.") and ra.exam_id=e.id and e.patient_id=p.id and r.exam_id=e.id and r.remote_application_id=ra.id and ra.report_status !='' and ra.remote_institution_id='" . $doctor['institution_id']."'".$where." order by req_date_time desc,ra.is_urgent desc,ra.req_date_time desc".$limit;
  141. // // }
  142. // log::record($sql);
  143. // $list = DB::query($sql);
  144. // $csql = "SELECT count(1) from exams as e,remote_application as ra,patient_infos as p,report as r where (ra.remote_doctor_id='".$doctor['id']."' or ra.remote_doctor_id=''".$dwhere.") and r.remote_application_id=ra.id and ra.exam_id=e.id and ra.report_status !='' and e.patient_id=p.id and r.exam_id=e.id and ra.remote_institution_id='" . $doctor['institution_id']."'".$where;
  145. // $count = DB::query($csql);
  146. // foreach ($list as $k => $v) {
  147. // $cache_key = $doctor['id'].'_'.$v['id'];
  148. // if(Cache::get($cache_key)){
  149. // $list[$k]['status'] = 1;
  150. // }else{
  151. // $list[$k]['status'] = 0;
  152. // }
  153. // //申请医院
  154. // $local_institution = DB::table('institution')->where('id',$v['local_institution_id'])->cache(300)->field('name')->find();
  155. // $list[$k]['local_institution_name'] = $local_institution['name'];
  156. // //检查类型
  157. // $check_class = DB::table('constant')->where('id',$v['exam_class'])->cache(300)->field('constant_value as name')->find();
  158. // $list[$k]['class_name'] = $check_class['name'];
  159. // //检查子类
  160. // $subclass_name = DB::table('exam_subclass')->where('id',$v['exam_sub_class'])->cache(300)->field('name')->find();
  161. // $list[$k]['subclass_name'] = $subclass_name['name'];
  162. // //检查部位
  163. // $body_part = DB::table('bodypart')->where('id',$v['body_part'])->cache(300)->field('name')->find();
  164. // $list[$k]['body_name'] = $body_part['name'];
  165. // //检查设备
  166. // $device = DB::table('device')->where('id',$v['device'])->cache(300)->field('name')->find();
  167. // $list[$k]['device_name'] = $device['name'];
  168. // //报告医生
  169. // $report_doctor = DB::table('doctors')->where('id',$v['report_doctor_id'])->field('realname')->find();
  170. // $list[$k]['report_doctor_id'] = $report_doctor['realname'];
  171. // $list[$k]['datetime'] = $v['req_date_time'];
  172. // $list[$k]['rdatetime'] = $v['report_datetime'];
  173. // }
  174. // return json_encode(['status'=>'ok','code'=>'0000','count'=>$count[0]['count(1)'],'info'=>$list,'sessionid'=>$sessionid]);
  175. // }catch(\Exception $e){
  176. // return json_encode(['status'=>'fail','code'=>'2000','msg'=>$e->getMessage()]);
  177. // }
  178. // $remote_institution_id = '09b4765b26ba8b7c';
  179. // $remote_doctor_id = 'b5bed8f973852c22';
  180. // $filed = 'ra.id as ra_id, ra.anamnesis, ra.application_desc, ra.attachment, ra.clin_diag, ra.clin_symp, ra.createdAt, ra.exam_id, ra.family_ill, ra.illness_desc, ra.is_urgent, ra.local_institution_id, ra.marrital, ra.phys_sign, ra.remark, ra.remote_doctor_id, ra.remote_institution_id, ra.report_status, ra.req_date_time, ra.req_doctor_id, ra.status, e.body_part, e.exam_class, e.device, e.exam_datetime, e.id as exam_id, e.exam_status, e.exam_sub_class, e.id, e.severe, e.patient_id, r.report_datetime as rdatetime, r.report_datetime, r.report_doctor_id, r.id as report_id, r.report_result, pi.age, pi.name, pi.sex, i.name as local_institution_name';
  181. // $table = 'remote_application ra left join remote_order ro on ro.id = (select id from remote_order rot where rot.application_id = ra.id order by timestamp desc limit 1) left join exams e on ra.exam_id = e.id left join report r on ra.id = r.remote_application_id left join patient_infos pi on e.patient_id = pi.id left join institution i on ra.local_institution_id = i.id';
  182. // $where1 = "ra.remote_institution_id=:remote_institution_id";
  183. // $where2 = "(ra.report_status = '4' or report_status = '6' or report_status = '7' or report_status = '8' or report_status = '9')";
  184. // $where3 = "(ra.remote_doctor_id= :remote_doctor_id or ra.remote_doctor_id = '')";
  185. // $where4 = "(ro.status is null or ro.status = 2 or ro.status = 3)";
  186. // $order = "(ra.is_urgent = '1' and ra.report_status = '4') desc, (ra.is_urgent = '1' and ra.report_status = '6') desc, (ra.is_urgent = '1' and ra.report_status = '7'), ra.req_date_time desc";
  187. // $limit = ":start :number";
  188. // $where = $where1.$where2.$where3.$where4;
  189. // $sql = "select ".$filed." from ".$table." where ".$where." order by ".$order." limit ".$limit;
  190. // $options = [
  191. // "remote_institution_id" => $remote_institution_id,
  192. // "remote_doctor_id" => $remote_doctor_id,
  193. // "start" => 0,
  194. // "number" => 20
  195. // ];
  196. // DB::execute($sql, $options);
  197. // // $db->execute(SQLServerHelp::SET_LIS_DEPARTEMT_SQL,$departemt);
  198. // }
  199. // }
  200. public function index()
  201. {
  202. try{
  203. log::record('---------工作列表--------');
  204. log::record($_REQUEST);
  205. $sessionid = $_REQUEST['sessionid'];
  206. $doctor = Cache::get($sessionid);
  207. log::record($doctor);
  208. $remote_institution_id = $doctor['institution_id'];
  209. $remote_doctor_id = $doctor['id'];
  210. $page = $_REQUEST['page'];
  211. $num = $_REQUEST['num'];
  212. $filed = "`ra`.`id` as `ra_id`, `ra`.`anamnesis`, `ra`.`application_desc`, `ra`.`attachment`, `ra`.`clin_diag`, `ra`.`clin_symp`, `ra`.`createdAt`, `ra`.`exam_id`, `ra`.`family_ill`, `ra`.`illness_desc`, `ra`.`is_urgent`, `ra`.`local_institution_id`, `ra`.`marrital`, `ra`.`phys_sign`, `ra`.`remark`, `ra`.`remote_doctor_id`, `ra`.`remote_institution_id`, `ra`.`report_status`, `ra`.`req_date_time`, `ra`.`req_doctor_id`, `ra`.`status`, `e`.`body_part`, `e`.`exam_class`, `e`.`device`, `e`.`exam_datetime`, `e`.`id` as `exam_id`, `e`.`exam_status`, `e`.`exam_sub_class`, `e`.`id`, `e`.`severe`, `e`.`patient_id`, `r`.`report_datetime` as `rdatetime`, `r`.`report_datetime`, `r`.`report_doctor_id`, `r`.`id` as `report_id`, `r`.`report_result`, `pi`.`age`, `pi`.`name`, `pi`.`sex`, `i`.`name` as `local_institution_name`";
  213. $table = "`remote_application` `ra` left join `remote_order` `ro` on `ro`.`id` = (select `id` from `remote_order` `rot` where `rot`.`application_id` = `ra`.`id` order by `timestamp` desc limit 1) left join `exams` `e` on `ra`.`exam_id` = `e`.`id` left join `report` `r` on `ra`.`id` = `r`.`remote_application_id` left join `patient_infos` `pi` on `e`.`patient_id` = `pi`.`id` left join `institution` `i` on `ra`.`local_institution_id` = `i`.`id` left join";
  214. $where1 = "`ra`.`remote_institution_id` = ?";
  215. $where2 = "(`ra`.`report_status` = '4' or `ra`.`report_status` = '6' or `ra`.`report_status` = '7' or `ra`.`report_status` = '8' or `ra`.`report_status` = '9')";
  216. $where3 = "(`ra`.`remote_doctor_id`= ? or `ra`.`remote_doctor_id` = '')";
  217. $where4 = "(`ro`.`status` is null or `ro`.`status` = 2 or `ro`.`status` = 3)";
  218. $order = "(`ra`.`is_urgent` = '1' and `ra`.`report_status` = '4') desc, (`ra`.`is_urgent` = '1' and `ra`.`report_status` = '6') desc, (`ra`.`is_urgent` = '1' and `ra`.`report_status` = '7'), `ra`.`req_date_time` desc";
  219. $limit = "?, ?";
  220. $options = [
  221. $remote_institution_id,$remote_doctor_id
  222. ];
  223. $queryWhere = "";
  224. if(isset($_REQUEST['param'])){
  225. $param = $_REQUEST['param'];
  226. foreach ($param as $k => $v) {
  227. switch ($k) {
  228. case 'patient_num':
  229. $queryWhere.= " and `e`.`patient_num` like %?%";
  230. $options[] = $v;
  231. break;
  232. case 'exam_class' :
  233. if(empty($v)){
  234. break;
  235. }
  236. $queryWhere.= " and `e`.`exam_class` in ?";
  237. $options[] = $v;
  238. break;
  239. case 'name':
  240. $queryWhere.= " and `pi`.`name` like %?%";
  241. $options[] = $v;
  242. break;
  243. case 'applicationtime':
  244. if(empty($v)){
  245. break;
  246. }
  247. $queryWhere.= " and `ra`.`req_date_time` between ? and ?";
  248. $options[] = $v[0];
  249. $options[] = $v[1];
  250. break;
  251. case 'is_urgent':
  252. if($v == 0){
  253. break;
  254. }
  255. $queryWhere.= " and `ra`.`is_urgent` = ?";
  256. $options[] = $v[0];
  257. break;
  258. case 'report_result':
  259. if($v == 1 || $v == 2) {
  260. $queryWhere.= " and `r`.`report_result` = ?";
  261. $options[] = $v[0];
  262. }
  263. break;
  264. case 'exam_status':
  265. if($v != 10){
  266. $queryWhere.= " and `ra`.`report_status` = ?";
  267. $options[] = $v[0];
  268. }
  269. break;
  270. }
  271. }
  272. }
  273. $where = $where1." and ".$where2." and ".$where3." and ".$where4.$queryWhere;
  274. $sql = "select ".$filed." from ".$table." where ".$where." order by ".$order." limit ".$limit;
  275. $options[] = ($page - 1) * $num;
  276. $options[] = $num;
  277. // var_dump($sql);
  278. $res = DB::query($sql, $options);
  279. // var_dump($res);
  280. return json_encode(['status'=>'ok','code'=>'0000','count'=>26,'info'=>$res,'sessionid'=>$sessionid]);
  281. } catch(\Exception $e) {
  282. return json_encode(['status'=>'fail','code'=>'2000','msg'=>$e->getMessage()]);
  283. }
  284. }
  285. // select
  286. // ra.id as ra_id, ra.anamnesis, ra.application_desc, ra.attachment, ra.clin_diag, ra.clin_symp, ra.createdAt, ra.exam_id, ra.family_ill, ra.illness_desc, ra.is_urgent, ra.local_institution_id, ra.marrital, ra.phys_sign, ra.remark, ra.remote_doctor_id, ra.remote_institution_id, ra.report_status, ra.req_date_time, ra.req_doctor_id, ra.status,
  287. // e.body_part, e.exam_class, e.device, e.exam_datetime, e.id as exam_id, e.exam_status, e.exam_sub_class, e.id, e.severe, e.patient_id,
  288. // r.report_datetime as rdatetime, r.report_datetime, r.report_doctor_id, r.id as report_id, r.report_result,
  289. // pi.age, pi.name, pi.sex,
  290. // i.name as local_institution_name
  291. // from
  292. // remote_application ra
  293. // left join
  294. // remote_order ro
  295. // on
  296. // ro.id = (
  297. // select
  298. // id
  299. // from
  300. // remote_order rot
  301. // where
  302. // rot.application_id = ra.id
  303. // order by timestamp desc limit 1
  304. // )
  305. // left join
  306. // exams e
  307. // on
  308. // ra.exam_id = e.id
  309. // left join
  310. // report r
  311. // on
  312. // ra.id = r.remote_application_id
  313. // left join
  314. // patient_infos pi
  315. // on
  316. // e.patient_id = pi.id
  317. // left join
  318. // institution i
  319. // on
  320. // ra.local_institution_id = i.id
  321. // where
  322. // ra.remote_institution_id='09b4765b26ba8b7c'
  323. // and
  324. // (report_status = '4' or report_status = '6' or report_status = '7' or report_status = '8' or report_status = '9')
  325. // and
  326. // (ra.remote_doctor_id='b5bed8f973852c22' or ra.remote_doctor_id = '')
  327. // and
  328. // (ro.status is null or ro.status = 2 or ro.status = 3)
  329. // order by
  330. // (ra.is_urgent = '1' and ra.report_status = '4') desc,
  331. // (ra.is_urgent = '1' and ra.report_status = '6') desc,
  332. // (ra.is_urgent = '1' and ra.report_status = '7'),
  333. // ra.req_date_time desc
  334. // -- 4、申请 5、驳回 6、接收、7、初步报告 8、审核报告 9、确认、
  335. //接受 3
  336. /*public function accept(){
  337. $sessionid = $_REQUEST['sessionid'];
  338. $doctor = Cache::get($sessionid);
  339. $id = $_REQUEST['id'];
  340. DB::table('exams')->where('id',$id)->update(['exam_status'=>6]);
  341. DB::table('report')->where('exam_id',$id)->update(['report_doctor_id',$doctor['id']]);
  342. return json_encode(['status'=>'ok','code'=>'0000','msg'=>'已接受']);
  343. }
  344. //驳回 7
  345. public function reject(){
  346. // $sessionid = $_REQUEST['sessionid'];
  347. // $doctor = Cache::get($sessionid);
  348. $id = $_REQUEST['id'];
  349. DB::table('exams')->where('id',$id)->update(['exam_status'=>5]);
  350. return json_encode(['status'=>'ok','code'=>'0000','msg'=>'已驳回']);
  351. }
  352. //确认 5
  353. public function confirm(){
  354. $sessionid = $_REQUEST['sessionid'];
  355. $doctor = Cache::get($sessionid);
  356. $id = $_REQUEST['id'];
  357. DB::table('exams')->where('id',$id)->update(['exam_status'=>9]);
  358. DB::table('report')->where('exam_id',$id)->update(['confirm_doctor_id'=>$doctor['id'],'confirm_datetime'=>date('Y-m-d H:i:s')]);
  359. return json_encode(['status'=>'ok','code'=>'0000','msg'=>'已确认']);
  360. }
  361. // 审核
  362. public function examine(){
  363. $id = $_REQUEST['id'];
  364. DB::table('exams')->where('id',$id)->update(['exam_status'=>8]);
  365. return json_encode(['status'=>'ok','code'=>'0000','msg'=>'已审核']);
  366. }*/
  367. }