Fix DBCFX_RU_362 - Adeguamento logica silenzio assenso e isNP del.82
This commit is contained in:
@@ -196,17 +196,25 @@ public class RequestManagerDonor82 {
|
||||
int statoDa = richiesta.getStato().intValue();
|
||||
|
||||
if (check != StateManagerDonor.TRANSIZIONE_NON_POSSIBILE) {
|
||||
log.write("9999", "Passaggio di stato in RIFIUTATA ID RICHIESTA " + richiesta.getIdRichiesta());
|
||||
richiesta.setStato((long) StatoRichiestaDon.RIFIUTATA);
|
||||
richiesta.setCodValidazione((long) ApplicationCostants.COD_VALIDAZIONE_KO);
|
||||
//scadere dei 2 gg
|
||||
if (statoDa == StatoRichiestaDon.ATTESA_VERIFICA && richiesta.getDfw().after(new Date())) {
|
||||
log.write("9999", "Passaggio di stato in RIFIUTATA ID RICHIESTA " + richiesta.getIdRichiesta());
|
||||
richiesta.setStato((long) StatoRichiestaDon.RIFIUTATA);
|
||||
richiesta.setCodValidazione((long) ApplicationCostants.COD_VALIDAZIONE_KO);
|
||||
|
||||
// Notifica a OLO
|
||||
OLOControllerDonor.getInstance().accodaKORichiestaOloDonorOut(richiesta,
|
||||
descrizioneRifiuto,
|
||||
codMotivoRifiuto,
|
||||
ApplicationCostants.PROCESSO_DONOR.OLO_OUT.CAUSALE_RIFIUTO_GESTIONALE,
|
||||
ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_GESTIONALI);
|
||||
logStoricoPassaggioStato(richiesta.getIdRichiesta(), statoDa, StatoRichiestaDon.RIFIUTATA, log);
|
||||
// Notifica a OLO
|
||||
OLOControllerDonor.getInstance().accodaKORichiestaOloDonorOut(richiesta,
|
||||
descrizioneRifiuto,
|
||||
codMotivoRifiuto,
|
||||
ApplicationCostants.PROCESSO_DONOR.OLO_OUT.CAUSALE_RIFIUTO_GESTIONALE,
|
||||
ApplicationCostants.OLO_TIPO_COMUNICAZIONE_VER_GESTIONALI);
|
||||
logStoricoPassaggioStato(richiesta.getIdRichiesta(), statoDa, StatoRichiestaDon.RIFIUTATA, log);
|
||||
}
|
||||
//scadono i 2 giorni come 274
|
||||
else {
|
||||
log.write("9999", "Passaggio di stato in RIFIUTATA non effettuato perche DFW scaduta: ID RICHIESTA " + richiesta.getIdRichiesta());
|
||||
richiesta.setKoNonInviato(ApplicationCostants.PROCESSO_DONOR.KO_NON_INVIATO);
|
||||
}
|
||||
dao.merge(richiesta);
|
||||
} else if (statoDa == StatoRichiestaDon.ACCETTATA) {
|
||||
log.write("9999", "Passaggio di stato in RIFIUTATA non effettuato perche richiesta gia in ACCETTATA: ID RICHIESTA " + richiesta.getIdRichiesta());
|
||||
|
||||
@@ -1700,7 +1700,8 @@ public class DBSSFormatController extends FormatController {
|
||||
|
||||
notifyOut.setSistComp("D");
|
||||
notifyOut.setCodiceSegreto(richiesta.getCos());
|
||||
notifyOut.setDirectoryNumber(richiesta.getDn());
|
||||
//notifyOut.setDirectoryNumber(richiesta.getDn());
|
||||
notifyOut.setDirectoryNumber(nowIn.getNpDn1());
|
||||
notifyOut.setIdOperatoreDonating(richiesta.getCowDonating());
|
||||
notifyOut.setCognomeCliente(richiesta.getCognomeCliente());
|
||||
|
||||
@@ -1717,19 +1718,24 @@ public class DBSSFormatController extends FormatController {
|
||||
}
|
||||
|
||||
String aggiuntivi = "";
|
||||
if (!Func.isNull(richiesta.getDn2())) aggiuntivi += richiesta.getDn2() + ";";
|
||||
if (!Func.isNull(richiesta.getDn3())) aggiuntivi += richiesta.getDn3() + ";";
|
||||
if (!Func.isNull(richiesta.getDn4())) aggiuntivi += richiesta.getDn4() + ";";
|
||||
if (!Func.isNull(richiesta.getDn5())) aggiuntivi += richiesta.getDn5() + ";";
|
||||
if (!Func.isNull(richiesta.getDn6())) aggiuntivi += richiesta.getDn6() + ";";
|
||||
if (!Func.isNull(richiesta.getDn7())) aggiuntivi += richiesta.getDn7() + ";";
|
||||
if (!Func.isNull(richiesta.getDn8())) aggiuntivi += richiesta.getDn8() + ";";
|
||||
if (!Func.isNull(richiesta.getDn9())) aggiuntivi += richiesta.getDn9() + ";";
|
||||
if (!Func.isNull(richiesta.getDn10())) aggiuntivi += richiesta.getDn10() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn2())) aggiuntivi += nowIn.getNpDn2() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn3())) aggiuntivi += nowIn.getNpDn3() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn4())) aggiuntivi += nowIn.getNpDn4() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn5())) aggiuntivi += nowIn.getNpDn5() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn6())) aggiuntivi += nowIn.getNpDn6() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn7())) aggiuntivi += nowIn.getNpDn7() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn8())) aggiuntivi += nowIn.getNpDn8() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn9())) aggiuntivi += nowIn.getNpDn9() + ";";
|
||||
if (!Func.isNull(nowIn.getNpDn10())) aggiuntivi += nowIn.getNpDn10() + ";";
|
||||
if (aggiuntivi.endsWith(";")) aggiuntivi = aggiuntivi.substring(0, aggiuntivi.length()-1);
|
||||
if (!aggiuntivi.equals("")) notifyOut.setAggiuntivi(aggiuntivi);
|
||||
|
||||
notifyOut.setFlagNp("N");
|
||||
// TODO adeguamento IS NP se ci sono num metto ad Y else a N
|
||||
if (nowIn.getNpDn1() != null) {
|
||||
notifyOut.setFlagNp("Y");
|
||||
} else {
|
||||
notifyOut.setFlagNp("N");
|
||||
}
|
||||
|
||||
notifyOut.setSistComp(richiesta.getCrmCompetenza());
|
||||
|
||||
@@ -1742,7 +1748,7 @@ public class DBSSFormatController extends FormatController {
|
||||
notifyOut.setCow(richiesta.getCowDonating());
|
||||
notifyOut.setIdOperatoreDonor("TLC");
|
||||
notifyOut.setCodiceOloRecipient(nowIn.getCodiceOperatoreRecipient());
|
||||
//notifyOut.setCor(richiesta.getCor());
|
||||
notifyOut.setCor(richiesta.getCor());
|
||||
notifyOut.setCodiceSessione(richiesta.getCodiceSessione());
|
||||
return notifyOut;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,13 @@ import it.valueteam.gnp.obj.jms.UniqueIdNotificationMessage;
|
||||
import it.valueteam.gnp.utility.DateUtils;
|
||||
import it.valueteam.gnp.utility.Resources;
|
||||
import it.valueteam.gnp.utility.UserTransactionUtility;
|
||||
import org.hibernate.Criteria;
|
||||
import org.hibernate.criterion.Order;
|
||||
import org.hibernate.criterion.Restrictions;
|
||||
import weblogic.jws.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* MsgDonatingPortTypeImpl class implements web service endpoint interface MsgDonatingPortType */
|
||||
@@ -81,7 +85,16 @@ public class MsgDonatingPortTypeImpl implements MsgDonatingPortType, Loggable {
|
||||
UserTransaction utx;
|
||||
GnpNowD82RichiesteInDAO richiesteInDAO = new GnpNowD82RichiesteInDAO();
|
||||
GnpNowD82RichiesteIn richiesteIn = new GnpNowD82RichiesteIn();
|
||||
GnpNowD82RichiesteIn richN8 = (GnpNowD82RichiesteIn) richiesteInDAO.findByProperty("codiceOrdineWhs", request.getCODICE_ORDINE_WHS()).get(0);
|
||||
//estraggo rich. n8 per portarle poi in n10
|
||||
Criteria criteria = richiesteInDAO.getSession().createCriteria("it.valueteam.gnp.dao.db.hb.GnpNowD82RichiesteIn");
|
||||
criteria.add(Restrictions.eq("codiceOrdineWhs", richiesteIn.getCodiceOrdineWhs()));
|
||||
criteria.addOrder(Order.desc("dataRicezione"));
|
||||
List<GnpNowD82RichiesteIn> richiesteN8 = (List<GnpNowD82RichiesteIn>) richiesteInDAO.findByCriteria(criteria.list());
|
||||
GnpNowD82RichiesteIn richN8 = null;
|
||||
|
||||
if (richiesteN8 != null && richiesteN8.size() > 0) {
|
||||
richN8 = (GnpNowD82RichiesteIn) richiesteInDAO.findByProperty("codiceOrdineWhs", request.getCODICE_ORDINE_WHS()).get(0);
|
||||
}
|
||||
|
||||
try {
|
||||
utx = UserTransactionUtility.beginUserTransaction();
|
||||
@@ -115,7 +128,43 @@ public class MsgDonatingPortTypeImpl implements MsgDonatingPortType, Loggable {
|
||||
richiesteIn.setDataEspletamento(DateUtils.toDate(request.getDATA(), "yyyy-MM-dd"));
|
||||
}
|
||||
}
|
||||
richiesteIn.setIdRichiestaD82(richN8.getIdRichiestaD82());
|
||||
//TODO gestione Numerazioni Fase 3
|
||||
//porto le num di n8 su n10
|
||||
if (richN8 != null) {
|
||||
if (richN8.getNpDn1() != null) {
|
||||
richiesteIn.setNpDn1(richN8.getNpDn1());
|
||||
}
|
||||
if (richN8.getNpDn2() != null) {
|
||||
richiesteIn.setNpDn2(richN8.getNpDn2());
|
||||
}
|
||||
if (richN8.getNpDn3() != null) {
|
||||
richiesteIn.setNpDn3(richN8.getNpDn3());
|
||||
}
|
||||
if (richN8.getNpDn4() != null) {
|
||||
richiesteIn.setNpDn4(richN8.getNpDn4());
|
||||
}
|
||||
if (richN8.getNpDn5() != null) {
|
||||
richiesteIn.setNpDn5(richN8.getNpDn5());
|
||||
}
|
||||
if (richN8.getNpDn6() != null) {
|
||||
richiesteIn.setNpDn6(richN8.getNpDn6());
|
||||
}
|
||||
if (richN8.getNpDn7() != null) {
|
||||
richiesteIn.setNpDn7(richN8.getNpDn7());
|
||||
}
|
||||
if (richN8.getNpDn8() != null) {
|
||||
richiesteIn.setNpDn8(richN8.getNpDn8());
|
||||
}
|
||||
if (richN8.getNpDn9() != null) {
|
||||
richiesteIn.setNpDn9(richN8.getNpDn9());
|
||||
}
|
||||
if (richN8.getNpDn10() != null) {
|
||||
richiesteIn.setNpDn10(richN8.getNpDn10());
|
||||
}
|
||||
richiesteIn.setIdRichiestaD82(richN8.getIdRichiestaD82());
|
||||
} else {
|
||||
log.write("9999", "richN8 non trovata");
|
||||
}
|
||||
richiesteInDAO.save(richiesteIn);
|
||||
UserTransactionUtility.endUserTransaction(utx, true);
|
||||
} catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user