Compare commits

...

10 Commits

Author SHA1 Message Date
manuelstefanile
c0ff461073 DBCFX_RIL_1052 - Ril. DBCFX_SM_705 - GATEWAY DBCFX || R1D-24-0665 || CVM_KPI per analisi destinazione olo fisso - BU (fix data) 2025-07-24 08:35:37 +02:00
manuelstefanile
e604d9b18b DBCFX_RIL_1051 - Ril. DBCFX_RU_376 - Configurazioni per evoluzione/adeguamento Offerta Fisso (2Q 2025) //ordinamento GO 2025-07-24 07:19:59 +02:00
Salvatore Maisto
4dacf78bd3 Merge branch 'branch_C06_2025' into 'master'
Merge Branch c06 2025 into Master

See merge request dbc/dbcfx!1
2025-07-16 08:40:28 +02:00
manuelstefanile
25e49616ee DBCFX_RIL_1050 - Ril. DBCFX_SM_702 - Del. 82 TIM Donating - Invio scarto errato 2025-06-17 17:50:18 +02:00
manuelstefanile
b603345e14 DBCFX_RIL_1049 - Ril. DBCFX_RU_377 - 328134 CVM_KPI per analisi destinazione olo fisso - BU 2025-06-13 18:36:28 +02:00
manuelstefanile
a020fbbda2 DBCFX_RIL_1048 - DBCFX_SM_703 - Del.82 TIM Donating - DES errata sul cruscotto 2025-06-13 06:32:58 +02:00
manuelstefanile
6f17485b8d DBCFX_RIL_1047 - Ril. DBCFX_SM_700 - Mancata informazione olo recipient su uscite delibera 82 2025-05-26 23:44:28 +02:00
manuelstefanile
5fce48960b Commento
Ril. DBCFX_SM_699 - Del. 82 Business - Notifiche di N10 verso CRMB; invio del COR in assenza di DN1 da NOW
2025-03-12 11:37:16 +01:00
manuelstefanile
fa34956759 Ril. DBCFX_SM_699 - Del. 82 Business - Notifiche di N10 verso CRMB; invio del COR in assenza di DN1 da NOW 2025-03-12 11:29:35 +01:00
manuelstefanile
0c2e6e3f8a Ril. DBCFX_RU_375 - DBCFX - Modifica flussi Cubo Saldi Netti (Consumer e Business) - gestione scarti valore fittizio n.d 2025-03-12 10:37:34 +01:00
18 changed files with 566 additions and 10 deletions

View File

@@ -0,0 +1,11 @@
########################### INVIO FILE A EDL OLO DESTINAZIONE DONOR ###########################
#header edl Donor
EDL_DONOR_HEADER=AMBITO;LINEA;DATA_CESSAZIONE;OLO_DESTINAZIONE;DELIBERA
EDL_DONOR_OUT_PATH=/gnpapp/batch/ftpout/edl_olo_dest/
#estensione dei file da inviare a EDL
EDL_DONOR_FILENAME_EXT=.csv
#Prefisso dei file per EDL
EDL_DONOR_FILENAME_PREFIX=DBCFX_EDL_
EDL_DONOR_UNATANTUM_FILENAME_PREFIX=DBCFX_EDL_I_
EDL_DONOR_GIORNI_DELTA=1
EDL_DONOR_START_FULL=01/01/2024

View File

@@ -0,0 +1,21 @@
##############
#EDL
##############
# CONFIGURAZIONE PER PUT SU Enterpries_Data_Lake
PUT.LOCAL.PATH.EDL=/gnpapp/batch/ftpout/edl_olo_dest
PUT.LOCAL.BACKUP.PATH.EDL=/gnpapp/batch/backup_out/edl_olo_dest
# Estensione files da inviare verso EDL (POSSONO ESSERE PIU' DI UNA DELIMITATE DA ";")
PUT.EXTENSION.EDL=.csv
PUT.IDENTITY.EDL=/bea/.ssh/id_rsa
PUT.PASSPHRASE.EDL=bea
PUT.USERNAME.EDL=bea
PUT.HOST.EDL=10.192.65.18
PUT.PORT.EDL=22
PUT.KNOWN_HOSTS.EDL=/bea/.ssh/known_hosts
PUT.REMOTE_PATH.EDL=/home/bea/temp/edl
PUT.RENAMECTR.EDL=NO
PUT.RENAMECTR.SUFFIX.EDL=
PUT_SENDCTR.EDL=YES
# TIMEOUT IN MILLISECONDI (10000 = 10sec, 1800000 = 30min)
PUT.CONNECT.TIMEOUT.EDL=30000
##############

View File

@@ -44,7 +44,8 @@ public class SFTPPutDaemon {
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.PDC) //ADD PDC RU_352
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.CRMB) //ADD CRMB RU_XXX
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.DWHE2E_REPOSALDINETTI_CO) //ADD DHWE2E_REPOSALDINETTI
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.DWHE2E_REPOSALDINETTI_BU)){
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.DWHE2E_REPOSALDINETTI_BU)
&& !idSistemaRemoto.equalsIgnoreCase(ApplicationConstants.EDL)){ //ADD EDL RU_377
log.fatal("Sistema remoto sconosciuto: "+idSistemaRemoto);
}
initConfig(idSistemaRemoto);

View File

@@ -22,6 +22,7 @@ public class ApplicationConstants {
public static final String NOW_NGA = "NOW_NGA"; // Utilizzato per la GET da NOW dei servizi NGA
public static final String DWHE2E_REPOSALDINETTI_CO = "DWHE2E_REPOSALDINETTI_CO";
public static final String DWHE2E_REPOSALDINETTI_BU = "DWHE2E_REPOSALDINETTI_BU";
public static final String EDL="EDL";
public static final String EXTENSION_CTR = "ctr";
public static final String EXTENSION_GZ = "gz";

View File

@@ -371,5 +371,34 @@ public class GnpRichiesteCsNpg103DAO extends BaseHibernateDAO{
}
}
public List<GnpRichiesteCsNpg103> getEdlEspletamentoDel103(String tipoEstrazione, String param) {
try {
String sqlQuery = "SELECT " +
"A.* "+
"FROM GNP_RICHIESTE_CS_NPG103 A " +
"WHERE A.STATO ='5' " +
"AND PIATTAFORMA_COMPETENZA IN ('D','B') ";
if("FULL".equalsIgnoreCase(tipoEstrazione)) {
sqlQuery = sqlQuery + "AND A.DAC >= TO_DATE(:param,'DD/MM/YYYY') ";
} else {
sqlQuery = sqlQuery + "AND A.DAC >= TRUNC(sysdate - :param) ";
}
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("A", GnpRichiesteCsNpg103.class);
hqlQuery.setParameter("param", param);
return hqlQuery.list();
} catch (RuntimeException re) {
log.error("get GNP_RICHIESTE_CS_NPG103 query failed", re);
throw re;
}finally {
closeSession();
}
}
}

View File

@@ -272,5 +272,34 @@ public class GnpRichiesteDonNatOloDAO extends BaseHibernateDAO{
}
}
public List<GnpRichiesteDonNatOlo> getEdlEspletamentoDel103NatOlo(String tipoEstrazione, String param) {
try {
String sqlQuery = "SELECT " +
"A.* "+
"FROM GNP_RICHIESTE_DON_NAT_OLO A " +
"WHERE A.STATO ='5' " +
"AND PIATTAFORMA_COMPETENZA IN ('D','B') ";
if("FULL".equalsIgnoreCase(tipoEstrazione)) {
sqlQuery = sqlQuery + "AND A.DAC >= TO_DATE(:param,'DD/MM/YYYY') ";
} else {
sqlQuery = sqlQuery + "AND A.DAC >= TRUNC(sysdate - :param) ";
}
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("A", GnpRichiesteDonNatOlo.class);
hqlQuery.setParameter("param", param);
return hqlQuery.list();
} catch (RuntimeException re) {
log.error("get GNP_RICHIESTE_DON_NAT_OLO query failed", re);
throw re;
}finally {
closeSession();
}
}
}

View File

@@ -540,5 +540,38 @@ public class GnpRichiesteDonor82DAO extends BaseHibernateDAO{
closeSession();
}
}
public List getEdlEspletamentoDel82(String tipoEstrazione, String param) {
try {
String sqlQuery = "SELECT " +
"A.*, B.* "+
"FROM GNP_RICHIESTE_D82 A, GNP_NOW_D82_RICHIESTE_IN B " +
"WHERE A.ID_RICHIESTA = B.ID_RICHIESTA_D82 " +
"AND B.DATA_ESPLETAMENTO IS NOT NULL " +
"AND B.TIPO_NOTIFICA = 'N10' " +
"AND B.TIPO_EVENTO = '0' " +
"AND CRM_COMPETENZA IN ('D','B') ";
if("FULL".equalsIgnoreCase(tipoEstrazione)) {
sqlQuery = sqlQuery + "AND B.DATA_ESPLETAMENTO >= TO_DATE(:param,'DD/MM/YYYY') ";
} else {
sqlQuery = sqlQuery + "AND B.DATA_ESPLETAMENTO >= TRUNC(sysdate - :param) ";
}
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("A", GnpRichiesteDonor82.class)
.addEntity("B", GnpNowD82RichiesteIn.class);
hqlQuery.setParameter("param", param);
return hqlQuery.list();
} catch (RuntimeException re) {
log.error("get join GNP_RICHIESTE_D82 and GNP_NOW_D82_RICHIESTE_IN query failed", re);
throw re;
}finally {
closeSession();
}
}
}

View File

@@ -510,5 +510,33 @@ public class GnpRichiesteDonorDAO extends BaseHibernateDAO{
closeSession();
}
}
public List<GnpRichiesteDonor> getEdlEspletamentoDel274(String tipoEstrazione, String param) {
try {
String sqlQuery = "SELECT " +
"A.* "+
"FROM GNP_RICHIESTE_DONOR A " +
"WHERE A.STATO ='4' " +
"AND CRM_COMPETENZA IN ('B','D') ";
if("FULL".equalsIgnoreCase(tipoEstrazione)) {
sqlQuery = sqlQuery + "AND A.DAC >= TO_DATE(:param,'DD/MM/YYYY') ";
} else {
sqlQuery = sqlQuery + "AND A.DAC >= TRUNC(sysdate - :param) ";
}
Query hqlQuery = getSession().createSQLQuery(sqlQuery).addEntity("A", GnpRichiesteDonor.class);
hqlQuery.setParameter("param", param);
return hqlQuery.list();
} catch (RuntimeException re) {
log.error("get join GNP_RICHIESTE query failed", re);
throw re;
}finally {
closeSession();
}
}
}

View File

@@ -43,7 +43,7 @@ public class Dwhe2eRepoSaldiNettiIn extends InternalSenderProcess implements Log
private static final String DEL_103_STD_VOIP_TIPOUSCITA = "Uscite 103 Standard o VOIP";
private static final String DATACESSAZIONE_FORMAT = new String("yyyy-MM-dd");
private static final String REGEXP_SALDINETTI_LINE = "^([^;]{0,50});([^;]{0,15});([^;]{0,50});((\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01]))|);([^;]{0,1000});([^;]{0,1000});([^;]{0,1000});([^;]{0,1000});([^;]{0,1000});([^;]{0,1000})$";
private static final String NONDISPONIBILE = "[n.d]";
private static final String NONDISPONIBILE = "n.d";
private static final String REGEXP_ID_RICHIESTA = "\\d+";
//variabible usata per associare ad ogni nome file il proprio numero di righe e di errori

View File

@@ -0,0 +1,322 @@
package it.valueteam.gnp.internalflow.out;
import it.valueteam.crontab.processexecutor.ProcessIF;
import it.valueteam.gnp.dao.db.hb.*;
import it.valueteam.gnp.log.Loggable;
import it.valueteam.gnp.log.ProcessLogger;
import it.valueteam.gnp.obj.LogInfo;
import it.valueteam.gnp.obj.LogProcess;
import it.valueteam.gnp.utility.DateUtils;
import it.valueteam.gnp.utility.Resources;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
public class EdlEspletamentoOut extends InternalSenderProcess implements Loggable, ProcessIF {
private ProcessLogger log;
//TODO EDL verificare il codice processo
private static final String codiceProcesso = "IG";
private static final String versione = "1.0.0";
private static final char separator = ';';
// pattern della data per il nome del file csv da inviare
private static final String DATE_PATTERN_FILE_NAME = "yyyyMMdd";
private static final String DATE_PATTERN_DD_MM_YYYY = "yyyy-MM-dd";
//pattern date per campi file
private static final String ESTRAZIONE_FULL = "FULL";
private static final String ESTRAZIONE_DELTA = "DELTA";
private static final String DELIBERA_82 = "Del. 82";
private static final String DELIBERA_274 = "Del. 274";
private static final String DELIBERA_103 = "Del. 103_NP";
private static final String DELIBERA_103NATOLO = "Del. 103_NatOLO";
private static final String BUSINESS = "BU";
private static final String CONSUMER = "CO";
/**
* EdlEspletmentoOut
*
* @throws Exception
*/
public EdlEspletamentoOut() throws Exception {
super();
try {
LogProcess logProcess = new LogProcess();
logProcess.setCodice(codiceProcesso);
logProcess.setProcess(this);
log = new ProcessLogger(logProcess);
} catch (Exception ex) {
System.out.println("Errore nella creazione del ProcessLogger");
throw ex;
}
}
/**
* Interfaccia ProcessExecutor
* Ritorniamo sempre false perche' gestiamo le TX internamente
*
* @return boolean
*/
public boolean requiredTX() {
return false;
}
/**
* getLogInfo
*
* @return LogInfo
*/
public LogInfo getLogInfo() {
LogInfo logInfo = new LogInfo();
logInfo.setProcess(getClass().getName());
logInfo.setLogPath(Resources.getLogPath());
logInfo.setTypeInfo(Resources.getTypeInfo());
logInfo.setTypeDebug(Resources.getTypeDebug());
logInfo.setTypeError(Resources.getTypeError());
return logInfo;
}
/**
* Inizia il processo di creazione del file
*
* @param args String[]
*/
public void execute(String[] args) throws Exception {
log.write("9999", " Enterprise_Lake (EDL) ");
try {
if (args.length == 1 && (ESTRAZIONE_FULL.equalsIgnoreCase(args[0]) || ESTRAZIONE_DELTA.equalsIgnoreCase(args [0])))
generaFile(args[0]);
else {
log.write("9999", "Creazione file non eseguita. Inserire parametro (FULL o DELTA)");
}
} catch (Exception ex) {
//0003 C - PROCESSO TERMINATO CON ECCEZIONI
log.write("0003", "" + ex.toString());
ex.printStackTrace();
//Termino l'esecuzione ritornando un errore a chi mi ha eseguito
throw ex;
}
}
/**
* Genera il file per Enterprise_Lake
* @param arg String
*/
private void generaFile(String arg) throws Exception {
log.write("0001", " versione " + versione);
GnpRichiesteDonor82DAO donor82DAO = new GnpRichiesteDonor82DAO();
GnpRichiesteDonorDAO donorDAO = new GnpRichiesteDonorDAO();
GnpRichiesteCsNpg103DAO donorNpg103DAO = new GnpRichiesteCsNpg103DAO();
GnpRichiesteDonNatOloDAO donorNatOlo103DAO = new GnpRichiesteDonNatOloDAO();
String resourceParam = null;
List donorDelibera82 = null;
List<GnpRichiesteDonor> donorDelibera274 = null;
List<GnpRichiesteCsNpg103> donorDelibera103 = null;
List<GnpRichiesteDonNatOlo> donorDelibera103NativiOlo = null;
if(ESTRAZIONE_FULL.equalsIgnoreCase(arg)) {
resourceParam = Resources.getEDL_DONOR_START_FULL();
} else {
resourceParam = Resources.getEDL_DONOR_GIORNI_DELTA();
}
try {
donorDelibera82 = donor82DAO.getEdlEspletamentoDel82(arg,resourceParam);
donorDelibera274 = donorDAO.getEdlEspletamentoDel274(arg,resourceParam);
donorDelibera103 = donorNpg103DAO.getEdlEspletamentoDel103(arg,resourceParam);
donorDelibera103NativiOlo = donorNatOlo103DAO.getEdlEspletamentoDel103NatOlo(arg,resourceParam);
//TODO log
log.write("9999","------------ Start Liste size ------------");
log.write("9999", " Lista Delibera 82 numerazioni espletatate size = " + donorDelibera82!=null?String.valueOf(donorDelibera82.size()):"0");
log.write("9999", " Lista Delibera 274 numerazioni espletatate size = " + donorDelibera274!=null?String.valueOf(donorDelibera274.size()):"0");
log.write("9999", " Lista Delibera 103 standard numerazioni espletatate size = " + donorDelibera103!=null?String.valueOf(donorDelibera103.size()):"0");
log.write("9999", " Lista Delibera 103 NatOLO numerazioni espletatate size = " + donorDelibera103NativiOlo!=null?String.valueOf(donorDelibera103NativiOlo.size()):"0");
log.write("9999","------------ End Liste size ------------");
} catch (Exception ex) {
log.write("0003", "ERRORE NEL RECUPERO DEI DATI PER EDL " + ex.toString());
}
String fileName = getNomeFile(arg);
String filePath = Resources.getEDL_DONOR_OUT_PATH();
log.write("9999", "INIZIO CREAZIONE FILE " + fileName);
openFile(fileName, filePath);
//scrivo l'header
String campiHead = Resources.getEDL_DONOR_HEADER();
writeRecord(campiHead);
scritturaDonorSuFile(donorDelibera82,donorDelibera274,donorDelibera103,donorDelibera103NativiOlo);
log.write("9999", "CREATO FILE " + filePath + fileName);
// Chiudi il file e crea il file di sincronizzazione
closeFile(true);
}
private void scritturaDonorSuFile(List listaDonorDelibera82, List listaDonorDelibera274, List listaDonorDelibera103, List listaDonorDelibera103NativiOlo) throws Exception {
Iterator it;
String recordGenerato;
String crmCompetenza, dn, dataEspletamento, codiceOloRecipient;
if(listaDonorDelibera82!=null && listaDonorDelibera82.size()>0) {
log.write("9999","------------ Start Del. 82 ------------");
for (Object o : listaDonorDelibera82) {
Object[] ob = (Object[]) o;
GnpRichiesteDonor82 gnpRichiesteDonor82 = (GnpRichiesteDonor82) ob[0];
GnpNowD82RichiesteIn gnpNowD82RichiesteIn = (GnpNowD82RichiesteIn) ob[1];
crmCompetenza = mappincCrm(gnpRichiesteDonor82.getCrmCompetenza());
dn = gnpRichiesteDonor82.getDn() != null ? gnpRichiesteDonor82.getDn().toString() : "";
dataEspletamento = gnpNowD82RichiesteIn.getDataEspletamento() != null ? DateUtils.toString(gnpNowD82RichiesteIn.getDataEspletamento(), DATE_PATTERN_DD_MM_YYYY) : "";
codiceOloRecipient = gnpNowD82RichiesteIn.getCodiceOperatoreRecipient() != null ? gnpNowD82RichiesteIn.getCodiceOperatoreRecipient().toString() : "";
List<String> valori = new ArrayList<String>();
valori.add(crmCompetenza);
valori.add(dn);
valori.add(dataEspletamento);
valori.add(codiceOloRecipient);
valori.add(DELIBERA_82);
recordGenerato = generaRecord(valori);
writeRecord(recordGenerato);
stampaRecord(crmCompetenza,dn,dataEspletamento,codiceOloRecipient,DELIBERA_82);
}
log.write("9999","------------ End Del. 82 ------------");
}
if(listaDonorDelibera274!= null && listaDonorDelibera274.size()>0){
log.write("9999","------------ Start Del. 274 ------------");
it = listaDonorDelibera274.iterator();
while (it.hasNext()) {
GnpRichiesteDonor gnpRichiesteDonor274 = (GnpRichiesteDonor) it.next();
crmCompetenza = mappincCrm(gnpRichiesteDonor274.getCrmCompetenza());
dn = gnpRichiesteDonor274.getDn() != null ? gnpRichiesteDonor274.getDn().toString() : "";
dataEspletamento = gnpRichiesteDonor274.getDac() != null ? DateUtils.toString(gnpRichiesteDonor274.getDac(), DATE_PATTERN_DD_MM_YYYY) : "";
codiceOloRecipient = gnpRichiesteDonor274.getCowRecipient() != null ? gnpRichiesteDonor274.getCowRecipient().toString() : "";
List<String> valori = new ArrayList<String>();
valori.add(crmCompetenza);
valori.add(dn);
valori.add(dataEspletamento);
valori.add(codiceOloRecipient);
valori.add(DELIBERA_274);
recordGenerato = generaRecord(valori);
writeRecord(recordGenerato);
stampaRecord(crmCompetenza,dn,dataEspletamento,codiceOloRecipient,DELIBERA_274);
}
log.write("9999","------------ End Del. 274 ------------");
}
if(listaDonorDelibera103!= null && listaDonorDelibera103.size()>0) {
log.write("9999","------------ Start Del. 103 ------------");
it = listaDonorDelibera103.iterator();
while (it.hasNext()) {
GnpRichiesteCsNpg103 gnpRichiesteCsNpg103 = (GnpRichiesteCsNpg103) it.next();
crmCompetenza = mappincCrm(gnpRichiesteCsNpg103.getPiattaformaCompetenza());
dn = gnpRichiesteCsNpg103.getDn() != null ? gnpRichiesteCsNpg103.getDn().toString() : "";
dataEspletamento = gnpRichiesteCsNpg103.getDac() != null ? DateUtils.toString(gnpRichiesteCsNpg103.getDac(), DATE_PATTERN_DD_MM_YYYY) : "";
codiceOloRecipient = gnpRichiesteCsNpg103.getCodOpRecipient() != null ? gnpRichiesteCsNpg103.getCodOpRecipient().toString() : "";
List<String> valori = new ArrayList<String>();
valori.add(crmCompetenza);
valori.add(dn);
valori.add(dataEspletamento);
valori.add(codiceOloRecipient);
valori.add(DELIBERA_103);
recordGenerato = generaRecord(valori);
writeRecord(recordGenerato);
stampaRecord(crmCompetenza,dn,dataEspletamento,codiceOloRecipient,DELIBERA_103);
}
log.write("9999","------------ End Del. 103 ------------");
}
if(listaDonorDelibera103NativiOlo!= null && listaDonorDelibera103NativiOlo.size()>0) {
log.write("9999","------------ Start Del. 103 NatOlo ------------");
it = listaDonorDelibera103NativiOlo.iterator();
while (it.hasNext()) {
GnpRichiesteDonNatOlo gnpRichiesteDonNatOlo = (GnpRichiesteDonNatOlo) it.next();
crmCompetenza = mappincCrm(gnpRichiesteDonNatOlo.getPiattaformaCompetenza());
dn = gnpRichiesteDonNatOlo.getDn() != null ? gnpRichiesteDonNatOlo.getDn().toString() : "";
dataEspletamento = gnpRichiesteDonNatOlo.getDac() != null ? DateUtils.toString(gnpRichiesteDonNatOlo.getDac(), DATE_PATTERN_DD_MM_YYYY) : "";
codiceOloRecipient = gnpRichiesteDonNatOlo.getCodOpRecipient() != null ? gnpRichiesteDonNatOlo.getCodOpRecipient().toString() : "";
List<String> valori = new ArrayList<String>();
valori.add(crmCompetenza);
valori.add(dn);
valori.add(dataEspletamento);
valori.add(codiceOloRecipient);
valori.add(DELIBERA_103NATOLO);
recordGenerato = generaRecord(valori);
writeRecord(recordGenerato);
stampaRecord(crmCompetenza,dn,dataEspletamento,codiceOloRecipient,DELIBERA_103NATOLO);
}
log.write("9999","------------ End Del. 103 NatOlo ------------");
}
}
/**
* Restituisce il nome del file da generare
*
* @return il nome esteso del file
*/
protected String getNomeFile(String arg) {
Date dataAttuale = new Date();
String prefisso = arg.equalsIgnoreCase("FULL") ? Resources.getEDL_DONOR_UNATANTUM_FILENAME_PREFIX()
: Resources.getEDL_DONOR_FILENAME_PREFIX();
String ext = Resources.getEDL_DONOR_FILENAME_EXT();
String formatDate = DateUtils.toString(dataAttuale, DATE_PATTERN_FILE_NAME);
return prefisso + formatDate + ext;
}
/**
* Restituisce un record a partire dalla lista di campi
*
* @param campi di campi
* @return il record
*/
private String generaRecord(List<String> campi) {
StringBuilder line = new StringBuilder();
Iterator<String> it = campi.iterator();
while (it.hasNext()) {
line.append(it.next());
if (it.hasNext()) line.append(separator);
}
return line.toString();
}
private String mappincCrm(String crm){
if(crm.equalsIgnoreCase("D"))
return CONSUMER;
else return BUSINESS;
}
private void stampaRecord(String crmCompetenza, String dn, String dataEspletamento, String codiceOlo, String delibera){
log.write("9999","CrmCompetenza = " + crmCompetenza +
" dn = " + dn + " dataEspletamento = " + dataEspletamento +
" codiceOloRecipient = " + codiceOlo + " delibera = " + delibera );
}
}

View File

@@ -260,7 +260,7 @@ public class RequestManagerDonor82 {
GnpAnagCowTelecom anagCowTelecom = anagCowDAO.findById(richiesta.getCowDonating());
//C09 2019 WA RICHIESTO ESCLUSIVAMENTE PER LA VERIFICA CS
if (Resources.getFLAG_CHECK_ANAG_COW_LINEA()) {
if (Resources.getFLAG_CHECK_ANAG_COW_LINEA() && richiesta.getDn()!=null) {
log.write("9999", "CONTROLLO SU TABELLA GNP_ANAG_COW_LINEA_TELECOM(FLAG WA ABILITATO) : " + richiesta.getIdRichiesta() + " COW: " + richiesta.getCowDonating() + " DN:" + richiesta.getDn());
cowLineaDao = new GnpAnagCowLineaTelecomDAO();
anagCowLineaTelecom = cowLineaDao.findByDnAndCowOld(richiesta.getDn(), richiesta.getCowDonating());
@@ -278,7 +278,8 @@ public class RequestManagerDonor82 {
// Se non trovo il cow nell'anagrafica:
// 1)Aggiorno la tabella GNP_RICHIESTE_DONOR con cod_validazione = 1
// 2)Inserisco un record nella tabella GNP_OLO_RICHIESTE_DONOR_OUT
if (anagCowTelecom == null) {
//C06 2025 DBCFX_SM_702 devo gestire un mancato invio del DN dall'OLO con cod.session X
if (anagCowTelecom == null || richiesta.getDn() == null) {
richiesta.setCodValidazione(1L);
String sessionId = Func.findNextD82SessionId();
String dateSessionId = createSessionID82(sessionId);

View File

@@ -862,8 +862,9 @@ extends AbstractCRMFormatController {
notifyOut.setSistComp(CRM_COMPETENZA_BUSINESS);
notifyOut.setCodiceSegreto(richiesta.getCos());
// Per la Del.82 in continuità con la Del.274 in mancanza del DN1 da NOW mappiamo il COR (Codice Risorsa)
notifyOut.setDirectoryNumber(nowIn.getNpDn1() != null ? nowIn.getNpDn1() : richiesta.getCor());
// DBCFX_SM_699
// per la Del.82 in mancanza del DN1 da NOW mappiamo il DN ricevuto in FASE2 nella richiesta di Migrazione da OLO (TC1)
notifyOut.setDirectoryNumber(nowIn.getNpDn1() != null ? nowIn.getNpDn1() : richiesta.getDn());
notifyOut.setIdOperatoreDonating(richiesta.getCowDonating());
notifyOut.setCognomeCliente(richiesta.getCognomeCliente());
notifyOut.setCodiceRichiesta(richiesta.getIdRichiesta());

View File

@@ -2584,10 +2584,11 @@ public class DBSSController extends SystemController {
int charValueSize = 7; //numero di elementi characteristicValue. Inizializzato a 7 (obbligatori), eventualmente incrementato con opzionali (0..3)
int charValueIndex = 0; //usato come indice per l'array CharacteristicValueType
boolean notePresente = false, aggiuntiviPresente = false, flagNPPresente = false;
boolean notePresente = false, aggiuntiviPresente = false, flagNPPresente = false, recipientOloCodePresente=false;
it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicValueType comments = null;
it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicValueType aggiuntivi = null;
it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicValueType flagNP = null;
it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicValueType recipientOloCode = null;
//SM_408
if (!Func.isNull(notifica.getNote())) {
@@ -2614,6 +2615,18 @@ public class DBSSController extends SystemController {
aggiuntivi.setCharacteristicSpecification(aggiuntiviName);
}
//DBCFX_SM_700 mancata informazione OLO recipient su uscite delibera 82
if (!Func.isNull(notifica.getCodiceOloRecipient()) && notifica.getAmbito().equals("Del.82")) {
charValueSize++;
recipientOloCodePresente = true;
recipientOloCode = new it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicValueType();
it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicSpecificationType recipientOloCodeName =
new it.telecomitalia.soa.wirelineportoutordermgmtcustomtypes.x20150511.CharacteristicSpecificationType();
recipientOloCodeName.setName("RecipientOLOCode");
recipientOloCode.setValue(String.valueOf(notifica.getCodiceOloRecipient()));
recipientOloCode.setCharacteristicSpecification(recipientOloCodeName);
}
if (!Func.isNull(notifica.getFlagNp())) {
charValueSize++;
flagNPPresente = true;
@@ -2706,6 +2719,9 @@ public class DBSSController extends SystemController {
if (flagNPPresente) {
characteristicValueTypes[charValueIndex++] = flagNP;
}
if (recipientOloCodePresente) {
characteristicValueTypes[charValueIndex++] = recipientOloCode;
}
customerOrder.setCharacteristicValue(characteristicValueTypes);
request.setCustomerOrder(customerOrder);

View File

@@ -766,7 +766,8 @@ public class OLOControllerDonor extends AbstractOLOController implements Loggab
&& anagOloDAO.findById(richiesta.getCodiceOperatoreRecipient())!=null
&& !Func.isNull(richiesta.getCodiceOperatoreDonating())
&& !Func.isNull(richiesta.getCor())
&& !Func.isNull(richiesta.getDn1())
// DBCFX_SM_702 gestione assenza DN1
//&& !Func.isNull(richiesta.getDn1())
) {
return true;
} else {

View File

@@ -3353,4 +3353,47 @@ public class Resources {
return Trim(props.getProperty("DWHE2E_REPOSALDINETTI_BUFFER_COMMIT"));
}
//EDL file per OLO destinazione
public static String getEDL_DONOR_HEADER() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_HEADER"));
}
public static String getEDL_DONOR_OUT_PATH() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_OUT_PATH"));
}
public static String getEDL_DONOR_FILENAME_EXT() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_FILENAME_EXT"));
}
public static String getEDL_DONOR_FILENAME_PREFIX() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_FILENAME_PREFIX"));
}
public static String getEDL_DONOR_UNATANTUM_FILENAME_PREFIX() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_UNATANTUM_FILENAME_PREFIX"));
}
public static String getEDL_DONOR_GIORNI_DELTA() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_GIORNI_DELTA"));
}
public static String getEDL_DONOR_START_FULL() {
if (props == null)
init();
return Trim(props.getProperty("EDL_DONOR_START_FULL"));
}
}

View File

@@ -239,4 +239,17 @@ public class NotificheNngOpTerzoBean implements Serializable {
public void setListaRecipient(List<GnpgoNngRecipient> listaRecipient) {
this.listaRecipient = listaRecipient;
}
public void ordinaPerDAC() {
Collections.sort(listaTestate, new Comparator<GnpgoNngTestataOpTerzo>() {
public int compare(GnpgoNngTestataOpTerzo item1, GnpgoNngTestataOpTerzo item2) {
Date data1 = item1.getDataEspletamento();
Date data2 = item2.getDataEspletamento();
if (data1 == null && data2 == null) return 0;
if (data1 == null) return 1; // I valori nulli vengono alla fine
if (data2 == null) return -1;
return data2.compareTo(data1); // Ordinamento dal più recente al più vecchio
}
});
}
}

View File

@@ -241,7 +241,10 @@
<h:outputText value="#{item.causaleRifiuto}" />
</rich:column>
<rich:column>
<h:outputText value="#{item.des}" />
<h:outputFormat value="{0, date, dd-MM-yyyy}" rendered="#{item.des ne null}">
<f:param value="#{item.des}"/>
</h:outputFormat>
<h:outputText value="" rendered="#{item.des == null}"/>
</rich:column>
<rich:column>
<h:outputText value="#{item.ultimoEventoNOW}" />

View File

@@ -88,7 +88,10 @@
<h:outputText value="Recipient" />
</rich:column>
<rich:column>
<h:outputText value="DAC" />
<a4j:commandButton
value="DAC"
action="#{nng_ot.ordinaPerDAC}"
reRender="listaTestate" />
</rich:column>
<rich:column>
<h:outputText value="RDAC" />