Merge pull request '修复三轮车发送合同回调' (#51) from zhangwei into dev
Reviewed-on: #51
This commit is contained in:
commit
373146e186
@ -426,22 +426,22 @@ class IndexController extends BaseApiController
|
|||||||
}
|
}
|
||||||
$cars = json_decode($model['cars_info'], true);
|
$cars = json_decode($model['cars_info'], true);
|
||||||
$result = $model->where('id', $model['id'])->save($param);
|
$result = $model->where('id', $model['id'])->save($param);
|
||||||
if ($result && isset($param['status']) && $param['status'] == 3) {
|
// if ($result && isset($param['status']) && $param['status'] == 3) {
|
||||||
$data = [];
|
// $data = [];
|
||||||
foreach ($cars as $k => $v) {
|
// foreach ($cars as $k => $v) {
|
||||||
$data[$k]['car_id'] = $v['id'];
|
// $data[$k]['car_id'] = $v['id'];
|
||||||
$data[$k]['car_license'] = $v['license'];
|
// $data[$k]['car_license'] = $v['license'];
|
||||||
$data[$k]['type'] = 0;
|
// $data[$k]['type'] = 0;
|
||||||
$data[$k]['status'] = 0;
|
// $data[$k]['status'] = 0;
|
||||||
$data[$k]['company_id'] = $model['company_b_id'];
|
// $data[$k]['company_id'] = $model['company_b_id'];
|
||||||
$data[$k]['rent_time'] = 0;
|
// $data[$k]['rent_time'] = 0;
|
||||||
$data[$k]['rent_company_id'] = 0;
|
// $data[$k]['rent_company_id'] = 0;
|
||||||
$data[$k]['contract_id'] = $model['id'];
|
// $data[$k]['contract_id'] = $model['id'];
|
||||||
$data[$k]['create_time'] = strtotime($model['create_time']);
|
// $data[$k]['create_time'] = strtotime($model['create_time']);
|
||||||
}
|
// }
|
||||||
$vehicleRent = new VehicleRent();
|
// $vehicleRent = new VehicleRent();
|
||||||
$vehicleRent->saveAll($data);
|
// $vehicleRent->saveAll($data);
|
||||||
}
|
// }
|
||||||
//返回
|
//返回
|
||||||
return $result ? $this->success('更新成功') : $this->fail('更新失败');
|
return $result ? $this->success('更新成功') : $this->fail('更新失败');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user