修改:1.提交强制到核保,2.保单查询状态>1,3增加是否移库检测

dev
zhaocheng 5 years ago
parent c5ef7b9ec4
commit 529f75d1b5
  1. 11
      frontend/controllers/CarController.php
  2. 1
      frontend/controllers/FinanceController.php
  3. 19
      frontend/controllers/InsurerController.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;

@ -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')

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

Loading…
Cancel
Save