|
|
|
@ -3673,30 +3673,19 @@ class InsurerController extends BaseController |
|
|
|
|
$id_man = $request->get('id_man'); |
|
|
|
|
$phone = $request->get('phone'); |
|
|
|
|
$car_no = $request->get('car_no'); |
|
|
|
|
$page = $request->get('page',1); |
|
|
|
|
$date_begin = $request->get('date_begin'); |
|
|
|
|
$date_end = $request->get('date_end'); |
|
|
|
|
$date2_begin = $request->get('date2_begin'); |
|
|
|
|
$date2_end = $request->get('date2_end'); |
|
|
|
|
$date3_begin = $request->get('date3_begin'); |
|
|
|
|
$date3_end = $request->get('date3_end'); |
|
|
|
|
$group_id = $request->get('group_id'); |
|
|
|
|
$company_id = $request->get('company_id'); |
|
|
|
|
$insurance_status= $request->get('insurance_status'); |
|
|
|
|
$status = $request->get('status'); |
|
|
|
|
$offset = $request->get('offset',0); |
|
|
|
|
$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() |
|
|
|
|
->where('status_id>1') |
|
|
|
|
->orderBy('car_no desc,submit_date asc'); |
|
|
|
|
->orderBy('car_no desc,submit_date asc'); |
|
|
|
|
if($id_man != '') { |
|
|
|
|
$query->andWhere(['like','id_man',$id_man]); |
|
|
|
|
} |
|
|
|
@ -3704,7 +3693,7 @@ class InsurerController extends BaseController |
|
|
|
|
$query->andWhere(['like','car_man',$car_man]); |
|
|
|
|
} |
|
|
|
|
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 != '') { |
|
|
|
|
$query->andWhere(['like','car_no',$car_no]); |
|
|
|
@ -3722,17 +3711,18 @@ class InsurerController extends BaseController |
|
|
|
|
$query->andWhere('print_date<="'.$date2_end.'"'); |
|
|
|
|
} |
|
|
|
|
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 != '') { |
|
|
|
|
$query->andWhere('insurer1_begin_date<="'.$date3_end.'"'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if($company_id != '') { |
|
|
|
|
$query->andWhere('company_id ="'.$company_id.'"'); |
|
|
|
|
$query->andWhere('insurer1_begin_date<=:end_date or insurer2_begin_date<=:end_date', [':end_date'=>$date3_end]); |
|
|
|
|
} |
|
|
|
|
if($insurance_status != '') { |
|
|
|
|
$query->andWhere('insurance_status ="'.$insurance_status.'"'); |
|
|
|
|
if($status > 0) { |
|
|
|
|
if($status == 1) { |
|
|
|
|
$query->andWhere('status>1 and status<10'); |
|
|
|
|
} |
|
|
|
|
if($status == 2) { |
|
|
|
|
$query->andWhere('status=10'); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$total = $query->count(); |
|
|
|
|
|
|
|
|
|