更新到检接口

main
yanzai 1 year ago
parent 16bad4b6fb
commit 02ea930740

@ -15,10 +15,13 @@ class OrderController extends Controller
$password = request('password');
$serve_id = request('serve_id');
$exam_id = request('exam_id');
if(!isset($exam_id) or empty($exam_id)) return \Yz::echoError1("体检号不能为空");
if ($password !== 'YRtA1rx1iWgbpYKX') return \Yz::echoError1("校验密码失败");
if (isset($serve_id) and !empty($serve_id) and $serve_id <> '') { //到检通知
$orderInfo = DB::table('orders')->where('appointment_number', $serve_id)->orderBy('id', 'desc')->first();
if (!$orderInfo) return \Yz::echoError1("未找到有效订单");
if (!$orderInfo){
return $this->CreateOrder($exam_id);
}else{
if (!!$exam_id) {
if ($orderInfo->status == 1) return \Yz::echoError1("订单未付款");
if ($orderInfo->status == 3) return \Yz::echoError1("订单已取消");
@ -41,7 +44,15 @@ class OrderController extends Controller
} else {
return \Yz::echoError1("体检号不能为空");
}
}
} else { //体检直接登记用户信息没经过h5登记。根据体检号查询信息入库
return $this->CreateOrder($exam_id);
}
}
//根据体检号拉取数据进行存储
public function CreateOrder($exam_id)
{
if (isset($exam_id)) {
$peis = new PEISApiController();
$data = [
@ -105,9 +116,6 @@ class OrderController extends Controller
}
}
}
public function GetH5Order()
{
$appointment_number = request('appointment_number');//思信预约完成后的id

Loading…
Cancel
Save