|
|
@ -447,6 +447,27 @@ class CarInfoHandle |
|
|
|
return '处理总数:' . $count . ', 删除总数:' . $delete_num . ', 失败总数:' . $faild_num; |
|
|
|
return '处理总数:' . $count . ', 删除总数:' . $delete_num . ', 失败总数:' . $faild_num; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function exportRepeatData($data, $id) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$query = RepeatDataT::alias('car_info_t')->where('repeat_id', $data['source_id']); |
|
|
|
|
|
|
|
$count = $query->count(); |
|
|
|
|
|
|
|
$count = $count <= $data['export_limit'] || $data['export_limit'] == 0 ? $count : $data['export_limit']; |
|
|
|
|
|
|
|
echo '总计:' . $count . PHP_EOL; |
|
|
|
|
|
|
|
cache('shell_process_' . $id, 0, 300); |
|
|
|
|
|
|
|
$data['export_field'] = $data['export_field'] ?? []; |
|
|
|
|
|
|
|
list($titles, $fields) = $this->getTitleAndField($data['export_type'], $data['export_field']); |
|
|
|
|
|
|
|
if (isset($data['is_excel']) && $data['is_excel'] == 'yes') { |
|
|
|
|
|
|
|
$basename = '/export/' . date('YmdHis') . '.xlsx'; |
|
|
|
|
|
|
|
$this->exportExcel($data['export_type'], $data['export_limit'], $titles, $fields, root_path() . 'public' . $basename, $query, $count, $id); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$basename = '/export/' . date('YmdHis') . '.csv'; |
|
|
|
|
|
|
|
$this->exportCsv($data['export_type'], $data['export_limit'], $titles, $fields, root_path() . 'public' . $basename, $query, $count, $id); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$this->setProcess($count, $count, $id); |
|
|
|
|
|
|
|
$this->addExportLog($count, $data['export_type'],$id); |
|
|
|
|
|
|
|
return $basename; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public function carInfoUpdate($data, $id) |
|
|
|
public function carInfoUpdate($data, $id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$filename = public_path('public/storage') . $data['filename']; |
|
|
|
$filename = public_path('public/storage') . $data['filename']; |
|
|
|