ultimas adecuaciones para creacion y notificacion de contratos

parent 34109ab6
#----------------------------------------------- #-----------------------------------------------
# Ambiente local/desarrollo/preprod/produccion # Ambiente local/desarrollo/preprod/produccion
#----------------------------------------------- #-----------------------------------------------
ambiente=desarrollo ambiente=preprod
#----------------------------------------------- #-----------------------------------------------
# Variables Generales # Variables Generales
...@@ -17,14 +17,19 @@ sap.services.credenciales=${${ambiente}.sap.services.credenciales} ...@@ -17,14 +17,19 @@ sap.services.credenciales=${${ambiente}.sap.services.credenciales}
#----------------------------------------------- #-----------------------------------------------
produccion.database.jndi=jdbc/DBDLA produccion.database.jndi=jdbc/DBDLA
produccion.log4j.properties.location=classpath:log4j.prod.properties produccion.log4j.properties.location=classpath:log4j.prod.properties
#produccion.servidor.sap.ws =10.94.182.93 #produccion.servidor.sap.ws=10.94.182.93
produccion.servidor.sap.ws =amcopocipr-1.amxcontenido.local produccion.servidor.sap.ws =amcoPOCIPR-1.amxcontenido.local
produccion.puerto.sap.ws =50000 produccion.puerto.sap.ws=50200
#produccion.sap.services.credenciales=EXDDA001:4Mxdd4&P1 #produccion.sap.services.credenciales=EXDDA001:4Mxdd4&P1
produccion.sap.services.credenciales=ZAMC_DDA:FJ12y$.43 produccion.sap.services.credenciales=ZAMC_DDA:FJ12y$.43
produccion.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo produccion.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo
produccion.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido produccion.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido
produccion.clientws.interface.i99=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_TerminosComerciales_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaTerminosComerciales
produccion.centro.costo=0908A05000 produccion.centro.costo=0908A05000
produccion.id.material.mg.transaccional=52
produccion.id.material.overage.transaccional=52
produccion.id.material.licensefee=52
produccion.id.material.suscripcion=52
...@@ -32,15 +37,21 @@ produccion.centro.costo=0908A05000 ...@@ -32,15 +37,21 @@ produccion.centro.costo=0908A05000
# Propiedades Preproduccion # Propiedades Preproduccion
#----------------------------------------------- #-----------------------------------------------
preprod.database.jndi=jdbc/DBDLA preprod.database.jndi=jdbc/DBDLA
preprod.log4j.properties.location=classpath:log4j.dev.properties preprod.log4j.properties.location=classpath:log4j.pre.properties
#preprod.servidor.sap.ws =10.94.182.80 #preprod.servidor.sap.ws=10.94.182.80
preprod.servidor.sap.ws =amcopodev-6.amxcontenido.local preprod.servidor.sap.ws =amcopociqa-1.amxcontenido.local
preprod.puerto.sap.ws =50000 preprod.puerto.sap.ws=50000
#preprod.sap.services.credenciales=EXDDA001:4Mxdd4&P1 #preprod.sap.services.credenciales=EXDDA001:4Mxdd4&P1
preprod.sap.services.credenciales=ZAMC_DDA:FJ12y$.43 preprod.sap.services.credenciales=ZAMC_DDA:FJ12y$.43
preprod.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo preprod.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo
preprod.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido preprod.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido
preprod.clientws.interface.i99=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_TerminosComerciales_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaTerminosComerciales
preprod.centro.costo=0908A05000 preprod.centro.costo=0908A05000
#preprod.centro.costo=07UOVAB002
preprod.id.material.mg.transaccional=52
preprod.id.material.overage.transaccional=52
preprod.id.material.licensefee=52
preprod.id.material.suscripcion=52
......
...@@ -2,12 +2,6 @@ ...@@ -2,12 +2,6 @@
<project-private xmlns="http://www.netbeans.org/ns/project-private/1"> <project-private xmlns="http://www.netbeans.org/ns/project-private/1">
<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/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/dao/IDDAExhibicionDAO.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/dao/DDAExhibicionDAO.java</file>
</group>
</open-files> </open-files>
</project-private> </project-private>
#----------------------------------------------- #-----------------------------------------------
# Ambiente local/desarrollo/preprod/produccion # Ambiente local/desarrollo/preprod/produccion
#----------------------------------------------- #-----------------------------------------------
ambiente=desarrollo ambiente=preprod
#----------------------------------------------- #-----------------------------------------------
# Variables Generales # Variables Generales
...@@ -17,14 +17,19 @@ sap.services.credenciales=${${ambiente}.sap.services.credenciales} ...@@ -17,14 +17,19 @@ sap.services.credenciales=${${ambiente}.sap.services.credenciales}
#----------------------------------------------- #-----------------------------------------------
produccion.database.jndi=jdbc/DBDLA produccion.database.jndi=jdbc/DBDLA
produccion.log4j.properties.location=classpath:log4j.prod.properties produccion.log4j.properties.location=classpath:log4j.prod.properties
#produccion.servidor.sap.ws =10.94.182.93 #produccion.servidor.sap.ws=10.94.182.93
produccion.servidor.sap.ws =amcopocipr-1.amxcontenido.local produccion.servidor.sap.ws =amcoPOCIPR-1.amxcontenido.local
produccion.puerto.sap.ws =50000 produccion.puerto.sap.ws=50200
#produccion.sap.services.credenciales=EXDDA001:4Mxdd4&P1 #produccion.sap.services.credenciales=EXDDA001:4Mxdd4&P1
produccion.sap.services.credenciales=ZAMC_DDA:FJ12y$.43 produccion.sap.services.credenciales=ZAMC_DDA:FJ12y$.43
produccion.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo produccion.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo
produccion.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido produccion.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido
produccion.clientws.interface.i99=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_PRD&receiverParty=&receiverService=&interface=SI_TerminosComerciales_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaTerminosComerciales
produccion.centro.costo=0908A05000 produccion.centro.costo=0908A05000
produccion.id.material.mg.transaccional=52
produccion.id.material.overage.transaccional=52
produccion.id.material.licensefee=52
produccion.id.material.suscripcion=52
...@@ -32,15 +37,21 @@ produccion.centro.costo=0908A05000 ...@@ -32,15 +37,21 @@ produccion.centro.costo=0908A05000
# Propiedades Preproduccion # Propiedades Preproduccion
#----------------------------------------------- #-----------------------------------------------
preprod.database.jndi=jdbc/DBDLA preprod.database.jndi=jdbc/DBDLA
preprod.log4j.properties.location=classpath:log4j.dev.properties preprod.log4j.properties.location=classpath:log4j.pre.properties
#preprod.servidor.sap.ws =10.94.182.80 #preprod.servidor.sap.ws=10.94.182.80
preprod.servidor.sap.ws =amcopodev-6.amxcontenido.local preprod.servidor.sap.ws =amcopociqa-1.amxcontenido.local
preprod.puerto.sap.ws =50000 preprod.puerto.sap.ws=50000
#preprod.sap.services.credenciales=EXDDA001:4Mxdd4&P1 #preprod.sap.services.credenciales=EXDDA001:4Mxdd4&P1
preprod.sap.services.credenciales=ZAMC_DDA:FJ12y$.43 preprod.sap.services.credenciales=ZAMC_DDA:FJ12y$.43
preprod.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo preprod.clientws.interface.i10=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_ActivoFijo_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaActivoFijo
preprod.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido preprod.clientws.interface.i12=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_Contenido_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaContenido
preprod.clientws.interface.i99=http://%servidor%:%puerto%/XISOAPAdapter/MessageServlet?senderParty=&senderService=SYS_AM_1_DDA_QA&receiverParty=&receiverService=&interface=SI_TerminosComerciales_Out&interfaceNamespace=http://americamovil.com/DDA/1/F/EnviaTerminosComerciales
preprod.centro.costo=0908A05000 preprod.centro.costo=0908A05000
#preprod.centro.costo=07UOVAB002
preprod.id.material.mg.transaccional=52
preprod.id.material.overage.transaccional=52
preprod.id.material.licensefee=52
preprod.id.material.suscripcion=52
......
...@@ -37,7 +37,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -37,7 +37,7 @@ public class DDAExhibicion implements ApplicationContextAware {
} }
} }
public void ejecuta( List<String> contratosId) { public void ejecuta() {
ejecutaProceso(null); ejecutaProceso(null);
} }
...@@ -209,7 +209,7 @@ public class DDAExhibicion implements ApplicationContextAware { ...@@ -209,7 +209,7 @@ public class DDAExhibicion implements ApplicationContextAware {
//-- 9. Sos 22Ago17 Generacin de la amortizacin real de los titulos //-- 9. Sos 22Ago17 Generacin de la amortizacin real de los titulos
LOG.info(" [INI]. Paso 10.- Llamado a SP Amortizacion Real."); LOG.info(" [INI]. Paso 10.- Llamado a SP Amortizacion Real.");
boolean lboResultadoSP = bo.ejecutarSPAmortizacionReal(); boolean lboResultadoSP = bo.ejecutarSPAmortizacionReal(contratosId);
LOG.info(" [FIN]. Paso 10.- Llamado a SP Amortizacion Real. Resultado:_" + lboResultadoSP + "_"); LOG.info(" [FIN]. Paso 10.- Llamado a SP Amortizacion Real. Resultado:_" + lboResultadoSP + "_");
}//Ends if(lstFechaReferencia.trim().length() > 0) }//Ends if(lstFechaReferencia.trim().length() > 0)
......
...@@ -371,19 +371,19 @@ public class DDAExhibicionBO { ...@@ -371,19 +371,19 @@ public class DDAExhibicionBO {
} catch (WebServiceException c) { } catch (WebServiceException c) {
for (ItemActivoFijoDTO titulo : dto.getContratos()) { for (ItemActivoFijoDTO titulo : dto.getContratos()) {
writeResponse(tf, "DDA-AF-001", ERROR_COMUNICACION_SAP, c.getMessage(), method, titulo.getContratoDDA()); writeResponse(tf, "DDA-AF-001", ERROR_COMUNICACION_SAP, c.getMessage(), method, titulo.getCodigoDDA());
} }
resultado.setResultado(Boolean.FALSE); resultado.setResultado(Boolean.FALSE);
return resultado; return resultado;
} catch (SoapFaultClientException se) { } catch (SoapFaultClientException se) {
for (ItemActivoFijoDTO titulo : dto.getContratos()) { for (ItemActivoFijoDTO titulo : dto.getContratos()) {
writeResponse(tf, "DDA-AF-002", ERROR_INTERNO_SAP, se.getMessage(), method, titulo.getContratoDDA()); writeResponse(tf, "DDA-AF-002", ERROR_INTERNO_SAP, se.getMessage(), method, titulo.getCodigoDDA());
} }
resultado.setResultado(Boolean.FALSE); resultado.setResultado(Boolean.FALSE);
return resultado; return resultado;
} catch (Exception e) { } catch (Exception e) {
for (ItemActivoFijoDTO titulo : dto.getContratos()) { for (ItemActivoFijoDTO titulo : dto.getContratos()) {
writeResponse(tf, "DDA-AF-002", ERROR_PROCESO, e.getMessage(), method, titulo.getContratoDDA()); writeResponse(tf, "DDA-AF-002", ERROR_PROCESO, e.getMessage(), method, titulo.getCodigoDDA());
} }
resultado.setResultado(Boolean.FALSE); resultado.setResultado(Boolean.FALSE);
return resultado; return resultado;
...@@ -682,13 +682,17 @@ public class DDAExhibicionBO { ...@@ -682,13 +682,17 @@ public class DDAExhibicionBO {
this.dao = dao; this.dao = dao;
} }
public boolean ejecutarSPAmortizacionReal() throws Exception { public boolean ejecutarSPAmortizacionReal(String contratos) throws Exception {
LOG.debug(" - [" + this.getClass().getSimpleName() + "::ejecutarSPAmortizacionReal]"); LOG.debug(" - [" + this.getClass().getSimpleName() + "::ejecutarSPAmortizacionReal]");
boolean resultado = Boolean.FALSE; boolean resultado = Boolean.FALSE;
try { try {
resultado = dao.ejecutarSPAmortizacionReal(); if(Objects.isNull(contratos)){
resultado = dao.ejecutarSPAmortizacionReal();
} else {
resultado = dao.ejecutarSPAmortizacionReal(contratos);
}
} catch (Exception e) { } catch (Exception e) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::ejecutarSPAmortizacionReal]: " + e.getMessage()); LOG.error("Exception[" + this.getClass().getSimpleName() + "::ejecutarSPAmortizacionReal]: " + e.getMessage());
throw new Exception(e.getMessage()); throw new Exception(e.getMessage());
......
...@@ -21,6 +21,9 @@ import mx.com.amx.mx.dda.crn.dto.ItemActivoFijoDTO; ...@@ -21,6 +21,9 @@ import mx.com.amx.mx.dda.crn.dto.ItemActivoFijoDTO;
import mx.com.amx.mx.dda.crn.dto.ParametroDTO; import mx.com.amx.mx.dda.crn.dto.ParametroDTO;
import mx.com.amx.mx.dda.crn.dto.RespSAPActivoFijoDTO; import mx.com.amx.mx.dda.crn.dto.RespSAPActivoFijoDTO;
import mx.com.amx.mx.dda.crn.dto.TituloDTO; import mx.com.amx.mx.dda.crn.dto.TituloDTO;
import oracle.sql.ARRAY;
import oracle.sql.ArrayDescriptor;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;
@Component @Component
@Qualifier("ddaexhibicionDAO") @Qualifier("ddaexhibicionDAO")
...@@ -262,7 +265,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -262,7 +265,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
} }
sb.append("ORDER BY CNTTIT.FECHA_INICIO DESC) "); sb.append("ORDER BY CNTTIT.FECHA_INICIO DESC) ");
sb.append("WHERE rownum < 901 "); sb.append("WHERE rownum < 901 ");
sb.append("GROUP BY ID_SAP, SUBNUMERO, NUMERO_CONTRATO"); sb.append("GROUP BY ID_SAP, SUBNUMERO, NUMERO_CONTRATO ");
sb.append("ORDER BY ID_SAP, SUBNUMERO"); sb.append("ORDER BY ID_SAP, SUBNUMERO");
//--Debug //--Debug
...@@ -428,7 +431,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -428,7 +431,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
sb.append("and contrato.ID_TIPO_CONTRATO = 1 "); sb.append("and contrato.ID_TIPO_CONTRATO = 1 ");
if(Objects.nonNull(contratosId)){ if(Objects.nonNull(contratosId)){
sb.append("and contrato.ID_CONTRATO in ("); sb.append("and contrato.ID_CONTRATO in (");
sb.append(contratosId + ")"); sb.append(contratosId + ") ");
} }
sb.append("ORDER BY CNTTIT.FECHA_INICIO DESC)"); sb.append("ORDER BY CNTTIT.FECHA_INICIO DESC)");
sb.append("WHERE ROWNUM < 901 AND inicioAmortizacion IS NOT NULL "); sb.append("WHERE ROWNUM < 901 AND inicioAmortizacion IS NOT NULL ");
...@@ -486,7 +489,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -486,7 +489,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
sb.append("and contrato.ID_TIPO_CONTRATO = 1 "); sb.append("and contrato.ID_TIPO_CONTRATO = 1 ");
if(Objects.nonNull(contratosId)){ if(Objects.nonNull(contratosId)){
sb.append("and contrato.ID_CONTRATO in ("); sb.append("and contrato.ID_CONTRATO in (");
sb.append(contratosId + ")"); sb.append(contratosId + ") ");
} }
sb.append("GROUP BY contrato.ID_SAP, estudio.ID_SAP, contrato.NUMERO_CONTRATO, contrato.ID_CONTRATO_BV, contrato.NUMERO_CONTRATO "); sb.append("GROUP BY contrato.ID_SAP, estudio.ID_SAP, contrato.NUMERO_CONTRATO, contrato.ID_CONTRATO_BV, contrato.NUMERO_CONTRATO ");
sb.append("ORDER BY ordenCompra, inicioAmortizacion DESC "); sb.append("ORDER BY ordenCompra, inicioAmortizacion DESC ");
...@@ -589,7 +592,6 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -589,7 +592,6 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
LOG.debug(">Sql_D [ejecutarSPAmortizacionReal]:" + sb.toString()); LOG.debug(">Sql_D [ejecutarSPAmortizacionReal]:" + sb.toString());
final String lstSQL = sb.toString(); final String lstSQL = sb.toString();
int lnuRowsUpdate = jdbcTemplate.update(lstSQL, qryParams.toArray()); int lnuRowsUpdate = jdbcTemplate.update(lstSQL, qryParams.toArray());
if (lnuRowsUpdate >= 0) { if (lnuRowsUpdate >= 0) {
...@@ -602,6 +604,37 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -602,6 +604,37 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
return resultado; return resultado;
} }
@Override
public boolean ejecutarSPAmortizacionReal(String contratos) throws Exception {
boolean resultado = Boolean.FALSE;
StringBuilder sb = new StringBuilder();
List<Object> qryParams = new ArrayList<>();
try {
//--Ejecucion
sb.append("call DDA_AMORTIZACIONREAL_LISTA(?)");
//--Debug
LOG.debug(">Sql_D [ejecutarSPAmortizacionRealLista]:" + sb.toString());
final String lstSQL = sb.toString();
qryParams.add(contratos);
int lnuRowsUpdate = jdbcTemplate.update(lstSQL, qryParams.toArray());
if (lnuRowsUpdate >= 0) {
resultado = Boolean.TRUE;
}
} catch (Exception e) {
LOG.error("Exception[" + this.getClass().getSimpleName() + "::ejecutarSPAmortizacionRealLista]: " + e.getMessage());
throw new Exception(e.getMessage());
}
return resultado;
}
@Override @Override
public List<ContratoDTO> obtenerContratos(String contratosId) throws Exception { public List<ContratoDTO> obtenerContratos(String contratosId) throws Exception {
...@@ -628,7 +661,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO { ...@@ -628,7 +661,7 @@ public class DDAExhibicionDAO implements IDDAExhibicionDAO {
sb.append("and cnttit.FECHA_NOTIFSAP is null "); sb.append("and cnttit.FECHA_NOTIFSAP is null ");
if(Objects.nonNull(contratosId)){ if(Objects.nonNull(contratosId)){
sb.append("and cnt.ID_CONTRATO in ("); sb.append("and cnt.ID_CONTRATO in (");
sb.append(contratosId + ")"); sb.append(contratosId + ") ");
} }
sb.append("GROUP BY cnt.ID_SAP, cnt.ID_CONTRATO, cnt.NUMERO_CONTRATO "); sb.append("GROUP BY cnt.ID_SAP, cnt.ID_CONTRATO, cnt.NUMERO_CONTRATO ");
......
...@@ -24,6 +24,7 @@ public interface IDDAExhibicionDAO ...@@ -24,6 +24,7 @@ public interface IDDAExhibicionDAO
public List<ItemActivoFijoDTO> obtenerContratosConTitulosSinIdSAP_RecienExhibidos(String pstFechaReferencia, String contratosId) throws Exception; public List<ItemActivoFijoDTO> obtenerContratosConTitulosSinIdSAP_RecienExhibidos(String pstFechaReferencia, String contratosId) throws Exception;
public boolean actualizaIdSAPCntTitulo(RespSAPActivoFijoDTO dto) throws Exception; public boolean actualizaIdSAPCntTitulo(RespSAPActivoFijoDTO dto) throws Exception;
public boolean ejecutarSPAmortizacionReal() throws Exception; public boolean ejecutarSPAmortizacionReal() throws Exception;
public boolean ejecutarSPAmortizacionReal(String contratos) throws Exception;
public List<ContratoDTO> obtenerContratos(String contratosId) throws Exception; public List<ContratoDTO> obtenerContratos(String contratosId) throws Exception;
public List<ContratoDTO> obtenerContratosCandidatos(String contratosId) throws Exception; public List<ContratoDTO> obtenerContratosCandidatos(String contratosId) throws Exception;
public boolean eliminarIdSAPCntTitulo(String idcontrato) throws Exception; public boolean eliminarIdSAPCntTitulo(String idcontrato) throws Exception;
......
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