Skip to content

Commit

Permalink
Ripristino firma fittizia variazioni
Browse files Browse the repository at this point in the history
  • Loading branch information
rosangela.pucciarelli committed Dec 19, 2016
1 parent 126d82b commit 9c2243a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Expand Up @@ -3858,6 +3858,10 @@ public OggettoBulk inizializzaBulkPerModifica(UserContext aUC,
V_mandato_reversaleBulk man_rev = (V_mandato_reversaleBulk) getHome( aUC, V_mandato_reversaleBulk.class ).findByPrimaryKey( new V_mandato_reversaleBulk(mandato.getEsercizio(), Numerazione_doc_contBulk.TIPO_MAN, mandato.getCd_cds_origine(), mandato.getPg_mandato_riemissione()));
if ( man_rev != null )
mandato.setV_man_rev( man_rev );
else
man_rev = (V_mandato_reversaleBulk) getHome( aUC, V_mandato_reversaleBulk.class ).findByPrimaryKey( new V_mandato_reversaleBulk(mandato.getEsercizio(), Numerazione_doc_contBulk.TIPO_MAN, mandato.getCd_cds(), mandato.getPg_mandato_riemissione()));
if ( man_rev != null )
mandato.setV_man_rev( man_rev );
}
} catch (Exception e) {
throw handleException(mandato, e);
Expand Down
Expand Up @@ -3042,6 +3042,10 @@ public OggettoBulk inizializzaBulkPerModifica (UserContext aUC,OggettoBulk bulk)
V_mandato_reversaleBulk man_rev = (V_mandato_reversaleBulk) getHome( aUC, V_mandato_reversaleBulk.class ).findByPrimaryKey( new V_mandato_reversaleBulk(reversale.getEsercizio(), Numerazione_doc_contBulk.TIPO_REV, reversale.getCd_cds_origine(), reversale.getPg_reversale_riemissione()));
if ( man_rev != null )
reversale.setV_man_rev( man_rev );
else
man_rev = (V_mandato_reversaleBulk) getHome( aUC, V_mandato_reversaleBulk.class ).findByPrimaryKey( new V_mandato_reversaleBulk(reversale.getEsercizio(), Numerazione_doc_contBulk.TIPO_REV, reversale.getCd_cds(), reversale.getPg_reversale_riemissione()));
if ( man_rev != null )
reversale.setV_man_rev( man_rev );
}
}catch ( Exception e )
{
Expand Down
@@ -1,8 +1,11 @@
package it.cnr.contab.pdg00.action;

import it.cnr.contab.config00.bulk.Parametri_cdsBulk;
import it.cnr.contab.firma.bulk.FirmaOTPBulk;
import it.cnr.contab.pdg00.bp.FirmaDigitalePdgVariazioniBP;
import it.cnr.contab.pdg00.bulk.ArchiviaStampaPdgVariazioneBulk;
import it.cnr.contab.utenze00.bp.CNRUserContext;
import it.cnr.contab.util.Utility;
import it.cnr.jada.action.ActionContext;
import it.cnr.jada.action.Forward;
import it.cnr.jada.action.HookForward;
Expand Down Expand Up @@ -67,10 +70,22 @@ public Forward doSign(ActionContext context) {

public Forward doSignOTP(ActionContext context) {
try {
FirmaDigitalePdgVariazioniBP bp = (FirmaDigitalePdgVariazioniBP)context.getBusinessProcess();
Parametri_cdsBulk parametriCds = Utility.createParametriCdsComponentSession().
getParametriCds(context.getUserContext(),
CNRUserContext.getCd_cds(context.getUserContext()),
CNRUserContext.getEsercizio(context.getUserContext()));
if (!parametriCds.getFl_kit_firma_digitale()){
bp.sign(context);
return context.findDefaultForward();
}
else
{
BulkBP firmaOTPBP = (BulkBP) context.createBusinessProcess("FirmaOTPBP");
firmaOTPBP.setModel(context, new FirmaOTPBulk());
context.addHookForward("firmaOTP",this,"doBackFirmaOTP");
return context.addBusinessProcess(firmaOTPBP);
}
} catch(Exception e) {
return handleException(context,e);
}
Expand Down

0 comments on commit 9c2243a

Please sign in to comment.