去掉重复调试,增加车牌有效检测,处理错误写日志

master
zhaocheng 2 years ago
parent 5c572970ed
commit 05eb15d3fd
  1. 7
      extend/service/CarInfoHandle.php

@ -360,6 +360,12 @@ class CarInfoHandle
$delete_num ++;
unset($sources[$index]);
} else {
if ($source_a['car_no'] != $source['car_no'] && (trim($source_a['car_no']) == '' || !in_array(strlen($source_a['car_no']), [7,8]))) {
list($source_a, $source) = [$source, $source_a];
} else if ($source_a['register_date'] != $source['register_date'] && (trim($source_a['register_date']) == '' || $source_a['register_date'] < $source['register_date'])) {
list($source_a, $source) = [$source, $source_a];
}
$phones = [$source['car_phone']];
$phones_a = [$source_a['car_phone']];
foreach (['id_phone', 'insured_phone', 'link_phone_1', 'link_phone_2', 'link_phone_3'] as $key) {
@ -394,6 +400,7 @@ class CarInfoHandle
} catch (\Exception $e) {
$faild_num++;
Db::rollback();
Log::record($e->getTraceAsString(), 'error');
}
$current++;
}

Loading…
Cancel
Save