Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
16,060 additions
and
0 deletions.
There are no files selected for viewing
3,818 changes: 3,818 additions & 0 deletions
3,818
sigla-ejb/src/main/java/it/cnr/contab/ordmag/richieste/action/CRUDRichiestaUopAction.java
Large diffs are not rendered by default.
Oops, something went wrong.
830 changes: 830 additions & 0 deletions
830
sigla-ejb/src/main/java/it/cnr/contab/ordmag/richieste/bp/CRUDRichiestaUopBP.java
Large diffs are not rendered by default.
Oops, something went wrong.
122 changes: 122 additions & 0 deletions
122
...a-ejb/src/main/java/it/cnr/contab/ordmag/richieste/bp/RichiestaUopRigaCRUDController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
package it.cnr.contab.ordmag.richieste.bp; | ||
import java.io.IOException; | ||
|
||
import javax.servlet.jsp.JspWriter; | ||
|
||
import it.cnr.contab.docamm00.ejb.*; | ||
import it.cnr.contab.docamm00.docs.bulk.*; | ||
import it.cnr.contab.doccont00.core.bulk.MandatoBulk; | ||
import it.cnr.jada.action.*; | ||
import it.cnr.jada.bulk.*; | ||
import it.cnr.jada.util.action.SimpleCRUDBP; | ||
|
||
/** | ||
* Riga del documento generico passivo | ||
*/ | ||
|
||
public class RichiestaUopRigaCRUDController extends it.cnr.jada.util.action.SimpleDetailCRUDController { | ||
public RichiestaUopRigaCRUDController(String name, Class modelClass, String listPropertyName, it.cnr.jada.util.action.FormController parent) { | ||
super(name, modelClass, listPropertyName, parent); | ||
} | ||
|
||
public boolean isGrowable() { | ||
|
||
Documento_genericoBulk doc = (Documento_genericoBulk)getParentModel(); | ||
return super.isGrowable() && !((it.cnr.jada.util.action.CRUDBP)getParentController()).isSearching() && | ||
!doc.STATO_PAGATO.equalsIgnoreCase(doc.getStato_cofi()) && | ||
(!doc.isDoc1210Associato() || (doc.getLettera_pagamento_estero()!=null && doc.getLettera_pagamento_estero().getStato_trasmissione().compareTo(MandatoBulk.STATO_TRASMISSIONE_TRASMESSO)==0)); | ||
} | ||
|
||
public boolean isShrinkable() { | ||
|
||
Documento_genericoBulk doc = (Documento_genericoBulk)getParentModel(); | ||
return super.isShrinkable() && !((it.cnr.jada.util.action.CRUDBP)getParentController()).isSearching() && | ||
!doc.STATO_PAGATO.equalsIgnoreCase(doc.getStato_cofi()) && | ||
(!doc.isDoc1210Associato() || (doc.getLettera_pagamento_estero()!=null && doc.getLettera_pagamento_estero().getStato_trasmissione().compareTo(MandatoBulk.STATO_TRASMISSIONE_TRASMESSO)==0)); | ||
} | ||
|
||
public void validate(ActionContext context,OggettoBulk model) throws ValidationException { | ||
if (context.getCurrentCommand().equals("doContabilizzaObbligazioni")) | ||
return; | ||
try { | ||
if ((Documento_generico_rigaBulk)model!=null && (((Documento_generico_rigaBulk)model).getTerzo()==null || ((Documento_generico_rigaBulk)model).getTerzo().getAnagrafico()==null)) | ||
throw new ValidationException("Il campo anagrafica e' obbligatorio"); | ||
if ((Documento_generico_rigaBulk)model!=null && ((Documento_generico_rigaBulk)model).getDs_riga()==null) | ||
throw new ValidationException("Inserire una descrizione"); | ||
if ((Documento_generico_rigaBulk)model!=null && (((Documento_generico_rigaBulk)model).getIm_riga()==null || ((Documento_generico_rigaBulk)model).getIm_riga().compareTo(new java.math.BigDecimal(0))==0)) | ||
throw new ValidationException("Inserire un importo positivo"); | ||
if ((Documento_generico_rigaBulk)model!=null && ((Documento_generico_rigaBulk)model).getBanca()==null) | ||
throw new ValidationException("Inserire dei riferimenti bancari corretti"); | ||
((DocumentoGenericoComponentSession)(((SimpleCRUDBP)getParentController()).createComponentSession())).validaRiga(context.getUserContext(), (Documento_generico_rigaBulk)model); | ||
} catch (ValidationException e) { | ||
throw e; | ||
} catch (it.cnr.jada.comp.ApplicationException e) { | ||
throw new ValidationException(e.getMessage()); | ||
} catch (Throwable e) { | ||
throw new it.cnr.jada.DetailedRuntimeException(e); | ||
} | ||
} | ||
|
||
public void validateForDelete(ActionContext context, OggettoBulk detail) throws ValidationException { | ||
try { | ||
Documento_generico_rigaBulk riga = (Documento_generico_rigaBulk)detail; | ||
if (riga.getTi_associato_manrev() != null && riga.ASSOCIATO_A_MANDATO.equalsIgnoreCase(riga.getTi_associato_manrev())) | ||
throw new ValidationException("Impossibile eliminare il dettaglio \"" + | ||
((riga.getDs_riga() != null) ? | ||
riga.getDs_riga() : | ||
String.valueOf(riga.getProgressivo_riga().longValue())) + | ||
"\" perchè associato a mandato."); | ||
((DocumentoGenericoComponentSession)(((SimpleCRUDBP)getParentController()).createComponentSession())).eliminaRiga(context.getUserContext(), (Documento_generico_rigaBulk)detail); | ||
} catch (it.cnr.jada.comp.ApplicationException e) { | ||
throw new ValidationException(e.getMessage()); | ||
} catch (ValidationException e) { | ||
throw e; | ||
} catch (Throwable e) { | ||
throw new it.cnr.jada.DetailedRuntimeException(e); | ||
} | ||
} | ||
|
||
public void writeHTMLToolbar( | ||
javax.servlet.jsp.PageContext context, | ||
boolean reset, | ||
boolean find, | ||
boolean delete) throws java.io.IOException, javax.servlet.ServletException { | ||
|
||
super.writeHTMLToolbar(context, reset, find, delete); | ||
|
||
String command = "javascript:submitForm('doRicercaObbligazione')"; | ||
it.cnr.jada.util.jsp.JSPUtils.toolbarButton( | ||
context, | ||
"img/history16.gif", | ||
!(isInputReadonly() || getDetails().isEmpty() || ((CRUDRichiestaUopBP)getParentController()).isSearching())? command : null, | ||
true,"Contabilizza"); | ||
} | ||
@Override | ||
public void writeFormInput(JspWriter jspwriter, String s, String s1, | ||
boolean flag, String s2, String s3) throws IOException { | ||
|
||
Documento_genericoBulk doc=null; | ||
if(((it.cnr.jada.util.action.CRUDBP)getParentController()) instanceof CRUDRichiestaUopBP ){ | ||
if(((it.cnr.jada.util.action.CRUDBP)getParentController()).getModel()!=null) | ||
doc = (Documento_genericoBulk)((it.cnr.jada.util.action.CRUDBP)getParentController()).getModel(); | ||
if (doc!=null && | ||
doc.isRiportataInScrivania()&& | ||
!doc.isPagata()&& | ||
isInputReadonly()&& | ||
s1.equals("modalita_pagamento")){ | ||
getBulkInfo().writeFormInput(jspwriter, getModel(), s, s1, flag, s2, "onChange=\"submitForm('doOnModalitaPagamentoChange')\"", getInputPrefix(), getStatus(), getFieldValidationMap()); | ||
}else | ||
if (doc!=null && | ||
doc.isRiportataInScrivania()&& | ||
!doc.isPagata()&& | ||
isInputReadonly()&& | ||
s1.equals("listabanche")){ | ||
getBulkInfo().writeFormInput(jspwriter, getModel(), s, s1, flag, | ||
s2,"" , | ||
getInputPrefix(), getStatus(), getFieldValidationMap()); | ||
} | ||
else | ||
super.writeFormInput(jspwriter,s,s1,flag,s2,s3); | ||
} | ||
} | ||
} |
137 changes: 137 additions & 0 deletions
137
sigla-ejb/src/main/java/it/cnr/contab/ordmag/richieste/bulk/RichiestaUopBase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
/* | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Date 12/05/2017 | ||
*/ | ||
package it.cnr.contab.ordmag.richieste.bulk; | ||
import it.cnr.jada.persistency.Keyed; | ||
public class RichiestaUopBase extends RichiestaUopKey implements Keyed { | ||
// DATA_RICHIESTA TIMESTAMP(7) NOT NULL | ||
private java.sql.Timestamp dataRichiesta; | ||
|
||
// STATO DECIMAL(3,0) NOT NULL | ||
private java.lang.Integer stato; | ||
|
||
// DS_RICHIESTA VARCHAR(300) | ||
private java.lang.String dsRichiesta; | ||
|
||
// NOTA VARCHAR(2000) | ||
private java.lang.String nota; | ||
|
||
// CD_UNITA_OPERATIVA_DEST VARCHAR(30) NOT NULL | ||
private java.lang.String cdUnitaOperativaDest; | ||
|
||
// DATA_INVIO TIMESTAMP(7) | ||
private java.sql.Timestamp dataInvio; | ||
|
||
// DT_CANCELLAZIONE TIMESTAMP(7) | ||
private java.sql.Timestamp dtCancellazione; | ||
|
||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Table name: RICHIESTA_UOP | ||
**/ | ||
public RichiestaUopBase() { | ||
super(); | ||
} | ||
public RichiestaUopBase(java.lang.String cdCds, java.lang.String cdUnitaOperativa, java.lang.Integer esercizio, java.lang.String cdNumeratore, java.lang.Integer numero) { | ||
super(cdCds, cdUnitaOperativa, esercizio, cdNumeratore, numero); | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [dataRichiesta] | ||
**/ | ||
public java.sql.Timestamp getDataRichiesta() { | ||
return dataRichiesta; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [dataRichiesta] | ||
**/ | ||
public void setDataRichiesta(java.sql.Timestamp dataRichiesta) { | ||
this.dataRichiesta=dataRichiesta; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [stato] | ||
**/ | ||
public java.lang.Integer getStato() { | ||
return stato; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [stato] | ||
**/ | ||
public void setStato(java.lang.Integer stato) { | ||
this.stato=stato; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [dsRichiesta] | ||
**/ | ||
public java.lang.String getDsRichiesta() { | ||
return dsRichiesta; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [dsRichiesta] | ||
**/ | ||
public void setDsRichiesta(java.lang.String dsRichiesta) { | ||
this.dsRichiesta=dsRichiesta; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [nota] | ||
**/ | ||
public java.lang.String getNota() { | ||
return nota; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [nota] | ||
**/ | ||
public void setNota(java.lang.String nota) { | ||
this.nota=nota; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [cdUnitaOperativaDest] | ||
**/ | ||
public java.lang.String getCdUnitaOperativaDest() { | ||
return cdUnitaOperativaDest; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [cdUnitaOperativaDest] | ||
**/ | ||
public void setCdUnitaOperativaDest(java.lang.String cdUnitaOperativaDest) { | ||
this.cdUnitaOperativaDest=cdUnitaOperativaDest; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [dataInvio] | ||
**/ | ||
public java.sql.Timestamp getDataInvio() { | ||
return dataInvio; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [dataInvio] | ||
**/ | ||
public void setDataInvio(java.sql.Timestamp dataInvio) { | ||
this.dataInvio=dataInvio; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Restituisce il valore di: [dtCancellazione] | ||
**/ | ||
public java.sql.Timestamp getDtCancellazione() { | ||
return dtCancellazione; | ||
} | ||
/** | ||
* Created by BulkGenerator 2.0 [07/12/2009] | ||
* Setta il valore di: [dtCancellazione] | ||
**/ | ||
public void setDtCancellazione(java.sql.Timestamp dtCancellazione) { | ||
this.dtCancellazione=dtCancellazione; | ||
} | ||
} |
Oops, something went wrong.