|
|
@ -3673,27 +3673,16 @@ class InsurerController extends BaseController |
|
|
|
$id_man = $request->get('id_man'); |
|
|
|
$id_man = $request->get('id_man'); |
|
|
|
$phone = $request->get('phone'); |
|
|
|
$phone = $request->get('phone'); |
|
|
|
$car_no = $request->get('car_no'); |
|
|
|
$car_no = $request->get('car_no'); |
|
|
|
$page = $request->get('page',1); |
|
|
|
|
|
|
|
$date_begin = $request->get('date_begin'); |
|
|
|
$date_begin = $request->get('date_begin'); |
|
|
|
$date_end = $request->get('date_end'); |
|
|
|
$date_end = $request->get('date_end'); |
|
|
|
$date2_begin = $request->get('date2_begin'); |
|
|
|
$date2_begin = $request->get('date2_begin'); |
|
|
|
$date2_end = $request->get('date2_end'); |
|
|
|
$date2_end = $request->get('date2_end'); |
|
|
|
$date3_begin = $request->get('date3_begin'); |
|
|
|
$date3_begin = $request->get('date3_begin'); |
|
|
|
$date3_end = $request->get('date3_end'); |
|
|
|
$date3_end = $request->get('date3_end'); |
|
|
|
$group_id = $request->get('group_id'); |
|
|
|
$status = $request->get('status'); |
|
|
|
$company_id = $request->get('company_id'); |
|
|
|
|
|
|
|
$insurance_status= $request->get('insurance_status'); |
|
|
|
|
|
|
|
$offset = $request->get('offset',0); |
|
|
|
$offset = $request->get('offset',0); |
|
|
|
$limit = $request->get('limit', 10); |
|
|
|
$limit = $request->get('limit', 10); |
|
|
|
|
|
|
|
|
|
|
|
$group_items = GroupT::getTree(); |
|
|
|
|
|
|
|
$group_ids[] = $group_id; |
|
|
|
|
|
|
|
if($group_id > 0) { |
|
|
|
|
|
|
|
$items = GroupT::getTree($group_id); |
|
|
|
|
|
|
|
foreach($items as $group_info) { |
|
|
|
|
|
|
|
$group_ids[] = $group_info->id; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$query = OrderT::find() |
|
|
|
$query = OrderT::find() |
|
|
|
->where('status_id>1') |
|
|
|
->where('status_id>1') |
|
|
|
->orderBy('car_no desc,submit_date asc'); |
|
|
|
->orderBy('car_no desc,submit_date asc'); |
|
|
@ -3704,7 +3693,7 @@ class InsurerController extends BaseController |
|
|
|
$query->andWhere(['like','car_man',$car_man]); |
|
|
|
$query->andWhere(['like','car_man',$car_man]); |
|
|
|
} |
|
|
|
} |
|
|
|
if($phone != '') { |
|
|
|
if($phone != '') { |
|
|
|
$query->andWhere(['like','link_phone',$phone]); |
|
|
|
$query->andWhere('car_man_phone like :phone or id_man_phone like :phone or link_man_phone like :phone', [':phone'=>$phone]); |
|
|
|
} |
|
|
|
} |
|
|
|
if($car_no != '') { |
|
|
|
if($car_no != '') { |
|
|
|
$query->andWhere(['like','car_no',$car_no]); |
|
|
|
$query->andWhere(['like','car_no',$car_no]); |
|
|
@ -3722,17 +3711,18 @@ class InsurerController extends BaseController |
|
|
|
$query->andWhere('print_date<="'.$date2_end.'"'); |
|
|
|
$query->andWhere('print_date<="'.$date2_end.'"'); |
|
|
|
} |
|
|
|
} |
|
|
|
if($date3_begin != '') { |
|
|
|
if($date3_begin != '') { |
|
|
|
$query->andWhere('insurer1_begin_date>="'.$date3_begin.'"'); |
|
|
|
$query->andWhere('insurer1_begin_date>=:begin_date or insurer2_begin_date>=:begin_date', [':begin_date'=>$date3_begin]); |
|
|
|
} |
|
|
|
} |
|
|
|
if($date3_end != '') { |
|
|
|
if($date3_end != '') { |
|
|
|
$query->andWhere('insurer1_begin_date<="'.$date3_end.'"'); |
|
|
|
$query->andWhere('insurer1_begin_date<=:end_date or insurer2_begin_date<=:end_date', [':end_date'=>$date3_end]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if($status > 0) { |
|
|
|
if($company_id != '') { |
|
|
|
if($status == 1) { |
|
|
|
$query->andWhere('company_id ="'.$company_id.'"'); |
|
|
|
$query->andWhere('status>1 and status<10'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if($status == 2) { |
|
|
|
|
|
|
|
$query->andWhere('status=10'); |
|
|
|
} |
|
|
|
} |
|
|
|
if($insurance_status != '') { |
|
|
|
|
|
|
|
$query->andWhere('insurance_status ="'.$insurance_status.'"'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
$total = $query->count(); |
|
|
|
$total = $query->count(); |
|
|
|
|
|
|
|
|
|
|
|