add our creation
This commit is contained in:
parent
4990934126
commit
527e047e68
@ -121,3 +121,7 @@ symbol_info_budget:
|
||||
# Note: the backend is fixed at startup. If a project with a different backend
|
||||
# is activated post-init, an error will be returned.
|
||||
language_backend:
|
||||
|
||||
# list of regex patterns which, when matched, mark a memory entry as read‑only.
|
||||
# Extends the list from the global configuration, merging the two lists.
|
||||
read_only_memory_patterns: []
|
||||
|
||||
@ -133,6 +133,26 @@ try {
|
||||
VALUES (?, GETDATE(), ?, ?)";
|
||||
$this->db->query($sqlLog, [$accessnumber, $stepType, $stepStatus]);
|
||||
|
||||
try {
|
||||
$oruDir = 'c:\inetpub\wwwroot\spooler_db\process_oru';
|
||||
if (!is_dir($oruDir)) {
|
||||
mkdir($oruDir, 0777, true);
|
||||
}
|
||||
|
||||
$oruFile = "$oruDir/$accessnumber.oru";
|
||||
$date = date('Y-m-d H:i');
|
||||
$status = $data['status'] ?? 'PENDING';
|
||||
$file = fopen($oruFile, 'w+');
|
||||
fwrite($file, "$accessnumber\r\n$hostnumber\r\n$date\r\n$status\r\n-");
|
||||
fclose($file);
|
||||
|
||||
$sqlOruLog = "INSERT INTO GDC_CMOD.dbo.AUDIT_REQUESTS(ACCESSNUMBER, STEPDATE, STEPTYPE, STEPSTATUS)
|
||||
VALUES (?, GETDATE(), 'ORU_FILE', 'Created')";
|
||||
$this->db->query($sqlOruLog, [$accessnumber]);
|
||||
} catch (\Throwable $e) {
|
||||
log_message('error', "ORU file creation failed for $accessnumber: " . $e->getMessage());
|
||||
}
|
||||
|
||||
return $this->response->setJSON([
|
||||
'success' => true,
|
||||
'jobId' => $jobId,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user