add new liquidazione requests for complete data

This commit is contained in:
2026-05-29 16:08:50 +02:00
parent 8338fb762d
commit 2ca8746209
7 changed files with 442 additions and 85 deletions
@@ -0,0 +1,67 @@
info:
name: Importo richiedente da Proposta ADVANCED
type: http
seq: 13
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "31555"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n",
"useTestCF": false
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="codiceFiscaleRichiedente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="datiRipartizioniIterable" type="iterable"][SPLIT regex="##"][TAG]GETVALUEBYTAG,RIPARTIZIONE_DATI_COMPLETI,REQUEST,IUQOID,CONCAT,##[/TAG][/SPLIT][/VAR]
[VAR name="item2" type="number"][% item2 = 1; %][/VAR]
[VAR name="item5" type="number"][% item5 = 4; %][/VAR]
[VAR name="importoRichiedente" type="number"][% importoRichiedente = 0; %][/VAR]
[FOR varname="riga" iterable="datiRipartizioniIterable"]
[VAR name="rigaiIterable" type="iterable"][SPLIT regex=";;"][VALUE_OF varname="riga" /][/SPLIT][/VAR]
[VAR name="codiceFiscale" type="string"][VALUE_OF varname="rigaiIterable" index="item2" /][/VAR]
[VAR name="importo" type="number"][VALUE_OF varname="rigaiIterable" index="item5" /][/VAR]
[IF]
[CONDITION][% codiceFiscale == codiceFiscaleRichiedente %][/CONDITION]
[THEN][% importoRichiedente = importo; %][/THEN]
[/IF]
[/FOR]
[FORMAT type="number" pattern="0.00"][% importoRichiedente %][/FORMAT]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
SchemaId 709
Campo COL0118
@@ -0,0 +1,101 @@
info:
name: Ore richiedente da Proposta ADVANCED
type: http
seq: 14
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "31555"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n",
"IS_OP": "OP0",
"IS_CO": "CO0",
"IS_FU": "FU0",
"IS_EP": "EP0",
"OP": 0.0431,
"CO": 0.0405,
"FU": 0.0350,
"EP": 0.0307,
"useTestCF": false
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="inquadramentoRichiedente" type="string"][TAG]GETVALUEBYTAG,INQUADRAMENTO_DIPENDENTE,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="codiceFiscaleRichiedente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="datiRipartizioniIterable" type="iterable"][SPLIT regex="##"][TAG]GETVALUEBYTAG,RIPARTIZIONE_DATI_COMPLETI,REQUEST,IUQOID,CONCAT,##[/TAG][/SPLIT][/VAR]
[% item2 = 1; %]
[% item5 = 4; %]
[% importoRichiedente = 0; %]
[% fattoreConversione = 0; %]
[FOR varname="riga" iterable="datiRipartizioniIterable"]
[VAR name="rigaIterable" type="iterable"][SPLIT regex=";;"][VALUE_OF varname="riga" /][/SPLIT][/VAR]
[VAR name="codiceFiscale" type="string"][VALUE_OF varname="rigaIterable" index="item2" /][/VAR]
[VAR name="importo" type="number"][VALUE_OF varname="rigaIterable" index="item5" /][/VAR]
[IF]
[CONDITION][% codiceFiscale == codiceFiscaleRichiedente %][/CONDITION]
[THEN][% importoRichiedente = importo; %][/THEN]
[/IF]
[/FOR]
[IF]
[CONDITION][CONTAINS varname="IS_OP"][% inquadramentoRichiedente %][/CONTAINS][/CONDITION]
[THEN][% fattoreConversione = OP; %][/THEN]
[ELSE IF]
[CONDITION][CONTAINS varname="IS_CO"][% inquadramentoRichiedente %][/CONTAINS][/CONDITION]
[THEN][% fattoreConversione = CO; %][/THEN]
[/ELSE IF]
[ELSE IF]
[CONDITION][CONTAINS varname="IS_FU"][% inquadramentoRichiedente %][/CONTAINS][/CONDITION]
[THEN][% fattoreConversione = FU; %][/THEN]
[/ELSE IF]
[ELSE IF]
[CONDITION][CONTAINS varname="IS_EP"][% inquadramentoRichiedente %][/CONTAINS][/CONDITION]
[THEN][% fattoreConversione = EP; %][/THEN]
[/ELSE IF]
[/IF]
[!--
inquadramentoRichiedente: [%= inquadramentoRichiedente %]
codiceFiscaleRichiedente: [%= codiceFiscaleRichiedente %]
importoRichiedente: [%= importoRichiedente %]
fattoreConversione: [%= fattoreConversione %]
Output
--]
[FORMAT type="number" pattern="0"][% importoRichiedente * fattoreConversione %][/FORMAT]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
SchemaId 709
Campo COL0118
@@ -0,0 +1,76 @@
info:
name: Richiedente ammesso ADVANCED
type: http
seq: 15
http:
method: POST
url: "{{elixFormsApiUrl}}/eftl/process/v1"
headers:
- name: x-requested-with
value: XMLHttpRequest
- name: x-api-key
value: "{{elixFormsWsAuthenticationToken}}"
- name: x-ef-request-id
value: "31555"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n",
"useTestCF": false
}
}
auth: inherit
runtime:
scripts:
- type: before-request
code: |-
const { prepareEftlDocument } = require("./elixFormsJs.js")
// Copy-pasta your EFTL document below inside the template literals (`)
prepareEftlDocument(String.raw`
[EFTL][HEADER name="trimDocument" value="true" type="boolean" /]
[VAR name="checkUtentePartecipante" type="string"][% checkUtentePartecipante = "Il richiedente non è ammesso alla compilazione perché non partecipa alle ripartizioni"; %][/VAR]
[VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="richiedentePropostaCF" type="string"][TAG]GETVALUEBYTAG,PROPOSTA_RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR]
[VAR name="ripartizioniDatiCompleti" type="string"][TAG]GETVALUEBYTAG,RIPARTIZIONE_DATI_COMPLETI,REQUEST,IUQOID[/TAG][/VAR]
[!-- ATTENZIONE: gli ELSEIF non rispettano la logica di esclusione dei blocchi! Lasciare le condizioni in questo ordine! --]
[!-- 1. Il richiedente non deve essere vuoto --]
[!-- 2. Il richiedente deve comparire fra le ripartizioni --]
[!-- 3. Il richiedente può eventualmente comparire fra i nominativi ammessi (DEBUG) --]
[!-- 4. Il richiedente non deve essere il RS che ha presentato la Proposta --]
[IF]
[CONDITION][IS_EMPTY varname="richiedenteCF" /][/CONDITION]
[THEN][% checkUtentePartecipante = "Nessun richiedente trovato"; %][/THEN]
[ELSE IF]
[CONDITION][CONTAINS varname="ripartizioniDatiCompleti"];;[VALUE_OF varname="richiedenteCF" /];;[/CONTAINS][/CONDITION]
[THEN][% checkUtentePartecipante = ""; %][/THEN]
[/ELSE IF]
[ELSE IF]
[CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION]
[THEN][% checkUtentePartecipante = ""; %][/THEN]
[/ELSE IF]
[ELSE IF]
[CONDITION][% richiedenteCF == richiedentePropostaCF %][/CONDITION]
[THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente della Proposta non deve compilare la DSAN"; %][/THEN]
[/ELSE IF]
[/IF]
[%= checkUtentePartecipante %]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
SchemaId 709
Campo COL0118