...Человеческий поиск в разработке...
- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/lib/integrity/persondedupedatasource.php
- Класс: Bitrix\Crm\Integrity\PersonDedupeDataSource
- Вызов: PersonDedupeDataSource::calculateEntityCount
public function calculateEntityCount(DuplicateCriterion $criterion, array $options = null) { $count = $this->innerCalculateEntityCount($criterion, $options); $matches = $criterion->getMatches(); $name = isset($matches['NAME']) ? $matches['NAME'] : ''; $secondName = isset($matches['SECOND_NAME']) ? $matches['SECOND_NAME'] : ''; $lastName = isset($matches['LAST_NAME']) ? $matches['LAST_NAME'] : ''; if($secondName !== '' && $name !== '') { $count += $this->innerCalculateEntityCount( DuplicatePersonCriterion::createFromMatches(array('LAST_NAME' => $lastName, 'NAME' => $name)), $options ); } if($name !== '') { $count += $this->innerCalculateEntityCount( DuplicatePersonCriterion::createFromMatches(array('LAST_NAME' => $lastName)), $options ); } return $count; }