|
|
|
@ -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; |
|
|
|
|