Major CRM updates: AI Assistant, Court Status API, S3 integration improvements, and extensive file storage system

- Added comprehensive AI Assistant system (aiassist/ directory):
  * Vector search and embedding capabilities
  * Typebot proxy integration
  * Elastic search functionality
  * Message classification and chat history
  * MCP proxy for external integrations

- Implemented Court Status API (GetCourtStatus.php):
  * Real-time court document status checking
  * Integration with external court systems
  * Comprehensive error handling and logging

- Enhanced S3 integration:
  * Improved file backup system with metadata
  * Batch processing capabilities
  * Enhanced error logging and recovery
  * Copy operations with URL fixing

- Added Telegram contact creation API
- Improved error logging across all modules
- Enhanced callback system for AI responses
- Extensive backup file storage with timestamps
- Updated documentation and README files

- File storage improvements:
  * Thousands of backup files with proper metadata
  * Fix operations for broken file references
  * Project-specific backup and recovery systems
  * Comprehensive file integrity checking

Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
This commit is contained in:
Fedor
2025-10-16 11:17:21 +03:00
parent dabcd43a00
commit ac7467f0b4
26580 changed files with 50860 additions and 3261 deletions

70
debug_project_391604.php Normal file
View File

@@ -0,0 +1,70 @@
<?php
// Диагностика файлов проекта 391604
require_once 'config.inc.php';
require_once 'include/utils/Letters.php';
$projectid = 391604;
echo "=== Диагностика файлов проекта $projectid ===\n\n";
// 1. Проверяем основной документ (исковое заявление)
echo "1. Проверяем исковое заявление:\n";
$claim = getClaim($projectid, 'исковое');
echo "Результат: " . $claim['result'] . "\n";
if ($claim['result'] == 'YES') {
echo "Файл: " . $claim['filepath'] . "\n";
echo "Название: " . $claim['filename'] . "\n";
echo "S3 данные: bucket=" . $claim['s3_bucket'] . ", key=" . $claim['s3_key'] . "\n";
echo "Тип размещения: " . $claim['filelocationtype'] . "\n";
if ($claim['filelocationtype'] == 'E') {
echo "Пытаемся скачать из S3...\n";
$tempPath = getTempFileFromS3($claim['s3_bucket'], $claim['s3_key'], 'test_claim.pdf');
if ($tempPath) {
echo "✅ S3 файл успешно скачан: $tempPath\n";
unlink($tempPath);
} else {
echo "❌ Ошибка скачивания из S3\n";
}
}
} else {
echo "❌ Исковое заявление не найдено\n";
}
echo "\n2. Проверяем доверенность:\n";
$authdoc = getAuthDoc(9728036753, 1); // Примерные ID
echo "Результат: " . $authdoc['result'] . "\n";
if ($authdoc['result'] == 'YES') {
echo "Файл: " . $authdoc['filepath'] . "\n";
echo "S3 данные: bucket=" . $authdoc['s3_bucket'] . ", key=" . $authdoc['s3_key'] . "\n";
echo "Тип размещения: " . $authdoc['filelocationtype'] . "\n";
}
echo "\n3. Проверяем дополнительные документы:\n";
$otherDocs = getOtherDocs($projectid, 9728036753, 0, 0);
echo "Найдено документов: " . count($otherDocs) . "\n";
for ($i = 0; $i < count($otherDocs); $i++) {
echo "\nДокумент " . ($i + 1) . ":\n";
echo " Название: " . $otherDocs[$i]['description'] . "\n";
echo " Файл: " . $otherDocs[$i]['filepath'] . "\n";
echo " S3 данные: bucket=" . $otherDocs[$i]['s3_bucket'] . ", key=" . $otherDocs[$i]['s3_key'] . "\n";
echo " Тип размещения: " . $otherDocs[$i]['filelocationtype'] . "\n";
if ($otherDocs[$i]['filelocationtype'] == 'E' && !empty($otherDocs[$i]['s3_bucket']) && !empty($otherDocs[$i]['s3_key'])) {
echo " Пытаемся скачать из S3...\n";
$tempPath = getTempFileFromS3($otherDocs[$i]['s3_bucket'], $otherDocs[$i]['s3_key'], 'test_other_' . $i . '.pdf');
if ($tempPath) {
echo " ✅ S3 файл успешно скачан: $tempPath\n";
unlink($tempPath);
} else {
echo " ❌ Ошибка скачивания из S3\n";
}
} else {
echo " Локальный файл или нет S3 данных\n";
}
}
echo "\n=== Конец диагностики ===\n";
?>