diff --git a/frontend/controllers/CarController.php b/frontend/controllers/CarController.php index c706d63..27af841 100644 --- a/frontend/controllers/CarController.php +++ b/frontend/controllers/CarController.php @@ -1879,15 +1879,8 @@ class CarController extends BaseController $order_info->link_man_number = $link_man_number; $order_info->company_id = $company_id; - if($order_info->status_id != $status_id) { - if($order_info->return_status_id > 0) { - $order_info->status_id = $order_info->return_status_id; - $order_info->return_status_id = 0; - } else { - $order_info->status_id = $status_id; - $order_info->return_status_id = 0; - } - } + $order_info->status_id = $status_id; + $order_info->return_status_id = 0; $order_info->submit_date = date('Y-m-d'); //商业保险日期 $order_info->insurer1_begin_date = $insurer1_begin_date; diff --git a/frontend/controllers/FinanceController.php b/frontend/controllers/FinanceController.php index 810114c..0aeb258 100644 --- a/frontend/controllers/FinanceController.php +++ b/frontend/controllers/FinanceController.php @@ -6725,7 +6725,6 @@ class FinanceController extends \frontend\controllers\UserBaseController } } - $query = CaiwuT::find() ->leftJoin(OrderT::tableName(), "order_t.id=caiwu_t.order_id") ->where('order_t.status_id>1') diff --git a/frontend/controllers/InsurerController.php b/frontend/controllers/InsurerController.php index f6f3060..cc38bc0 100644 --- a/frontend/controllers/InsurerController.php +++ b/frontend/controllers/InsurerController.php @@ -2365,10 +2365,8 @@ class InsurerController extends BaseController $limit = $request->get('limit', 10); $query = OrderT::find() + ->andWhere('status_id>1') ->orderBy('status_id desc,car_no desc,submit_date asc'); - if($this->my->id > 2){ - $query->andWhere('status_id>1'); - } if($id_man != '') { $query->andWhere(['like','id_man',$id_man]); } @@ -3745,13 +3743,19 @@ class InsurerController extends BaseController // 车辆信息 CarCT::deleteAll(['id' => $order_info->car_id]); - if($order_info->car->op2_id > 0){ + // 检测车辆是否移库 + if($order_info->car->op2_id > 0 && $order_info->car->location != 4){ $car_db_info = new CarDT(false); - }else { + $car_db_info->id = $order_info->car_id; + $car_db_info->user_id = $order_info->user_id; + $order_info->car->save(); + } + if(!$order_info->car->op2_id && $order_info->car->location != 2){ $car_db_info = new CarBT(false); + $car_db_info->id = $order_info->car_id; + $car_db_info->user_id = $order_info->user_id; + $order_info->car->save(); } - $car_db_info->id = $order_info->car_id; - $car_db_info->user_id = $order_info->user_id; // 礼品状态回退 GiftTicketTUse::deleteAll('order_id=' . $order_info->id); @@ -3759,7 +3763,6 @@ class InsurerController extends BaseController $this->addLog($order_info->car_id,'超管退单,理由是:'.$return_remark,1); $car_db_info->save(); - $order_info->car->save(); $order_info->save(); $tran->commit(); $result['success'] = true;