|
|
|
|
@ -23,19 +23,23 @@ class OrderController extends Controller
|
|
|
|
|
if($orderInfo->status==3) return \Yz::echoError1("订单已取消");
|
|
|
|
|
if($orderInfo->status==4 || $orderInfo->check_status==2) return \Yz::echoError1("人员已经到检");
|
|
|
|
|
if($orderInfo->status==5) return \Yz::echoError1("订单已退款");
|
|
|
|
|
$peis = new PEISApiController();
|
|
|
|
|
$data = [
|
|
|
|
|
"电话号码" => $orderInfo->phone,
|
|
|
|
|
"证件号码" => $orderInfo->id_number,
|
|
|
|
|
];
|
|
|
|
|
$info = $peis::Post('分诊查询体检号', $orderInfo->hospital_id,$data);
|
|
|
|
|
// $peis = new PEISApiController();
|
|
|
|
|
// $data = [
|
|
|
|
|
// "电话号码" => $orderInfo->phone,
|
|
|
|
|
// "证件号码" => $orderInfo->id_number,
|
|
|
|
|
// ];
|
|
|
|
|
// $info = $peis::Post('分诊查询体检号', $orderInfo->hospital_id,$data);
|
|
|
|
|
DB::table('orders')->where('id',$orderInfo->id)->update([
|
|
|
|
|
'status'=>4,
|
|
|
|
|
'tj_number'=>$info['data'][0]['体检号'],
|
|
|
|
|
// 'tj_number'=>$info['data'][0]['体检号'],
|
|
|
|
|
'tj_number'=>$exam_id,
|
|
|
|
|
'check_status'=>2,
|
|
|
|
|
'check_time'=>date('Y-m-d H:i:s')
|
|
|
|
|
]);
|
|
|
|
|
return \Yz::Return(true,"",['id'=>$orderInfo->id]);
|
|
|
|
|
}else{
|
|
|
|
|
return \Yz::echoError1("体检号不能为空");
|
|
|
|
|
}
|
|
|
|
|
return \Yz::Return(true,"",['id'=>$orderInfo->id]);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|