Browse Source

车位辨识率导出优化2

master
wanghongjun 3 weeks ago
parent
commit
e5c3e9499a
  1. 4
      app/Exports/LicensePlateRecognitionExport.php

4
app/Exports/LicensePlateRecognitionExport.php

@ -15,8 +15,8 @@ class LicensePlateRecognitionExport implements FromArray, WithHeadings
$data = []; $data = [];
$index = 1; $index = 1;
$query = LicensePlateRecognition::query(); $query = LicensePlateRecognition::query();
$columns = ['time_slot']; $query->groupBy('time_slot')->latest('time_slot')
$query->groupBy('time_slot')->limit(1000)->select($columns)->get()->each( ->forPage(1, 1000)->get()->each(
function ($item) use (&$data, &$index) { function ($item) use (&$data, &$index) {
$countData = (new LicensePlateRecognitionService( $countData = (new LicensePlateRecognitionService(
new OperationLogService() new OperationLogService()

Loading…
Cancel
Save