Non puoi selezionare più di 25 argomenti
Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
77 righe
3.6 KiB
77 righe
3.6 KiB
<? |
|
if (isset($this) && is_a($this,"anac")) { |
|
$simogMethod = "inserisciGara"; |
|
if (!empty($this->info["id_gara"])) { $simogMethod = "modificaGara"; } |
|
if ($operation == "get") { |
|
$return = []; |
|
$return["method"] = $simogMethod; |
|
$return["data"] = []; |
|
if (!empty($this->info["id_gara"])) { |
|
$return["data"]["id_gara"] = $this->info["id_gara"]; |
|
} |
|
$array = []; |
|
$dati = $this->getDati(); |
|
$array["OGGETTO"] = $this->info["oggetto"]; |
|
$array["ID_STAZIONE_APPALTANTE"] = $_SESSION["simog"]["collaborazione"]["ufficio_id"]; |
|
$array["DENOM_STAZIONE_APPALTANTE"] = $_SESSION["simog"]["collaborazione"]["ufficio_denominazione"]; |
|
$array["CF_AMMINISTRAZIONE"] = $_SESSION["simog"]["collaborazione"]["azienda_codiceFiscale"]; |
|
$array["DENOM_AMMINISTRAZIONE"] = $_SESSION["simog"]["collaborazione"]["azienda_denominazione"]; |
|
$array["CF_UTENTE"] = $_SESSION["simog"]["username"]; |
|
$array["IMPORTO_GARA"] = $dati["importo"] ?? ""; |
|
$array["TIPO_SCHEDA"] = $dati["tipo_scheda"] ?? ""; |
|
$array["MODO_INDIZIONE"] = $dati["modo_indizione"] ?? ""; |
|
$array["ALLEGATO_IX"] = $dati["allegato_ix"] ?? ""; |
|
$array["MODO_REALIZZAZIONE"] = $dati["modo_realizzazione"] ?? ""; |
|
$array["MOTIVO_RICH_CIG"] = $dati["motivo_rich_cig"] ?? ""; |
|
$array["CIG_ACC_QUADRO"] = $dati["cig_acc_quadro"] ?? ""; |
|
$array["DURATA_ACCQUADRO_CONVENZIONE_GARA"] = $dati["durata_accquadro_convenzione_gara"] ?? ""; |
|
$array["ESCLUSO_AVCPASS"] = $dati["escluso_avcpass"] ?? ""; |
|
$array["URGENZA_DL133"] = $dati["urgenza_dl133"] ?? ""; |
|
$array["ESTREMA_URGENZA"] = $dati["estrema_urgenza"] ?? ""; |
|
$array["NUMERO_LOTTI"] = $dati["numero_lotti"] ?? ""; |
|
$array["STRUMENTO_SVOLGIMENTO"] = $dati["strumento_svolgimento"] ?? ""; |
|
$array["ID_F_DELEGATE"] = $dati["id_f_delegate"] ?? ""; |
|
$array["CF_AMM_AGENTE_GARA"] = $dati["cf_amm_agente_gara"] ?? ""; |
|
$array["CATEGORIE_MERC"] = ["CATEGORIA"=>$dati["categorie_merc"]]; |
|
foreach($array AS $key => $value) { |
|
if (empty($value) && $value !== "0") { unset($array[$key]); } |
|
} |
|
$array["FLAG_SA_AGENTE_GARA"] = (empty($array["ID_F_DELEGATE"])) ? "N" : "S"; |
|
$return["data"]["@xmlns:simog"] = "xmlbeans.massload.simog.avlp.it"; |
|
$return["data"]["datiGara"]["DatiGara"] = $array; |
|
} else if ($operation == "put" && !empty($response)) { |
|
|
|
if (!empty($response->return->success)) { |
|
$this->updateSimogLog($simogMethod,1,""); |
|
if (!empty($response->return->id_gara)) { |
|
$this->updateStato("10"); |
|
$gara = []; |
|
$gara["codice"] = $this->info["codice"]; |
|
$gara["id_gara"] = $response->return->id_gara; |
|
$gara["cf_utente_simog"] = $_SESSION["simog"]["username"]; |
|
$gara["data_invio_simog"] = date("d-m-Y H:i:s"); |
|
$gara["id_stazione_appaltante"] = $_SESSION["simog"]["collaborazione"]["ufficio_id"]; |
|
$salva = new salva(); |
|
$salva->debug = false; |
|
|
|
$salva->nome_tabella = "b_simog"; |
|
$salva->operazione = "UPDATE"; |
|
$salva->oggetto = $gara; |
|
$salva->save(); |
|
} |
|
alertManager::printSuccessBox(__("Operazione effettuata con successo")); |
|
$return = true; |
|
} else if (!empty($response->return->error)) { |
|
$errors = $response->return->error; |
|
} else { |
|
$errors = __("Errore nella risposta"); |
|
} |
|
} else { |
|
$errors = __("Operazione sconosciuta"); |
|
} |
|
if (!empty($errors)) { |
|
$this->updateSimogLog($simogMethod,2,$errors); |
|
alertManager::printAlertBox($errors); |
|
} |
|
} |
|
?>
|