Skip to content

Commit

Permalink
Corretto problema nella ricerca dei versamenti con filtro su domini e…
Browse files Browse the repository at this point in the history
… UO.

Corretto messaggio dell'errore VER_004.
  • Loading branch information
pintorig committed Mar 31, 2021
1 parent ae996e4 commit 595f677
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Expand Up @@ -168,7 +168,7 @@ public String getMessage() {
case VER_001: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") presenta il codSingoloVersamentoEnte (" + this.params[2] + ") piu' di una volta";
case VER_002: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") ha un importo totale (" + this.params[3] + ") diverso dalla somma dei singoli importi (" + this.params[2] + ")";
case VER_003: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") e' in uno stato che non consente l'aggiornamento (" + this.params[2] + ")";
case VER_004: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") inviato ha un'unita' operativa beneficiaria (" + this.params[2] + ") diversa da quello originale (" + this.params[3] + ")";
case VER_004: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") presenta un beneficiario (" + this.params[2] + " / "+ this.params[3] + ") diverso da quello originale (" + this.params[4] + " / "+ this.params[5] +")";
case VER_005: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") inviato ha un numero di singoli versamenti (" + this.params[2] + ") diverso da quello originale (" + this.params[3] + ")";
case VER_006: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") inviato ha un singolo versamento con codSingoloVersamentoEnte (" + this.params[2] + ") non presente nell'originale";
case VER_007: return "La pendenza (IdA2A:" + this.params[0] + ", Id:" + this.params[1] + ") ha il singolo versamento con codSingoloVersamentoEnte (" + this.params[2] + ") inviato ha un tipo tributo (" + this.params[3] + ") diverso dall'originale (" + this.params[4] + ")";
Expand Down
Expand Up @@ -132,7 +132,10 @@ public static void validazioneSemanticaAggiornamento(Versamento versamentoLetto,
throw new GovPayException(EsitoOperazione.VER_003, versamentoNuovo.getApplicazione(configWrapper).getCodApplicazione(), versamentoLetto.getCodVersamentoEnte(), versamentoLetto.getStatoVersamento().toString());
}
if(versamentoLetto.getIdUo() != versamentoNuovo.getIdUo()) {
throw new GovPayException(EsitoOperazione.VER_004, versamentoNuovo.getApplicazione(configWrapper).getCodApplicazione(), versamentoLetto.getCodVersamentoEnte(), versamentoLetto.getUo(configWrapper).getCodUo(), versamentoNuovo.getUo(configWrapper).getCodUo());
// Pendenza (idA2A,idPendenza) presenta un beneficiario (vNuovo.idDominio/vNuovo.idUo) diverso da quello originale (vLetto.idDominio/vLetto.idUo)
throw new GovPayException(EsitoOperazione.VER_004, versamentoNuovo.getApplicazione(configWrapper).getCodApplicazione(), versamentoNuovo.getCodVersamentoEnte(),
versamentoNuovo.getUo(configWrapper).getDominio(configWrapper).getCodDominio() , versamentoNuovo.getUo(configWrapper).getCodUo(),
versamentoLetto.getUo(configWrapper).getDominio(configWrapper).getCodDominio(), versamentoLetto.getUo(configWrapper).getCodUo() );
}
versamentoNuovo.setId(versamentoLetto.getId());
versamentoNuovo.setDataCreazione(versamentoLetto.getDataCreazione());
Expand Down
Expand Up @@ -266,6 +266,7 @@ public IExpression _toExpression() throws ServiceException {
if(addAnd)
newExpression.and();

IExpression orExprExt = this.newExpression();
List<IExpression> listaUoExpr = new ArrayList<IExpression>();
for (IdUnitaOperativa uo : this.idUo) {
IExpression orExpr = this.newExpression();
Expand All @@ -282,7 +283,9 @@ public IExpression _toExpression() throws ServiceException {
listaUoExpr.add(orExpr);
}

newExpression.or(listaUoExpr.toArray(new IExpression[listaUoExpr.size()]));
orExprExt.or(listaUoExpr.toArray(new IExpression[listaUoExpr.size()]));

newExpression.and(orExprExt);
addAnd = true;
}

Expand Down Expand Up @@ -562,6 +565,7 @@ public ISQLQueryObject toWhereCondition(ISQLQueryObject sqlQueryObject) throws S
if(this.idUo != null && !this.idUo.isEmpty()){
this.idUo.removeAll(Collections.singleton(null));


List<String> listaUoExpr = new ArrayList<String>();
for (IdUnitaOperativa uo : this.idUo) {
String orExpr = "";
Expand Down

0 comments on commit 595f677

Please sign in to comment.