Update sync status handling in UpdateJunctionSyncStatus hook; enforce required aiProvider field in CAkten entity; adjust microtime values in config and state files
This commit is contained in:
@@ -61,19 +61,23 @@ class UpdateJunctionSyncStatus implements AfterSave, AfterRemove
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fall 3: Relevante Feldänderungen (Datei, Name, Beschreibung, …)
|
// Fall 3: Relevante Feldänderungen (Datei, Name, Beschreibung, …)
|
||||||
if (!$this->hasRelevantChanges($entity)) {
|
if ($this->hasRelevantChanges($entity)) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!$entity->get('cAktenId')) {
|
if (!$entity->get('cAktenId')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$entity->set('syncStatus', 'unclean');
|
$entity->set('syncStatus', 'unclean');
|
||||||
$entity->set('aiSyncStatus', 'unclean');
|
$entity->set('aiSyncStatus', 'unclean');
|
||||||
$entity->set('aiParsingStatus', 'unknown');
|
$entity->set('aiParsingStatus', 'unknown');
|
||||||
$this->entityManager->saveEntity($entity, ['silent' => true, 'skipHooks' => true]);
|
$this->entityManager->saveEntity($entity, ['silent' => true, 'skipHooks' => true]);
|
||||||
$this->triggerAkteUpdate($entity->get('cAktenId'));
|
$this->triggerAkteUpdate($entity->get('cAktenId'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fall 4: aiParsingStatus geändert (z.B. durch externen Parsing-Service)
|
||||||
|
// → Akte neu berechnen, aber KEIN unclean setzen (Inhalt ist unverändert)
|
||||||
|
if ($entity->isAttributeChanged('aiParsingStatus') && $entity->get('cAktenId')) {
|
||||||
|
$this->triggerAkteUpdate($entity->get('cAktenId'));
|
||||||
|
}
|
||||||
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
$GLOBALS['log']->error('CDokumente UpdateJunctionSyncStatus afterSave Error: ' . $e->getMessage());
|
$GLOBALS['log']->error('CDokumente UpdateJunctionSyncStatus afterSave Error: ' . $e->getMessage());
|
||||||
|
|||||||
@@ -171,13 +171,18 @@
|
|||||||
},
|
},
|
||||||
"aiProvider": {
|
"aiProvider": {
|
||||||
"type": "enum",
|
"type": "enum",
|
||||||
"required": false,
|
"required": true,
|
||||||
"options": [
|
"options": [
|
||||||
"ragflow",
|
"ragflow",
|
||||||
"xai"
|
"xai"
|
||||||
],
|
],
|
||||||
"default": "ragflow",
|
"default": "ragflow",
|
||||||
"isCustom": true
|
"isCustom": true,
|
||||||
|
"style": {
|
||||||
|
"ragflow": null,
|
||||||
|
"xai": null
|
||||||
|
},
|
||||||
|
"audited": true
|
||||||
},
|
},
|
||||||
"globalSyncStatus": {
|
"globalSyncStatus": {
|
||||||
"type": "enum",
|
"type": "enum",
|
||||||
@@ -233,9 +238,10 @@
|
|||||||
"complete_with_failures": "warning"
|
"complete_with_failures": "warning"
|
||||||
},
|
},
|
||||||
"default": "unknown",
|
"default": "unknown",
|
||||||
"readOnly": true,
|
"readOnly": false,
|
||||||
"tooltip": true,
|
"tooltip": true,
|
||||||
"isCustom": true
|
"isCustom": true,
|
||||||
|
"audited": true
|
||||||
},
|
},
|
||||||
"graphParsingStatus": {
|
"graphParsingStatus": {
|
||||||
"type": "enum",
|
"type": "enum",
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ return [
|
|||||||
0 => 'youtube.com',
|
0 => 'youtube.com',
|
||||||
1 => 'google.com'
|
1 => 'google.com'
|
||||||
],
|
],
|
||||||
'microtime' => 1774604561.068253,
|
'microtime' => 1774606534.98333,
|
||||||
'siteUrl' => 'https://crm.bitbylaw.com',
|
'siteUrl' => 'https://crm.bitbylaw.com',
|
||||||
'fullTextSearchMinLength' => 4,
|
'fullTextSearchMinLength' => 4,
|
||||||
'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws',
|
'webSocketUrl' => 'ws://api.bitbylaw.com:5000/espocrm/ws',
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'cacheTimestamp' => 1774604771,
|
'cacheTimestamp' => 1774606535,
|
||||||
'microtimeState' => 1774604771.465835,
|
'microtimeState' => 1774606535.168197,
|
||||||
'currencyRates' => [
|
'currencyRates' => [
|
||||||
'EUR' => 1.0
|
'EUR' => 1.0
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user