Cambios de interfaz de contingencia contratos especificos

parent 86a888a2
...@@ -15,6 +15,10 @@ public class RegistroMontoDTO { ...@@ -15,6 +15,10 @@ public class RegistroMontoDTO {
private String sistema; private String sistema;
private String idSap; private String idSap;
private String idBroadView; private String idBroadView;
private Long idContrato;
private String numContrato;
private Date fechaFin;
private Date fechaInicio;
@Override @Override
public String toString() { public String toString() {
......
...@@ -5,6 +5,7 @@ import lombok.Data; ...@@ -5,6 +5,7 @@ import lombok.Data;
@Data @Data
public class ReporteInterfazContingenciaDTO { public class ReporteInterfazContingenciaDTO {
private String contrato;
private String titulo; private String titulo;
private String idBroadview; private String idBroadview;
private String fechaInicio; private String fechaInicio;
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
No preview for this file type
#Generated by Maven #Generated by Maven
#Tue Jul 18 22:00:06 CDT 2023 #Tue Aug 08 13:11:49 CDT 2023
version=1.1 version=1.1
groupId=com.mx.dla groupId=com.mx.dla
artifactId=dominio artifactId=dominio
...@@ -374,7 +374,7 @@ public class OpcionesContratoAction extends BaseContratoAction { ...@@ -374,7 +374,7 @@ public class OpcionesContratoAction extends BaseContratoAction {
DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_EXHIBICION); DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_EXHIBICION);
ResponseTitulosBroadViewDTO response = null; ResponseTitulosBroadViewDTO response = null;
try { try {
response = c.get(StringUtils.EMPTY, ResponseTitulosBroadViewDTO.class); response = c.get("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
} catch (Exception e) { } catch (Exception e) {
logger.info("Error: {}", e); logger.info("Error: {}", e);
tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato); tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato);
...@@ -383,7 +383,7 @@ public class OpcionesContratoAction extends BaseContratoAction { ...@@ -383,7 +383,7 @@ public class OpcionesContratoAction extends BaseContratoAction {
DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_CLIENTE_SAP); DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_CLIENTE_SAP);
ResponseTitulosBroadViewDTO response = null; ResponseTitulosBroadViewDTO response = null;
try { try {
response = c.get(StringUtils.EMPTY, ResponseTitulosBroadViewDTO.class); response = c.get("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
} catch (Exception e) { } catch (Exception e) {
logger.info("Error: {}", e); logger.info("Error: {}", e);
tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato); tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato);
......
...@@ -15,7 +15,7 @@ import com.mx.dla.dda.reporte.pago.dtos.ReporteRowDTO; ...@@ -15,7 +15,7 @@ import com.mx.dla.dda.reporte.pago.dtos.ReporteRowDTO;
public class ReporteContingenciaAction extends BaseContratoAction { public class ReporteContingenciaAction extends BaseContratoAction {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String idCon; private List<String> idCon;
private Date fechaInicio; private Date fechaInicio;
private Date fechaFin; private Date fechaFin;
private String[] llaves; private String[] llaves;
...@@ -28,18 +28,16 @@ public class ReporteContingenciaAction extends BaseContratoAction { ...@@ -28,18 +28,16 @@ public class ReporteContingenciaAction extends BaseContratoAction {
private ReporteContingenciaBO ReporteContingenciaBO; private ReporteContingenciaBO ReporteContingenciaBO;
public String execute() { public String execute() {
//setEncabezado(ReporteContingenciaBO.obtenerEncabezado(fechaInicio));
setEncabezado(ReporteContingenciaBO.obtenerEncabezado()); setEncabezado(ReporteContingenciaBO.obtenerEncabezado());
// setInfoReporte(ReporteContingenciaBO.obtenInfoReportePago(idCon, fechaInicio, fechaFin, llaves, idEstudio));
reporte = ReporteContingenciaBO.obteneReporte(idCon, idEstudio); reporte = ReporteContingenciaBO.obteneReporte(idCon, idEstudio);
return SUCCESS; return SUCCESS;
} }
public void setIdCon(String idCon) { public void setIdCon(List<String> idCon) {
this.idCon = idCon; this.idCon = idCon;
} }
public String getIdCon() { public List<String> getIdCon() {
return idCon; return idCon;
} }
......
.ui-multiselect { padding:2px 0 2px 4px; text-align:left }
.ui-multiselect span.ui-icon { float:right }
.ui-multiselect-single .ui-multiselect-checkboxes input { left:-9999px; position:absolute !important; top: auto !important; }
.ui-multiselect-single .ui-multiselect-checkboxes label { padding:5px !important }
.ui-multiselect-header { margin-bottom:3px; padding:3px 0 3px 4px; }
.ui-multiselect-header ul { font-size:0.9em }
.ui-multiselect-header ul li { float:left; padding:0 10px 0 0; }
.ui-multiselect-header a { text-decoration:none; }
.ui-multiselect-header a:hover { text-decoration:underline; }
.ui-multiselect-header span.ui-icon { float:left; }
.ui-multiselect-header .ui-multiselect-close { float:right; padding-right:0; text-align:right; }
.ui-multiselect-menu { display:none; padding:3px; position:absolute; text-align: left; }
.ui-multiselect-checkboxes { overflow-y:auto; position:relative; }
.ui-multiselect-checkboxes label { border:1px solid transparent; cursor:default; display:block; padding:3px 1px; }
.ui-multiselect-checkboxes label input { position:relative; top:1px }
.ui-multiselect-checkboxes label img { height: 30px; vertical-align: middle; padding-right: 3px;}
.ui-multiselect-checkboxes li { clear:both; font-size:0.9em; list-style: none; padding-right:3px; }
.ui-multiselect-checkboxes .ui-multiselect-optgroup { padding: 3px; }
.ui-multiselect-columns { display: inline-block; vertical-align: top; }
.ui-multiselect-checkboxes .ui-multiselect-optgroup a { border-bottom:1px solid; cursor: pointer; display:block; font-weight:bold; margin:1px 0; padding:3px; text-align:center; text-decoration:none; }
@media print{
.ui-multiselect-menu {display: none;}
}
...@@ -2,6 +2,7 @@ $().ready(function() { ...@@ -2,6 +2,7 @@ $().ready(function() {
//console.log('Iniciando pantalla'); //console.log('Iniciando pantalla');
$("#loadingDiv").hide(); $("#loadingDiv").hide();
$("#labelDiv").hide(); $("#labelDiv").hide();
$("#campoContrato").multiselect();
}); });
function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){
...@@ -11,6 +12,7 @@ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){ ...@@ -11,6 +12,7 @@ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){
type: 'POST', type: 'POST',
data: jsonActionParameter, data: jsonActionParameter,
dataType: "json", dataType: "json",
traditional: true,
success:function(response){ success:function(response){
functionProcessor(response); functionProcessor(response);
}, },
...@@ -25,12 +27,11 @@ function procesaDetalleContratos(jsonData) { ...@@ -25,12 +27,11 @@ function procesaDetalleContratos(jsonData) {
//console.info(JSON.stringify(jsonData)); //console.info(JSON.stringify(jsonData));
var contratos = jsonData.detalleContratos; var contratos = jsonData.detalleContratos;
$('#campoContrato').find('option').remove();
$("#campoContrato").multiselect('destroy');
if(contratos.length > 0){ if(contratos.length > 0){
$("#campoContrato").prop( "disabled", false); $("#campoContrato").prop( "disabled", false);
$('#campoContrato').find('option').remove();
$("#campoContrato").append('<option value="">Todos</option>');
$("#botonConsultar").prop( "disabled", false); $("#botonConsultar").prop( "disabled", false);
//$("#botonNotificar").prop( "disabled", false); //$("#botonNotificar").prop( "disabled", false);
//$("#botonExportar").prop( "disabled", false); //$("#botonExportar").prop( "disabled", false);
...@@ -42,8 +43,6 @@ function procesaDetalleContratos(jsonData) { ...@@ -42,8 +43,6 @@ function procesaDetalleContratos(jsonData) {
$("#campoContrato").append('<option value="' + cnt.idContrato + '">' + cnt.numeroContrato + '</option>'); $("#campoContrato").append('<option value="' + cnt.idContrato + '">' + cnt.numeroContrato + '</option>');
} }
}else { }else {
$("#campoContrato").prop( "disabled", true); $("#campoContrato").prop( "disabled", true);
$("#botonConsultar").prop( "disabled", true); $("#botonConsultar").prop( "disabled", true);
...@@ -53,9 +52,22 @@ function procesaDetalleContratos(jsonData) { ...@@ -53,9 +52,22 @@ function procesaDetalleContratos(jsonData) {
showError("El estudio seleccionado no tiene contratos asociados"); showError("El estudio seleccionado no tiene contratos asociados");
console.log('Es nulo'); console.log('Es nulo');
} }
reloadMultiSelect();
} }
function reloadMultiSelect() {
$("#campoContrato").multiselect({
columns: 1,
texts: {
placeholder: 'Seleccione contratos',
search : 'B&uacute;squeda contratos'
},
search: true,
selectAll: true
});
}
function llamaObtenerDetalleContratos() { function llamaObtenerDetalleContratos() {
...@@ -73,6 +85,7 @@ function procesaReportePrincipal(jsonData) { ...@@ -73,6 +85,7 @@ function procesaReportePrincipal(jsonData) {
console.info(JSON.stringify(jsonData)); console.info(JSON.stringify(jsonData));
var colNamesVar = [ var colNamesVar = [
'contrato',
'titulo', 'titulo',
'idBroadview', 'idBroadview',
'fechaInicio', 'fechaInicio',
...@@ -81,7 +94,8 @@ function procesaReportePrincipal(jsonData) { ...@@ -81,7 +94,8 @@ function procesaReportePrincipal(jsonData) {
'anio', 'anio',
'meses' 'meses'
]; ];
var colModelVar= [{name:'titulo',index:'titulo', width:300, align:"left", sortable:false}, var colModelVar= [{name:'contrato',index:'contrato', width:80, align:"left", sortable:false},
{name:'titulo',index:'titulo', width:300, align:"left", sortable:false},
{name:'idBroadview',index:'idBroadview', width:80, frozen : true, sortable:false}, {name:'idBroadview',index:'idBroadview', width:80, frozen : true, sortable:false},
{name:'fechaInicio',index:'fechaInicio', width:150, align:"right", sortable:false}, {name:'fechaInicio',index:'fechaInicio', width:150, align:"right", sortable:false},
{name:'fechaFin',index:'fechaFin', width:150, align:"right", sortable:false}, {name:'fechaFin',index:'fechaFin', width:150, align:"right", sortable:false},
...@@ -91,6 +105,7 @@ function procesaReportePrincipal(jsonData) { ...@@ -91,6 +105,7 @@ function procesaReportePrincipal(jsonData) {
]; ];
var colModelNames = [ var colModelNames = [
'contrato',
'titulo', 'titulo',
'idBroadview', 'idBroadview',
'fechaInicio', 'fechaInicio',
...@@ -183,9 +198,23 @@ function llamaReporteInfoAction(){ //Funcion de boton Consultar ...@@ -183,9 +198,23 @@ function llamaReporteInfoAction(){ //Funcion de boton Consultar
textoLabel(); textoLabel();
$("#labelDiv").show(); $("#labelDiv").show();
$("#reporteTableDiv").hide(); $("#reporteTableDiv").hide();
var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}'; const selectedOptions = [];
var stringJson = JSON.parse(jsonString); const options = $("#campoContrato").val();
callActionAjax( "/admin/reporteContingencia/reporteContInf", stringJson, procesaReportePrincipal); for (let i = 0; i < options.length; i++) {
selectedOptions.push(options[i]);
}
const jsonObject = {
idCon: selectedOptions,
fechaInicio: "01/01/2021",
fechaFin:"01/01/2022",
idEstudio: $("#campoEstudio").val()
};
//var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}';
//var stringJson = JSON.parse(jsonString);
const jsonString = JSON.stringify(jsonObject);
console.log(jsonString);
callActionAjax( "/admin/reporteContingencia/reporteContInf", jsonObject, procesaReportePrincipal);
} }
function descargarReporteEnExcel() { function descargarReporteEnExcel() {
...@@ -217,14 +246,25 @@ function textoLabel(){ ...@@ -217,14 +246,25 @@ function textoLabel(){
} }
function notificarSAP(){ function notificarSAP(){
var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}'; const adenmOrig = [];
var stringJson = JSON.parse(jsonString); const enmiendas = [];
const str2 = $("#campoContrato option:selected").text(); $("#campoContrato option:selected").each(function () {
if(str2.endsWith('A') || str2.endsWith('O') || str2.endsWith('V')){ var $this = $(this);
$.ajax({ if ($this.length) {
var str2 = $this.text();
if(str2.endsWith('A') || str2.endsWith('O') || str2.endsWith('V')){
adenmOrig.push($this.val());
} else {
enmiendas.push($this.val());
}
}
});
if(adenmOrig.length > 0) {
$.ajax({
url: '/DDA_CRN_Exhibicion/servicio', url: '/DDA_CRN_Exhibicion/servicio',
type: 'GET', type: 'GET',
dataType: "json", dataType: "json",
data: {lista: JSON.stringify(adenmOrig)},
success:function(response){ success:function(response){
console.log("Servicio ejecutado correctamente "); console.log("Servicio ejecutado correctamente ");
showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP"); showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP");
...@@ -234,11 +274,13 @@ function notificarSAP(){ ...@@ -234,11 +274,13 @@ function notificarSAP(){
showError("Fallo en ejecuci&oacute;n de Notificaci&oacute;n SAP."); showError("Fallo en ejecuci&oacute;n de Notificaci&oacute;n SAP.");
} }
}); });
} else { }
if(enmiendas.length > 0) {
$.ajax({ $.ajax({
url: '/DDA_CRN_ClienteSAP/servicioEnmienda', url: '/DDA_CRN_ClienteSAP/servicioEnmienda',
type: 'GET', type: 'GET',
dataType: "json", dataType: "json",
data: {lista: JSON.stringify(enmiendas)},
success:function(response){ success:function(response){
console.log("Servicio ejecutado correctamente "); console.log("Servicio ejecutado correctamente ");
showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP"); showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP");
...@@ -249,5 +291,6 @@ function notificarSAP(){ ...@@ -249,5 +291,6 @@ function notificarSAP(){
} }
}); });
} }
} }
<%@include file="/jsp/common/defaultTopLogin.jsp"%> <%@include file="/jsp/common/defaultTopLogin.jsp"%>
<script src="${contextPath}/js/dda/admin/reporte/multiselect/jquery.multiselect.js"></script>
<link rel="stylesheet" href="${contextPath}/css/dda/contrato/multiselect/jquery.multiselect.css">
<script src="${contextPath}/js/dda/admin/reporte/reporteContingencia.js?v=${versionJS}"></script> <script src="${contextPath}/js/dda/admin/reporte/reporteContingencia.js?v=${versionJS}"></script>
<style type="text/css"> <style type="text/css">
...@@ -28,10 +30,10 @@ ...@@ -28,10 +30,10 @@
</div> </div>
<div class="col-xs-1"></div> <div class="col-xs-1"></div>
<div class="col-xs-1"> <div class="col-xs-1">
<label class="control-label" for="campoContrato">Contrato:</label> <label class="control-label" for="campoContrato">Contratos:</label>
</div> </div>
<div class="col-xs-3"> <div class="col-xs-3">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" onclick="" disabled onchange=""> <select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple">
</select> </select>
</div> </div>
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
No preview for this file type
...@@ -7,7 +7,7 @@ error.002 = DLA-002: El usuario no tiene un perfil definido ...@@ -7,7 +7,7 @@ error.002 = DLA-002: El usuario no tiene un perfil definido
error.003 = DLA-003: Proporcione un usuario v&aacute;lido error.003 = DLA-003: Proporcione un usuario v&aacute;lido
error.004 = DLA-004: Proporcione una contrase&ntilde;a v&aacute;lida error.004 = DLA-004: Proporcione una contrase&ntilde;a v&aacute;lida
cooking.date=07-19-2023 cooking.date=08-08-2023
#sociedad = NT07 #sociedad = NT07
#centro.de.costos = 07A01US602 #centro.de.costos = 07A01US602
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -2,6 +2,7 @@ $().ready(function() { ...@@ -2,6 +2,7 @@ $().ready(function() {
//console.log('Iniciando pantalla'); //console.log('Iniciando pantalla');
$("#loadingDiv").hide(); $("#loadingDiv").hide();
$("#labelDiv").hide(); $("#labelDiv").hide();
$("#campoContrato").multiselect();
}); });
function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){
...@@ -11,6 +12,7 @@ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){ ...@@ -11,6 +12,7 @@ function callActionAjax(actionRoute, jsonActionParameter, functionProcessor){
type: 'POST', type: 'POST',
data: jsonActionParameter, data: jsonActionParameter,
dataType: "json", dataType: "json",
traditional: true,
success:function(response){ success:function(response){
functionProcessor(response); functionProcessor(response);
}, },
...@@ -25,12 +27,11 @@ function procesaDetalleContratos(jsonData) { ...@@ -25,12 +27,11 @@ function procesaDetalleContratos(jsonData) {
//console.info(JSON.stringify(jsonData)); //console.info(JSON.stringify(jsonData));
var contratos = jsonData.detalleContratos; var contratos = jsonData.detalleContratos;
$('#campoContrato').find('option').remove();
$("#campoContrato").multiselect('destroy');
if(contratos.length > 0){ if(contratos.length > 0){
$("#campoContrato").prop( "disabled", false); $("#campoContrato").prop( "disabled", false);
$('#campoContrato').find('option').remove();
$("#campoContrato").append('<option value="">Todos</option>');
$("#botonConsultar").prop( "disabled", false); $("#botonConsultar").prop( "disabled", false);
//$("#botonNotificar").prop( "disabled", false); //$("#botonNotificar").prop( "disabled", false);
//$("#botonExportar").prop( "disabled", false); //$("#botonExportar").prop( "disabled", false);
...@@ -42,8 +43,6 @@ function procesaDetalleContratos(jsonData) { ...@@ -42,8 +43,6 @@ function procesaDetalleContratos(jsonData) {
$("#campoContrato").append('<option value="' + cnt.idContrato + '">' + cnt.numeroContrato + '</option>'); $("#campoContrato").append('<option value="' + cnt.idContrato + '">' + cnt.numeroContrato + '</option>');
} }
}else { }else {
$("#campoContrato").prop( "disabled", true); $("#campoContrato").prop( "disabled", true);
$("#botonConsultar").prop( "disabled", true); $("#botonConsultar").prop( "disabled", true);
...@@ -53,9 +52,22 @@ function procesaDetalleContratos(jsonData) { ...@@ -53,9 +52,22 @@ function procesaDetalleContratos(jsonData) {
showError("El estudio seleccionado no tiene contratos asociados"); showError("El estudio seleccionado no tiene contratos asociados");
console.log('Es nulo'); console.log('Es nulo');
} }
reloadMultiSelect();
} }
function reloadMultiSelect() {
$("#campoContrato").multiselect({
columns: 1,
texts: {
placeholder: 'Seleccione contratos',
search : 'B&uacute;squeda contratos'
},
search: true,
selectAll: true
});
}
function llamaObtenerDetalleContratos() { function llamaObtenerDetalleContratos() {
...@@ -73,6 +85,7 @@ function procesaReportePrincipal(jsonData) { ...@@ -73,6 +85,7 @@ function procesaReportePrincipal(jsonData) {
console.info(JSON.stringify(jsonData)); console.info(JSON.stringify(jsonData));
var colNamesVar = [ var colNamesVar = [
'contrato',
'titulo', 'titulo',
'idBroadview', 'idBroadview',
'fechaInicio', 'fechaInicio',
...@@ -81,7 +94,8 @@ function procesaReportePrincipal(jsonData) { ...@@ -81,7 +94,8 @@ function procesaReportePrincipal(jsonData) {
'anio', 'anio',
'meses' 'meses'
]; ];
var colModelVar= [{name:'titulo',index:'titulo', width:300, align:"left", sortable:false}, var colModelVar= [{name:'contrato',index:'contrato', width:80, align:"left", sortable:false},
{name:'titulo',index:'titulo', width:300, align:"left", sortable:false},
{name:'idBroadview',index:'idBroadview', width:80, frozen : true, sortable:false}, {name:'idBroadview',index:'idBroadview', width:80, frozen : true, sortable:false},
{name:'fechaInicio',index:'fechaInicio', width:150, align:"right", sortable:false}, {name:'fechaInicio',index:'fechaInicio', width:150, align:"right", sortable:false},
{name:'fechaFin',index:'fechaFin', width:150, align:"right", sortable:false}, {name:'fechaFin',index:'fechaFin', width:150, align:"right", sortable:false},
...@@ -91,6 +105,7 @@ function procesaReportePrincipal(jsonData) { ...@@ -91,6 +105,7 @@ function procesaReportePrincipal(jsonData) {
]; ];
var colModelNames = [ var colModelNames = [
'contrato',
'titulo', 'titulo',
'idBroadview', 'idBroadview',
'fechaInicio', 'fechaInicio',
...@@ -183,9 +198,23 @@ function llamaReporteInfoAction(){ //Funcion de boton Consultar ...@@ -183,9 +198,23 @@ function llamaReporteInfoAction(){ //Funcion de boton Consultar
textoLabel(); textoLabel();
$("#labelDiv").show(); $("#labelDiv").show();
$("#reporteTableDiv").hide(); $("#reporteTableDiv").hide();
var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}'; const selectedOptions = [];
var stringJson = JSON.parse(jsonString); const options = $("#campoContrato").val();
callActionAjax( "/admin/reporteContingencia/reporteContInf", stringJson, procesaReportePrincipal); for (let i = 0; i < options.length; i++) {
selectedOptions.push(options[i]);
}
const jsonObject = {
idCon: selectedOptions,
fechaInicio: "01/01/2021",
fechaFin:"01/01/2022",
idEstudio: $("#campoEstudio").val()
};
//var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}';
//var stringJson = JSON.parse(jsonString);
const jsonString = JSON.stringify(jsonObject);
console.log(jsonString);
callActionAjax( "/admin/reporteContingencia/reporteContInf", jsonObject, procesaReportePrincipal);
} }
function descargarReporteEnExcel() { function descargarReporteEnExcel() {
...@@ -217,14 +246,25 @@ function textoLabel(){ ...@@ -217,14 +246,25 @@ function textoLabel(){
} }
function notificarSAP(){ function notificarSAP(){
var jsonString = '{"idCon" : "' + $("#campoContrato").val() + '", "fechaInicio":"01/01/2021", "fechaFin":"01/01/2022", "idEstudio":"'+ $("#campoEstudio").val() +'"}'; const adenmOrig = [];
var stringJson = JSON.parse(jsonString); const enmiendas = [];
const str2 = $("#campoContrato option:selected").text(); $("#campoContrato option:selected").each(function () {
if(str2.endsWith('A') || str2.endsWith('O') || str2.endsWith('V')){ var $this = $(this);
$.ajax({ if ($this.length) {
var str2 = $this.text();
if(str2.endsWith('A') || str2.endsWith('O') || str2.endsWith('V')){
adenmOrig.push($this.val());
} else {
enmiendas.push($this.val());
}
}
});
if(adenmOrig.length > 0) {
$.ajax({
url: '/DDA_CRN_Exhibicion/servicio', url: '/DDA_CRN_Exhibicion/servicio',
type: 'GET', type: 'GET',
dataType: "json", dataType: "json",
data: {lista: JSON.stringify(adenmOrig)},
success:function(response){ success:function(response){
console.log("Servicio ejecutado correctamente "); console.log("Servicio ejecutado correctamente ");
showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP"); showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP");
...@@ -234,11 +274,13 @@ function notificarSAP(){ ...@@ -234,11 +274,13 @@ function notificarSAP(){
showError("Fallo en ejecuci&oacute;n de Notificaci&oacute;n SAP."); showError("Fallo en ejecuci&oacute;n de Notificaci&oacute;n SAP.");
} }
}); });
} else { }
if(enmiendas.length > 0) {
$.ajax({ $.ajax({
url: '/DDA_CRN_ClienteSAP/servicioEnmienda', url: '/DDA_CRN_ClienteSAP/servicioEnmienda',
type: 'GET', type: 'GET',
dataType: "json", dataType: "json",
data: {lista: JSON.stringify(enmiendas)},
success:function(response){ success:function(response){
console.log("Servicio ejecutado correctamente "); console.log("Servicio ejecutado correctamente ");
showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP"); showMessage("Se ha ejecutado el proceso de Notificaci&oacute;n SAP");
...@@ -249,5 +291,6 @@ function notificarSAP(){ ...@@ -249,5 +291,6 @@ function notificarSAP(){
} }
}); });
} }
} }
...@@ -504,6 +504,10 @@ function seleccionaTodo() { ...@@ -504,6 +504,10 @@ function seleccionaTodo() {
} }
function desactivar() {
$("#bNotificar").prop( "disabled", true );
}
function fSeleccionarOpcionesCombo( pstIDCombo ) { function fSeleccionarOpcionesCombo( pstIDCombo ) {
var lobCombo = document.getElementById( pstIDCombo ); var lobCombo = document.getElementById( pstIDCombo );
......
<%@include file="/jsp/common/defaultTopLogin.jsp"%> <%@include file="/jsp/common/defaultTopLogin.jsp"%>
<script src="${contextPath}/js/dda/admin/reporte/multiselect/jquery.multiselect.js"></script>
<link rel="stylesheet" href="${contextPath}/css/dda/contrato/multiselect/jquery.multiselect.css">
<script src="${contextPath}/js/dda/admin/reporte/reporteContingencia.js?v=${versionJS}"></script> <script src="${contextPath}/js/dda/admin/reporte/reporteContingencia.js?v=${versionJS}"></script>
<style type="text/css"> <style type="text/css">
...@@ -28,10 +30,10 @@ ...@@ -28,10 +30,10 @@
</div> </div>
<div class="col-xs-1"></div> <div class="col-xs-1"></div>
<div class="col-xs-1"> <div class="col-xs-1">
<label class="control-label" for="campoContrato">Contrato:</label> <label class="control-label" for="campoContrato">Contratos:</label>
</div> </div>
<div class="col-xs-3"> <div class="col-xs-3">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" onclick="" disabled onchange=""> <select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple">
</select> </select>
</div> </div>
......
<%@include file="/jsp/common/defaultTopLogin.jsp"%> <%@include file="/jsp/common/defaultTopLogin.jsp"%>
<form action="operacionesContrato" method="post" id="forma" name="forma" <form action="operacionesContrato" method="post" id="forma" name="forma"
class="form-horizontal"> class="form-horizontal" onsubmit="desactivar()">
<div class="form-group"> <div class="form-group">
<!-- Separador que indica el concepto de los siguientes campos --> <!-- Separador que indica el concepto de los siguientes campos -->
......
#Generated by Maven #Generated by Maven
#Tue Jul 18 22:00:26 CDT 2023 #Tue Aug 08 13:12:10 CDT 2023
version=1.1 version=1.1
groupId=com.mx.dla groupId=com.mx.dla
artifactId=front artifactId=front
...@@ -16,15 +16,15 @@ public interface ReporteAmortizacionDAO { ...@@ -16,15 +16,15 @@ public interface ReporteAmortizacionDAO {
public List<RegistroMontoDTO> obtenMontosTotalesEstudio(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha); public List<RegistroMontoDTO> obtenMontosTotalesEstudio(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha);
public List<RegistroMontoDTO> obtenMontosTotalesContrato(@Param("idContrato")Long idContrato, @Param("fecha")String fecha, @Param("meses")Long meses); public List<RegistroMontoDTO> obtenMontosTotalesContrato(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha, @Param("meses")Long meses);
public List<ContratoConsultaDTO> consultaContratosConAmoritzacionPorEstudio(@Param("idEstudio")Long idEstudio); public List<ContratoConsultaDTO> consultaContratosConAmoritzacionPorEstudio(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha);
public List<MesesAmortizacionDTO> obtenerMesesAmortizacionSAP(@Param("idEstudio") Long idEstudio, @Param("fecha") String fecha); public List<MesesAmortizacionDTO> obtenerMesesAmortizacionSAP(@Param("idEstudio") Long idEstudio, @Param("fecha") String fecha);
public List<ContratoConsultaDTO> consultaContratosConAmoritzacionPorEstudioSAP(@Param("idEstudio")Long idEstudio); public List<ContratoConsultaDTO> consultaContratosConAmoritzacionPorEstudioSAP(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha);
public List<RegistroMontoDTO> obtenMontosTotalesContratoSAP(@Param("idContrato")Long idContrato, @Param("fecha")String fecha, @Param("meses")Long meses); public List<RegistroMontoDTO> obtenMontosTotalesContratoSAP(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha, @Param("meses")Long meses);
public List<RegistroMontoDTO> obtenMontosTotalesEstudioSAP(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha); public List<RegistroMontoDTO> obtenMontosTotalesEstudioSAP(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha);
......
...@@ -19,6 +19,8 @@ public interface ReportePagoDAO { ...@@ -19,6 +19,8 @@ public interface ReportePagoDAO {
public List<DetalleContratoDTO> obtenerDetalleContratoPorEstudio(@Param("idEstudio") Long idEstudio); public List<DetalleContratoDTO> obtenerDetalleContratoPorEstudio(@Param("idEstudio") Long idEstudio);
public List<DetalleContratoDTO> obtenerDetalleContratoPorEstudioSAP(@Param("idEstudio") Long idEstudio);
public List<DetalleContratoDTO> obtenerIdsEstudios(@Param("campos") List<String> campos, @Param("valores") List<Integer> valores); public List<DetalleContratoDTO> obtenerIdsEstudios(@Param("campos") List<String> campos, @Param("valores") List<Integer> valores);
public List<Long> obtenerIdContratos(); public List<Long> obtenerIdContratos();
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
<result property="sistema" column="SISTEMA" /> <result property="sistema" column="SISTEMA" />
<result property="idSap" column="ID_SAP" /> <result property="idSap" column="ID_SAP" />
<result property="idBroadView" column="ID_BV" /> <result property="idBroadView" column="ID_BV" />
<result property="idContrato" column="ID_CONTRATO" />
<result property="numContrato" column="NUMERO_CONTRATO" />
<result property="fechaFin" column="FECHA_FIN" />
<result property="fechaInicio" column="FECHA_INICIO" />
</resultMap> </resultMap>
<resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO"> <resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO">
...@@ -49,17 +53,34 @@ ...@@ -49,17 +53,34 @@
</select> </select>
<select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION, SELECT max(contratosEst.ID_CONTRATO) AS ID_CONTRATO, min(contratosEst.NUMERO_CONTRATO) AS NUMERO_CONTRATO, NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
FROM DDA_T_AMORTIZACION a FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = #{idContrato} AND INNER JOIN ( SELECT
TRUNC(a.MES) MAX(t.ID_CONTRATO) AS ID_CONTRATO,
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses}) 'DDA' AS SISTEMA
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES) FROM DDA_T_CONTRATO t
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
SELECT 1
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY
t.NUMERO_CONTRATO
ORDER BY
t.NUMERO_CONTRATO ASC ) contratosEst ON ct.ID_CONTRATO = contratosEst.ID_CONTRATO
WHERE TRUNC(a.MES)
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses})
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES)
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC
</select> </select>
<select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map">
...@@ -91,6 +112,7 @@ ...@@ -91,6 +112,7 @@
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5) t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY GROUP BY
t.NUMERO_CONTRATO t.NUMERO_CONTRATO
ORDER BY ORDER BY
...@@ -112,7 +134,8 @@ ...@@ -112,7 +134,8 @@
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5) t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY GROUP BY
t.NUMERO_CONTRATO t.NUMERO_CONTRATO
ORDER BY ORDER BY
...@@ -120,17 +143,34 @@ ...@@ -120,17 +143,34 @@
</select> </select>
<select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION, SELECT max(contratosEst.ID_CONTRATO) AS ID_CONTRATO, min(contratosEst.NUMERO_CONTRATO) AS NUMERO_CONTRATO, NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
FROM DDA_T_AMORTIZACION_SAP a FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = #{idContrato} AND INNER JOIN ( SELECT
TRUNC(a.MES) MAX(t.ID_CONTRATO) AS ID_CONTRATO,
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses}) 'DDA' AS SISTEMA
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES) FROM DDA_T_CONTRATO t
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
SELECT 1
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY
t.NUMERO_CONTRATO
ORDER BY
t.NUMERO_CONTRATO ASC ) contratosEst ON ct.ID_CONTRATO = contratosEst.ID_CONTRATO
WHERE TRUNC(a.MES)
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses})
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES)
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC
</select> </select>
<select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map">
......
...@@ -94,6 +94,21 @@ ...@@ -94,6 +94,21 @@
tcnt.NUMERO_CONTRATO tcnt.NUMERO_CONTRATO
</select> </select>
<select id="obtenerDetalleContratoPorEstudioSAP" resultMap="detalleContrato">
<!-- SELECT ID_CONTRATO, NUMERO_CONTRATO FROM DDA_T_CONTRATO WHERE ID_ESTUDIO = #{idEstudio} ORDER BY NUMERO_CONTRATO -->
SELECT DISTINCT
tcnt.ID_CONTRATO, tcnt.NUMERO_CONTRATO
FROM
DDA_T_REPORTE_PAGO trp
JOIN DDA_T_CONTRATO tcnt ON trp.ID_CONTRATO = tcnt.ID_CONTRATO
JOIN DDA_T_CONTRATO_TITULO ct ON ct.ID_CONTRATO = tcnt.ID_CONTRATO
WHERE
tcnt.ID_ESTUDIO = #{idEstudio} AND
(ct.ID_SAP IS NULL OR ct.FECHA_NOTIFSAP IS NULL)
ORDER BY
tcnt.NUMERO_CONTRATO
</select>
<select id="obtenerIdsEstudios" resultMap="detalleContrato"> <select id="obtenerIdsEstudios" resultMap="detalleContrato">
SELECT SELECT
<if test="campos != null"> <if test="campos != null">
......
...@@ -11,6 +11,10 @@ ...@@ -11,6 +11,10 @@
<result property="sistema" column="SISTEMA" /> <result property="sistema" column="SISTEMA" />
<result property="idSap" column="ID_SAP" /> <result property="idSap" column="ID_SAP" />
<result property="idBroadView" column="ID_BV" /> <result property="idBroadView" column="ID_BV" />
<result property="idContrato" column="ID_CONTRATO" />
<result property="numContrato" column="NUMERO_CONTRATO" />
<result property="fechaFin" column="FECHA_FIN" />
<result property="fechaInicio" column="FECHA_INICIO" />
</resultMap> </resultMap>
<resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO"> <resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO">
...@@ -49,17 +53,34 @@ ...@@ -49,17 +53,34 @@
</select> </select>
<select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION, SELECT max(contratosEst.ID_CONTRATO) AS ID_CONTRATO, min(contratosEst.NUMERO_CONTRATO) AS NUMERO_CONTRATO, NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
FROM DDA_T_AMORTIZACION a FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = #{idContrato} AND INNER JOIN ( SELECT
TRUNC(a.MES) MAX(t.ID_CONTRATO) AS ID_CONTRATO,
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses}) 'DDA' AS SISTEMA
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES) FROM DDA_T_CONTRATO t
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
SELECT 1
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY
t.NUMERO_CONTRATO
ORDER BY
t.NUMERO_CONTRATO ASC ) contratosEst ON ct.ID_CONTRATO = contratosEst.ID_CONTRATO
WHERE TRUNC(a.MES)
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses})
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES)
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC
</select> </select>
<select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map">
...@@ -91,6 +112,7 @@ ...@@ -91,6 +112,7 @@
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5) t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY GROUP BY
t.NUMERO_CONTRATO t.NUMERO_CONTRATO
ORDER BY ORDER BY
...@@ -112,7 +134,8 @@ ...@@ -112,7 +134,8 @@
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5) t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY GROUP BY
t.NUMERO_CONTRATO t.NUMERO_CONTRATO
ORDER BY ORDER BY
...@@ -120,17 +143,34 @@ ...@@ -120,17 +143,34 @@
</select> </select>
<select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION, SELECT max(contratosEst.ID_CONTRATO) AS ID_CONTRATO, min(contratosEst.NUMERO_CONTRATO) AS NUMERO_CONTRATO, NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
FROM DDA_T_AMORTIZACION_SAP a FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = #{idContrato} AND INNER JOIN ( SELECT
TRUNC(a.MES) MAX(t.ID_CONTRATO) AS ID_CONTRATO,
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses}) 'DDA' AS SISTEMA
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES) FROM DDA_T_CONTRATO t
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
SELECT 1
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
WHERE ct.ID_CONTRATO = t.ID_CONTRATO) AND
t.ID_ESTATUS IN (4, 5)
AND TO_DATE(#{fecha}, 'MM/YYYY') &lt; t.FECHA_FIN
GROUP BY
t.NUMERO_CONTRATO
ORDER BY
t.NUMERO_CONTRATO ASC ) contratosEst ON ct.ID_CONTRATO = contratosEst.ID_CONTRATO
WHERE TRUNC(a.MES)
BETWEEN TO_DATE(#{fecha}, 'MM/YYYY') AND
ADD_MONTHS(TO_DATE(#{fecha}, 'MM/YYYY'), #{meses})
GROUP BY ct.ID_CONTRATO, TRUNC(a.MES)
ORDER BY ct.ID_CONTRATO, TRUNC(a.MES) ASC
</select> </select>
<select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map"> <select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map">
......
...@@ -94,6 +94,21 @@ ...@@ -94,6 +94,21 @@
tcnt.NUMERO_CONTRATO tcnt.NUMERO_CONTRATO
</select> </select>
<select id="obtenerDetalleContratoPorEstudioSAP" resultMap="detalleContrato">
<!-- SELECT ID_CONTRATO, NUMERO_CONTRATO FROM DDA_T_CONTRATO WHERE ID_ESTUDIO = #{idEstudio} ORDER BY NUMERO_CONTRATO -->
SELECT DISTINCT
tcnt.ID_CONTRATO, tcnt.NUMERO_CONTRATO
FROM
DDA_T_REPORTE_PAGO trp
JOIN DDA_T_CONTRATO tcnt ON trp.ID_CONTRATO = tcnt.ID_CONTRATO
JOIN DDA_T_CONTRATO_TITULO ct ON ct.ID_CONTRATO = tcnt.ID_CONTRATO
WHERE
tcnt.ID_ESTUDIO = #{idEstudio} AND
(ct.ID_SAP IS NULL OR ct.FECHA_NOTIFSAP IS NULL)
ORDER BY
tcnt.NUMERO_CONTRATO
</select>
<select id="obtenerIdsEstudios" resultMap="detalleContrato"> <select id="obtenerIdsEstudios" resultMap="detalleContrato">
SELECT SELECT
<if test="campos != null"> <if test="campos != null">
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
This diff is collapsed.
#Generated by Maven #Generated by Maven
#Tue Jul 18 22:00:13 CDT 2023 #Tue Aug 08 13:11:56 CDT 2023
version=1.1 version=1.1
groupId=com.mx.dla groupId=com.mx.dla
artifactId=persistencia artifactId=persistencia
...@@ -57,9 +57,9 @@ function toggleAllBoxes() { ...@@ -57,9 +57,9 @@ function toggleAllBoxes() {
<tr> <tr>
<td>Tests passed/Failed/Skipped:</td><td>0/0/0</td> <td>Tests passed/Failed/Skipped:</td><td>0/0/0</td>
</tr><tr> </tr><tr>
<td>Started on:</td><td>Tue Jul 18 22:00:13 CDT 2023</td> <td>Started on:</td><td>Tue Aug 08 13:11:56 CDT 2023</td>
</tr> </tr>
<tr><td>Total time:</td><td>0 seconds (0 ms)</td> <tr><td>Total time:</td><td>0 seconds (1 ms)</td>
</tr><tr> </tr><tr>
<td>Included groups:</td><td></td> <td>Included groups:</td><td></td>
</tr><tr> </tr><tr>
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter --> <!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="LAPTOP-HHND8GT5" tests="0" failures="0" timestamp="19 Jul 2023 03:00:13 GMT" time="0.0" errors="0"> <testsuite hostname="LAPTOP-HHND8GT5" tests="0" failures="0" timestamp="8 Aug 2023 18:11:56 GMT" time="0.001" errors="0">
</testsuite> </testsuite>
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Test set: TestSuite Test set: TestSuite
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.457 sec Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.464 sec
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Command line suite</th></tr><tr><td><a href="#t0">Command line test</a></td><td class="num">0</td><td class="num">0</td><td class="num">0</td><td class="num">0</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Command line suite</th></tr></tbody><tbody id="t0"></tbody></table><h2>Command line test</h2></body></html> <html xmlns="http://www.w3.org/1999/xhtml"><head><title>TestNG Report</title><style type="text/css">table {margin-bottom:10px;border-collapse:collapse;empty-cells:show}th,td {border:1px solid #009;padding:.25em .5em}th {vertical-align:bottom}td {vertical-align:top}table a {font-weight:bold}.stripe td {background-color: #E6EBF9}.num {text-align:right}.passedodd td {background-color: #3F3}.passedeven td {background-color: #0A0}.skippedodd td {background-color: #DDD}.skippedeven td {background-color: #CCC}.failedodd td,.attn {background-color: #F33}.failedeven td,.stripe .attn {background-color: #D00}.stacktrace {white-space:pre;font-family:monospace}.totop {font-size:85%;text-align:center;border-bottom:2px solid #000}</style></head><body><table><tr><th>Test</th><th># Passed</th><th># Skipped</th><th># Failed</th><th>Time (ms)</th><th>Included Groups</th><th>Excluded Groups</th></tr><tr><th colspan="7">Command line suite</th></tr><tr><td><a href="#t0">Command line test</a></td><td class="num">0</td><td class="num">0</td><td class="num">0</td><td class="num">1</td><td></td><td></td></tr></table><table><thead><tr><th>Class</th><th>Method</th><th>Start</th><th>Time (ms)</th></tr></thead><tbody><tr><th colspan="4">Command line suite</th></tr></tbody><tbody id="t0"></tbody></table><h2>Command line test</h2></body></html>
\ No newline at end of file \ No newline at end of file
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
<testng-results skipped="0" failed="0" total="0" passed="0"> <testng-results skipped="0" failed="0" total="0" passed="0">
<reporter-output> <reporter-output>
</reporter-output> </reporter-output>
<suite name="Command line suite" duration-ms="0" started-at="2023-07-19T03:00:13Z" finished-at="2023-07-19T03:00:13Z"> <suite name="Command line suite" duration-ms="1" started-at="2023-08-08T18:11:56Z" finished-at="2023-08-08T18:11:56Z">
<groups> <groups>
</groups> </groups>
<test name="Command line test" duration-ms="0" started-at="2023-07-19T03:00:13Z" finished-at="2023-07-19T03:00:13Z"> <test name="Command line test" duration-ms="1" started-at="2023-08-08T18:11:56Z" finished-at="2023-08-08T18:11:56Z">
</test> <!-- Command line test --> </test> <!-- Command line test -->
</suite> <!-- Command line suite --> </suite> <!-- Command line suite -->
</testng-results> </testng-results>
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -13,6 +13,7 @@ import java.util.Map; ...@@ -13,6 +13,7 @@ import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -40,36 +41,45 @@ public class ReporteAmortizacionBO extends BaseBO{ ...@@ -40,36 +41,45 @@ public class ReporteAmortizacionBO extends BaseBO{
List<RegistroRubroDTO> totalesPorContrato = new ArrayList<RegistroRubroDTO>(); List<RegistroRubroDTO> totalesPorContrato = new ArrayList<RegistroRubroDTO>();
List<ContratoConsultaDTO> contratosPorEstudio = reporteAmortizacionDAO //List<ContratoConsultaDTO> contratosPorEstudio = reporteAmortizacionDAO
.consultaContratosConAmoritzacionPorEstudio(idEstudio); // .consultaContratosConAmoritzacionPorEstudio(idEstudio, fecha);
List<RegistroMontoDTO> montosContrato = reporteAmortizacionDAO
.obtenMontosTotalesContrato(idEstudio, fecha, mesesSearch);
Map<Long, List<RegistroMontoDTO>> contratosMonto = new HashMap<Long,List<RegistroMontoDTO>>();
for(RegistroMontoDTO monto : montosContrato) {
if(Objects.isNull(contratosMonto.get(monto.getIdContrato()))) {
contratosMonto.put(monto.getIdContrato(), new ArrayList<RegistroMontoDTO>());
}
contratosMonto.get(monto.getIdContrato()).add(monto);
}
List<String> meses = getFechasAConsultar(fecha); List<String> meses = getFechasAConsultar(fecha);
for (ContratoConsultaDTO contrato : contratosPorEstudio) { for (Entry<Long, List<RegistroMontoDTO>> contrato : contratosMonto.entrySet()) {
Long idContrato = contrato.getIdContrato(); //Long idContrato = contrato.getIdContrato();
String numContrato = contrato.getNumeroContrato(); //String numContrato = contrato.getNumeroContrato();
List<RegistroMontoDTO> montosTotalesContrato = reporteAmortizacionDAO List<RegistroMontoDTO> montos = contrato.getValue();
.obtenMontosTotalesContrato(idContrato, fecha, mesesSearch);
List<RegistroMontoDTO> list = obtenMontosMesesVacios(meses); List<RegistroMontoDTO> list = obtenMontosMesesVacios(meses);
//completaMontosTotales(montosTotalesContrato); //completaMontosTotales(montosTotalesContrato);
if (montosTotalesContrato != null) { if (montos != null && !montos.isEmpty()) {
//System.out.println("Contrato: " + montos.get(0).getNumContrato() + " registros: " + montos.size());
for(RegistroMontoDTO item : montosTotalesContrato) for(RegistroMontoDTO item : montos)
buscaRegistroMontoMes(list, item); buscaRegistroMontoMes(list, item);
RegistroRubroDTO totalContrato = new RegistroRubroDTO(); RegistroRubroDTO totalContrato = new RegistroRubroDTO();
totalContrato.setId(idContrato); totalContrato.setId(contrato.getKey());
totalContrato.setDescripcion(numContrato); totalContrato.setDescripcion(montos.get(0).getNumContrato());
totalContrato.setMontoMes(list); totalContrato.setMontoMes(list);
totalContrato.setFechaFin(contrato.getFechaFin()); totalContrato.setFechaFin(montos.get(0).getFechaFin());
totalContrato.setFechainicio(contrato.getFechaInicio()); totalContrato.setFechainicio(montos.get(0).getFechaInicio());
totalContrato.setCodigoSAP("-"); totalContrato.setCodigoSAP("-");
totalContrato.setSistema(contrato.getSistema()); totalContrato.setSistema("DDA");
totalContrato.setIdBroadview("-"); totalContrato.setIdBroadview("-");
totalesPorContrato.add(totalContrato); totalesPorContrato.add(totalContrato);
} }
...@@ -196,7 +206,7 @@ public class ReporteAmortizacionBO extends BaseBO{ ...@@ -196,7 +206,7 @@ public class ReporteAmortizacionBO extends BaseBO{
for (int i = 0; total.getValue().size() > i; i++) { for (int i = 0; total.getValue().size() > i; i++) {
if(!total.getKey().equals(idEstudio.toString())) { if(!total.getKey().equals(idEstudio.toString())) {
if(totalesPorContratoAnioAnterior.get(total.getKey()).size() > i) { if(Objects.nonNull(totalesPorContratoAnioAnterior.get(total.getKey())) && totalesPorContratoAnioAnterior.get(total.getKey()).size() > i) {
if(Objects.nonNull(totalesPorContratoAnioAnterior.get(total.getKey()))) { if(Objects.nonNull(totalesPorContratoAnioAnterior.get(total.getKey()))) {
total.getValue().get(i) total.getValue().get(i)
.setAcumuladoAnterior(totalesPorContratoAnioAnterior .setAcumuladoAnterior(totalesPorContratoAnioAnterior
...@@ -385,34 +395,45 @@ public class ReporteAmortizacionBO extends BaseBO{ ...@@ -385,34 +395,45 @@ public class ReporteAmortizacionBO extends BaseBO{
List<RegistroRubroDTO> totalesPorContrato = new ArrayList<RegistroRubroDTO>(); List<RegistroRubroDTO> totalesPorContrato = new ArrayList<RegistroRubroDTO>();
List<ContratoConsultaDTO> contratosPorEstudio = reporteAmortizacionDAO.consultaContratosConAmoritzacionPorEstudioSAP(idEstudio); //List<ContratoConsultaDTO> contratosPorEstudio = reporteAmortizacionDAO.consultaContratosConAmoritzacionPorEstudioSAP(idEstudio, fecha);
List<RegistroMontoDTO> montosContrato = reporteAmortizacionDAO.obtenMontosTotalesContratoSAP(idEstudio, fecha, mesesSearch);
Map<Long, List<RegistroMontoDTO>> contratosMonto = new HashMap<Long,List<RegistroMontoDTO>>();
for(RegistroMontoDTO monto : montosContrato) {
if(Objects.isNull(contratosMonto.get(monto.getIdContrato()))) {
contratosMonto.put(monto.getIdContrato(), new ArrayList<RegistroMontoDTO>());
}
contratosMonto.get(monto.getIdContrato()).add(monto);
}
List<String> meses = getFechasAConsultar(fecha); List<String> meses = getFechasAConsultar(fecha);
for (ContratoConsultaDTO contrato : contratosPorEstudio) { for (Entry<Long, List<RegistroMontoDTO>> contrato : contratosMonto.entrySet()) {
Long idContrato = contrato.getIdContrato(); //Long idContrato = contrato.getIdContrato();
String numContrato = contrato.getNumeroContrato(); //String numContrato = contrato.getNumeroContrato();
List<RegistroMontoDTO> montosTotalesContrato = reporteAmortizacionDAO.obtenMontosTotalesContratoSAP(idContrato, fecha, mesesSearch); List<RegistroMontoDTO> montos = contrato.getValue();
List<RegistroMontoDTO> list = obtenMontosMesesVacios(meses); List<RegistroMontoDTO> list = obtenMontosMesesVacios(meses);
//completaMontosTotales(montosTotalesContrato); //completaMontosTotales(montosTotalesContrato);
if (montosTotalesContrato != null) { if (montos != null && !montos.isEmpty()) {
//System.out.println("SAP Contrato: " + montos.get(0).getNumContrato() + " registros: " + montos.size());
for(RegistroMontoDTO item : montosTotalesContrato) for(RegistroMontoDTO item : montos)
buscaRegistroMontoMes(list, item); buscaRegistroMontoMes(list, item);
RegistroRubroDTO totalContrato = new RegistroRubroDTO(); RegistroRubroDTO totalContrato = new RegistroRubroDTO();
totalContrato.setId(idContrato); totalContrato.setId(montos.get(0).getIdContrato());
totalContrato.setDescripcion(numContrato); totalContrato.setDescripcion(montos.get(0).getNumContrato());
totalContrato.setMontoMes(list); totalContrato.setMontoMes(list);
totalContrato.setFechaFin(contrato.getFechaFin()); totalContrato.setFechaFin(montos.get(0).getFechaFin());
totalContrato.setFechainicio(contrato.getFechaInicio()); totalContrato.setFechainicio(montos.get(0).getFechaInicio());
totalContrato.setCodigoSAP("-"); totalContrato.setCodigoSAP("-");
totalContrato.setSistema(contrato.getSistema()); totalContrato.setSistema("SAP");
totalContrato.setIdBroadview("-"); totalContrato.setIdBroadview("-");
totalesPorContrato.add(totalContrato); totalesPorContrato.add(totalContrato);
} }
......
...@@ -234,6 +234,7 @@ public class ReporteContingenciaBO extends BaseBO{ ...@@ -234,6 +234,7 @@ public class ReporteContingenciaBO extends BaseBO{
public String[] obtenerLlaves(){ public String[] obtenerLlaves(){
String[] llaves = { String[] llaves = {
"Contrato",
"Titulo", "Titulo",
"id Broadview", "id Broadview",
"Inicio", "Inicio",
...@@ -316,19 +317,21 @@ public class ReporteContingenciaBO extends BaseBO{ ...@@ -316,19 +317,21 @@ public class ReporteContingenciaBO extends BaseBO{
return parametros; return parametros;
} }
public List<ReporteInterfazContingenciaDTO> obteneReporte( String idContrato, Long idEstudio) { public List<ReporteInterfazContingenciaDTO> obteneReporte( List<String> contratos, Long idEstudio) {
List<ReporteInterfazContingenciaDTO> reporte = null; List<ReporteInterfazContingenciaDTO> reporte = new ArrayList<>();
try { try {
logger.debug("antes de reporte"); logger.debug("antes de reporte");
ContratoDTO contrato = generalesDAO.obtenerContrato(Long.parseLong(idContrato)); for( String idContrato : contratos) {
if(contrato.getNumeroContrato().endsWith("E") || contrato.getNumeroContrato().endsWith("C")) { ContratoDTO contrato = generalesDAO.obtenerContrato(Long.parseLong(idContrato));
reporte = reportePagoAlterno.obtenerReporteRowsEnmienda(idContrato); if(contrato.getNumeroContrato().endsWith("E") || contrato.getNumeroContrato().endsWith("C")) {
} else { reporte.addAll(reportePagoAlterno.obtenerReporteRowsEnmienda(idContrato));
reporte = reportePagoAlterno.obtenerReporteRowsC( idContrato, idEstudio); } else {
reporte.addAll(reportePagoAlterno.obtenerReporteRowsC( idContrato, idEstudio));
}
logger.debug("Regresando reporte");
} }
logger.debug("Regresando reporte");
}catch(Exception ex){ }catch(Exception ex){
logger.error("[{}]", ex); logger.error("[{}]", ex);
logger.debug("No regresa reporte reporte"); logger.debug("No regresa reporte reporte");
......
...@@ -182,7 +182,7 @@ public class ReportePagoAlternoImpl extends BaseBO implements ReportePagoAlterno ...@@ -182,7 +182,7 @@ public class ReportePagoAlternoImpl extends BaseBO implements ReportePagoAlterno
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
StringBuilder query = new StringBuilder(); StringBuilder query = new StringBuilder();
query.append("select dtct.DESC_TITULO AS titulo, dtct.id_bv AS idBroadview, dtct.fecha_inicio AS fechaInicio,dtct.fecha_fin AS fechaFin, "); query.append("select dtc.NUMERO_CONTRATO AS CONTRATO, dtct.DESC_TITULO AS titulo, dtct.id_bv AS idBroadview, dtct.fecha_inicio AS fechaInicio,dtct.fecha_fin AS fechaFin, ");
query.append("SUBSTR(dtct.VIDA_UTIL ,0,2) anio, SUBSTR(dtct.VIDA_UTIL ,3) meses, dtct.costo, dtc.ID_CONTRATO AS idContrato "); query.append("SUBSTR(dtct.VIDA_UTIL ,0,2) anio, SUBSTR(dtct.VIDA_UTIL ,3) meses, dtct.costo, dtc.ID_CONTRATO AS idContrato ");
query.append("FROM DDA_T_CONTRATO_TITULO dtct "); query.append("FROM DDA_T_CONTRATO_TITULO dtct ");
query.append("INNER JOIN DDA_T_CONTRATO dtc ON dtct.ID_CONTRATO = dtc.ID_CONTRATO "); query.append("INNER JOIN DDA_T_CONTRATO dtc ON dtct.ID_CONTRATO = dtc.ID_CONTRATO ");
...@@ -213,9 +213,11 @@ public class ReportePagoAlternoImpl extends BaseBO implements ReportePagoAlterno ...@@ -213,9 +213,11 @@ public class ReportePagoAlternoImpl extends BaseBO implements ReportePagoAlterno
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
StringBuilder query = new StringBuilder(); StringBuilder query = new StringBuilder();
query.append("SELECT DESC_TITULO AS titulo, ID_BV AS idBroadview, a.FECHA_INICIO AS fechaInicio, a.FECHA_FIN AS fechaFin, COSTO, "); query.append("SELECT dtc.NUMERO_CONTRATO AS CONTRATO, DESC_TITULO AS titulo, a.ID_BV AS idBroadview, a.FECHA_INICIO AS fechaInicio, a.FECHA_FIN AS fechaFin, COSTO, ");
query.append(" SUBSTR(VIDA_UTIL ,0,2) AS anio, SUBSTR(VIDA_UTIL ,3) AS meses, b.ID_CONTRATO AS idContrato FROM DDA_T_CONTRATO_TITULO a "); query.append(" SUBSTR(VIDA_UTIL ,0,2) AS anio, SUBSTR(VIDA_UTIL ,3) AS meses, b.ID_CONTRATO AS idContrato FROM DDA_T_CONTRATO_TITULO a ");
query.append(" JOIN DDA_T_CRN_CLIENTESAP b ON a.ID_TITULO_CNT = b.ID_TITULO_CNT WHERE a.ID_CONTRATO = "); query.append(" JOIN DDA_T_CRN_CLIENTESAP b ON a.ID_TITULO_CNT = b.ID_TITULO_CNT ");
query.append(" JOIN DDA_T_CONTRATO dtc ON a.ID_CONTRATO = dtc.ID_CONTRATO" );
query.append(" WHERE a.ID_CONTRATO = ");
query.append(idContrato); query.append(idContrato);
query.append(" AND to_date(a.FECHA_CONTABILIZACION,'dd/mm/yyyy') <= to_date(sysdate,'dd/mm/yyyy') "); query.append(" AND to_date(a.FECHA_CONTABILIZACION,'dd/mm/yyyy') <= to_date(sysdate,'dd/mm/yyyy') ");
query.append(" and FECHA_ENVIO_OK is NULL "); query.append(" and FECHA_ENVIO_OK is NULL ");
......
...@@ -234,7 +234,7 @@ public class ReportePagoBO extends BaseBO{ ...@@ -234,7 +234,7 @@ public class ReportePagoBO extends BaseBO{
try { try {
detalleContratos = reportePagoDAO.obtenerDetalleContratoPorEstudio(idEstudio); detalleContratos = reportePagoDAO.obtenerDetalleContratoPorEstudioSAP(idEstudio);
}catch(Exception ex) { }catch(Exception ex) {
logger.error("[{}]", ex); logger.error("[{}]", ex);
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P ...@@ -77,8 +77,8 @@ uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_P
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/ uri.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion******************* #*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito #sociedad tambien se usa en Nota Credito
......
No preview for this file type
#Generated by Maven #Generated by Maven
#Tue Jul 18 22:00:19 CDT 2023 #Tue Aug 08 13:12:02 CDT 2023
version=1.1 version=1.1
groupId=com.mx.dla groupId=com.mx.dla
artifactId=servicios artifactId=servicios
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