|
|
@ -63,20 +63,9 @@ class Index extends BaseController |
|
|
|
$params['data_check'] = 'car_frame_check'; |
|
|
|
$params['data_check'] = 'car_frame_check'; |
|
|
|
} |
|
|
|
} |
|
|
|
if(isset($params['data_check']) && $params['data_check'] == 'car_frame_check'){ |
|
|
|
if(isset($params['data_check']) && $params['data_check'] == 'car_frame_check'){ |
|
|
|
$query = $this->model->rightJoin('repeat_frame_t','repeat_frame_t.car_frame_no = car_info_t.car_frame_no')->field('car_info_t.*')->where($map)->order('repeat_frame_t.car_frame_no desc'); |
|
|
|
$query = Db::table('repeat_data_t')->rightJoin('repeat_frame_t','repeat_frame_t.car_frame_no = car_info_t.car_frame_no')->field('car_info_t.*')->where($map)->order('repeat_frame_t.car_frame_no desc'); |
|
|
|
if (isset($params['is_check_repeat_frame']) && $params['is_check_repeat_frame'] > 0) { |
|
|
|
if (isset($params['is_delete_frame']) && $params['is_delete_frame'] > 0) { |
|
|
|
$jobs_info = JobsT::find($params['is_check_repeat_frame']); |
|
|
|
$query = $query->where('repeat_data_t.repeat_id', '=', $params['is_delete_frame']); |
|
|
|
$job_info_payload = json_decode($jobs_info->payload,true)['data']['params']; |
|
|
|
|
|
|
|
if(isset($job_info_payload['export_date1']) && $job_info_payload['export_date1'] != ''){ |
|
|
|
|
|
|
|
$query = $query->where('car_info_t.register_date', '>=', $job_info_payload['export_date1']); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(isset($job_info_payload['export_date2']) && $job_info_payload['export_date2'] != ''){ |
|
|
|
|
|
|
|
$query = $query->where('car_info_t.register_date', '<=', $job_info_payload['export_date2']); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$query = $query->where([ |
|
|
|
|
|
|
|
['repeat_frame_t.source', '=', $params['is_check_repeat_frame']]]); |
|
|
|
|
|
|
|
} else if (isset($params['is_delete_frame']) && $params['is_delete_frame'] > 0) { |
|
|
|
|
|
|
|
$query = $query->where('repeat_frame_t.is_delete', '=', $params['is_delete_frame']); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}else if(isset($params['data_check']) && $params['data_check'] == 'car_phone_check'){ |
|
|
|
}else if(isset($params['data_check']) && $params['data_check'] == 'car_phone_check'){ |
|
|
|
$query = $this->model->rightJoin('peer_phone_t','peer_phone_t.phone = car_info_t.car_phone')->field('car_info_t.*')->where($map)->order('peer_phone_t.phone desc'); |
|
|
|
$query = $this->model->rightJoin('peer_phone_t','peer_phone_t.phone = car_info_t.car_phone')->field('car_info_t.*')->where($map)->order('peer_phone_t.phone desc'); |
|
|
|