- 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.
54 lines
2.3 KiB
Plaintext
54 lines
2.3 KiB
Plaintext
<?php
|
||
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - старт корневой процедуры отправки исковых'.PHP_EOL, FILE_APPEND);
|
||
|
||
set_time_limit(0); //Снимаем ограничение по времени работы скрипта
|
||
error_reporting(E_ALL);
|
||
ini_set('display_errors', '1');
|
||
|
||
$id = $_REQUEST['id'];
|
||
$version = $_REQUEST['version'];
|
||
|
||
require_once 'include/utils/Debexpert-guzzle.php';
|
||
require_once 'include/utils/utils.php';
|
||
|
||
if (isset($id) and !empty($id) and $id > 0) {
|
||
// Задан ID конкретного Проекта - его и отправим
|
||
$result = Send2Court($id, $version);
|
||
|
||
if (is_array($result)) {
|
||
// Завершилось относительно ровно, в том плане, что логических ошибок не найдено, которые прервали бы процесс
|
||
$result = json_encode($result);
|
||
}
|
||
|
||
file_put_contents('send2court.log', date('Y-m-d H:i:s').' - в WD возвращаем ответ: '.$result.PHP_EOL, FILE_APPEND);
|
||
echo $result;
|
||
} else {
|
||
// Конкретный Проект не задан - значит отправим все
|
||
global $adb;
|
||
|
||
$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 "%москва%"';
|
||
$result = $adb->pquery($query);
|
||
|
||
$count = $adb->num_rows($result);
|
||
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, $version);
|
||
}
|
||
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);
|
||
}
|
||
}
|
||
|
||
?> |