Files
crm.clientright.ru/modules/Project/tasks/Send2Court.service
Fedor ac7467f0b4 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.
2025-10-16 11:17:21 +03:00

41 lines
2.5 KiB
Desktop File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - старт корневой процедуры отправки исковых'.PHP_EOL, FILE_APPEND);
set_time_limit(1800); //Работаем не более 30 минут
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - Установили лимит работы скрипта'.PHP_EOL, FILE_APPEND);
error_reporting(E_ALL);
ini_set('display_errors', '1');
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - Установили правила показа ошибок'.PHP_EOL, FILE_APPEND);
require_once 'include/utils/Debexpert-guzzle.php';
require_once 'include/utils/utils.php';
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - подключили библиотеки'.PHP_EOL, FILE_APPEND);
global $adb;
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - создали глобальный объект для обращения к БД'.PHP_EOL, FILE_APPEND);
$query = 'select p.projectid
from vtiger_project p
left join vtiger_crmentity e on e.crmid = p.projectid
left join vtiger_projectcf cf on cf.projectid = p.projectid
where e.deleted = 0 and p.projectstatus = "готово для подачи" and cf.cf_1501 not like "%Москва%" and cf.cf_1501 not like "%москва%"';
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - Поднимаем список Проектов в корневой процедуре'.PHP_EOL, FILE_APPEND);
$result = $adb->pquery($query);
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - Запрос выполнен'.PHP_EOL, FILE_APPEND);
$count = $adb->num_rows($result);
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - найдено '.$count.' Проектов на отправку в суд'.PHP_EOL, FILE_APPEND);
if ($count > 0) {
//file_put_contents('send2court.log', date('Y-m-d H:i:s').' - найдено '.$count.' Проектов на отправку в суд'.PHP_EOL, FILE_APPEND);
// Есть Проекты на отправку
for ($i=0; $i<$count; $i++) {
$id = $adb->query_result($result, $i, 'projectid');
if ($i > 0) {
// Пауза между отправками
sleep(10);
}
$out = Send2Court($id, 'Prod');
}
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - закончили отправку всех исковых'.PHP_EOL, FILE_APPEND);
} else {
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - нечего делать'.PHP_EOL, FILE_APPEND);
}
?>