Step 9 remove comment on export to lims
This commit is contained in:
parent
5e677a8b9c
commit
2598a4c91b
File diff suppressed because one or more lines are too long
@ -63,8 +63,8 @@ try {
|
||||
$clienteResponsabile = !empty($result['cliente_responsabile_id']) ? (int) $result['cliente_responsabile_id'] : null;
|
||||
$moltiplicatorePrezzo = !empty($result['moltiplicatore_prezzo_id']) ? (int) $result['moltiplicatore_prezzo_id'] : null;
|
||||
$anagraficaObject = !empty($result['anagrafica_certest_object_id']) ? (int) $result['anagrafica_certest_object_id'] : null;
|
||||
$anagraficaService = !empty($result['anagrafica_certest_service_id'])? (int) $result['anagrafica_certest_service_id']: null;
|
||||
$clienteFornitore = !empty($result['cliente_fornitore_id'])? (int) $result['cliente_fornitore_id']: null;
|
||||
$anagraficaService = !empty($result['anagrafica_certest_service_id']) ? (int) $result['anagrafica_certest_service_id'] : null;
|
||||
$clienteFornitore = !empty($result['cliente_fornitore_id']) ? (int) $result['cliente_fornitore_id'] : null;
|
||||
|
||||
// 🔹 STEP 3: Fetch Parts (including idmatrice)
|
||||
$stmt = $pdo->prepare("
|
||||
@ -291,18 +291,18 @@ try {
|
||||
]);
|
||||
|
||||
// 🔹 STEP 9: Send CommessaWeb to laboratory (commentato come richiesto)
|
||||
/*
|
||||
|
||||
$sendResult = $api->post("CommessaWeb({$commessaId})/InviaCommessa", []);
|
||||
|
||||
// Logga il POST
|
||||
$logContentStep9 = "curl --location --request POST '{$apiBaseUrl}CommessaWeb({$commessaId})/InviaCommessa' \\\n" .
|
||||
"--header 'Content-Type: application/json' \\\n" .
|
||||
"--header 'Authorization: Bearer ••••••' \\\n" .
|
||||
"--data '{}'\n\n" .
|
||||
"RESPONSE:\n" . json_encode($sendResult, JSON_PRETTY_PRINT);
|
||||
"--header 'Content-Type: application/json' \\\n" .
|
||||
"--header 'Authorization: Bearer ••••••' \\\n" .
|
||||
"--data '{}'\n\n" .
|
||||
"RESPONSE:\n" . json_encode($sendResult, JSON_PRETTY_PRINT);
|
||||
$logFileStep9 = $logDir . "commessa_{$commessaId}_send_step9_" . time() . ".txt";
|
||||
file_put_contents($logFileStep9, $logContentStep9);
|
||||
*/
|
||||
|
||||
|
||||
// 🔹 STEP 9.5: Importazione da CommessaWeb a Commessa (commentato come richiesto)
|
||||
// Supplier call: POST api/odata/CommessaWeb(XXX)/ImportaCommessa
|
||||
@ -311,10 +311,10 @@ try {
|
||||
|
||||
// Logga il POST
|
||||
$logContentStep91 = "curl --location --request POST '{$apiBaseUrl}CommessaWeb({$commessaId})/ImportaCommessa' \\\n" .
|
||||
"--header 'Content-Type: application/json' \\\n" .
|
||||
"--header 'Authorization: Bearer ••••••' \\\n" .
|
||||
"--data '{}'\n\n" .
|
||||
"RESPONSE:\n" . json_encode($importResult, JSON_PRETTY_PRINT);
|
||||
"--header 'Content-Type: application/json' \\\n" .
|
||||
"--header 'Authorization: Bearer ••••••' \\\n" .
|
||||
"--data '{}'\n\n" .
|
||||
"RESPONSE:\n" . json_encode($importResult, JSON_PRETTY_PRINT);
|
||||
$logFileStep91 = $logDir . "commessa_{$commessaId}_importa_step91_" . time() . ".txt";
|
||||
file_put_contents($logFileStep91, $logContentStep91);
|
||||
|
||||
|
||||
@ -0,0 +1,28 @@
|
||||
curl --location --request POST 'https://93.43.5.102/limsapi/api/odata/CommessaWeb' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Authorization: Bearer ••••••' \
|
||||
--data '{
|
||||
"Cliente": 3378,
|
||||
"SchemaCustomField": 82,
|
||||
"Richiedente": "Test Web Import",
|
||||
"Descrizione": "TEST CommessaWeb",
|
||||
"ClienteResponsabile": 7586,
|
||||
"MoltiplicatorePrezzo": 3,
|
||||
"AnagraficaCertestObject": 8963,
|
||||
"AnagraficaCertestService": 9007,
|
||||
"ClienteFornitore": null
|
||||
}'
|
||||
|
||||
RESPONSE:
|
||||
{
|
||||
"@odata.context": "https:\/\/bvcpsitaly-elims.com\/limsapi\/api\/odata\/$metadata#CommessaWeb\/$entity",
|
||||
"IdCommessa": 562479,
|
||||
"CodiceCommessa": "26C0013",
|
||||
"RiferimentoCertificato": null,
|
||||
"StatoCommessaWeb": "Nuova",
|
||||
"DataCreazioneWeb": "2026-03-06T09:09:16.9338074+01:00",
|
||||
"CodiceCommessaWeb": "26C0013",
|
||||
"DataInviatoWeb": null,
|
||||
"Richiedente": "Test Web Import",
|
||||
"Descrizione": "TEST CommessaWeb"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user