初等日期格式化调试

master
zcstatham 2 years ago
parent d4a9b0445d
commit cf440a0525
  1. 20
      extend/service/CarInfoHandle.php

@ -488,16 +488,16 @@ class CarInfoHandle
Db::execute('ALTER TABLE car_info_t DISABLE KEYS;');
for ($row = 2; $row <= $highestRow; $row++) {
$row_array[] = [
'duty_no' => $worksheet->getCellByColumnAndRow(1, $row)->getValue(),
'register_date' => date('Y-m-d', strtotime($worksheet->getCellByColumnAndRow(2, $row)->getValue())),
'car_man' => $worksheet->getCellByColumnAndRow(3, $row)->getValue(),
'car_number' => $worksheet->getCellByColumnAndRow(4, $row)->getValue(),
'car_phone' => $worksheet->getCellByColumnAndRow(5, $row)->getValue(),
'car_frame_no' => $worksheet->getCellByColumnAndRow(6, $row)->getValue(),
'car_no' => str_replace('-', '', $worksheet->getCellByColumnAndRow(7, $row)->getValue()),
'engine_no' => $worksheet->getCellByColumnAndRow(8, $row)->getValue(),
'factory_model' => $worksheet->getCellByColumnAndRow(9, $row)->getValue(),
'purchase_price' => $worksheet->getCellByColumnAndRow(10, $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(), '"')))),
'car_man' => trim(trim($worksheet->getCellByColumnAndRow(3, $row)->getValue(), '"')),
'car_number' => trim(trim($worksheet->getCellByColumnAndRow(4, $row)->getValue(), '"')),
'car_phone' => trim(trim($worksheet->getCellByColumnAndRow(5, $row)->getValue(), '"')),
'car_frame_no' => trim(trim($worksheet->getCellByColumnAndRow(6, $row)->getValue(), '"')),
'car_no' => str_replace('-', '', trim(trim($worksheet->getCellByColumnAndRow(7, $row)->getValue(), '"'))),
'engine_no' => trim(trim($worksheet->getCellByColumnAndRow(8, $row)->getValue(), '"')),
'factory_model' => trim(trim($worksheet->getCellByColumnAndRow(9, $row)->getValue(), '"')),
'purchase_price' => trim(trim($worksheet->getCellByColumnAndRow(10, $row)->getValue(), '"')),
'source' => $id,
'create_timestamp' => $now,
'update_timestamp' => $now

Loading…
Cancel
Save