正在显示
1 个修改的文件
包含
9 行增加
和
1 行删除
@@ -385,6 +385,14 @@ class Yuyue extends Api | @@ -385,6 +385,14 @@ class Yuyue extends Api | ||
385 | /*更改预约单状态*/ | 385 | /*更改预约单状态*/ |
386 | Db::name('yuyue')->where('id', $Params['id'])->update($data); | 386 | Db::name('yuyue')->where('id', $Params['id'])->update($data); |
387 | /*新增数据*/ | 387 | /*新增数据*/ |
388 | + //飞行种类:0=训练,1=机长,2=单飞 | ||
389 | + if ($Params['fly_type'] == '训练') { | ||
390 | + $Params['fly_type'] = 0; | ||
391 | + } else if ($Params['fly_type'] == '机长') { | ||
392 | + $Params['fly_type'] = 1; | ||
393 | + } else if ($Params['fly_type'] == '单飞') { | ||
394 | + $Params['fly_type'] = 2; | ||
395 | + } | ||
388 | $NewAdd = [ | 396 | $NewAdd = [ |
389 | 'name' => (isset($Params['name'])) ? $Params['name'] : '', | 397 | 'name' => (isset($Params['name'])) ? $Params['name'] : '', |
390 | 'work' => (isset($Params['work'])) ? $Params['work'] : '', | 398 | 'work' => (isset($Params['work'])) ? $Params['work'] : '', |
@@ -397,7 +405,7 @@ class Yuyue extends Api | @@ -397,7 +405,7 @@ class Yuyue extends Api | ||
397 | 'json' => (isset($Params['json'])) ? $Params['json'] : '', | 405 | 'json' => (isset($Params['json'])) ? $Params['json'] : '', |
398 | 'airplane_type' => (isset($Params['airplane_type'])) ? $Params['airplane_type'] : '', | 406 | 'airplane_type' => (isset($Params['airplane_type'])) ? $Params['airplane_type'] : '', |
399 | 'airplane_number' => (isset($Params['airplane_number'])) ? $Params['airplane_number'] : '', | 407 | 'airplane_number' => (isset($Params['airplane_number'])) ? $Params['airplane_number'] : '', |
400 | - 'fly_type' => (isset($Params['fly_type'])) ? $Params['fly_type'] : '', | 408 | + 'fly_type' => $Params['fly_type'], |
401 | 'teacher_name' => (isset($Params['teacher_name'])) ? $Params['teacher_name'] : '', | 409 | 'teacher_name' => (isset($Params['teacher_name'])) ? $Params['teacher_name'] : '', |
402 | 'beizhu' => (isset($Params['beizhu'])) ? $Params['beizhu'] : '', | 410 | 'beizhu' => (isset($Params['beizhu'])) ? $Params['beizhu'] : '', |
403 | 'updatetime' => time() | 411 | 'updatetime' => time() |
-
请 注册 或 登录 后发表评论