|
|
@ -298,12 +298,6 @@ class DatabaseController extends BaseController |
|
|
|
if(!$b_info->save(false)) { |
|
|
|
if(!$b_info->save(false)) { |
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$b_info->user_id = 0; |
|
|
|
|
|
|
|
if(!$b_info->save(false)) { |
|
|
|
|
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从B库回收成未分配状态',1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$this->addLog($car_info->id,'从A库分配到B库',1); |
|
|
|
$this->addLog($car_info->id,'从A库分配到B库',1); |
|
|
|
} |
|
|
|
} |
|
|
@ -352,12 +346,6 @@ class DatabaseController extends BaseController |
|
|
|
if(!$b_info->save(false)) { |
|
|
|
if(!$b_info->save(false)) { |
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$b_info->user_id = 0; |
|
|
|
|
|
|
|
if(!$b_info->save(false)) { |
|
|
|
|
|
|
|
throw new Exception(print_r($b_info->getFirstErrors(),true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从B库回收成未分配状态',1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$this->addLog($car_info->id,'从A库分配到B库',1); |
|
|
|
$this->addLog($car_info->id,'从A库分配到B库',1); |
|
|
|
} |
|
|
|
} |
|
|
@ -408,12 +396,6 @@ class DatabaseController extends BaseController |
|
|
|
if(!$c_info->save(false)) { |
|
|
|
if(!$c_info->save(false)) { |
|
|
|
throw new Exception(print_r($c_info->getFirstErrors(),true)); |
|
|
|
throw new Exception(print_r($c_info->getFirstErrors(),true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$c_info->user_id = 0; |
|
|
|
|
|
|
|
if(!$c_info->save(false)) { |
|
|
|
|
|
|
|
throw new Exception(print_r($c_info->getFirstErrors(),true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从C库回收成未分配状态',1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$this->addLog($car_info->id,'从A库分配到C库',1); |
|
|
|
$this->addLog($car_info->id,'从A库分配到C库',1); |
|
|
|
} |
|
|
|
} |
|
|
@ -1006,7 +988,6 @@ class DatabaseController extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$b_info = CarBT::findOne(['id'=>$id]); |
|
|
|
$b_info = CarBT::findOne(['id'=>$id]); |
|
|
|
if($b_info) { |
|
|
|
|
|
|
|
if($b_info->user_id > 0) { |
|
|
|
if($b_info->user_id > 0) { |
|
|
|
//删除预约 |
|
|
|
//删除预约 |
|
|
|
AppointmentT::deleteAll('car_id='.$b_info->id); |
|
|
|
AppointmentT::deleteAll('car_id='.$b_info->id); |
|
|
@ -1022,8 +1003,6 @@ class DatabaseController extends BaseController |
|
|
|
$order_info->delete(); |
|
|
|
$order_info->delete(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$b_info->delete(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从B库移动到无效库',1); |
|
|
|
$this->addLog($car_info->id,'从B库移动到无效库',1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1576,12 +1555,6 @@ class DatabaseController extends BaseController |
|
|
|
if(!$d_info->save(false)) { |
|
|
|
if(!$d_info->save(false)) { |
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$d_info->user_id = 0; |
|
|
|
|
|
|
|
if(!$d_info->save(false)) { |
|
|
|
|
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从D库回收成未分配状态',1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$this->addLog($car_info->id,'从C库分配到D库',1); |
|
|
|
$this->addLog($car_info->id,'从C库分配到D库',1); |
|
|
|
} |
|
|
|
} |
|
|
@ -1628,12 +1601,6 @@ class DatabaseController extends BaseController |
|
|
|
if(!$d_info->save(false)) { |
|
|
|
if(!$d_info->save(false)) { |
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$d_info->user_id = 0; |
|
|
|
|
|
|
|
if(!$d_info->save(false)) { |
|
|
|
|
|
|
|
throw new Exception(print_r($d_info->getFirstErrors(),true)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从D库回收成未分配状态',1); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$this->addLog($car_info->id,'从C库分配到D库',1); |
|
|
|
$this->addLog($car_info->id,'从C库分配到D库',1); |
|
|
|
} |
|
|
|
} |
|
|
@ -1692,7 +1659,6 @@ class DatabaseController extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$c_info = CarCT::findOne(['id'=>$id]); |
|
|
|
$c_info = CarCT::findOne(['id'=>$id]); |
|
|
|
if($c_info) { |
|
|
|
|
|
|
|
if($c_info->user_id > 0) { |
|
|
|
if($c_info->user_id > 0) { |
|
|
|
//删除预约 |
|
|
|
//删除预约 |
|
|
|
AppointmentT::deleteAll('car_id='.$c_info->id); |
|
|
|
AppointmentT::deleteAll('car_id='.$c_info->id); |
|
|
@ -1708,8 +1674,6 @@ class DatabaseController extends BaseController |
|
|
|
$order_info->delete(); |
|
|
|
$order_info->delete(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$c_info->delete(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从C库移动到无效库',1); |
|
|
|
$this->addLog($car_info->id,'从C库移动到无效库',1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2272,7 +2236,6 @@ class DatabaseController extends BaseController |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$d_info = CarDT::findOne(['id'=>$id]); |
|
|
|
$d_info = CarDT::findOne(['id'=>$id]); |
|
|
|
if($d_info) { |
|
|
|
|
|
|
|
if($d_info->user_id > 0) { |
|
|
|
if($d_info->user_id > 0) { |
|
|
|
//删除预约 |
|
|
|
//删除预约 |
|
|
|
AppointmentT::deleteAll('car_id='.$d_info->id); |
|
|
|
AppointmentT::deleteAll('car_id='.$d_info->id); |
|
|
@ -2288,8 +2251,6 @@ class DatabaseController extends BaseController |
|
|
|
$order_info->delete(); |
|
|
|
$order_info->delete(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
$d_info->deletel(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->addLog($car_info->id,'从C库移动到无效库',1); |
|
|
|
$this->addLog($car_info->id,'从C库移动到无效库',1); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|