导入更新null值检测

master
zcstatham 2 years ago
parent 3d2d334297
commit 540a2fed0e
  1. 28
      extend/service/CarInfoHandle.php

@ -389,20 +389,20 @@ class CarInfoHandle
];
$is_update_failed = 0;
for ($row = 2; $row <= $highestRow; $row++) {
$car_no = trim($worksheet->getCellByColumnAndRow(1, $row)->getValue());
$car_number = trim($worksheet->getCellByColumnAndRow(4, $row)->getValue());
$car_man = trim($worksheet->getCellByColumnAndRow(5, $row)->getValue());
$factory_model = trim($worksheet->getCellByColumnAndRow(10, $row)->getValue());
$engine_no = trim($worksheet->getCellByColumnAndRow(3, $row)->getValue());
$car_frame_no = trim($worksheet->getCellByColumnAndRow(2, $row)->getValue());
$register_date = substr(trim($worksheet->getCellByColumnAndRow(11, $row)->getValue()), 0, 10);
$company = trim($worksheet->getCellByColumnAndRow(12, $row)->getValue());
$insurer1_date = substr(trim($worksheet->getCellByColumnAndRow(14, $row)->getValue()), 0, 10);
$insurer2_date = substr(trim($worksheet->getCellByColumnAndRow(13, $row)->getValue()), 0, 10);
$id_man = trim($worksheet->getCellByColumnAndRow(7, $row)->getValue());
$id_number = trim($worksheet->getCellByColumnAndRow(6, $row)->getValue());
$insured_man = trim($worksheet->getCellByColumnAndRow(9, $row)->getValue());
$insured_number = trim($worksheet->getCellByColumnAndRow(8, $row)->getValue());
$car_no = trim($worksheet->getCellByColumnAndRow(1, $row)->getValue()?:'');
$car_number = trim($worksheet->getCellByColumnAndRow(4, $row)->getValue()?:'');
$car_man = trim($worksheet->getCellByColumnAndRow(5, $row)->getValue()?:'');
$factory_model = trim($worksheet->getCellByColumnAndRow(10, $row)->getValue()?:'');
$engine_no = trim($worksheet->getCellByColumnAndRow(3, $row)->getValue()?:'');
$car_frame_no = trim($worksheet->getCellByColumnAndRow(2, $row)->getValue()?:'');
$register_date = substr(trim($worksheet->getCellByColumnAndRow(11, $row)->getValue()?:''), 0, 10);
$company = trim($worksheet->getCellByColumnAndRow(12, $row)->getValue()?:'');
$insurer1_date = substr(trim($worksheet->getCellByColumnAndRow(14, $row)->getValue()?:''), 0, 10);
$insurer2_date = substr(trim($worksheet->getCellByColumnAndRow(13, $row)->getValue()?:''), 0, 10);
$id_man = trim($worksheet->getCellByColumnAndRow(7, $row)->getValue()?:'');
$id_number = trim($worksheet->getCellByColumnAndRow(6, $row)->getValue()?:'');
$insured_man = trim($worksheet->getCellByColumnAndRow(9, $row)->getValue()?:'');
$insured_number = trim($worksheet->getCellByColumnAndRow(8, $row)->getValue()?:'');
if ($car_frame_no == '') {
continue;

Loading…
Cancel
Save