Correcciones por pruebas de SAP

parent 0839533e
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/> <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2"> <open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
<group> <group>
<file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/resources/general.properties</file> <file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/mx/dda/msjb/service.java</file>
<file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/DDAExhibicion.java</file> <file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/DDAExhibicion.java</file>
<file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/bo/DDAExhibicionBO.java</file> <file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/bo/DDAExhibicionBO.java</file>
<file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/dao/DDAExhibicionDAO.java</file> <file>file:/C:/Users/jfmj_/Documents/DDA/Githg/DDA_CRN_Exhibicion/src/mx/com/amx/mx/dda/crn/dao/DDAExhibicionDAO.java</file>
......
package mx.com.amx.mx.dda.crn; package mx.com.amx.mx.dda.crn;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Properties; import java.util.Properties;
...@@ -35,10 +36,11 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -35,10 +36,11 @@ public class DDAExhibicion implements ApplicationContextAware {
} }
} }
public void ejecutaProceso() { public String ejecutaProceso() {
LOG.info(" "); LOG.info(" ");
LOG.info("<< :::::::::::::::: Inicia Proceso Notifica Exhibicion DDA :::::::::::::::: >>"); LOG.info("<< :::::::::::::::: Inicia Proceso Notifica Exhibicion DDA :::::::::::::::: >>");
String mensaje = "OK";
try { try {
//-- 1. Verifica que no se este ejecutando ya un proceso de Notificacion //-- 1. Verifica que no se este ejecutando ya un proceso de Notificacion
...@@ -85,22 +87,22 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -85,22 +87,22 @@ public class DDAExhibicion implements ApplicationContextAware {
//-- 7. Obtener los titulos recien exhibidos para notificarlos a SAP //-- 7. Obtener los titulos recien exhibidos para notificarlos a SAP
LOG.info(" [INI]. Paso 7.- Obtener Titulos recien exhibidos con base a fecha referencia."); LOG.info(" [INI]. Paso 7.- Obtener Titulos recien exhibidos con base a fecha referencia.");
List<DatosCntTituloExhibicionDTO> lobTitulos = bo.obtenerTitulosRecienExhibidos(lstFechaReferencia); List<DatosCntTituloExhibicionDTO> lobTitulos = bo.obtenerTitulosRecienExhibidos(lstFechaReferencia);
List<DatosCntTituloExhibicionDTO> lobTitulosTC = bo.obtenerContratosRecienExhibidos(lstFechaReferencia);
LOG.info(" [FIN]. Paso 7.- Obtener Titulos recien exhibidos con base a fecha referencia. Titulos:_" + lobTitulos.size() + "_"); LOG.info(" [FIN]. Paso 7.- Obtener Titulos recien exhibidos con base a fecha referencia. Titulos:_" + lobTitulos.size() + "_");
LOG.info(" [INI]. Paso 8.- Envo de terminos comerciales de los contratos. (Creacion de Terminos Comerciales)"); LOG.info(" [INI]. Paso 8.- Envo de terminos comerciales de los contratos. (Creacion de Terminos Comerciales)");
String respuestaTC = bo.ejecutarTerminosComerciales(lobTitulos); Map<String,String> respuestaTC = bo.ejecutarTerminosComerciales(lobTitulosTC);
LOG.info(" [FIN]. Paso 8.- Envo de terminos comerciales de los contratos."); LOG.info(" [FIN]. Paso 8.- Envo de terminos comerciales de los contratos.");
if (respuestaTC.isEmpty()){
if (Objects.nonNull(lobTitulos) && !lobTitulos.isEmpty()) { if (Objects.nonNull(lobTitulos) && !lobTitulos.isEmpty()) {
//-- 8. LLamado a WS para notificar Activo Fijo (Titulos recien exhibidos) //-- 8. LLamado a WS para notificar Activo Fijo (Titulos recien exhibidos)
LOG.info(" [INI]. Paso 9.- Llamado a WS SAP. Interfaz 12."); LOG.info(" [INI]. Paso 9.- Llamado a WS SAP. Interfaz 12.");
ResultadoNotificacionDTO rWS_Notifica = bo.notificarAFijoWS(lobTitulos); ResultadoNotificacionDTO rWS_Notifica = bo.notificarAFijoWS(lobTitulos, respuestaTC);
LOG.info(" [FIN]. Paso 9.- Llamado a WS SAP. Interfaz 12. Resultado: _" + rWS_Notifica.getResultado() + "_"); LOG.info(" [FIN]. Paso 9.- Llamado a WS SAP. Interfaz 12. Resultado: _" + rWS_Notifica.getResultado() + "_");
if (Objects.nonNull(rWS_Notifica.getNotificaciones()) && rWS_Notifica.getResultado()) { if (Objects.nonNull(rWS_Notifica.getNotificaciones()) && rWS_Notifica.getResultado()) {
//-- Verifica que los enviados sean igual a los procesados(notificados) por parte de SAP //-- Verifica que los enviados sean igual a los procesados(notificados) por parte de SAP
//-- Si se enviaron 3, mismos 3 que debera regresar //-- Si se enviaron 3, mismos 3 que debera regresar
if (rWS_Notifica.getNotificaciones().size() == lobTitulos.size()) { if (rWS_Notifica.getNotificaciones().size() == rWS_Notifica.getTitulosEnviados()) {
//-- Recorrer la respuesta en busqueda de los titulos notificados en SAP correctamente //-- Recorrer la respuesta en busqueda de los titulos notificados en SAP correctamente
int lnuTitulosNotificados = rWS_Notifica.getNotificaciones().size(); int lnuTitulosNotificados = rWS_Notifica.getNotificaciones().size();
int lnuNotificadosSAP_OK = 0; int lnuNotificadosSAP_OK = 0;
...@@ -180,7 +182,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -180,7 +182,7 @@ public class DDAExhibicion implements ApplicationContextAware {
}//Ends if(rWS_Notifica.getNotificaciones().size() == lobTitulos.size()) }//Ends if(rWS_Notifica.getNotificaciones().size() == lobTitulos.size())
else { else {
LOG.error("DDA-NOT-011: El numero de titulos procesados fueron distintos al numero de titulos enviado."); LOG.error("DDA-NOT-011: El numero de titulos procesados fueron distintos al numero de titulos enviado.");
mensaje = "Error: DDA-NOT-011";
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Caso Enviados y procesados distinto total.]"); LOG.info("Apaga bandera de proceso Notifica.[Caso Enviados y procesados distinto total.]");
} }
...@@ -188,6 +190,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -188,6 +190,7 @@ public class DDAExhibicion implements ApplicationContextAware {
else if (Objects.nonNull(rWS_Notifica.getTransFault()) && !rWS_Notifica.getResultado()) { else if (Objects.nonNull(rWS_Notifica.getTransFault()) && !rWS_Notifica.getResultado()) {
//-- Tracking //-- Tracking
LOG.error("Error al llamar el WS Notifica Activo Fijo: " + rWS_Notifica.getTransFault().toString()); LOG.error("Error al llamar el WS Notifica Activo Fijo: " + rWS_Notifica.getTransFault().toString());
mensaje = "Error: DDA-NOT-012";
LOG.error("Datos recibidos de la interfaz 12: " + rWS_Notifica.getNotificaciones().size() + " Datos enviados a la interfaz 12 " + lobTitulos.size()); LOG.error("Datos recibidos de la interfaz 12: " + rWS_Notifica.getNotificaciones().size() + " Datos enviados a la interfaz 12 " + lobTitulos.size());
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Caso TransFault]"); LOG.info("Apaga bandera de proceso Notifica.[Caso TransFault]");
...@@ -195,16 +198,8 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -195,16 +198,8 @@ public class DDAExhibicion implements ApplicationContextAware {
}//Ends if(lobTitulos != null && lobTitulos.size() > 0) }//Ends if(lobTitulos != null && lobTitulos.size() > 0)
else { else {
LOG.error("DDA-NOT-006: No se encontraron registros de titulos recien exhibidos."); LOG.error("DDA-NOT-006: No se encontraron registros de titulos recien exhibidos.");
mensaje = "Error: DDA-NOT-006";
bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Else_lobTitulos_null]");
}
}
else {
LOG.error("DDA-NOT-012: Falla en terminos comerciales.");
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
updateTitulos(contratos, respuestaTC);
LOG.info("Apaga bandera de proceso Notifica.[Else_lobTitulos_null]"); LOG.info("Apaga bandera de proceso Notifica.[Else_lobTitulos_null]");
} }
...@@ -216,6 +211,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -216,6 +211,7 @@ public class DDAExhibicion implements ApplicationContextAware {
}//Ends if(lstFechaReferencia.trim().length() > 0) }//Ends if(lstFechaReferencia.trim().length() > 0)
else { else {
LOG.error("DDA-NOT-005: No se pudo obtener la fecha de referencia"); LOG.error("DDA-NOT-005: No se pudo obtener la fecha de referencia");
mensaje = "Error: DDA-NOT-005";
updateTitulos(contratos, "NO SE LOGRO OBTENER LA FECHA DE REFERENCIA"); updateTitulos(contratos, "NO SE LOGRO OBTENER LA FECHA DE REFERENCIA");
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Else_lstFechaReferencia_trim()_length()]"); LOG.info("Apaga bandera de proceso Notifica.[Else_lstFechaReferencia_trim()_length()]");
...@@ -224,6 +220,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -224,6 +220,7 @@ public class DDAExhibicion implements ApplicationContextAware {
else { else {
LOG.error("DDA-NOT-004: No se pudo obtener el valor de referencia"); LOG.error("DDA-NOT-004: No se pudo obtener el valor de referencia");
updateTitulos(contratos, "NO SE LOGRO OBTENER VALOR DE REFERENCIA"); updateTitulos(contratos, "NO SE LOGRO OBTENER VALOR DE REFERENCIA");
mensaje = "Error: DDA-NOT-004";
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Else_boActualizarBanderaIniciaProceso]"); LOG.info("Apaga bandera de proceso Notifica.[Else_boActualizarBanderaIniciaProceso]");
} }
...@@ -231,6 +228,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -231,6 +228,7 @@ public class DDAExhibicion implements ApplicationContextAware {
else { else {
LOG.error("DDA-NOT-003: No se pudo actualizar la bandera de inicio de proceso."); LOG.error("DDA-NOT-003: No se pudo actualizar la bandera de inicio de proceso.");
updateTitulos(contratos, "NO SE LOGRO ACTUALIZAR LA BANDERA DE INICIO"); updateTitulos(contratos, "NO SE LOGRO ACTUALIZAR LA BANDERA DE INICIO");
mensaje = "Error: DDA-NOT-003";
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
LOG.info("Apaga bandera de proceso Notifica.[Else_boActualizarBanderaIniciaProceso]"); LOG.info("Apaga bandera de proceso Notifica.[Else_boActualizarBanderaIniciaProceso]");
...@@ -239,21 +237,25 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -239,21 +237,25 @@ public class DDAExhibicion implements ApplicationContextAware {
else { else {
LOG.error("DDA-NOT-002: No se han otorgado los permisos para poder iniciar el proceso."); LOG.error("DDA-NOT-002: No se han otorgado los permisos para poder iniciar el proceso.");
updateTitulos(contratos, "SIN PERMISOS PARA INICIAR PROCESOS A SAP"); updateTitulos(contratos, "SIN PERMISOS PARA INICIAR PROCESOS A SAP");
mensaje = "Error: DDA-NOT-002";
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
} }
}//Ends if(!boEjecutandoseProceso) }//Ends if(!boEjecutandoseProceso)
else { else {
LOG.error("DDA-NOT-001: Es probable que se haya iniciado este proceso previamente."); LOG.error("DDA-NOT-001: Es probable que se haya iniciado este proceso previamente.");
mensaje = "Error: DDA-NOT-001";
updateTitulos(contratos, "PROCESO DE SAP INICIADO PREVIAMENTE"); updateTitulos(contratos, "PROCESO DE SAP INICIADO PREVIAMENTE");
bo.actualizarEjecutandoProcesoNotificacion("0"); bo.actualizarEjecutandoProcesoNotificacion("0");
} }
} catch (Exception e) { } catch (Exception e) {
LOG.error("Ocurrio un error en ejecutaProceso::DDAExhibicion: " + e.getMessage()); LOG.error("Ocurrio un error en ejecutaProceso::DDAExhibicion: " + e.getMessage());
mensaje = "Error: DDA-NOT-013";
} }
LOG.info("<< :::::::::::::::: Finaliza Proceso Notifica Exhibicion DDA :::::::::::::::: >>"); LOG.info("<< :::::::::::::::: Finaliza Proceso Notifica Exhibicion DDA :::::::::::::::: >>");
LOG.info(" "); LOG.info(" ");
return mensaje;
} }
private void updateTitulos(List<ContratoDTO> contratos, String mensaje){ private void updateTitulos(List<ContratoDTO> contratos, String mensaje){
......
...@@ -265,11 +265,13 @@ public class DDAExhibicionBO { ...@@ -265,11 +265,13 @@ public class DDAExhibicionBO {
TransactionFaultDTO tf = resultado.getTransFault(); TransactionFaultDTO tf = resultado.getTransFault();
List<RespSAPActivoFijoDTO> afs = resultado.getActivosFijos(); List<RespSAPActivoFijoDTO> afs = resultado.getActivosFijos();
String method = "crearActivoFijoWS"; String method = "crearActivoFijoWS";
Map<String,String> contratosIdSap = new HashMap<>();
try { try {
DTActivoFijo params = new DTActivoFijo(); DTActivoFijo params = new DTActivoFijo();
for (ItemActivoFijoDTO titulo : dto.getContratos()) { for (ItemActivoFijoDTO titulo : dto.getContratos()) {
String idSap = dao.validarIdSap(titulo.getContratoDDA());
if(idSap.isEmpty()){
DTActivoFijo.Registro tituloAF = new DTActivoFijo.Registro(); DTActivoFijo.Registro tituloAF = new DTActivoFijo.Registro();
tituloAF.setCentroCoste((Objects.nonNull(titulo.getCentroCosto()) && !titulo.getCentroCosto().isEmpty()) ? titulo.getCentroCosto() : ""); tituloAF.setCentroCoste((Objects.nonNull(titulo.getCentroCosto()) && !titulo.getCentroCosto().isEmpty()) ? titulo.getCentroCosto() : "");
tituloAF.setCodigoDDA((Objects.nonNull(titulo.getCodigoDDA()) && !titulo.getCodigoDDA().isEmpty()) ? titulo.getCodigoDDA() : ""); tituloAF.setCodigoDDA((Objects.nonNull(titulo.getCodigoDDA()) && !titulo.getCodigoDDA().isEmpty()) ? titulo.getCodigoDDA() : "");
...@@ -281,14 +283,19 @@ public class DDAExhibicionBO { ...@@ -281,14 +283,19 @@ public class DDAExhibicionBO {
tituloAF.setContratoDDA((Objects.nonNull(titulo.getContratoDDA()) && !titulo.getContratoDDA().isEmpty()) ? titulo.getContratoDDA() : "" ); tituloAF.setContratoDDA((Objects.nonNull(titulo.getContratoDDA()) && !titulo.getContratoDDA().isEmpty()) ? titulo.getContratoDDA() : "" );
tituloAF.setInicioAmortizacion((Objects.nonNull(titulo.getInicioAmortizacion()) && !titulo.getInicioAmortizacion().isEmpty()) ? titulo.getInicioAmortizacion() : "" ); tituloAF.setInicioAmortizacion((Objects.nonNull(titulo.getInicioAmortizacion()) && !titulo.getInicioAmortizacion().isEmpty()) ? titulo.getInicioAmortizacion() : "" );
params.getRegistro().add(tituloAF); params.getRegistro().add(tituloAF);
} else{
contratosIdSap.put(titulo.getContratoDDA(), idSap);
}
} }
//--Llamado al WS de SAP. Interfaz 10. //--Llamado al WS de SAP. Interfaz 10.
LOG.debug(" Url Srv. Activo Fijo primer llamado: " + this.getUrlServicio(TEN)); LOG.debug(" Url Srv. Activo Fijo primer llamado: " + this.getUrlServicio(TEN));
DTActivoFijoRes responseActivoFijo = null;
if(params.getRegistro().size() > 0){
responseActivoFijo = (DTActivoFijoRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TEN), params);
}
DTActivoFijoRes responseActivoFijo = (DTActivoFijoRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TEN), params); if (!contratosIdSap.isEmpty() || (Objects.nonNull(responseActivoFijo) && Objects.nonNull(responseActivoFijo.getRespuesta()) && !responseActivoFijo.getRespuesta().isEmpty())) {
if (Objects.nonNull(responseActivoFijo) && Objects.nonNull(responseActivoFijo.getRespuesta()) && !responseActivoFijo.getRespuesta().isEmpty()) {
int lnuTitulosActualizados = responseActivoFijo.getRespuesta().size(); int lnuTitulosActualizados = responseActivoFijo.getRespuesta().size();
LOG.info(" Total titulos procesados SAP primer llamado: " + lnuTitulosActualizados); LOG.info(" Total titulos procesados SAP primer llamado: " + lnuTitulosActualizados);
...@@ -316,11 +323,15 @@ public class DDAExhibicionBO { ...@@ -316,11 +323,15 @@ public class DDAExhibicionBO {
tituloAF.setProgramID((Objects.nonNull(titulo.getProgramID()) && !titulo.getProgramID().isEmpty()) ? titulo.getProgramID() : ""); tituloAF.setProgramID((Objects.nonNull(titulo.getProgramID()) && !titulo.getProgramID().isEmpty()) ? titulo.getProgramID() : "");
tituloAF.setContratoDDA((Objects.nonNull(titulo.getContratoDDA()) && !titulo.getContratoDDA().isEmpty()) ? titulo.getContratoDDA() : "" ); tituloAF.setContratoDDA((Objects.nonNull(titulo.getContratoDDA()) && !titulo.getContratoDDA().isEmpty()) ? titulo.getContratoDDA() : "" );
tituloAF.setInicioAmortizacion((Objects.nonNull(titulo.getInicioAmortizacion()) && !titulo.getInicioAmortizacion().isEmpty()) ? titulo.getInicioAmortizacion() : "" ); tituloAF.setInicioAmortizacion((Objects.nonNull(titulo.getInicioAmortizacion()) && !titulo.getInicioAmortizacion().isEmpty()) ? titulo.getInicioAmortizacion() : "" );
if(Objects.nonNull(contratosIdSap.get(tituloAF.getContratoDDA()))){
tituloAF.setCodigoSAP((contratosIdSap.get(tituloAF.getContratoDDA())));
} else {
for (DTActivoFijo.Registro registro : params.getRegistro()){ for (DTActivoFijo.Registro registro : params.getRegistro()){
if (tituloAF.getContratoDDA().equals(registro.getContratoDDA())){ if (tituloAF.getContratoDDA().equals(registro.getContratoDDA())){
tituloAF.setCodigoSAP((Objects.nonNull(registro.getCodigoSAP()) && !registro.getCodigoSAP().isEmpty()) ? registro.getCodigoSAP() : ""); tituloAF.setCodigoSAP((Objects.nonNull(registro.getCodigoSAP()) && !registro.getCodigoSAP().isEmpty()) ? registro.getCodigoSAP() : "");
} }
} }
}
paramsSeg.getRegistro().add(tituloAF); paramsSeg.getRegistro().add(tituloAF);
} }
...@@ -386,10 +397,10 @@ public class DDAExhibicionBO { ...@@ -386,10 +397,10 @@ public class DDAExhibicionBO {
dao.actualizarEstatusSapTitulosByTitulo(faultDesc, idtituloCnt); dao.actualizarEstatusSapTitulosByTitulo(faultDesc, idtituloCnt);
} }
public String ejecutarTerminosComerciales( List<DatosCntTituloExhibicionDTO> titulos ){ public Map<String,String> ejecutarTerminosComerciales( List<DatosCntTituloExhibicionDTO> titulos ){
//--Llamado al WS de SAP. Interfaz 99. Terminos Comerciales //--Llamado al WS de SAP. Interfaz 99. Terminos Comerciales
LOG.info(" Url Srv. Activo Fijo primer llamado: " + this.getUrlServicio(TERMINOS)); LOG.info(" Url Srv. Activo Fijo primer llamado: " + this.getUrlServicio(TERMINOS));
String respuesta = ""; Map<String,String> validaciones = new HashMap<>();
try { try {
Map<String,DatosCntTituloExhibicionDTO> map = new HashMap<>(); Map<String,DatosCntTituloExhibicionDTO> map = new HashMap<>();
LOG.info(" Entrando try: " ); LOG.info(" Entrando try: " );
...@@ -450,9 +461,11 @@ public class DDAExhibicionBO { ...@@ -450,9 +461,11 @@ public class DDAExhibicionBO {
DTTerminosComercialesRes response = (DTTerminosComercialesRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TERMINOS), params); DTTerminosComercialesRes response = (DTTerminosComercialesRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TERMINOS), params);
if(!response.getESTPROC().equals("OK")){ if(!response.getESTPROC().equals("OK")){
LOG.info(" Fallo el contrato " + contrato.getContratoDDA() + " al enviarlo a " + this.getUrlServicio(TERMINOS) + " se daran de baja los titulos en la BD."); LOG.info(" Fallo el contrato " + contrato.getContratoDDA() + " al enviarlo a " + this.getUrlServicio(TERMINOS) + " se daran de baja los titulos en la BD.");
respuesta = response.getEstatus(); //respuesta = response.getEstatus();
validaciones.put(contrato.getContratoDDA(), response.getEstatus());
} else { } else {
LOG.info(" Respuesta OK del servicio ESTPROC: " + response.getESTPROC() + " con Estatus: " + response.getEstatus()); LOG.info(" Respuesta OK del servicio ESTPROC: " + response.getESTPROC() + " con Estatus: " + response.getEstatus());
validaciones.put(contrato.getContratoDDA(), response.getESTPROC());
} }
} }
} }
...@@ -461,9 +474,25 @@ public class DDAExhibicionBO { ...@@ -461,9 +474,25 @@ public class DDAExhibicionBO {
LOG.info(ex); LOG.info(ex);
ex.printStackTrace(); ex.printStackTrace();
java.util.logging.Logger.getLogger(DDAExhibicionBO.class.getName()).log(Level.SEVERE, null, ex); java.util.logging.Logger.getLogger(DDAExhibicionBO.class.getName()).log(Level.SEVERE, null, ex);
respuesta = "ERROR DE PROCESO"; //respuesta = "ERROR DE PROCESO";
}
return validaciones;
}
public List<DatosCntTituloExhibicionDTO> obtenerContratosRecienExhibidos(String pstFechaReferencia) throws Exception {
LOG.debug(" - [" + this.getClass().getSimpleName() + "::obtenerContratosRecienExhibidos]");
LOG.debug(" - Parametros: _" + pstFechaReferencia + "_");
List<DatosCntTituloExhibicionDTO> lobResultado = new ArrayList<>();
try {
lobResultado = dao.obtenerTitulosRecienExhibidos(pstFechaReferencia);
} catch (Exception e) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::obtenerFechaReferencia]: " + e.getMessage());
throw new Exception(e.getMessage());
} }
return respuesta;
return lobResultado;
} }
public List<DatosCntTituloExhibicionDTO> obtenerTitulosRecienExhibidos(String pstFechaReferencia) throws Exception { public List<DatosCntTituloExhibicionDTO> obtenerTitulosRecienExhibidos(String pstFechaReferencia) throws Exception {
...@@ -482,7 +511,7 @@ public class DDAExhibicionBO { ...@@ -482,7 +511,7 @@ public class DDAExhibicionBO {
return lobResultado; return lobResultado;
} }
public ResultadoNotificacionDTO notificarAFijoWS(List<DatosCntTituloExhibicionDTO> dto) { public ResultadoNotificacionDTO notificarAFijoWS(List<DatosCntTituloExhibicionDTO> dto, Map<String,String> respuestaTC) {
LOG.debug(" - [" + this.getClass().getSimpleName() + "::notificarAFijoWS]"); LOG.debug(" - [" + this.getClass().getSimpleName() + "::notificarAFijoWS]");
LOG.debug(" - Parametros: _" + dto.size() + " Titulos._"); LOG.debug(" - Parametros: _" + dto.size() + " Titulos._");
...@@ -495,6 +524,7 @@ public class DDAExhibicionBO { ...@@ -495,6 +524,7 @@ public class DDAExhibicionBO {
DTContenido params = new DTContenido(); DTContenido params = new DTContenido();
int xNotifica = 1; int xNotifica = 1;
for (DatosCntTituloExhibicionDTO dtoEx : dto) { for (DatosCntTituloExhibicionDTO dtoEx : dto) {
if(respuestaTC.get(dtoEx.getNUMERO_CONTRATO()).equals("OK")){
String lstCodigoSAP = (Objects.nonNull(dtoEx.getID_SAP()) && !dtoEx.getID_SAP().trim().isEmpty()) ? dtoEx.getID_SAP() : ""; String lstCodigoSAP = (Objects.nonNull(dtoEx.getID_SAP()) && !dtoEx.getID_SAP().trim().isEmpty()) ? dtoEx.getID_SAP() : "";
String lstFechaContabilizacionBD = (Objects.nonNull(dtoEx.getFECHA_CONTABILIZACION()) && !dtoEx.getFECHA_CONTABILIZACION().trim().isEmpty()) ? dtoEx.getFECHA_CONTABILIZACION() : ""; String lstFechaContabilizacionBD = (Objects.nonNull(dtoEx.getFECHA_CONTABILIZACION()) && !dtoEx.getFECHA_CONTABILIZACION().trim().isEmpty()) ? dtoEx.getFECHA_CONTABILIZACION() : "";
String lstFechaInicio = (Objects.nonNull(dtoEx.getFECHA_INICIO()) && !dtoEx.getFECHA_INICIO().trim().isEmpty()) ? dtoEx.getFECHA_INICIO() : ""; String lstFechaInicio = (Objects.nonNull(dtoEx.getFECHA_INICIO()) && !dtoEx.getFECHA_INICIO().trim().isEmpty()) ? dtoEx.getFECHA_INICIO() : "";
...@@ -530,12 +560,21 @@ public class DDAExhibicionBO { ...@@ -530,12 +560,21 @@ public class DDAExhibicionBO {
titulo.setSubNumero(lstSubNumero); titulo.setSubNumero(lstSubNumero);
params.getRegistro().add(titulo); params.getRegistro().add(titulo);
} }
else {
LOG.error("DDA-NOT-012: Falla en terminos comerciales.");
dao.actualizarEstatusSapTitulosByTitulo(respuestaTC.get(dtoEx.getNUMERO_CONTRATO()), dtoEx.getID_TITULO_CNTORIG());
}
}
//--Llamado a WS de SAP. Interfaz 12 //--Llamado a WS de SAP. Interfaz 12
LOG.debug(" Url Srv. Notifica Activo Fijo: " + this.getUrlServicio(TWELVE)); LOG.debug(" Url Srv. Notifica Activo Fijo: " + this.getUrlServicio(TWELVE));
//-- REAL CODE //-- REAL CODE
DTContenidoRes responseNotifica = (DTContenidoRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TWELVE), params); DTContenidoRes responseNotifica = null;
resultado.setTitulosEnviados(params.getRegistro().size());
if(!params.getRegistro().isEmpty()){
responseNotifica = (DTContenidoRes) wsNotificaAFijoSAP.marshalSendAndReceive(this.getUrlServicio(TWELVE), params);
}
if (Objects.nonNull(responseNotifica) && Objects.nonNull(responseNotifica.getRespuesta()) && !responseNotifica.getRespuesta().isEmpty()) { if (Objects.nonNull(responseNotifica) && Objects.nonNull(responseNotifica.getRespuesta()) && !responseNotifica.getRespuesta().isEmpty()) {
int lnuTitulosNotificados = responseNotifica.getRespuesta().size(); int lnuTitulosNotificados = responseNotifica.getRespuesta().size();
......
...@@ -231,6 +231,57 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -231,6 +231,57 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
List<Object> qryParams = new ArrayList<>(); List<Object> qryParams = new ArrayList<>();
try {
//String lstFechaReferencia = (pstFechaReferencia != null && pstFechaReferencia.length() > 0) ? pstFechaReferencia : "";
//--Ejecucion
sb.append("SELECT ID_SAP,SUM(COSTO) AS COSTO,MIN(FECHA_INICIO) AS FECHA_INICIO ,MAX(VIDA_UTIL) AS VIDA_UTIL,MIN(FECHA_CONTABILIZACION) AS FECHA_CONTABILIZACION, ");
sb.append("MIN(ID_TITULO_CNTORIG) AS ID_TITULO_CNTORIG, SUBNUMERO, NUMERO_CONTRATO, MAX(FECHA_VENCIMIENTO) AS FECHA_VENCIMIENTO FROM ( ");
sb.append("select ");
sb.append("cnttit.ID_SAP, ");
sb.append("trunc(cnttit.COSTO,2) as COSTO, ");
sb.append("to_char(cnttit.FECHA_INICIO,'YYYYMMDD') as FECHA_INICIO, ");
sb.append("cnttit.VIDA_UTIL, ");
sb.append("to_char(cnttit.FECHA_INICIO,'DD/MM/YYYY') as FECHA_CONTABILIZACION, ");
sb.append("cnttit.ID_TITULO_CNTORIG, ");
sb.append("cnttit.SUBNUMERO, ");
sb.append("cnt.NUMERO_CONTRATO, ");
sb.append("to_char(cnt.FECHA_INICIO,'YYYYMMDD') AS FECHA_VENCIMIENTO ");
sb.append("from ");
sb.append("DDA_T_CONTRATO_TITULO cnttit, ");
sb.append("DDA_T_CONTRATO cnt ");
sb.append("where ");
sb.append("cnttit.ID_CONTRATO = cnt.ID_CONTRATO ");
sb.append("and cnttit.ID_SAP is not null ");
sb.append("and cnttit.SUBNUMERO is not null ");
sb.append("and cnt.ID_ESTATUS = ? ");
sb.append("and cnttit.FECHA_NOTIFSAP is null ");
sb.append("ORDER BY CNTTIT.FECHA_INICIO DESC) ");
sb.append("WHERE rownum < 901 ");
sb.append("GROUP BY ID_SAP, SUBNUMERO, NUMERO_CONTRATO");
//--Debug
LOG.debug(">Sql_D [obtenerTitulosRecienExhibidos]:" + sb.toString());
final String lstSQL = sb.toString();
qryParams.add(ESTATUS_VIGENTE);
//qryParams.add(lstFechaReferencia);
lobResultado = (ArrayList<DatosCntTituloExhibicionDTO>) getJdbcTemplate().query(lstSQL, qryParams.toArray(), new BeanPropertyRowMapper<>(DatosCntTituloExhibicionDTO.class));
} catch (Exception e) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::obtenerTitulosRecienExhibidos]: " + e.getMessage());
throw new Exception(e.getMessage());
}
return lobResultado;
}
@Override
public List<DatosCntTituloExhibicionDTO> obtenerContratosRecienExhibidos(String pstFechaReferencia) throws Exception {
List<DatosCntTituloExhibicionDTO> lobResultado = new ArrayList<>();
StringBuilder sb = new StringBuilder();
List<Object> qryParams = new ArrayList<>();
try { try {
//String lstFechaReferencia = (pstFechaReferencia != null && pstFechaReferencia.length() > 0) ? pstFechaReferencia : ""; //String lstFechaReferencia = (pstFechaReferencia != null && pstFechaReferencia.length() > 0) ? pstFechaReferencia : "";
...@@ -339,7 +390,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -339,7 +390,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
public boolean actualizaFechaNotificacion(ContratoTituloDTO dto) throws Exception { public boolean actualizaFechaNotificacion(ContratoTituloDTO dto) throws Exception {
boolean resultado = Boolean.FALSE; boolean resultado = Boolean.FALSE;
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
final String sbCon = "SELECT NOMBRE_UNICO AS nombre, TEMPORADA AS temporada FROM DDA_T_CONTRATO_TITULO WHERE ID_TITULO_CNTORIG = ?"; final String sbCon = "SELECT NOMBRE_UNICO AS nombre, TEMPORADA AS temporada, ID_CONTRATO AS contrato FROM DDA_T_CONTRATO_TITULO WHERE ID_TITULO_CNTORIG = ?";
List<Object> qryParam = new ArrayList<>(); List<Object> qryParam = new ArrayList<>();
List<Object> qryParams = new ArrayList<>(); List<Object> qryParams = new ArrayList<>();
...@@ -366,8 +417,10 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -366,8 +417,10 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
sb.append("WHERE "); sb.append("WHERE ");
sb.append("NOMBRE_UNICO = ? "); sb.append("NOMBRE_UNICO = ? ");
sb.append("AND TEMPORADA = ? "); sb.append("AND TEMPORADA = ? ");
sb.append("AND ID_CONTRATO = ? ");
qryParams.add(lobResultado.get(0).getNombre()); qryParams.add(lobResultado.get(0).getNombre());
qryParams.add(lobResultado.get(0).getTemporada()); qryParams.add(lobResultado.get(0).getTemporada());
qryParams.add(lobResultado.get(0).getContrato());
LOG.debug(">Sql_D [Actualizacion de todos los titulos de la serie]:" + sb.toString()); LOG.debug(">Sql_D [Actualizacion de todos los titulos de la serie]:" + sb.toString());
} }
} }
...@@ -844,6 +897,12 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -844,6 +897,12 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
StringBuffer sbD = new StringBuffer(); StringBuffer sbD = new StringBuffer();
List<Object> qryParams = new ArrayList<Object>(); List<Object> qryParams = new ArrayList<Object>();
final String sbCon = "SELECT NOMBRE_UNICO AS nombre, TEMPORADA AS temporada, ID_CONTRATO AS contrato FROM DDA_T_CONTRATO_TITULO WHERE ID_TITULO_CNTORIG = ?";
List<Object> qryParam = new ArrayList<>();
qryParam.add(idtitulo);
try { try {
//--Debug //--Debug
sbD.append("UPDATE DDA_T_CONTRATO_TITULO SET ESTATUS_SAP =' "); sbD.append("UPDATE DDA_T_CONTRATO_TITULO SET ESTATUS_SAP =' ");
...@@ -852,14 +911,29 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -852,14 +911,29 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
sbD.append(idtitulo); sbD.append(idtitulo);
LOG.debug(">Sql_D [actualizarEstatusSapTitulos]:" + sbD.toString()); LOG.debug(">Sql_D [actualizarEstatusSapTitulos]:" + sbD.toString());
//--Ejecucion List<TituloDTO> lobResultado = getJdbcTemplate().query(sbCon, qryParam.toArray(), new BeanPropertyRowMapper<>(TituloDTO.class));
if (Objects.nonNull(lobResultado) && lobResultado.size() > 0) {
if (Objects.isNull(lobResultado.get(0).getTemporada())) {
sb.append("UPDATE DDA_T_CONTRATO_TITULO SET ESTATUS_SAP = ? "); sb.append("UPDATE DDA_T_CONTRATO_TITULO SET ESTATUS_SAP = ? ");
sb.append(" WHERE ID_TITULO_CNT = ? "); sb.append(" WHERE ID_TITULO_CNT = ? ");
sb.append(idtitulo);
final String lstSQL = sb.toString();
qryParams.add(mensaje); qryParams.add(mensaje);
qryParams.add(idtitulo); qryParams.add(idtitulo);
} else {
sb.append("UPDATE DDA_T_CONTRATO_TITULO SET ESTATUS_SAP = ? ");
sb.append("WHERE ");
sb.append("NOMBRE_UNICO = ? ");
sb.append("AND TEMPORADA = ? ");
sb.append("AND ID_CONTRATO = ? ");
qryParams.add(mensaje);
qryParams.add(lobResultado.get(0).getNombre());
qryParams.add(lobResultado.get(0).getTemporada());
qryParams.add(lobResultado.get(0).getContrato());
}
}
//--Ejecucion
final String lstSQL = sb.toString();
jdbcTemplate.update(lstSQL, qryParams.toArray()); jdbcTemplate.update(lstSQL, qryParams.toArray());
...@@ -868,6 +942,34 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -868,6 +942,34 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
} }
} }
public String validarIdSap(String numeroContrato){
StringBuilder sb = new StringBuilder();
List<Object> qryParams = new ArrayList<>();
String lstValor = "";
try {
sb.append("SELECT tit.ID_SAP AS ID_SAP FROM DDA_T_CONTRATO cnt inner join DDA_T_CONTRATO_TITULO tit on cnt.ID_CONTRATO = tit.ID_CONTRATO ");
sb.append("WHERE cnt.NUMERO_CONTRATO = '" + numeroContrato + "' AND tit.ID_SAP IS NOT NULL GROUP BY tit.ID_SAP ");
LOG.debug(">Sql_D [verificaEjecutandoseProcesoNotificacion]:" + sb.toString());
final String lstSQL = sb.toString();
lstValor = (String) jdbcTemplate.queryForObject(lstSQL, qryParams.toArray(), String.class);
if (Objects.nonNull(lstValor) && !lstValor.isEmpty()) {
lstValor = "";
}
} catch (EmptyResultDataAccessException er) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::verificaEjecutandoseProcesoNotificacion]: No se encontraron registros coincidentes con la clave especificada. " + er.getMessage());
} catch (Exception e) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::verificaEjecutandoseProcesoNotificacion]: " + e.getMessage());
}
return lstValor;
}
} }
...@@ -17,6 +17,7 @@ public interface IDDAExhibicionDAO ...@@ -17,6 +17,7 @@ public interface IDDAExhibicionDAO
public boolean verificaEjecutandoseProcesoNotificacion() throws Exception; public boolean verificaEjecutandoseProcesoNotificacion() throws Exception;
public boolean updateEjecutandoseProcesoNotificacion(String pstValor) throws Exception; public boolean updateEjecutandoseProcesoNotificacion(String pstValor) throws Exception;
public List<DatosCntTituloExhibicionDTO> obtenerTitulosRecienExhibidos(String pstFechaReferencia) throws Exception; public List<DatosCntTituloExhibicionDTO> obtenerTitulosRecienExhibidos(String pstFechaReferencia) throws Exception;
public List<DatosCntTituloExhibicionDTO> obtenerContratosRecienExhibidos(String pstFechaReferencia) throws Exception;
public boolean actualizaFechaNotificacion(ContratoTituloDTO dto) throws Exception; public boolean actualizaFechaNotificacion(ContratoTituloDTO dto) throws Exception;
public boolean insertarRegistroSubnum(String pstIdTituloCnt) throws Exception; public boolean insertarRegistroSubnum(String pstIdTituloCnt) throws Exception;
public List<ItemActivoFijoDTO> obtenerTitulosSinIdSAP_RecienExhibidos(String pstFechaReferencia) throws Exception; public List<ItemActivoFijoDTO> obtenerTitulosSinIdSAP_RecienExhibidos(String pstFechaReferencia) throws Exception;
......
...@@ -5,19 +5,30 @@ import java.util.ArrayList; ...@@ -5,19 +5,30 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* Representa el manejo interno que se le dara al llamado del WS a SAP para Notificar Activos Fijos (Titulos recien exhibidos). * Representa el manejo interno que se le dara al llamado del WS a SAP para
* considerando los posibles escenarios de exito y error. * Notificar Activos Fijos (Titulos recien exhibidos). considerando los posibles
* Si el objeto TransactionFaultDTO tiene valores, entonces ocurrio alguna excepcion en el llamado. * escenarios de exito y error. Si el objeto TransactionFaultDTO tiene valores,
* Si la lista de RespSAPNotificaAFijoDTO tiene valores entonces la conexion al servicio se realizo satisfactoriamente. * entonces ocurrio alguna excepcion en el llamado. Si la lista de
* En resumen, ambos objetos deben ser mutuamente excluyentes, indicando el exito o el error segun haya sucedido. * RespSAPNotificaAFijoDTO tiene valores entonces la conexion al servicio se
* realizo satisfactoriamente. En resumen, ambos objetos deben ser mutuamente
* excluyentes, indicando el exito o el error segun haya sucedido.
*/ */
public class ResultadoNotificacionDTO implements Serializable public class ResultadoNotificacionDTO implements Serializable {
{
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private List<RespSAPNotificaAFijoDTO> notificaciones = new ArrayList<RespSAPNotificaAFijoDTO>(); private List<RespSAPNotificaAFijoDTO> notificaciones = new ArrayList<RespSAPNotificaAFijoDTO>();
private TransactionFaultDTO transFault = new TransactionFaultDTO(); private TransactionFaultDTO transFault = new TransactionFaultDTO();
private Integer titulosEnviados;
private boolean resultado; private boolean resultado;
public Integer getTitulosEnviados() {
return titulosEnviados;
}
public void setTitulosEnviados(Integer titulosEnviados) {
this.titulosEnviados = titulosEnviados;
}
public List<RespSAPNotificaAFijoDTO> getNotificaciones() { public List<RespSAPNotificaAFijoDTO> getNotificaciones() {
return notificaciones; return notificaciones;
} }
...@@ -42,8 +53,7 @@ public class ResultadoNotificacionDTO implements Serializable ...@@ -42,8 +53,7 @@ public class ResultadoNotificacionDTO implements Serializable
this.resultado = resultado; this.resultado = resultado;
} }
public String toString() public String toString() {
{
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
String NEW_LINE = System.getProperty("line.separator"); String NEW_LINE = System.getProperty("line.separator");
result.append(" [Begin of Class] " + NEW_LINE); result.append(" [Begin of Class] " + NEW_LINE);
...@@ -51,6 +61,7 @@ public class ResultadoNotificacionDTO implements Serializable ...@@ -51,6 +61,7 @@ public class ResultadoNotificacionDTO implements Serializable
result.append(" notificaciones: _" + this.getNotificaciones().size() + "_" + NEW_LINE); result.append(" notificaciones: _" + this.getNotificaciones().size() + "_" + NEW_LINE);
result.append(" tFault: _" + this.getTransFault().toString() + "_" + NEW_LINE); result.append(" tFault: _" + this.getTransFault().toString() + "_" + NEW_LINE);
result.append(" resultado: _" + this.getResultado() + "_" + NEW_LINE); result.append(" resultado: _" + this.getResultado() + "_" + NEW_LINE);
result.append(" titulosEnviados: _" + this.getTitulosEnviados() + "_" + NEW_LINE);
result.append(" [End of Class] " + NEW_LINE); result.append(" [End of Class] " + NEW_LINE);
result.append("}"); result.append("}");
NEW_LINE = null; NEW_LINE = null;
......
...@@ -13,6 +13,7 @@ public class TituloDTO { ...@@ -13,6 +13,7 @@ public class TituloDTO {
private String nombre; private String nombre;
private String temporada; private String temporada;
private String contrato;
public String getNombre() { public String getNombre() {
return nombre; return nombre;
...@@ -30,4 +31,12 @@ public class TituloDTO { ...@@ -30,4 +31,12 @@ public class TituloDTO {
this.temporada = temporada; this.temporada = temporada;
} }
public String getContrato() {
return contrato;
}
public void setContrato(String contrato) {
this.contrato = contrato;
}
} }
...@@ -32,40 +32,19 @@ public class service extends HttpServlet { ...@@ -32,40 +32,19 @@ public class service extends HttpServlet {
@Override @Override
public void doGet(HttpServletRequest request, HttpServletResponse response) public void doGet(HttpServletRequest request, HttpServletResponse response)
throws IOException, ServletException { throws IOException, ServletException {
response.setContentType("text/html"); response.setContentType("application/json");
PrintWriter out = response.getWriter(); PrintWriter out = response.getWriter();
out.println("<html>"); String msg = ejec();
out.println("<head>"); out.write("{\"rows\":\"" + msg + "\"}");
out.println("<title>Ejecucion Notificacion SAP</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Ejecucion Notificacion SAP<</h1>");
out.println("</body>");
out.println("</html>");
ejec();
} }
public void ejec() { public String ejec() {
ScheduledExecutorService se = Executors.newScheduledThreadPool(5);
ScheduledFuture sf = se.schedule(new Callable() {
@Override
public Object call() throws Exception {
// System.out.println("##################################_______________AQUI_______________");
ApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml"); ApplicationContext context = new ClassPathXmlApplicationContext("ApplicationContext.xml");
setEx((DDAExhibicion) context.getBean("exhibicion_DDA")); setEx((DDAExhibicion) context.getBean("exhibicion_DDA"));
getEx().ejecutaProceso(); getEx().ejecutaProceso();
// System.out.println("##################################_______________AQUI2_______________"); return "OK";
return "Done";
}
}, 1, TimeUnit.SECONDS);//Retrazo de tiempo
// System.out.println("Result of ScheduledFuture: " );
se.shutdown();
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment