|
|
@ -14,6 +14,7 @@ use file\FileSystem; |
|
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet; |
|
|
|
use PhpOffice\PhpSpreadsheet\Spreadsheet; |
|
|
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
|
|
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx; |
|
|
|
use think\facade\Db; |
|
|
|
use think\facade\Db; |
|
|
|
|
|
|
|
use think\facade\Log; |
|
|
|
|
|
|
|
|
|
|
|
class CarInfoHandle |
|
|
|
class CarInfoHandle |
|
|
|
{ |
|
|
|
{ |
|
|
@ -487,9 +488,13 @@ class CarInfoHandle |
|
|
|
$now = date('Y-m-d H:i:s'); |
|
|
|
$now = date('Y-m-d H:i:s'); |
|
|
|
Db::execute('ALTER TABLE car_info_t DISABLE KEYS;'); |
|
|
|
Db::execute('ALTER TABLE car_info_t DISABLE KEYS;'); |
|
|
|
for ($row = 2; $row <= $highestRow; $row++) { |
|
|
|
for ($row = 2; $row <= $highestRow; $row++) { |
|
|
|
|
|
|
|
$log = $worksheet->getCellByColumnAndRow(2, $row)->getValue(); |
|
|
|
|
|
|
|
Log::record($log); |
|
|
|
|
|
|
|
Log::record(strtotime(trim(trim($log), '"'))); |
|
|
|
|
|
|
|
Log::record(date('Y-m-d', strtotime(trim(trim($log), '"')))); |
|
|
|
$row_array[] = [ |
|
|
|
$row_array[] = [ |
|
|
|
'duty_no' => trim(trim($worksheet->getCellByColumnAndRow(1, $row)->getValue(), '"')), |
|
|
|
'duty_no' => trim(trim($worksheet->getCellByColumnAndRow(1, $row)->getValue(), '"')), |
|
|
|
'register_date' => date('Y-m-d', strtotime( trim(trim($worksheet->getCellByColumnAndRow(2, $row)->getValue(), '"')))), |
|
|
|
'register_date' => date('Y-m-d', strtotime(trim(trim($worksheet->getCellByColumnAndRow(2, $row)->getValue(), '"')))), |
|
|
|
'car_man' => trim(trim($worksheet->getCellByColumnAndRow(3, $row)->getValue(), '"')), |
|
|
|
'car_man' => trim(trim($worksheet->getCellByColumnAndRow(3, $row)->getValue(), '"')), |
|
|
|
'car_number' => trim(trim($worksheet->getCellByColumnAndRow(4, $row)->getValue(), '"')), |
|
|
|
'car_number' => trim(trim($worksheet->getCellByColumnAndRow(4, $row)->getValue(), '"')), |
|
|
|
'car_phone' => trim(trim($worksheet->getCellByColumnAndRow(5, $row)->getValue(), '"')), |
|
|
|
'car_phone' => trim(trim($worksheet->getCellByColumnAndRow(5, $row)->getValue(), '"')), |
|
|
|