|
|
@ -322,6 +322,15 @@ class CarInfoHandle |
|
|
|
foreach ($sources as $index => $source) { |
|
|
|
foreach ($sources as $index => $source) { |
|
|
|
if (empty(trim($source['car_phone']))) { |
|
|
|
if (empty(trim($source['car_phone']))) { |
|
|
|
foreach ($sources as $source_data) { |
|
|
|
foreach ($sources as $source_data) { |
|
|
|
|
|
|
|
if (trim($source_a['insurer1_date']) != trim($source['insurer1_date']) && (trim($source_a['insurer1_date']) == '' || $source_a['insurer1_date'] < $source['insurer1_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} else if (trim($source_a['insurer2_date']) != trim($source['insurer2_date']) && (trim($source_a['insurer2_date']) == '' || $source_a['insurer2_date'] < $source['insurer2_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} 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]; |
|
|
|
|
|
|
|
} |
|
|
|
$this->repeatDataHandle($source_data, $id, 'frame'); |
|
|
|
$this->repeatDataHandle($source_data, $id, 'frame'); |
|
|
|
$delete_num ++; |
|
|
|
$delete_num ++; |
|
|
|
} |
|
|
|
} |
|
|
@ -357,11 +366,27 @@ class CarInfoHandle |
|
|
|
unset($sources[$index]); |
|
|
|
unset($sources[$index]); |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (!preg_match('/^1[3-9][0-9]{9}/', $source['car_phone'])) { |
|
|
|
} else if (!preg_match('/^1[3-9][0-9]{9}/', $source['car_phone'])) { |
|
|
|
|
|
|
|
if (preg_match('/^1[3-9][0-9]{9}/', $source_a['car_phone'])) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (trim($source_a['insurer1_date']) != trim($source['insurer1_date']) && (trim($source_a['insurer1_date']) == '' || $source_a['insurer1_date'] < $source['insurer1_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} else if (trim($source_a['insurer2_date']) != trim($source['insurer2_date']) && (trim($source_a['insurer2_date']) == '' || $source_a['insurer2_date'] < $source['insurer2_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} 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]; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$this->repeatDataHandle($source, $id, 'frame'); |
|
|
|
$this->repeatDataHandle($source, $id, 'frame'); |
|
|
|
$delete_num ++; |
|
|
|
$delete_num ++; |
|
|
|
unset($sources[$index]); |
|
|
|
unset($sources[$index]); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if ($source_a['car_no'] != $source['car_no'] && (trim($source_a['car_no']) == '' || !in_array(strlen($source_a['car_no']), [7,8]))) { |
|
|
|
if (trim($source_a['insurer1_date']) != trim($source['insurer1_date']) && (trim($source_a['insurer1_date']) == '' || $source_a['insurer1_date'] < $source['insurer1_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} else if (trim($source_a['insurer2_date']) != trim($source['insurer2_date']) && (trim($source_a['insurer2_date']) == '' || $source_a['insurer2_date'] < $source['insurer2_date'])) { |
|
|
|
|
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|
|
|
|
|
} 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]; |
|
|
|
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'])) { |
|
|
|
} 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]; |
|
|
|
list($source_a, $source) = [$source, $source_a]; |
|
|
|