-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nuova Stampa Bilancio Decisionale/Gestionale
- Loading branch information
1 parent
dc968a0
commit c31c6e1
Showing
12 changed files
with
511 additions
and
6 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
sigla-ejb/src/main/java/it/cnr/contab/prevent01/action/StampaPdgpBilancioAction.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,58 @@ | ||
/* | ||
* Created on Apr 26, 2005 | ||
* | ||
* To change the template for this generated file go to | ||
* Window>Preferences>Java>Code Generation>Code and Comments | ||
*/ | ||
package it.cnr.contab.prevent01.action; | ||
|
||
import it.cnr.contab.prevent01.bp.StampaPdgpBilancioBP; | ||
import it.cnr.jada.action.ActionContext; | ||
import it.cnr.jada.action.BusinessProcessException; | ||
import it.cnr.jada.action.Forward; | ||
|
||
/** | ||
* @author mspasiano | ||
* | ||
* To change the template for this generated type comment go to | ||
* Window>Preferences>Java>Code Generation>Code and Comments | ||
*/ | ||
public class StampaPdgpBilancioAction extends it.cnr.contab.reports.action.ParametricPrintAction { | ||
|
||
/** | ||
* | ||
*/ | ||
public StampaPdgpBilancioAction() { | ||
super(); | ||
} | ||
|
||
public Forward doOnTipoChange(ActionContext context) { | ||
try{ | ||
StampaPdgpBilancioBP bp = (StampaPdgpBilancioBP)context.getBusinessProcess(); | ||
fillModel(context); | ||
try { | ||
bp.loadModelBulkOptions(context); | ||
} catch (BusinessProcessException e) { | ||
return handleException(context, e); | ||
} | ||
return context.findDefaultForward(); | ||
}catch(it.cnr.jada.bulk.FillException ex){ | ||
return handleException(context, ex); | ||
} | ||
} | ||
|
||
public Forward doOnFonteChange(ActionContext context) { | ||
try{ | ||
StampaPdgpBilancioBP bp = (StampaPdgpBilancioBP)context.getBusinessProcess(); | ||
fillModel(context); | ||
try { | ||
bp.loadModelBulkOptions(context); | ||
} catch (BusinessProcessException e) { | ||
return handleException(context, e); | ||
} | ||
return context.findDefaultForward(); | ||
}catch(it.cnr.jada.bulk.FillException ex){ | ||
return handleException(context, ex); | ||
} | ||
} | ||
} |
116 changes: 116 additions & 0 deletions
116
sigla-ejb/src/main/java/it/cnr/contab/prevent01/bp/StampaPdgpBilancioBP.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,116 @@ | ||
package it.cnr.contab.prevent01.bp; | ||
|
||
import it.cnr.contab.config00.pdcfin.cla.bulk.Parametri_livelliBulk; | ||
import it.cnr.contab.prevent01.bulk.Stampa_pdgp_bilancioBulk; | ||
import it.cnr.contab.reports.bp.ParametricPrintBP; | ||
import it.cnr.contab.utenze00.bp.CNRUserContext; | ||
import it.cnr.contab.util.Utility; | ||
import it.cnr.jada.action.ActionContext; | ||
import it.cnr.jada.action.BusinessProcessException; | ||
import it.cnr.jada.bulk.OggettoBulk; | ||
|
||
|
||
public class StampaPdgpBilancioBP extends ParametricPrintBP { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = -3023075061400467210L; | ||
|
||
/** | ||
* StampaRendicontoFinanziarioBP constructor comment. | ||
*/ | ||
public StampaPdgpBilancioBP() { | ||
super(); | ||
} | ||
/** | ||
* StampaRendicontoFinanziarioBP constructor comment. | ||
* @param function java.lang.String | ||
*/ | ||
public StampaPdgpBilancioBP(String function) { | ||
super(function); | ||
} | ||
|
||
@Override | ||
public OggettoBulk initializeBulkForPrint(ActionContext context, OggettoBulk bulk) throws BusinessProcessException { | ||
try { | ||
OggettoBulk oggettoBulk = super.initializeBulkForPrint(context, bulk); | ||
if (oggettoBulk instanceof Stampa_pdgp_bilancioBulk) { | ||
((Stampa_pdgp_bilancioBulk) oggettoBulk).setEsercizio(CNRUserContext.getEsercizio(context.getUserContext())); | ||
((Stampa_pdgp_bilancioBulk) oggettoBulk).setTi_fonte(Stampa_pdgp_bilancioBulk.TIPO_DECISIONALE_SCIENTIFICO); | ||
((Stampa_pdgp_bilancioBulk) oggettoBulk).setTi_gestione(Stampa_pdgp_bilancioBulk.TIPO_GESTIONE_ENTRATA); | ||
|
||
loadModelBulkOptions(context, (Stampa_pdgp_bilancioBulk) oggettoBulk); | ||
} | ||
return oggettoBulk; | ||
}catch(Throwable e) { | ||
throw new BusinessProcessException(e); | ||
} | ||
} | ||
|
||
public void loadModelBulkOptions(ActionContext context) throws BusinessProcessException { | ||
try { | ||
OggettoBulk oggettoBulk = this.getModel(); | ||
if (oggettoBulk instanceof Stampa_pdgp_bilancioBulk) | ||
loadModelBulkOptions(context, (Stampa_pdgp_bilancioBulk) oggettoBulk); | ||
}catch(Throwable e) { | ||
throw new BusinessProcessException(e); | ||
} | ||
} | ||
|
||
private Stampa_pdgp_bilancioBulk loadModelBulkOptions(ActionContext context, Stampa_pdgp_bilancioBulk stampa) throws BusinessProcessException { | ||
try { | ||
stampa.setTi_livello(null); | ||
|
||
Parametri_livelliBulk parliv = Utility.createClassificazioneVociComponentSession().findParametriLivelli(context.getUserContext(), stampa.getEsercizio()); | ||
|
||
it.cnr.jada.util.OrderedHashtable livelliOptions = new it.cnr.jada.util.OrderedHashtable(); | ||
|
||
int index = 1; | ||
|
||
if (Stampa_pdgp_bilancioBulk.TIPO_DECISIONALE_SCIENTIFICO.equals(stampa.getTi_fonte())|| | ||
Stampa_pdgp_bilancioBulk.TIPO_GESTIONALE_SCIENTIFICO.equals(stampa.getTi_fonte())|| | ||
Stampa_pdgp_bilancioBulk.TIPO_STANZIAMENTO_SCIENTIFICO.equals(stampa.getTi_fonte())) { | ||
livelliOptions.put(index++, "Programma"); | ||
livelliOptions.put(index++, "Missione"); | ||
} | ||
|
||
if (Stampa_pdgp_bilancioBulk.TIPO_GESTIONE_ENTRATA.equals(stampa.getTi_gestione())) { | ||
if (parliv.getDs_livello1e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello1e()); | ||
if (parliv.getDs_livello2e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello2e()); | ||
if (parliv.getDs_livello3e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello3e()); | ||
if (parliv.getDs_livello4e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello4e()); | ||
if (parliv.getDs_livello5e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello5e()); | ||
if (parliv.getDs_livello6e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello6e()); | ||
if (parliv.getDs_livello7e()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello7e()); | ||
} else { | ||
if (parliv.getDs_livello1s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello1s()); | ||
if (parliv.getDs_livello2s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello2s()); | ||
if (parliv.getDs_livello3s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello3s()); | ||
if (parliv.getDs_livello4s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello4s()); | ||
if (parliv.getDs_livello5s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello5s()); | ||
if (parliv.getDs_livello6s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello6s()); | ||
if (parliv.getDs_livello7s()!=null) | ||
livelliOptions.put(index++, parliv.getDs_livello7s()); | ||
} | ||
|
||
stampa.setLivelliOptions(livelliOptions); | ||
}catch(Throwable e) { | ||
throw new BusinessProcessException(e); | ||
} | ||
return stampa; | ||
} | ||
} |
112 changes: 112 additions & 0 deletions
112
sigla-ejb/src/main/java/it/cnr/contab/prevent01/bulk/Stampa_pdgp_bilancioBulk.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,112 @@ | ||
/* | ||
* Created on Oct 4, 2005 | ||
* | ||
* To change the template for this generated file go to | ||
* Window>Preferences>Java>Code Generation>Code and Comments | ||
*/ | ||
package it.cnr.contab.prevent01.bulk; | ||
|
||
import java.util.Enumeration; | ||
import java.util.Iterator; | ||
|
||
import it.cnr.jada.bulk.OggettoBulk; | ||
|
||
/** | ||
* @author | ||
* | ||
* To change the template for this generated type comment go to | ||
* Window>Preferences>Java>Code Generation>Code and Comments | ||
*/ | ||
public class Stampa_pdgp_bilancioBulk extends OggettoBulk { | ||
|
||
private Integer esercizio; | ||
|
||
// Tipo gestione | ||
private String ti_gestione; | ||
|
||
// Tipo di stampa | ||
private String ti_fonte; | ||
|
||
// Tipo livello | ||
private String ti_livello; | ||
|
||
private it.cnr.jada.util.OrderedHashtable livelliOptions = new it.cnr.jada.util.OrderedHashtable(); | ||
|
||
public final static String TIPO_DECISIONALE_SCIENTIFICO = "DECSCI"; | ||
public final static String TIPO_GESTIONALE_SCIENTIFICO = "GESTSCI"; | ||
public final static String TIPO_STANZIAMENTO_SCIENTIFICO = "STASCI"; | ||
public final static String TIPO_DECISIONALE_FINANZIARIO = "DECFIN"; | ||
public final static String TIPO_GESTIONALE_FINANZIARIO = "GESTFIN"; | ||
public final static String TIPO_STANZIAMENTO_FINANZIARIO = "STAFIN"; | ||
|
||
public final static java.util.Dictionary ti_fonteKeys; | ||
|
||
static { | ||
ti_fonteKeys = new it.cnr.jada.util.OrderedHashtable(); | ||
ti_fonteKeys.put(TIPO_DECISIONALE_SCIENTIFICO,"Decisionale Scientifico"); | ||
ti_fonteKeys.put(TIPO_GESTIONALE_SCIENTIFICO,"Gestionale Scientifico"); | ||
ti_fonteKeys.put(TIPO_DECISIONALE_FINANZIARIO,"Decisionale Finanziario"); | ||
ti_fonteKeys.put(TIPO_GESTIONALE_FINANZIARIO,"Gestionale Finanziario"); | ||
}; | ||
|
||
public final static String TIPO_GESTIONE_ENTRATA = "E"; | ||
public final static String TIPO_GESTIONE_SPESA = "S"; | ||
|
||
public final static java.util.Dictionary ti_gestioneKeys; | ||
|
||
static { | ||
ti_gestioneKeys = new it.cnr.jada.util.OrderedHashtable(); | ||
ti_gestioneKeys.put(TIPO_GESTIONE_ENTRATA,"Entrata"); | ||
ti_gestioneKeys.put(TIPO_GESTIONE_SPESA,"Spesa"); | ||
}; | ||
|
||
public Stampa_pdgp_bilancioBulk() { | ||
super(); | ||
} | ||
|
||
|
||
public java.lang.Integer getEsercizio() { | ||
return esercizio; | ||
} | ||
public void setEsercizio(java.lang.Integer newEsercizio) { | ||
esercizio = newEsercizio; | ||
} | ||
|
||
public String getTi_gestione() { | ||
return ti_gestione; | ||
} | ||
public void setTi_gestione(String ti_gestione) { | ||
this.ti_gestione = ti_gestione; | ||
} | ||
|
||
public String getTi_fonte() { | ||
return ti_fonte; | ||
} | ||
public void setTi_fonte(String ti_fonte) { | ||
this.ti_fonte = ti_fonte; | ||
} | ||
|
||
public String getTi_livello() { | ||
return ti_livello; | ||
} | ||
public void setTi_livello(String ti_livello) { | ||
this.ti_livello = ti_livello; | ||
} | ||
|
||
public it.cnr.jada.util.OrderedHashtable getLivelliOptions() { | ||
return livelliOptions; | ||
} | ||
public void setLivelliOptions(it.cnr.jada.util.OrderedHashtable livelliOptions) { | ||
this.livelliOptions = livelliOptions; | ||
} | ||
|
||
public Integer getNr_livello() { | ||
Enumeration a = livelliOptions.keys(); | ||
while (a.hasMoreElements()) { | ||
Integer key = (Integer) a.nextElement(); | ||
if (livelliOptions.get(key).equals(ti_livello)) | ||
return key; | ||
} | ||
return 1; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
sigla-ejb/src/main/java/it/cnr/contab/prevent01/bulk/Stampa_pdgp_bilancioHome.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,19 @@ | ||
package it.cnr.contab.prevent01.bulk; | ||
|
||
import it.cnr.jada.bulk.BulkHome; | ||
|
||
/** | ||
* Insert the type's description here. | ||
* Creation date: (26/03/2003 10.28.22) | ||
* @author: Gennaro Borriello | ||
*/ | ||
public class Stampa_pdgp_bilancioHome extends BulkHome { | ||
|
||
public Stampa_pdgp_bilancioHome(Class clazz, java.sql.Connection conn) { | ||
super(clazz, conn); | ||
} | ||
|
||
public Stampa_pdgp_bilancioHome(Class clazz, java.sql.Connection conn, it.cnr.jada.persistency.PersistentCache persistentCache) { | ||
super(clazz, conn, persistentCache); | ||
} | ||
} |
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
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
Oops, something went wrong.