actualizacion de produccion

parent 5291a699
**/target/
/target/
*/target/*
.classpath
.project
.settings
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
package com.mx.dla.dda.admin.catalogos.estudios.dtos;
import java.io.Serializable;
public class CatalogoContratoDTO implements Serializable{
private static final long serialVersionUID = 7273988497345132540L;
private Integer idContrato;
private String numContrato;
public Integer getIdContrato() {
return idContrato;
}
public void setIdContrato(Integer idContrato) {
this.idContrato = idContrato;
}
public String getNumContrato() {
return numContrato;
}
public void setNumContrato(String numContrato) {
this.numContrato = numContrato;
}
}
......@@ -19,6 +19,8 @@ public class RegistroMontoDTO {
private String numContrato;
private Date fechaFin;
private Date fechaInicio;
private String color;
private Double costo;
@Override
public String toString() {
......
......@@ -20,12 +20,13 @@ public class RegistroRubroDTO {
private String nombreUnico;
private Date fechainicio;
private Date fechaFin;
private Double costo;
List<RegistroMontoDTO> montoMes;
@Override
public String toString() {
return "RegistroRubroDTO [id=" + id + ", descripcion=" + descripcion
return "RegistroRubroDTO [id=" + id + ", descripcion=" + descripcion + ", remanente=" + remanente
+ ", montoMes=" + montoMes + "]";
}
......
package com.mx.dla.dda.reporte.amortizacion.dtos;
import lombok.Data;
@Data
public class RemanenteDTO {
public String diferenciador;
public String remanente;
@Override
public String toString() {
return "RemanenteDTO [diferenciador=" + diferenciador
+ ", remanente=" + remanente + "]";
}
}
......@@ -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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
......
......@@ -76,7 +76,7 @@ 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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.titulosBroadView = http://localhost:5001/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
......
No preview for this file type
#Generated by Maven
#Tue Aug 08 13:11:49 CDT 2023
#Tue Nov 28 17:31:41 CST 2023
version=1.1
groupId=com.mx.dla
artifactId=dominio
......@@ -106,12 +106,14 @@ com\mx\dla\dda\contrato\notasDeCredito\dtos\NotaDeCreditoDbDTO.class
com\mx\dla\dda\contrato\ws\dtos\ResponseAdendumEnmiendaDTO.class
com\mx\dla\dda\contrato\titulo\exception\TituloException.class
com\mx\dla\dda\contrato\listado\dtos\ListadoBD.class
com\mx\dla\dda\admin\catalogos\estudios\dtos\CatalogoContratoDTO.class
com\mx\dla\dda\contrato\minimoseleccion\dtos\ContratoPagoFlatDTO.class
com\mx\dla\dda\admin\catalogos\materiales\dtos\CatalogoMaterialDTO.class
com\mx\dla\dda\excelMapper\dtos\ExcelMapper.class
com\mx\dla\dda\contrato\generales\dtos\WFSeguimientoDTO.class
com\mx\dla\dda\contrato\condicionesTransaccion\dtos\ContratoPtCmgDTO.class
com\mx\dla\dda\reporte\pago\dtos\ReporteInterfazContingenciaDTO.class
com\mx\dla\dda\reporte\amortizacion\dtos\RemanenteDTO.class
com\mx\dla\admin\dtos\UsuarioDTO.class
com\mx\dla\dda\contrato\condicionesLicense\constants\TipoCondicion.class
com\mx\dla\dda\contrato\amortizacion\exception\AmortizacionException.class
......
......@@ -234,6 +234,7 @@ C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dd
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\carga\transaccion\dtos\RowRepErrAsocTitulosDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\transaccion\fees\dtos\FeesTMinValoresDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\catalogos\dtos\RegionVentaDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\admin\catalogos\estudios\dtos\CatalogoContratoDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\reporte\pago\dtos\ReporteAddOnRowDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\promociones\dtos\PromocionTitulosDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\generales\dtos\ProcesoPendienteDTO.java
......@@ -326,6 +327,7 @@ C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dd
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\transaccion\titulos\dtos\TituloTransDB.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\transaccion\titulos\dtos\TituloValidaEstatusDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\contrato\ws\validarMinimoSeleccion\ResponseValidaMinimoSeleccionDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\reporte\amortizacion\dtos\RemanenteDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\factura\general\dtos\FacturaDetalleLDTO.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\carga\suscriptor\dtos\CargaSuscripcionBD.java
C:\Users\jfmj_\Documents\DDA\Githg\dda-front\dominio\src\main\java\com\mx\dla\dda\carga\transaccion\dtos\plantillaCargaTransaccionesDTO.java
......
......@@ -71,7 +71,7 @@ public class ObtenerTitulosBroadViewAction extends BaseContratoAction {
String request = contratoBv.toString() +"?formato=oracle&contrato_dda=" + contratoDda.toString();
ResponseTitulosBroadViewDTO response = null;
try {
response = c.get(request, ResponseTitulosBroadViewDTO.class);
response = c.getBv(request, ResponseTitulosBroadViewDTO.class);
} catch (Exception e) {
e.printStackTrace();
}
......
......@@ -374,7 +374,7 @@ public class OpcionesContratoAction extends BaseContratoAction {
DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_EXHIBICION);
ResponseTitulosBroadViewDTO response = null;
try {
response = c.get("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
response = c.getJson("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
} catch (Exception e) {
logger.info("Error: {}", e);
tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato);
......@@ -383,7 +383,7 @@ public class OpcionesContratoAction extends BaseContratoAction {
DLARestClient c = dlaRestClientFactory.getClient(DLARestServices.CRN_CLIENTE_SAP);
ResponseTitulosBroadViewDTO response = null;
try {
response = c.get("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
response = c.getJson("?lista=[\"" + idContrato + "\"]", ResponseTitulosBroadViewDTO.class);
} catch (Exception e) {
logger.info("Error: {}", e);
tituloBO.actualizaEstatusTitulo("ERROR DE CONEXION CON SERVICIO DDA", idContrato);
......
......@@ -12,16 +12,20 @@ import java.util.Map;
import java.util.Objects;
import java.util.Map.Entry;
import org.apache.commons.collections.map.HashedMap;
import org.apache.ibatis.exceptions.PersistenceException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoContratoDTO;
import com.mx.dla.dda.catalogos.bos.CatalogosBO;
import com.mx.dla.dda.catalogos.dtos.EstudioDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.generales.bos.PoblarGeneralesBO;
import com.mx.dla.dda.reporte.amortizacion.bos.ReporteAmortizacionBO;
import com.mx.dla.dda.reporte.amortizacion.daos.ReporteAmortizacionDAO;
import com.mx.dla.dda.reporte.amortizacion.dtos.RegistroMontoDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.RegistroRubroDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.RemanenteDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.SortByNumeroContrato;
import com.opensymphony.xwork2.Action;
......@@ -40,6 +44,7 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
private String fecha;
private List<String> fechasRango;
private List<EstudioDTO> estudios;
private List<CatalogoContratoDTO> contratos;
private RegistroRubroDTO totalesMontosEstudio;
private List<RegistroRubroDTO> totalesMontosContratos;
......@@ -50,6 +55,15 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
@Autowired
private PoblarGeneralesBO poblarGeneralesBO;
@Autowired
private ReporteAmortizacionDAO reporteAmortizacionDAO;
public String obtenerContratos() {
contratos = catalogosBO.getContratosByEstudio(idEstudio);
return Action.SUCCESS;
}
public String obtenerEstudios() {
......@@ -73,8 +87,18 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
year = Integer.parseInt(fecha.substring(3));
Integer month = Integer.parseInt(fecha.substring(0,2));
fecha = "01/" + year;
if(idEstudio != null && idEstudio > 0) {
totalesMontosContratosSAPDLA = reporteAmortizacionBO
.obtenListaMontosTotalesContratoPorEstudioDLASAP(idEstudio, fecha, year, month);
.obtenListaMontosTotalesContratoPorEstudioDLASAP(idEstudio,idContrato, fecha, year, month);
} else {
estudios = catalogosBO.obtenListaEstudios();
totalesMontosContratosSAPDLA = new HashedMap();
for (EstudioDTO estudio : estudios) {
totalesMontosContratosSAPDLA.putAll(
reporteAmortizacionBO
.obtenListaMontosTotalesContratoPorEstudioDLASAP(estudio.getIdEstudio(),idContrato, fecha, year, month));
}
}
List<String> fechas = reporteAmortizacionBO
.getFechasAConsultar(fecha);
......@@ -103,7 +127,7 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
totalesMontosEstudio = reporteAmortizacionBO
.obtenMontosTotalesPorEstudio(idEstudio, fecha);
totalesMontosContratos = reporteAmortizacionBO
.obtenListaMontosTotalesContratoPorEstudio(idEstudio, fecha, 12L);
.obtenListaMontosTotalesContratoPorEstudio(idEstudio,null, fecha, 12L);
List<String> fechas = reporteAmortizacionBO
.getFechasAConsultar(fecha);
......@@ -152,7 +176,7 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
totalesMontosEstudio = reporteAmortizacionBO
.obtenMontosTotalesPorEstudioSAP(idEstudio, fecha);
totalesMontosContratos = reporteAmortizacionBO
.obtenListaMontosTotalesContratoPorEstudioSAP(idEstudio, fecha, 12L);
.obtenListaMontosTotalesContratoPorEstudioSAP(idEstudio,null, fecha, 12L);
List<String> fechas = reporteAmortizacionBO
.getFechasAConsultar(fecha);
......@@ -199,10 +223,9 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
year = Integer.parseInt(fecha.substring(3));
Integer month = Integer.parseInt(fecha.substring(0,2));
fecha = "01/" + year;
totalesMontosTitulosSAPDLA = getListByYear(fecha);
Map<String, List<RegistroRubroDTO>> totalesAnioPasado = getListByYear("01/" + (year - 1));
Map<String, List<RegistroRubroDTO>> totalesAnioSiguiente = getListByYear("01/" + (year + 1));
totalesMontosTitulosSAPDLA = getListByYear(fecha, month + "/" + year);
Map<String, List<RegistroRubroDTO>> totalesAnioPasado = getListByYear("01/" + (year - 1), month + "/" + year);
Map<String, List<RegistroRubroDTO>> totalesAnioSiguiente = getListByYear("01/" + (year + 1), month + "/" + year);
for(Entry<String, List<RegistroRubroDTO>> total : totalesMontosTitulosSAPDLA.entrySet()) {
if(total.getValue().size() < 2) {
RegistroRubroDTO emptyValue = new RegistroRubroDTO();
......@@ -213,6 +236,7 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
emptyValue.setFechaFin(total.getValue().get(0).getFechaFin());
emptyValue.setCodigoSAP(total.getValue().get(0).getCodigoSAP());
emptyValue.setIdBroadview(total.getValue().get(0).getIdBroadview());
emptyValue.setRemanente(0.0);
total.getValue().add(emptyValue);
}
for (int i = 0; total.getValue().size() > i; i++) {
......@@ -232,23 +256,24 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
} else {
total.getValue().get(i).setAcumuladoPosterior(0.0);
}
Double r1 = total.getValue().get(i).getAcumuladoAnterior();
Double r2 = total.getValue().get(i).getAcumuladoPosterior();
int mon = 1;
for (RegistroMontoDTO mnt : total.getValue().get(i).getMontoMes()){
if(mon <= month) {
r1 += mnt.getMonto();
}
if(mon > month && mon <= 12 ) {
r2 += mnt.getMonto();
}
mon++;
}
total.getValue().get(i).setRemanente(r1 - r2);
} else {
total.getValue().get(i).setAcumuladoAnterior(0.0);
total.getValue().get(i).setAcumuladoPosterior(0.0);
total.getValue().get(i).setRemanente(0.0);
}
}
}
for (Entry<String, List<RegistroRubroDTO>> total :totalesMontosTitulosSAPDLA.entrySet()) {
for(RegistroMontoDTO mesDDA : total.getValue().get(0).getMontoMes()) {
for(RegistroMontoDTO mesSAP : total.getValue().get(1).getMontoMes()) {
if(mesDDA.getFecha() != null && mesDDA.getFecha().equals(mesSAP.getFecha())) {
if(mesDDA.getMonto().equals(mesSAP.getMonto())) {
mesDDA.setColor("right");
mesSAP.setColor("right");
} else {
mesDDA.setColor("danger");
mesSAP.setColor("danger");
}
}
}
}
}
......@@ -262,18 +287,33 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
return Action.SUCCESS;
}
public Map<String, List<RegistroRubroDTO>> getListByYear(String date) throws ParseException{
public Map<String, List<RegistroRubroDTO>> getListByYear(String date, String dateRM) throws ParseException{
montosTitulos = reporteAmortizacionBO
.obtenListaMontoTitulosPorContratoSAP(idContrato, date);
.obtenListaMontoTitulosPorContrato(idContrato, date);
montosTitulos.addAll(reporteAmortizacionBO
.obtenListaMontoTitulosPorContrato(idContrato, date));
.obtenListaMontoTitulosPorContratoSAP(idContrato, date));
List<RemanenteDTO> remanentes = reporteAmortizacionDAO.obtenerRemanente(idEstudio, idContrato.toString(), dateRM);
List<RemanenteDTO> remanentesSAP = reporteAmortizacionDAO.obtenerRemanenteSAP(idEstudio,idContrato.toString(), dateRM);
montosTitulos.sort(new SortByNumeroContrato());
Map<String, List<RegistroRubroDTO>> totalesMontosTitulos = new LinkedHashMap<String, List<RegistroRubroDTO>>();
for(RegistroRubroDTO total :montosTitulos) {
if(!totalesMontosTitulos.containsKey(total.getDescripcion())) {
totalesMontosTitulos.put(total.getDescripcion(), new ArrayList<RegistroRubroDTO>());
}
if(total.getSistema().equals("SAP")) {
for(RemanenteDTO remanente : remanentesSAP) {
if(remanente != null && total.getId().toString().equals(remanente.getDiferenciador())) {
total.setRemanente(Double.parseDouble(remanente.getRemanente()));
}
}
} else {
for(RemanenteDTO remanente : remanentes) {
if(remanente != null && total.getId().toString().equals(remanente.getDiferenciador())) {
total.setRemanente(Double.parseDouble(remanente.getRemanente()));
}
}
}
totalesMontosTitulos.get(total.getDescripcion()).add(total);
}
......@@ -372,5 +412,13 @@ public class ReporteAmortizacionAction extends BaseContratoAction{
public void setEstudios(List<EstudioDTO> estudios) {
this.estudios = estudios;
}
public List<CatalogoContratoDTO> getContratos() {
return contratos;
}
public void setContratos(List<CatalogoContratoDTO> contratos) {
this.contratos = contratos;
}
}
......@@ -857,6 +857,12 @@
<result name="success">/jsp/dda/reporte/amortizacion/reporteAmortizacion.jsp
</result>
</action>
<action name="obtenerContratosListado"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
method="obtenerContratos">
<result type="json" />
</action>
<action name="cargaInicialReporte"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
......
......@@ -64,9 +64,7 @@ function realizaConsulta(){
{"sTitle":"Moneda" ,"mDataProp":"moneda" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"C\u00F3digo Pa\u00EDs" ,"mDataProp":"codigoPais" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Nombre Pa\u00EDs" ,"mDataProp":"nombrePais" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Sociedad" ,"mDataProp":"sociedad" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Es ADD ON" ,"mDataProp":"esAddOn" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Nombre AddOn" ,"mDataProp":"addOn" ,"bSearchable": true, sWidth : "500px"},
{"sTitle":"Sociedad" ,"mDataProp":"sociedad" ,"bSearchable": true, sWidth : "400px"}
],
'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
......@@ -81,8 +79,6 @@ function realizaConsulta(){
$('td:eq(5)', nRow).html(aData["codigoPais"]);
$('td:eq(6)', nRow).html(aData["nombrePais"]);
$('td:eq(7)', nRow).html(aData["sociedad"]);
$('td:eq(8)', nRow).html(aData["esAddOn"] == 1 ? "Si" : "No");
$('td:eq(9)', nRow).html(aData["addOn"]);
}
});
......
......@@ -245,6 +245,23 @@ function textoLabel(){
}
function validarVacio(){
const adenmOrig = [];
const enmiendas = [];
$("#campoContrato option:selected").each(function () {
var $this = $(this);
if ($this.length) {
var str2 = $this.text();
adenmOrig.push($this.val());
}
});
if(adenmOrig.length === 0) {
$("#botonNotificar").prop( "disabled", true);
} else {
$("#botonNotificar").prop( "disabled", false);
}
}
function notificarSAP(){
const adenmOrig = [];
const enmiendas = [];
......
$('#modalTitulosContrato').on('shown.bs.modal', function () {
console.log("Hola soy tu modal" );
tituloController = new TituloController();
console.log("Hola soy tu modal titulos" );
tituloController = new TituloControllerTitulos();
});
function TituloController() {
this.grid = new TituloGrid("tituloGrid2");
function TituloControllerTitulos() {
this.grid = new TituloGridTitulos("tituloGrid2");
};
function TituloGrid(gridId) {
function TituloGridTitulos(gridId) {
this.gridId = gridId;
this.grid = null ;
var me = this;
console.log("tipo contrato: 2" );
console.log("tipo contrato: 2 titulos" );
this.columnsFijas = [
{ label: 'Estatus contrato', name: 'estatusContrato', width: 100, hidden:false },
{ label: 'Nombre unico', name: 'nombreUnico', width: 200, hidden:false },
......@@ -27,34 +27,34 @@ function TituloGrid(gridId) {
this.reload();
}
TituloGrid.prototype.getColumns = function() {
TituloGridTitulos.prototype.getColumns = function() {
return this.columns;
};
TituloGrid.prototype.reload = function() {
TituloGridTitulos.prototype.reload = function() {
this.genericLoadData( this.getData );
};
TituloGrid.prototype.reloadDetails = function(nu) {
TituloGridTitulos.prototype.reloadDetails = function(nu) {
this.genericLoadData( this.getDetails, nu );
};
TituloGrid.prototype.genericLoadData = function( loadData , nu) {
TituloGridTitulos.prototype.genericLoadData = function( loadData , nu) {
var me = this;
$("#dynTitulosGrid2").html("<table id='tituloGrid2'></table><div id='tituloGridPager'></div>");
var items = loadData(nu);
$("#loadingDiv2").hide();
if (items != null && items.length > 0)
{
console.log("Entra con objetos");
console.log("Entra con objetos titulos");
$("#dynTitulosGrid2").show();
this.init(items);
} else
{
//$("#warningDiv").show();
console.log("Entra sin objetos");
console.log("Entra sin objetos titulos");
$("#warningDiv2").show();
}
}
......@@ -65,7 +65,7 @@ function cerrarElementos2(){
$("#dynTitulosGrid2").hide();
}
TituloGrid.prototype.getData =function( ) {
TituloGridTitulos.prototype.getData =function( ) {
var items = {};
var jsonString = '{"contratoDda" : "' + $("#idContrato").val() + '"}';
var stringJson = JSON.parse(jsonString);
......@@ -84,7 +84,7 @@ TituloGrid.prototype.getData =function( ) {
return items;
};
TituloGrid.prototype.init = function(items) {
TituloGridTitulos.prototype.init = function(items) {
var me = this;
me.grid = $("#"+me.gridId).jqGrid({
data: items,
......
......@@ -208,11 +208,12 @@ function enviarOperacionEnmienda(idContrato, tipoContrato){
function defineTipoEnmienda(idContrato, tipoContrato){
document.getElementById('idContratoE').innerHTML=idContrato; //$("#idContrato").val(idContrato);
document.getElementById('tipoContrato').innerHTML=tipoContrato;
//document.getElementById('idContratoE').innerHTML=idContrato; //$("#idContrato").val(idContrato);
//document.getElementById('tipoContrato').innerHTML=tipoContrato;
$("#modalTipoEnmienda").find("h3").text("Seleccione el Tipo de Enmienda: ");
$("#modalTipoEnmienda").modal('show');
//$("#modalTipoEnmienda").find("h3").text("Seleccione el Tipo de Enmienda: ");
//$("#modalTipoEnmienda").modal('show');
showAdv("M\u00F3dulo deshabilitado temporalmente, favor de contactar al administrador.");
}
function getListaContratos(estudios){
......
......@@ -86,7 +86,7 @@ TerminoService.prototype.validarTermino = function(termino, costo) {
if(valido)
{
if(Math.round(costo) != Math.round(termino.costoContrato))
if(costo != termino.costoContrato)
{
valido = false;
mensaje = "La suma de los periodos m\u00E1s el anticipo, no cumple el total del costo del contrato.";
......@@ -176,5 +176,5 @@ TerminoService.prototype.obtenerMontoProgramado = function(termino) {
if(termino.pagoAnticipado != null && (termino.pagoAnticipado.monto != null && termino.pagoAnticipado.monto != ""))
totalPeriodos = totalPeriodos + parseFloat(termino.pagoAnticipado.monto);
return totalPeriodos;
return parseFloat(totalPeriodos.toFixed(2));
};
\ No newline at end of file
......@@ -236,15 +236,24 @@ function generarPeriodos(){
if($("input[id='cbanticipo']").prop('checked') && $("#antMonto").val() != "")
anticipo = $("#antMonto").val() != "" ? parseFloat(deleteCommas($("#antMonto").val())) : 0.0;
var costoNeto = costoCto - anticipo;
var monto = (costoCto - anticipo) / numPagos;
monto = monto.toFixed(2);
var resto = costoCto - ((monto*numPagos) + anticipo);
var diferencia = 0;
if (costoNeto != (monto * numPagos)){
diferencia = (monto * numPagos) - costoNeto;
}
for(var i =0; i<numPagos; i++)
{
var fecha = new Date($("#txtFechaInicio").val().split("/")[2], parseInt($("#txtFechaInicio").val().split("/")[0])-1, $("#txtFechaInicio").val().split("/")[1]);
var fechaper = crearFechaString(fecha, mesesInc * i);
agregarFilaPagoDatos(monto.formatDLA(), fechaper, "", true);
var fechaper = crearFechaString(fecha, mesesInc * i);
if(i == (numPagos - 1)){
monto = monto - diferencia.toFixed(2);
}
agregarFilaPagoDatos(parseFloat(monto).formatDLA(), fechaper, "", true);
}
mostrarPagoDefinido();
mostrarPagoPeriodico();
......
......@@ -54,10 +54,11 @@ $(document).ready(function(){
$('#consultaReporte').click(function() {
var estudioEleccion = $('#estudioEleccion').val();
var contratoEleccion = $('#contratoEleccion').val()
var mesEleccion = $('#fecha').val();
if (validaParametrosEntrada(estudioEleccion, mesEleccion) != 0){
generaReporteAmortizacion(estudioEleccion, mesEleccion);
generaReporteAmortizacion(estudioEleccion, mesEleccion, contratoEleccion);
}else {
showError("No se ha seleccionado un valor valido de estudio y/o fecha o la fecha seleccionada no tiene el formato adecuado MM/YYYY");
}
......@@ -82,6 +83,35 @@ $(document).ready(function(){
});
function llamaObtenerContratos() {
var jsonString = '{"idEstudio" : "' + $("#estudioEleccion").val() + '"}';
//console.log(jsonString);
var stringJson = JSON.parse(jsonString);
callActionAjax( "/reporte/amortizacion/obtenerContratosListado", stringJson, procesaContratos);
}
function procesaContratos(jsonData) {
var contratos = jsonData.contratos;
$('#contratoEleccion').find('option').remove();
if(contratos.length > 0){
$("#contratoEleccion").prop( "disabled", false);
$("#contratoEleccion").append('<option value="-1">Todos</option>');
for(var i = 0; i < contratos.length; i++) {
cnt = contratos[i];
$("#contratoEleccion").append('<option value="' + cnt.idContrato + '">' + cnt.numContrato + '</option>');
}
}else {
$("#contratoEleccion").prop( "disabled", true);
}
}
function validaFechaMesAnio(fecha){
......@@ -102,7 +132,7 @@ function validaFechaMesAnio(fecha){
}
function generaReporteAmortizacion(estudio, fecha){
function generaReporteAmortizacion(estudio, fecha, contrato){
if (validaNuloUndefinido(estudio) == 0)
estudio = null;
......@@ -110,13 +140,13 @@ function generaReporteAmortizacion(estudio, fecha){
if (validaNuloUndefinido(fecha) == 0)
fecha = null;
var jsonString = '{"idEstudio":' + estudio + ',"fecha": "' + fecha + '"}';
var jsonString = '{"idEstudio":' + estudio + ',"fecha": "' + fecha + '","idContrato":' + contrato + '}';
var stringJson = JSON.parse(jsonString);
$("#loadingDiv").show();
callActionAjax( "/reporte/amortizacion/cargaInicialReporteSAPDLA", stringJson, procesaDatosReporte);
}
function generaDetalleReporteAmortizacionContrato(contrato, fecha){
function generaDetalleReporteAmortizacionContrato(contrato, fecha, estudio){
if (validaNuloUndefinido(contrato) == 0)
contrato = null;
......@@ -124,7 +154,7 @@ function generaDetalleReporteAmortizacionContrato(contrato, fecha){
if (validaNuloUndefinido(fecha) == 0)
fecha = null;
var jsonString = '{"idContrato":' + contrato + ',"fecha": "' + fecha + '"}';
var jsonString = '{"idContrato":' + contrato + ',"fecha": "' + fecha + '","idEstudio":' + estudio + '}';
var stringJson = JSON.parse(jsonString);
var tamanofilasTitulos = $('tr.'+contrato+'collapsed').length;
$("#loadingDiv").show();
......@@ -152,12 +182,13 @@ function procesaDatosReporte(datos){
var separado = $(this).attr('id');
var idContrato = obtenNSplitPorSeparador(separado, "rId", 1);
var mesEleccion = $('#fecha').val();
var estudioEleccion = $('#estudioEleccion').val();
fHideShow(idContrato.substring(0, idContrato.length - 1));
if($(this).attr('search') == '0')
{
$(this).attr('search', '1');
generaDetalleReporteAmortizacionContrato(idContrato.substring(0, idContrato.length - 1), mesEleccion);
generaDetalleReporteAmortizacionContrato(idContrato.substring(0, idContrato.length - 1), mesEleccion, estudioEleccion);
} else {
}
......@@ -207,11 +238,11 @@ function detalleContratoReporte(objetoDetalle, num, idg){
}else {
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>'
+ objetoDetalle.fechaFin.substring(0,10) +
+ objetoDetalle.fechainicio.substring(0,10) +
'</strong></h6></div>'+
'</td>';
}
if (objetoDetalle.fechainicio == null){
if (objetoDetalle.fechaFin == null){
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>-</strong></h6></div>'+
'</td>';
......@@ -222,6 +253,16 @@ function detalleContratoReporte(objetoDetalle, num, idg){
'</strong></h6></div>'+
'</td>';
}
if(objetoDetalle.costo == null){
var costo = parseFloat('0.0');
}else {
var costo = parseFloat(objetoDetalle.costo);
}
fila = fila + '<td id="rId'+ idg +'-cId3" class="text-right" >'+
'<div><h6><strong>'
+ costo.formatDLA() +
'</strong></h6></div>'+
'</td>';
var m = parseFloat(objetoDetalle.acumuladoAnterior);
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong">'+
......@@ -232,7 +273,7 @@ function detalleContratoReporte(objetoDetalle, num, idg){
var n = parseFloat(item.monto);
fila = fila + '<td id="rId'+ idg +'-cId'+ (i + 6) +'" class="text-right" >'+
'<div><h6><strong>'+
'<div><h6><strong class="text-' + item.color + '">'+
"" + n.formatDLA() +
'</strong></h6></div>'+
'</td>';
......@@ -243,7 +284,12 @@ function detalleContratoReporte(objetoDetalle, num, idg){
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
m = parseFloat(objetoDetalle.remanente);
if(objetoDetalle.remanente == null){
m = parseFloat('0.0');
}else {
m = parseFloat(objetoDetalle.remanente);
}
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>'+
m.formatDLA()
......@@ -274,6 +320,7 @@ function tituloReporte (idNombreTabla, idNombreTablaContainer, fechas, year){
header = header + '<th class="text-right"><div>Codigo SAP</div></th>';
header = header + '<th class="text-right"><div>Fecha Inicio</div></th>';
header = header + '<th class="text-right"><div>Fecha Fin</div></th>';
header = header + '<th class="text-right"><div>Costo</div></th>';
header = header + '<th class="text-right"><div>'+ 'Acumulado' + (year - 1) + '</div></th>';
for (var i=0; i<fechasTamano; i++){
......@@ -349,29 +396,43 @@ function detalleTitulosReporte(objetoDetalle, contrato, num){
fila = fila + '<td style="vertical-align: middle;" >'+
'<div><h6><strong class="text-info">-</strong></h6></div>'+
'</td>';
if(objetoDetalle.costo == null){
var costo = parseFloat('0.0');
}else {
var costo = parseFloat(objetoDetalle.costo);
}
fila = fila + '<td align="right" class="text-right" >'+
'<div><h6><strong>'
+ costo.formatDLA() +
'</strong></h6></div>'+
'</td>';
var m = parseFloat(objetoDetalle.acumuladoAnterior);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
$.each(objetoDetalle.montoMes, function(i, item) {
var n = parseFloat(item.monto);
fila = fila + '<td align="right">'+
'<div><h6><strong>'+
'<div><h6><strong class="text-' + item.color + '">'+
"" + n.formatDLA() +
'</strong></h6></div>'+
'</td>';
});
m = parseFloat(objetoDetalle.acumuladoPosterior);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
if(objetoDetalle.remanente == null){
m = parseFloat('0.0');
}else {
m = parseFloat(objetoDetalle.remanente);
}
m = parseFloat(objetoDetalle.remanente);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
......
......@@ -222,6 +222,15 @@ function showWarn(msg)
};
function showAdv(msg)
{
$("html, body").animate({ scrollTop: 0 }, "slow");
$("#divWarn").html("<div class='alert alert-dismissible alert-warning'> <button type='button' class='close' data-dismiss='alert'></button> <h4>Aviso</h4>"+parseMessage(msg)+"</div>");
closeDialog("divWarn");
};
function closeDialog(id)
{
$("#"+id).show();
......
......@@ -33,7 +33,7 @@
<label class="control-label" for="campoContrato">Contratos:</label>
</div>
<div class="col-xs-3">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple" onchange="validarVacio()">
</select>
</div>
......
......@@ -45,9 +45,9 @@
<input class="form-control" id="campoOperacion" name="campoOperacion" type="text" value="${descripcionMovimiento}" contenteditable="false"
<s:if test="estatus > 1">disabled</s:if>>
</div>
<div class="col-xs-3">
<label class="control-label" for="campoContrato">N&uacutemero de contrato: </label>
</div>
<div class="col-xs-1">
</div>
<label class="col-xs-2 control-label" for="campoContrato">N&uacutemero de contrato: </label>
<div class="col-xs-3">
<input class="form-control" id="campoContrato" name="campoContrato"
type="text" value="${numeroContrato}" contenteditable="false"
......@@ -57,7 +57,7 @@
</div>
<div class="form-group">
<div class="col-xs-2">
<label class="control-label" for="campoContrato">N&uacutemero de contrato BV: </label>
<label class="control-label" for="campoContrato">N&uacutemero de contrato BV:</label>
</div>
<div class="col-xs-3">
<input class="form-control" id="campoContratoBV" name="campoContratoBV"
......@@ -146,7 +146,7 @@
<s:if test="estatus >= 1">
<label class="col-xs-1 control-label" for="compoEstatus">Estatus:</label>
<div class="col-xs-2">
<div class="col-xs-3">
<input class="form-control" id="descripcionEstatus" name="descripcionEstatus"
type="text" value="${descripcionEstatus}" contenteditable="false" <s:if test="estatus > 1">disabled</s:if> >
</div>
......@@ -172,14 +172,12 @@
</select>
</div>
<div class="col-xs-1">
<div class="col-xs-2">
</div>
<div class="col-xs-1"></div>
<s:if test="estatus >= 1">
<label class="col-xs-1 control-label" for="compoEstatusSAP">Estatus SAP:</label>
<div class="col-xs-2">
<div class="col-xs-3">
<input class="form-control" id="statusSAP" name="statusSAP" type="text" value="${statusSap}" disabled>
</div>
</s:if>
......
......@@ -11,17 +11,23 @@
<div class="form-group">
<label class="col-xs-2 control-label">Estudio:</label>
<div class="col-xs-4">
<select id="estudioEleccion" class="form-control" required>
<div class="col-xs-2">
<select id="estudioEleccion" class="form-control" onchange="llamaObtenerContratos()" required>
<option value=""> Seleccione </option>
<option value="-1" > Todos </option>
<c:forEach var="m" items="${listaEstudios}">
<option value="${m.idEstudio}" > ${m.descripcionEstudio} </option>
</c:forEach>
</select>
</div>
<label class="col-xs-2 control-label">Contrato:</label>
<div class="col-xs-2">
<select id="contratoEleccion" class="form-control" disabled>
</select>
</div>
<label class="col-xs-2 control-label" for="fecha">Mes de Consulta:</label>
<div class="col-xs-4">
<div class="col-xs-2">
<input id="fecha" class="form-control"
required>
</div>
......
......@@ -857,6 +857,12 @@
<result name="success">/jsp/dda/reporte/amortizacion/reporteAmortizacion.jsp
</result>
</action>
<action name="obtenerContratosListado"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
method="obtenerContratos">
<result type="json" />
</action>
<action name="cargaInicialReporte"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
......
......@@ -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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
......
......@@ -76,7 +76,7 @@ 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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.titulosBroadView = http://localhost:5001/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
......
No preview for this file type
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
</body>
</html>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
\ No newline at end of file
# Archivo de configuraciones para ambientes de QA o Produccion (con tomcat)
#uri.file.store =/home/scm/server/dda/doctosContratos/
#uri.file.titulos =/home/scm/server/dda/titulos/error/
#uri.file.carga.fees =/home/scm/server/dda/cargaFees/excel/
#uri.file.carga.broadview =/home/scm/server/dda/actualizaIdBV/excel/
#uri.file.carga.suscriptores=/home/scm/server/dda/cargaSuscriptores/excel/
#uri.file.carga.titulos =/home/scm/server/dda/cargaTitulos/excel/
#uri.file.carga.titulosLF =/home/scm/server/dda/cargaTitulosLF/excel/
uri.file.carga.titulosLF =/home/admonDLA/dda/cargaTitulosLF/excel/
uri.file.store =/home/admonDLA/dda/doctosContratos/
uri.file.titulos =/home/admonDLA/dda/titulos/error/
uri.file.carga.fees =/home/admonDLA/dda/cargaFees/excel/
uri.file.carga.broadview =/home/admonDLA/dda/actualizaIdBV/excel/
uri.file.carga.suscriptores=/home/admonDLA/dda/cargaSuscriptores/excel/
uri.file.carga.titulos =/home/admonDLA/dda/cargaTitulos/excel/
uri.file.carga.transacciones = /home/admonDLA/dda/cargaTitulosPN/excel/
uri.file.carga.titulosTR =/home/admonDLA/dda/cargaTitulosTR/excel/
uri.file.carga.visualizaciones = /home/admonDLA/dda/cargaTitulosVS/excel/
uri.file.reporte.baseActivosSQL= /home/admonDLA/dda/sqlReportes/sql/
uri.file.reporte.TransaccionesvistaPrevia = /home/admonDLA/dda/sqlReportes/js/vistaprevia.js
uri.file.reporte.txtcpv= /home/admonDLA/dda/sqlReportes/txt/
#propiedades para el servidor 10
#uri.file.store =/home/DLASilicon/dda/doctosContratos/
#uri.file.titulos =/home/DLASilicon/dda/titulos/error/
#uri.file.carga.fees =/home/DLASilicon/dda/cargaFees/excel/
#uri.file.carga.broadview =/home/DLASilicon/dda/actualizaIdBV/excel/
#uri.file.carga.suscriptores=/home/DLASilicon/dda/cargaSuscriptores/excel/
#uri.file.carga.titulos =/home/DLASilicon/dda/cargaTitulos/excel/
#uri.file.carga.titulosLF =/home/DLASilicon/dda/cargaTitulosLF/excel/
#servidor.rest.ws=200.57.181.8
#servidor.rest.ws=200.57.181.10:8090
#propiedades para el servidor 163, pruebas locales susana
uri.file.carga.titulosLF =/home/scm/server/dda/cargaTitulosLF/excel/
uri.file.store =/home/scm/server/dda/doctosContratos/
uri.file.titulos =/home/scm/server/dda/titulos/error/
uri.file.carga.fees =/home/scm/server/dda/cargaFees/excel/
uri.file.carga.broadview =/home/scm/server/dda/actualizaIdBV/excel/
uri.file.carga.suscriptores=/home/scm/server/dda/cargaSuscriptores/excel/
uri.file.carga.titulos =/home/scm/server/dda/cargaTitulos/excel/
uri.file.carga.transacciones = /home/scm/server/dda/cargaTitulosPN/excel/
uri.file.carga.titulosTR =/home/scm/server/dda/cargaTitulosTR/excel/
uri.file.carga.visualizaciones = /home/scm/server/dda/cargaTitulosVS/excel/
uri.file.reporte.baseActivosSQL= /home/scm/server/dda/sqlReportes/sql/
#TELMEX
#/home/admonDLA/dda/cargaTitulosPN/excel/
#servidor.rest.ws=10.192.24.136:8006
#servidor.rest.ws=127.0.0.1:8090
#Es localhost para QA porque los servicios rest seran deployados en el mismo servidor que
#DLA
#servidor.rest.ws=200.57.181.10:8090
servidor.rest.ws=localhost:8080
\ No newline at end of file
......@@ -7,14 +7,14 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!-- <jee:jndi-lookup id="dsDLA" jndi-name="jdbc/PREDBDLA"
cache="true" lookup-on-startup="true" lazy-init="false" expected-type="javax.sql.DataSource" />
-->
<jee:jndi-lookup id="dsDLA" jndi-name="jdbc/DBDLA"
cache="true" lookup-on-startup="true" lazy-init="false" expected-type="javax.sql.DataSource" />
<!--<jee:jndi-lookup id="dsDLA" jndi-name="jdbc/PREDBDLA"
cache="true" lookup-on-startup="true" lazy-init="false" expected-type="javax.sql.DataSource" />
-->
<tx:annotation-driven />
</beans>
\ No newline at end of file
# Archivo de configuraciones
excel.shellPath =/home/admonDLA/dda/generadorExcel
excel.process.path =/home/admonDLA/dda/generadorExcel
excel.process.source.path =/home/admonDLA/dda/generadorExcel/entradas
excel.process.target.path =/home/admonDLA/dda/generadorExcel/salidas
excel.shellPath =/home/scm/server/dda/generadorExcel
excel.process.path =/home/scm/server/dda/generadorExcel
excel.process.source.path =/home/scm/server/dda/generadorExcel/entradas
excel.process.target.path =/home/scm/server/dda/generadorExcel/salidas
excel.shellName =vti_crearExcelXlsx.sh
excel.process.source.data =CTV_VistaPrevia_Chile_01092015.xml
excel.process.source.style =vti_css.xml
......
......@@ -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.004 = DLA-004: Proporcione una contrase&ntilde;a v&aacute;lida
cooking.date=08-08-2023
cooking.date=11-28-2023
#sociedad = NT07
#centro.de.costos = 07A01US602
......
......@@ -857,6 +857,12 @@
<result name="success">/jsp/dda/reporte/amortizacion/reporteAmortizacion.jsp
</result>
</action>
<action name="obtenerContratosListado"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
method="obtenerContratos">
<result type="json" />
</action>
<action name="cargaInicialReporte"
class="com.mx.dla.dda.reporte.amortizacion.actions.ReporteAmortizacionAction"
......
#***Propiedades para notificacion de sap desde pantalla de generales***
#Development version
#QA version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=400000010
ordenInterna.idMaterial.transaccines=300000004
ordenInterna.idMaterial.licenseFee=300000104
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000259
ordenInterna.idMaterial.licenseFee=300000259
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
......@@ -15,16 +15,16 @@ ordenInterna.tipoImputacion.noAmortizable=K
ordenInterna.tipoImputacion.siAmortizable=F
ordenInterna.idPosicionAcc=00010
ordenInterna.centroCostos=07A01US501
ordenInterna.idOrden=1000040
ordenInterna.centroCostos=0908A05000
ordenInterna.idOrden=000000400098
ordenInterna.sociedad=NT09
ordenInterna.claseDoc.t=NT08
ordenInterna.claseDoc.t=CD06
ordenInterna.claseDoc.a=CD06
ordenInterna.claseDoc.na=CD06
ordenInterna.idProveedor=3001000056
ordenInterna.idProveedor=0030800000
ordenInterna.orgCompras=AMCO
ordenInterna.grupoCompras=N06
......@@ -73,16 +73,16 @@ uri.rest.carga.transaccion.vistaprevia = http://${servidor.rest.ws}/DDA_WSB_Proc
uri.rest.carga.titulos.license = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosLF
uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
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.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
factura.header.sociedad =NT07
factura.header.sociedad =NT09
factura.header.indicador =X
factura.header.tipoDocumento=RE
#moneda tambien se usa en Nota Credito
......@@ -97,4 +97,5 @@ envMov.noItem =00010
#*************************Propiedades para Nota Credito*******************
notaCredito.header.tipoDocumento=KG
notaCredito.detalle.isoMedida =SRV
\ No newline at end of file
notaCredito.detalle.isoMedida =SRV
#***Propiedades para notificacion de sap desde pantalla de generales***
#Development version
#QA version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=400000010
ordenInterna.idMaterial.transaccines=300000004
ordenInterna.idMaterial.licenseFee=300000104
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000166
ordenInterna.idMaterial.licenseFee=300000166
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
......@@ -15,16 +15,16 @@ ordenInterna.tipoImputacion.noAmortizable=K
ordenInterna.tipoImputacion.siAmortizable=F
ordenInterna.idPosicionAcc=00010
ordenInterna.centroCostos=07A01US501
ordenInterna.idOrden=1000040
ordenInterna.centroCostos=0908A05000
ordenInterna.idOrden=000000400098
ordenInterna.sociedad=NT09
ordenInterna.claseDoc.t=NT08
ordenInterna.claseDoc.t=CD06
ordenInterna.claseDoc.a=CD06
ordenInterna.claseDoc.na=CD06
ordenInterna.idProveedor=3001000056
ordenInterna.idProveedor=0030800000
ordenInterna.orgCompras=AMCO
ordenInterna.grupoCompras=N06
......@@ -73,16 +73,16 @@ uri.rest.carga.transaccion.vistaprevia = http://${servidor.rest.ws}/DDA_WSB_Proc
uri.rest.carga.titulos.license = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosLF
uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
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.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
factura.header.sociedad =NT07
factura.header.sociedad =NT09
factura.header.indicador =X
factura.header.tipoDocumento=RE
#moneda tambien se usa en Nota Credito
......@@ -97,4 +97,5 @@ envMov.noItem =00010
#*************************Propiedades para Nota Credito*******************
notaCredito.header.tipoDocumento=KG
notaCredito.detalle.isoMedida =SRV
\ No newline at end of file
notaCredito.detalle.isoMedida =SRV
......@@ -64,9 +64,7 @@ function realizaConsulta(){
{"sTitle":"Moneda" ,"mDataProp":"moneda" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"C\u00F3digo Pa\u00EDs" ,"mDataProp":"codigoPais" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Nombre Pa\u00EDs" ,"mDataProp":"nombrePais" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Sociedad" ,"mDataProp":"sociedad" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Es ADD ON" ,"mDataProp":"esAddOn" ,"bSearchable": true, sWidth : "400px"},
{"sTitle":"Nombre AddOn" ,"mDataProp":"addOn" ,"bSearchable": true, sWidth : "500px"},
{"sTitle":"Sociedad" ,"mDataProp":"sociedad" ,"bSearchable": true, sWidth : "400px"}
],
'fnRowCallback': function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
......@@ -81,8 +79,6 @@ function realizaConsulta(){
$('td:eq(5)', nRow).html(aData["codigoPais"]);
$('td:eq(6)', nRow).html(aData["nombrePais"]);
$('td:eq(7)', nRow).html(aData["sociedad"]);
$('td:eq(8)', nRow).html(aData["esAddOn"] == 1 ? "Si" : "No");
$('td:eq(9)', nRow).html(aData["addOn"]);
}
});
......
......@@ -245,6 +245,23 @@ function textoLabel(){
}
function validarVacio(){
const adenmOrig = [];
const enmiendas = [];
$("#campoContrato option:selected").each(function () {
var $this = $(this);
if ($this.length) {
var str2 = $this.text();
adenmOrig.push($this.val());
}
});
if(adenmOrig.length === 0) {
$("#botonNotificar").prop( "disabled", true);
} else {
$("#botonNotificar").prop( "disabled", false);
}
}
function notificarSAP(){
const adenmOrig = [];
const enmiendas = [];
......
......@@ -208,11 +208,12 @@ function enviarOperacionEnmienda(idContrato, tipoContrato){
function defineTipoEnmienda(idContrato, tipoContrato){
document.getElementById('idContratoE').innerHTML=idContrato; //$("#idContrato").val(idContrato);
document.getElementById('tipoContrato').innerHTML=tipoContrato;
//document.getElementById('idContratoE').innerHTML=idContrato; //$("#idContrato").val(idContrato);
//document.getElementById('tipoContrato').innerHTML=tipoContrato;
$("#modalTipoEnmienda").find("h3").text("Seleccione el Tipo de Enmienda: ");
$("#modalTipoEnmienda").modal('show');
//$("#modalTipoEnmienda").find("h3").text("Seleccione el Tipo de Enmienda: ");
//$("#modalTipoEnmienda").modal('show');
showAdv("M\u00F3dulo deshabilitado temporalmente, favor de contactar al administrador.");
}
function getListaContratos(estudios){
......
......@@ -86,7 +86,7 @@ TerminoService.prototype.validarTermino = function(termino, costo) {
if(valido)
{
if(Math.round(costo) != Math.round(termino.costoContrato))
if(costo != termino.costoContrato)
{
valido = false;
mensaje = "La suma de los periodos m\u00E1s el anticipo, no cumple el total del costo del contrato.";
......@@ -176,5 +176,5 @@ TerminoService.prototype.obtenerMontoProgramado = function(termino) {
if(termino.pagoAnticipado != null && (termino.pagoAnticipado.monto != null && termino.pagoAnticipado.monto != ""))
totalPeriodos = totalPeriodos + parseFloat(termino.pagoAnticipado.monto);
return totalPeriodos;
return parseFloat(totalPeriodos.toFixed(2));
};
\ No newline at end of file
......@@ -236,15 +236,24 @@ function generarPeriodos(){
if($("input[id='cbanticipo']").prop('checked') && $("#antMonto").val() != "")
anticipo = $("#antMonto").val() != "" ? parseFloat(deleteCommas($("#antMonto").val())) : 0.0;
var costoNeto = costoCto - anticipo;
var monto = (costoCto - anticipo) / numPagos;
monto = monto.toFixed(2);
var resto = costoCto - ((monto*numPagos) + anticipo);
var diferencia = 0;
if (costoNeto != (monto * numPagos)){
diferencia = (monto * numPagos) - costoNeto;
}
for(var i =0; i<numPagos; i++)
{
var fecha = new Date($("#txtFechaInicio").val().split("/")[2], parseInt($("#txtFechaInicio").val().split("/")[0])-1, $("#txtFechaInicio").val().split("/")[1]);
var fechaper = crearFechaString(fecha, mesesInc * i);
agregarFilaPagoDatos(monto.formatDLA(), fechaper, "", true);
var fechaper = crearFechaString(fecha, mesesInc * i);
if(i == (numPagos - 1)){
monto = monto - diferencia.toFixed(2);
}
agregarFilaPagoDatos(parseFloat(monto).formatDLA(), fechaper, "", true);
}
mostrarPagoDefinido();
mostrarPagoPeriodico();
......
......@@ -54,10 +54,11 @@ $(document).ready(function(){
$('#consultaReporte').click(function() {
var estudioEleccion = $('#estudioEleccion').val();
var contratoEleccion = $('#contratoEleccion').val()
var mesEleccion = $('#fecha').val();
if (validaParametrosEntrada(estudioEleccion, mesEleccion) != 0){
generaReporteAmortizacion(estudioEleccion, mesEleccion);
generaReporteAmortizacion(estudioEleccion, mesEleccion, contratoEleccion);
}else {
showError("No se ha seleccionado un valor valido de estudio y/o fecha o la fecha seleccionada no tiene el formato adecuado MM/YYYY");
}
......@@ -82,6 +83,35 @@ $(document).ready(function(){
});
function llamaObtenerContratos() {
var jsonString = '{"idEstudio" : "' + $("#estudioEleccion").val() + '"}';
//console.log(jsonString);
var stringJson = JSON.parse(jsonString);
callActionAjax( "/reporte/amortizacion/obtenerContratosListado", stringJson, procesaContratos);
}
function procesaContratos(jsonData) {
var contratos = jsonData.contratos;
$('#contratoEleccion').find('option').remove();
if(contratos.length > 0){
$("#contratoEleccion").prop( "disabled", false);
$("#contratoEleccion").append('<option value="-1">Todos</option>');
for(var i = 0; i < contratos.length; i++) {
cnt = contratos[i];
$("#contratoEleccion").append('<option value="' + cnt.idContrato + '">' + cnt.numContrato + '</option>');
}
}else {
$("#contratoEleccion").prop( "disabled", true);
}
}
function validaFechaMesAnio(fecha){
......@@ -102,7 +132,7 @@ function validaFechaMesAnio(fecha){
}
function generaReporteAmortizacion(estudio, fecha){
function generaReporteAmortizacion(estudio, fecha, contrato){
if (validaNuloUndefinido(estudio) == 0)
estudio = null;
......@@ -110,13 +140,13 @@ function generaReporteAmortizacion(estudio, fecha){
if (validaNuloUndefinido(fecha) == 0)
fecha = null;
var jsonString = '{"idEstudio":' + estudio + ',"fecha": "' + fecha + '"}';
var jsonString = '{"idEstudio":' + estudio + ',"fecha": "' + fecha + '","idContrato":' + contrato + '}';
var stringJson = JSON.parse(jsonString);
$("#loadingDiv").show();
callActionAjax( "/reporte/amortizacion/cargaInicialReporteSAPDLA", stringJson, procesaDatosReporte);
}
function generaDetalleReporteAmortizacionContrato(contrato, fecha){
function generaDetalleReporteAmortizacionContrato(contrato, fecha, estudio){
if (validaNuloUndefinido(contrato) == 0)
contrato = null;
......@@ -124,7 +154,7 @@ function generaDetalleReporteAmortizacionContrato(contrato, fecha){
if (validaNuloUndefinido(fecha) == 0)
fecha = null;
var jsonString = '{"idContrato":' + contrato + ',"fecha": "' + fecha + '"}';
var jsonString = '{"idContrato":' + contrato + ',"fecha": "' + fecha + '","idEstudio":' + estudio + '}';
var stringJson = JSON.parse(jsonString);
var tamanofilasTitulos = $('tr.'+contrato+'collapsed').length;
$("#loadingDiv").show();
......@@ -152,12 +182,13 @@ function procesaDatosReporte(datos){
var separado = $(this).attr('id');
var idContrato = obtenNSplitPorSeparador(separado, "rId", 1);
var mesEleccion = $('#fecha').val();
var estudioEleccion = $('#estudioEleccion').val();
fHideShow(idContrato.substring(0, idContrato.length - 1));
if($(this).attr('search') == '0')
{
$(this).attr('search', '1');
generaDetalleReporteAmortizacionContrato(idContrato.substring(0, idContrato.length - 1), mesEleccion);
generaDetalleReporteAmortizacionContrato(idContrato.substring(0, idContrato.length - 1), mesEleccion, estudioEleccion);
} else {
}
......@@ -207,11 +238,11 @@ function detalleContratoReporte(objetoDetalle, num, idg){
}else {
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>'
+ objetoDetalle.fechaFin.substring(0,10) +
+ objetoDetalle.fechainicio.substring(0,10) +
'</strong></h6></div>'+
'</td>';
}
if (objetoDetalle.fechainicio == null){
if (objetoDetalle.fechaFin == null){
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>-</strong></h6></div>'+
'</td>';
......@@ -222,6 +253,16 @@ function detalleContratoReporte(objetoDetalle, num, idg){
'</strong></h6></div>'+
'</td>';
}
if(objetoDetalle.costo == null){
var costo = parseFloat('0.0');
}else {
var costo = parseFloat(objetoDetalle.costo);
}
fila = fila + '<td id="rId'+ idg +'-cId3" class="text-right" >'+
'<div><h6><strong>'
+ costo.formatDLA() +
'</strong></h6></div>'+
'</td>';
var m = parseFloat(objetoDetalle.acumuladoAnterior);
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong">'+
......@@ -232,7 +273,7 @@ function detalleContratoReporte(objetoDetalle, num, idg){
var n = parseFloat(item.monto);
fila = fila + '<td id="rId'+ idg +'-cId'+ (i + 6) +'" class="text-right" >'+
'<div><h6><strong>'+
'<div><h6><strong class="text-' + item.color + '">'+
"" + n.formatDLA() +
'</strong></h6></div>'+
'</td>';
......@@ -243,7 +284,12 @@ function detalleContratoReporte(objetoDetalle, num, idg){
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
m = parseFloat(objetoDetalle.remanente);
if(objetoDetalle.remanente == null){
m = parseFloat('0.0');
}else {
m = parseFloat(objetoDetalle.remanente);
}
fila = fila + '<td id="rId'+ idg +'-cId5" class="text-right" >'+
'<div><h6><strong>'+
m.formatDLA()
......@@ -274,6 +320,7 @@ function tituloReporte (idNombreTabla, idNombreTablaContainer, fechas, year){
header = header + '<th class="text-right"><div>Codigo SAP</div></th>';
header = header + '<th class="text-right"><div>Fecha Inicio</div></th>';
header = header + '<th class="text-right"><div>Fecha Fin</div></th>';
header = header + '<th class="text-right"><div>Costo</div></th>';
header = header + '<th class="text-right"><div>'+ 'Acumulado' + (year - 1) + '</div></th>';
for (var i=0; i<fechasTamano; i++){
......@@ -349,29 +396,43 @@ function detalleTitulosReporte(objetoDetalle, contrato, num){
fila = fila + '<td style="vertical-align: middle;" >'+
'<div><h6><strong class="text-info">-</strong></h6></div>'+
'</td>';
if(objetoDetalle.costo == null){
var costo = parseFloat('0.0');
}else {
var costo = parseFloat(objetoDetalle.costo);
}
fila = fila + '<td align="right" class="text-right" >'+
'<div><h6><strong>'
+ costo.formatDLA() +
'</strong></h6></div>'+
'</td>';
var m = parseFloat(objetoDetalle.acumuladoAnterior);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
$.each(objetoDetalle.montoMes, function(i, item) {
var n = parseFloat(item.monto);
fila = fila + '<td align="right">'+
'<div><h6><strong>'+
'<div><h6><strong class="text-' + item.color + '">'+
"" + n.formatDLA() +
'</strong></h6></div>'+
'</td>';
});
m = parseFloat(objetoDetalle.acumuladoPosterior);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
'</td>';
if(objetoDetalle.remanente == null){
m = parseFloat('0.0');
}else {
m = parseFloat(objetoDetalle.remanente);
}
m = parseFloat(objetoDetalle.remanente);
fila = fila + '<td style="vertical-align: middle;" >'+
fila = fila + '<td align="right" >'+
'<div><h6><strong class="text-info">'+
m.formatDLA()
+'</strong></h6></div>'+
......
......@@ -222,6 +222,15 @@ function showWarn(msg)
};
function showAdv(msg)
{
$("html, body").animate({ scrollTop: 0 }, "slow");
$("#divWarn").html("<div class='alert alert-dismissible alert-warning'> <button type='button' class='close' data-dismiss='alert'></button> <h4>Aviso</h4>"+parseMessage(msg)+"</div>");
closeDialog("divWarn");
};
function closeDialog(id)
{
$("#"+id).show();
......
......@@ -33,7 +33,7 @@
<label class="control-label" for="campoContrato">Contratos:</label>
</div>
<div class="col-xs-3">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple">
<select style="width: 250px;" class="form-control" id="campoContrato" name="campoContrato" disabled multiple="multiple" onchange="validarVacio()">
</select>
</div>
......
......@@ -45,9 +45,9 @@
<input class="form-control" id="campoOperacion" name="campoOperacion" type="text" value="${descripcionMovimiento}" contenteditable="false"
<s:if test="estatus > 1">disabled</s:if>>
</div>
<div class="col-xs-3">
<label class="control-label" for="campoContrato">N&uacutemero de contrato: </label>
</div>
<div class="col-xs-1">
</div>
<label class="col-xs-2 control-label" for="campoContrato">N&uacutemero de contrato: </label>
<div class="col-xs-3">
<input class="form-control" id="campoContrato" name="campoContrato"
type="text" value="${numeroContrato}" contenteditable="false"
......@@ -57,7 +57,7 @@
</div>
<div class="form-group">
<div class="col-xs-2">
<label class="control-label" for="campoContrato">N&uacutemero de contrato BV: </label>
<label class="control-label" for="campoContrato">N&uacutemero de contrato BV:</label>
</div>
<div class="col-xs-3">
<input class="form-control" id="campoContratoBV" name="campoContratoBV"
......@@ -146,7 +146,7 @@
<s:if test="estatus >= 1">
<label class="col-xs-1 control-label" for="compoEstatus">Estatus:</label>
<div class="col-xs-2">
<div class="col-xs-3">
<input class="form-control" id="descripcionEstatus" name="descripcionEstatus"
type="text" value="${descripcionEstatus}" contenteditable="false" <s:if test="estatus > 1">disabled</s:if> >
</div>
......@@ -172,14 +172,12 @@
</select>
</div>
<div class="col-xs-1">
<div class="col-xs-2">
</div>
<div class="col-xs-1"></div>
<s:if test="estatus >= 1">
<label class="col-xs-1 control-label" for="compoEstatusSAP">Estatus SAP:</label>
<div class="col-xs-2">
<div class="col-xs-3">
<input class="form-control" id="statusSAP" name="statusSAP" type="text" value="${statusSap}" disabled>
</div>
</s:if>
......
......@@ -11,17 +11,23 @@
<div class="form-group">
<label class="col-xs-2 control-label">Estudio:</label>
<div class="col-xs-4">
<select id="estudioEleccion" class="form-control" required>
<div class="col-xs-2">
<select id="estudioEleccion" class="form-control" onchange="llamaObtenerContratos()" required>
<option value=""> Seleccione </option>
<option value="-1" > Todos </option>
<c:forEach var="m" items="${listaEstudios}">
<option value="${m.idEstudio}" > ${m.descripcionEstudio} </option>
</c:forEach>
</select>
</div>
<label class="col-xs-2 control-label">Contrato:</label>
<div class="col-xs-2">
<select id="contratoEleccion" class="form-control" disabled>
</select>
</div>
<label class="col-xs-2 control-label" for="fecha">Mes de Consulta:</label>
<div class="col-xs-4">
<div class="col-xs-2">
<input id="fecha" class="form-control"
required>
</div>
......
#Generated by Maven
#Tue Aug 08 13:12:10 CDT 2023
#Tue Nov 28 17:32:05 CST 2023
version=1.1
groupId=com.mx.dla
artifactId=front
......@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
import com.mx.dla.dda.admin.catalogos.addons.dtos.EstudioAddonDTO;
import com.mx.dla.dda.admin.catalogos.addons.dtos.ReporteAddonDTO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoContratoDTO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoEstudioDTO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.EstudioMenuDTO;
......@@ -29,4 +30,5 @@ public interface CatalogoEstudiosDAO {
public void guardarAddon(EstudioAddonDTO addon);
public void guardarHistorico(@Param("idEstudio")Long idEstudio,@Param("anio")Integer anio,@Param("mes")Integer mes,@Param("reportetype")Integer reportetype);
public void cerrarHistorico(@Param("idEstudio")Long idEstudio,@Param("anio")Integer anio,@Param("mes")Integer mes);
public List<CatalogoContratoDTO> contratosByEstudio(@Param("idEstudio")Long idEstudio);
}
......@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param;
import com.mx.dla.dda.contrato.terminos.dtos.ContratoConsultaDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.MesesAmortizacionDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.RegistroMontoDTO;
import com.mx.dla.dda.reporte.amortizacion.dtos.RemanenteDTO;
public interface ReporteAmortizacionDAO {
......@@ -29,4 +30,8 @@ public interface ReporteAmortizacionDAO {
public List<RegistroMontoDTO> obtenMontosTotalesEstudioSAP(@Param("idEstudio")Long idEstudio, @Param("fecha")String fecha);
public List<RegistroMontoDTO> obtenMontosTitulosContratoSAP(@Param("idContrato")Long idContrato, @Param("fecha")String fecha);
public List<RemanenteDTO> obtenerRemanente(@Param("idEstudio") Long idEstudio, @Param("numContrato")String numContrato, @Param("fecha")String fecha);
public List<RemanenteDTO> obtenerRemanenteSAP(@Param("idEstudio") Long idEstudio, @Param("numContrato")String numContrato, @Param("fecha")String fecha);
}
......@@ -50,6 +50,11 @@
<id property="idEstudio" column="ID_ESTUDIO" />
<result property="descripcionEstudio" column="DESC_ESTUDIO" />
</resultMap>
<resultMap id="menuContrato" type="CatalogoContratoDTO">
<id property="idContrato" column="ID_CONTRATO" />
<result property="numContrato" column="NUMERO_CONTRATO" />
</resultMap>
<select id="catalogoEstudios" resultMap="estudio">
SELECT ce.ID_ESTUDIO,
......@@ -62,9 +67,7 @@
ce.SOCIEDAD,
ce.SIGLA_DDA,
ce.ORDEN,
ce.ID_GRUPO,
ce.ES_ADD_ON,
nvl(ce.ADD_ON,'') ADD_ON
ce.ID_GRUPO
FROM DDA_C_ESTUDIO ce JOIN DDA_C_ESTUDIO_GRUPO ceg ON (ce.ID_GRUPO = ceg.ID_GRUPO)
ORDER BY ce.DESC_ESTUDIO
</select>
......@@ -153,6 +156,11 @@
select count(*) from DDA_T_CONTRATO where id_estudio = #{idEstudio}
</select>
<select id="contratosByEstudio" resultMap="menuContrato">
SELECT ID_CONTRATO, NUMERO_CONTRATO FROM DDA_T_CONTRATO WHERE id_estudio = #{idEstudio} ORDER BY NUMERO_CONTRATO
</select>
<select id="getTiposReporte" resultMap="reportes">
SELECT ID_REPORTE, DESC_FORMULA, FORMULA, COLUMNAS FROM DDA_C_REPORTE_ADD_ON
</select>
......
......@@ -50,7 +50,7 @@
<select id="getTerminoPeriodicos" resultMap="terminoCtoBD" parameterType="long">
SELECT ID_PAGO_PERIODICO, MONTO, FECHA, COMENTARIO
FROM DDA_T_CONTRATO_TERMINO_PAGO
WHERE ID_CONTRATO = #{idContrato}
WHERE ID_CONTRATO = #{idContrato} ORDER BY FECHA ASC
</select>
<insert id="guardarTermino" parameterType="TerminoBD">
......
......@@ -34,7 +34,7 @@
<select id="getTerminoPeriodicos" resultMap="terminoCtoBD" parameterType="long">
SELECT ID_PAGO_PERIODICO, MONTO, FECHA, COMENTARIO
FROM DDA_T_CONTRATO_TERMINO_PAGO
WHERE ID_CONTRATO = #{idContrato}
WHERE ID_CONTRATO = #{idContrato} ORDER BY FECHA ASC
</select>
<select id="getTerminoTitulos" resultMap="servicioTerminoBD" parameterType="long">
......
......@@ -15,6 +15,7 @@
<result property="numContrato" column="NUMERO_CONTRATO" />
<result property="fechaFin" column="FECHA_FIN" />
<result property="fechaInicio" column="FECHA_INICIO" />
<result property="costo" column="COSTO" />
</resultMap>
<resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO">
......@@ -26,6 +27,92 @@
<result property="sistema" column="SISTEMA" />
</resultMap>
<resultMap id="resultsRemanente" type="RemanenteDTO">
<result property="diferenciador" column="DIFERENCIADOR" />
<result property="remanente" column="REMANENTE" />
</resultMap>
<select id='obtenerRemanente' resultMap='resultsRemanente' parameterType="map">
SELECT
<if test="idEstudio == null">
<if test="numContrato == null">
amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
amct.ID_TITULO_CNT
</if>
</if>
AS DIFERENCIADOR, ROUND(SUM(am.MONTO),2) AS REMANENTE FROM DDA_T_AMORTIZACION am
INNER JOIN DDA_T_CONTRATO_TITULO amct ON am.ID_TITULO_CNTORIG = amct.ID_TITULO_CNTORIG
INNER JOIN DDA_T_CONTRATO amc ON amct.ID_CONTRATO = amc.ID_CONTRATO
WHERE TRUNC(am.MES) > TO_DATE(#{fecha}, 'MM/YYYY') AND amc.ID_ESTATUS IN (4, 5)
<if test="idEstudio == null">
<if test="numContrato == null">
GROUP BY amc.ID_ESTUDIO ORDER BY amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
AND amc.ID_ESTUDIO = #{idEstudio}
GROUP BY amc.NUMERO_CONTRATO ORDER BY amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
AND amc.ID_ESTUDIO = #{idEstudio}
AND amc.ID_CONTRATO = #{numContrato}
GROUP BY amct.ID_TITULO_CNT ORDER BY amct.ID_TITULO_CNT
</if>
</if>
</select>
<select id='obtenerRemanenteSAP' resultMap='registroMonto' parameterType="map">
SELECT
<if test="idEstudio == null">
<if test="numContrato == null">
amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
amct.ID_TITULO_CNT
</if>
</if>
AS DIFERENCIADOR, (ROUND(SUM(am.MONTO),2) * -1) AS REMANENTE FROM DDA_T_AMORTIZACION_SAP am
INNER JOIN DDA_T_CONTRATO_TITULO amct ON am.ID_TITULO_CNTORIG = amct.ID_TITULO_CNTORIG
INNER JOIN DDA_T_CONTRATO amc ON amct.ID_CONTRATO = amc.ID_CONTRATO
WHERE TRUNC(am.MES) > TO_DATE(#{fecha}, 'MM/YYYY') AND amc.ID_ESTATUS IN (4, 5)
<if test="idEstudio == null">
<if test="numContrato == null">
GROUP BY amc.ID_ESTUDIO ORDER BY amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
AND amc.ID_ESTUDIO = #{idEstudio}
GROUP BY amc.NUMERO_CONTRATO ORDER BY amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
AND amc.ID_ESTUDIO = #{idEstudio}
AND amc.ID_CONTRATO = #{numContrato}
GROUP BY amct.ID_TITULO_CNT ORDER BY amct.ID_TITULO_CNT
</if>
</if>
</select>
<select id='obtenMontosTotalesEstudio' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
......@@ -53,8 +140,9 @@
</select>
<select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map">
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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
SELECT round(sum(ct.costo),2) AS COSTO, 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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN,
MAX(contratosEst.SISTEMA) AS SISTEMA
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -85,7 +173,7 @@
<select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map">
SELECT 'DDA' as SISTEMA, NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, SUM(a.MONTO) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV, round(sum(ct.costo),2) AS COSTO, MAX(ct.ID_TITULO_CNT) AS ID_CONTRATO
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -122,7 +210,7 @@
<!-- AMORTIZACION SAP -->
<select id="consultaContratosConAmoritzacionPorEstudioSAP" resultMap="resultsContratoAmortizacion"
parameterType="map">
SELECT
SELECT
MAX(t.ID_CONTRATO) AS ID_CONTRATO,
t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
'SAP' AS SISTEMA
......@@ -143,15 +231,16 @@
</select>
<select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map">
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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
SELECT round(sum(ct.costo),2) AS COSTO, 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, (round(SUM(a.MONTO), 2)* - 1) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN,
MAX(contratosEst.SISTEMA) AS SISTEMA
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
INNER JOIN ( SELECT
MAX(t.ID_CONTRATO) AS ID_CONTRATO,
t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
'DDA' AS SISTEMA
'SAP' AS SISTEMA
FROM DDA_T_CONTRATO t
WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
......@@ -175,7 +264,7 @@
<select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO
TRUNC(a.MES) AS FECHA, (round(SUM(a.MONTO), 2)* - 1) AS MONTO
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -199,8 +288,8 @@
</select>
<select id='obtenMontosTitulosContratoSAP' resultMap='registroMonto' parameterType="map">
SELECT 'SAP' as SISTEMA, ct.NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, SUM(a.MONTO) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV
SELECT 'SAP' as SISTEMA, ct.NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, (SUM(a.MONTO) * -1) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV, round(sum(ct.costo),2) AS COSTO, MAX(ct.ID_TITULO_CNT) AS ID_CONTRATO
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......
......@@ -50,6 +50,11 @@
<id property="idEstudio" column="ID_ESTUDIO" />
<result property="descripcionEstudio" column="DESC_ESTUDIO" />
</resultMap>
<resultMap id="menuContrato" type="CatalogoContratoDTO">
<id property="idContrato" column="ID_CONTRATO" />
<result property="numContrato" column="NUMERO_CONTRATO" />
</resultMap>
<select id="catalogoEstudios" resultMap="estudio">
SELECT ce.ID_ESTUDIO,
......@@ -62,9 +67,7 @@
ce.SOCIEDAD,
ce.SIGLA_DDA,
ce.ORDEN,
ce.ID_GRUPO,
ce.ES_ADD_ON,
nvl(ce.ADD_ON,'') ADD_ON
ce.ID_GRUPO
FROM DDA_C_ESTUDIO ce JOIN DDA_C_ESTUDIO_GRUPO ceg ON (ce.ID_GRUPO = ceg.ID_GRUPO)
ORDER BY ce.DESC_ESTUDIO
</select>
......@@ -153,6 +156,11 @@
select count(*) from DDA_T_CONTRATO where id_estudio = #{idEstudio}
</select>
<select id="contratosByEstudio" resultMap="menuContrato">
SELECT ID_CONTRATO, NUMERO_CONTRATO FROM DDA_T_CONTRATO WHERE id_estudio = #{idEstudio} ORDER BY NUMERO_CONTRATO
</select>
<select id="getTiposReporte" resultMap="reportes">
SELECT ID_REPORTE, DESC_FORMULA, FORMULA, COLUMNAS FROM DDA_C_REPORTE_ADD_ON
</select>
......
......@@ -50,7 +50,7 @@
<select id="getTerminoPeriodicos" resultMap="terminoCtoBD" parameterType="long">
SELECT ID_PAGO_PERIODICO, MONTO, FECHA, COMENTARIO
FROM DDA_T_CONTRATO_TERMINO_PAGO
WHERE ID_CONTRATO = #{idContrato}
WHERE ID_CONTRATO = #{idContrato} ORDER BY FECHA ASC
</select>
<insert id="guardarTermino" parameterType="TerminoBD">
......
......@@ -34,7 +34,7 @@
<select id="getTerminoPeriodicos" resultMap="terminoCtoBD" parameterType="long">
SELECT ID_PAGO_PERIODICO, MONTO, FECHA, COMENTARIO
FROM DDA_T_CONTRATO_TERMINO_PAGO
WHERE ID_CONTRATO = #{idContrato}
WHERE ID_CONTRATO = #{idContrato} ORDER BY FECHA ASC
</select>
<select id="getTerminoTitulos" resultMap="servicioTerminoBD" parameterType="long">
......
......@@ -15,6 +15,7 @@
<result property="numContrato" column="NUMERO_CONTRATO" />
<result property="fechaFin" column="FECHA_FIN" />
<result property="fechaInicio" column="FECHA_INICIO" />
<result property="costo" column="COSTO" />
</resultMap>
<resultMap id="resultsContratoAmortizacion" type="ContratoConsultaDTO">
......@@ -26,6 +27,92 @@
<result property="sistema" column="SISTEMA" />
</resultMap>
<resultMap id="resultsRemanente" type="RemanenteDTO">
<result property="diferenciador" column="DIFERENCIADOR" />
<result property="remanente" column="REMANENTE" />
</resultMap>
<select id='obtenerRemanente' resultMap='resultsRemanente' parameterType="map">
SELECT
<if test="idEstudio == null">
<if test="numContrato == null">
amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
amct.ID_TITULO_CNT
</if>
</if>
AS DIFERENCIADOR, ROUND(SUM(am.MONTO),2) AS REMANENTE FROM DDA_T_AMORTIZACION am
INNER JOIN DDA_T_CONTRATO_TITULO amct ON am.ID_TITULO_CNTORIG = amct.ID_TITULO_CNTORIG
INNER JOIN DDA_T_CONTRATO amc ON amct.ID_CONTRATO = amc.ID_CONTRATO
WHERE TRUNC(am.MES) > TO_DATE(#{fecha}, 'MM/YYYY') AND amc.ID_ESTATUS IN (4, 5)
<if test="idEstudio == null">
<if test="numContrato == null">
GROUP BY amc.ID_ESTUDIO ORDER BY amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
AND amc.ID_ESTUDIO = #{idEstudio}
GROUP BY amc.NUMERO_CONTRATO ORDER BY amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
AND amc.ID_ESTUDIO = #{idEstudio}
AND amc.ID_CONTRATO = #{numContrato}
GROUP BY amct.ID_TITULO_CNT ORDER BY amct.ID_TITULO_CNT
</if>
</if>
</select>
<select id='obtenerRemanenteSAP' resultMap='registroMonto' parameterType="map">
SELECT
<if test="idEstudio == null">
<if test="numContrato == null">
amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
amct.ID_TITULO_CNT
</if>
</if>
AS DIFERENCIADOR, (ROUND(SUM(am.MONTO),2) * -1) AS REMANENTE FROM DDA_T_AMORTIZACION_SAP am
INNER JOIN DDA_T_CONTRATO_TITULO amct ON am.ID_TITULO_CNTORIG = amct.ID_TITULO_CNTORIG
INNER JOIN DDA_T_CONTRATO amc ON amct.ID_CONTRATO = amc.ID_CONTRATO
WHERE TRUNC(am.MES) > TO_DATE(#{fecha}, 'MM/YYYY') AND amc.ID_ESTATUS IN (4, 5)
<if test="idEstudio == null">
<if test="numContrato == null">
GROUP BY amc.ID_ESTUDIO ORDER BY amc.ID_ESTUDIO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato == null">
AND amc.ID_ESTUDIO = #{idEstudio}
GROUP BY amc.NUMERO_CONTRATO ORDER BY amc.NUMERO_CONTRATO
</if>
</if>
<if test="idEstudio != null">
<if test="numContrato != null">
AND amc.ID_ESTUDIO = #{idEstudio}
AND amc.ID_CONTRATO = #{numContrato}
GROUP BY amct.ID_TITULO_CNT ORDER BY amct.ID_TITULO_CNT
</if>
</if>
</select>
<select id='obtenMontosTotalesEstudio' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
......@@ -53,8 +140,9 @@
</select>
<select id='obtenMontosTotalesContrato' resultMap='registroMonto' parameterType="map">
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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
SELECT round(sum(ct.costo),2) AS COSTO, 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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN,
MAX(contratosEst.SISTEMA) AS SISTEMA
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -85,7 +173,7 @@
<select id='obtenMontosTitulosContrato' resultMap='registroMonto' parameterType="map">
SELECT 'DDA' as SISTEMA, NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, SUM(a.MONTO) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV, round(sum(ct.costo),2) AS COSTO, MAX(ct.ID_TITULO_CNT) AS ID_CONTRATO
FROM DDA_T_AMORTIZACION a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -122,7 +210,7 @@
<!-- AMORTIZACION SAP -->
<select id="consultaContratosConAmoritzacionPorEstudioSAP" resultMap="resultsContratoAmortizacion"
parameterType="map">
SELECT
SELECT
MAX(t.ID_CONTRATO) AS ID_CONTRATO,
t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
'SAP' AS SISTEMA
......@@ -143,15 +231,16 @@
</select>
<select id='obtenMontosTotalesContratoSAP' resultMap='registroMonto' parameterType="map">
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, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN
SELECT round(sum(ct.costo),2) AS COSTO, 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, (round(SUM(a.MONTO), 2)* - 1) AS MONTO, MIN(contratosEst.FECHA_INICIO) AS FECHA_INICIO, MAX(contratosEst.FECHA_FIN) AS FECHA_FIN,
MAX(contratosEst.SISTEMA) AS SISTEMA
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
INNER JOIN ( SELECT
MAX(t.ID_CONTRATO) AS ID_CONTRATO,
t.NUMERO_CONTRATO, MIN(t.FECHA_INICIO) AS FECHA_INICIO, MAX(t.FECHA_FIN) AS FECHA_FIN , MAX(ID_SAP) AS ID_SAP,
'DDA' AS SISTEMA
'SAP' AS SISTEMA
FROM DDA_T_CONTRATO t
WHERE
t.ID_ESTUDIO = #{idEstudio} AND EXISTS(
......@@ -175,7 +264,7 @@
<select id='obtenMontosTotalesEstudioSAP' resultMap='registroMonto' parameterType="map">
SELECT NULL AS IDENTIFICADOR, NULL AS DESCRIPCION,
TRUNC(a.MES) AS FECHA, TRUNC(SUM(a.MONTO), 2) AS MONTO
TRUNC(a.MES) AS FECHA, (round(SUM(a.MONTO), 2)* - 1) AS MONTO
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......@@ -199,8 +288,8 @@
</select>
<select id='obtenMontosTitulosContratoSAP' resultMap='registroMonto' parameterType="map">
SELECT 'SAP' as SISTEMA, ct.NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, SUM(a.MONTO) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV
SELECT 'SAP' as SISTEMA, ct.NOMBRE_UNICO AS DESCRIPCION, TRUNC(a.MES) AS FECHA, (SUM(a.MONTO) * -1) AS MONTO, ct.TEMPORADA,
MAX(ct.ID_SAP) AS ID_SAP, MAX(ct.ID_BV) AS ID_BV, round(sum(ct.costo),2) AS COSTO, MAX(ct.ID_TITULO_CNT) AS ID_CONTRATO
FROM DDA_T_AMORTIZACION_SAP a
INNER JOIN DDA_T_CONTRATO_TITULO ct
ON a.ID_TITULO_CNTORIG = ct.ID_TITULO_CNTORIG
......
......@@ -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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
......
......@@ -76,7 +76,7 @@ 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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.titulosBroadView = http://localhost:5001/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
......
This diff is collapsed.
#Generated by Maven
#Tue Aug 08 13:11:56 CDT 2023
#Tue Nov 28 17:31:49 CST 2023
version=1.1
groupId=com.mx.dla
artifactId=persistencia
......@@ -57,7 +57,7 @@ function toggleAllBoxes() {
<tr>
<td>Tests passed/Failed/Skipped:</td><td>0/0/0</td>
</tr><tr>
<td>Started on:</td><td>Tue Aug 08 13:11:56 CDT 2023</td>
<td>Started on:</td><td>Tue Nov 28 17:31:49 CST 2023</td>
</tr>
<tr><td>Total time:</td><td>0 seconds (1 ms)</td>
</tr><tr>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated by org.testng.reporters.JUnitXMLReporter -->
<testsuite hostname="LAPTOP-HHND8GT5" tests="0" failures="0" timestamp="8 Aug 2023 18:11:56 GMT" time="0.001" errors="0">
<testsuite hostname="LAPTOP-HHND8GT5" tests="0" failures="0" timestamp="28 Nov 2023 23:31:49 GMT" time="0.001" errors="0">
</testsuite>
......@@ -29,7 +29,7 @@
<property name="os.name" value="Windows 10"/>
<property name="classworlds.conf" value="D:\apache-maven-3.8.7\bin\m2.conf"/>
<property name="sun.jnu.encoding" value="Cp1252"/>
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_202\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;D:\apache-maven-3.8.7\bin;C:\Program Files\Java\jdk1.8.0_202;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\jfmj_\AppData\Local\Microsoft\WindowsApps;;C:\Users\jfmj_\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\jfmj_\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;."/>
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_202\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Git\cmd;D:\apache-maven-3.8.7\bin;C:\Program Files\Java\jdk1.8.0_202;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\dotnet\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Azure Data Studio\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\jfmj_\AppData\Local\Microsoft\WindowsApps;;C:\Users\jfmj_\.dotnet\tools;C:\Program Files\Azure Data Studio\bin;."/>
<property name="maven.conf" value="D:\apache-maven-3.8.7/conf"/>
<property name="java.specification.name" value="Java Platform API Specification"/>
<property name="java.class.version" value="52.0"/>
......@@ -46,7 +46,7 @@
<property name="java.vm.specification.version" value="1.8"/>
<property name="sun.arch.data.model" value="64"/>
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_202\jre"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install -P qa"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="user.language" value="es"/>
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
......
-------------------------------------------------------------------------------
Test set: TestSuite
-------------------------------------------------------------------------------
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.464 sec
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.521 sec
......@@ -2,10 +2,10 @@
<testng-results skipped="0" failed="0" total="0" passed="0">
<reporter-output>
</reporter-output>
<suite name="Command line suite" duration-ms="1" started-at="2023-08-08T18:11:56Z" finished-at="2023-08-08T18:11:56Z">
<suite name="Command line suite" duration-ms="1" started-at="2023-11-28T23:31:49Z" finished-at="2023-11-28T23:31:49Z">
<groups>
</groups>
<test name="Command line test" duration-ms="1" started-at="2023-08-08T18:11:56Z" finished-at="2023-08-08T18:11:56Z">
<test name="Command line test" duration-ms="1" started-at="2023-11-28T23:31:49Z" finished-at="2023-11-28T23:31:49Z">
</test> <!-- Command line test -->
</suite> <!-- Command line suite -->
</testng-results>
......@@ -262,6 +262,12 @@
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
<!-- GSON -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.0</version>
</dependency>
</dependencies>
<profiles>
......@@ -284,7 +290,7 @@
<p.resources.dir>profiles/qa/resources</p.resources.dir>
</properties>
<build>
<finalName>dla</finalName>
<finalName>dla_qa</finalName>
</build>
</profile>
......
......@@ -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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:5000/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:5000/DDA_CRN_ClienteSAP/servicioEnmienda
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
......
......@@ -76,7 +76,7 @@ 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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.titulosBroadView = http://localhost:5001/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
......
# Archivo de configuraciones para ambientes de QA o Produccion (con tomcat)
uri.file.store =/home/DLASilicon/dda/doctosContratos/
uri.file.titulos =/home/DLASilicon/dda/titulos/error/
uri.file.carga.fees =/home/DLASilicon/dda/cargaFees/excel/
uri.file.carga.broadview =/home/DLASilicon/dda/actualizaIdBV/excel/
uri.file.carga.suscriptores=/home/DLASilicon/dda/cargaSuscriptores/excel/
uri.file.carga.titulos =/home/DLASilicon/dda/cargaTitulos/excel/
uri.file.carga.titulosLF =/home/DLASilicon/dda/cargaTitulosLF/excel/
uri.file.carga.transacciones = /home/DLASilicon/dda/cargaTitulosPN/excel/
uri.file.carga.titulosTR =/home/DLASilicon/dda/cargaTitulosTR/excel/
uri.file.carga.visualizaciones = /home/DLASilicon/dda/cargaTitulosVS/excel/
uri.file.reporte.baseActivosSQL= /home/DLASilicon/dda/sqlReportes/sql/
uri.file.store =/home/scm/server/dda/doctosContratos/
uri.file.titulos =/home/scm/server/dda/titulos/error/
uri.file.carga.fees =/home/scm/server/dda/cargaFees/excel/
uri.file.carga.broadview =/home/scm/server/dda/actualizaIdBV/excel/
uri.file.carga.suscriptores=/home/scm/server/dda/cargaSuscriptores/excel/
uri.file.carga.titulos =/home/scm/server/dda/cargaTitulos/excel/
uri.file.carga.titulosLF =/home/scm/server/dda/cargaTitulosLF/excel/
uri.file.carga.transacciones = /home/scm/server/dda/cargaTitulosPN/excel/
uri.file.carga.titulosTR =/home/scm/server/dda/cargaTitulosTR/excel/
uri.file.carga.visualizaciones = /home/scm/server/dda/cargaTitulosVS/excel/
uri.file.reporte.baseActivosSQL= /home/scm/server/dda/sqlReportes/sql/
uri.file.reporte.txtcpv= /home/scm/server/dda/sqlReportes/txt/
servidor.rest.ws=200.57.181.8
servidor.rest.ws=localhost:8080
# Archivo de configuraciones para ambientes de QA o Produccion (con tomcat)
uri.file.store =/home/DLASilicon/dda/doctosContratos/
uri.file.titulos =/home/DLASilicon/dda/titulos/error/
uri.file.carga.fees =/home/DLASilicon/dda/cargaFees/excel/
uri.file.carga.broadview =/home/DLASilicon/dda/actualizaIdBV/excel/
uri.file.carga.suscriptores=/home/DLASilicon/dda/cargaSuscriptores/excel/
uri.file.carga.titulos =/home/DLASilicon/dda/cargaTitulos/excel/
uri.file.carga.titulosLF =/home/DLASilicon/dda/cargaTitulosLF/excel/
uri.file.carga.transacciones = /home/DLASilicon/dda/cargaTitulosPN/excel/
uri.file.carga.titulosTR =/home/DLASilicon/dda/cargaTitulosTR/excel/
uri.file.carga.visualizaciones = /home/DLASilicon/dda/cargaTitulosVS/excel/
uri.file.reporte.baseActivosSQL= /home/DLASilicon/dda/sqlReportes/sql/
servidor.rest.ws=200.57.181.8
# Archivo de configuraciones
excel.shellPath =/home/DLASilicon/dda/generadorExcel
excel.process.path =/home/DLASilicon/dda/generadorExcel
excel.process.source.path =/home/DLASilicon/dda/generadorExcel/entradas
excel.process.target.path =/home/DLASilicon/dda/generadorExcel/salidas
excel.shellPath =/home/scm/server/dda/generadorExcel
excel.process.path =/home/scm/server/dda/generadorExcel
excel.process.source.path =/home/scm/server/dda/generadorExcel/entradas
excel.process.target.path =/home/scm/server/dda/generadorExcel/salidas
excel.shellName =vti_crearExcelXlsx.sh
excel.process.source.data =CTV_VistaPrevia_Chile_01092015.xml
excel.process.source.style =vti_css.xml
......
# Archivo de configuraciones
excel.shellPath =/home/DLASilicon/dda/generadorExcel
excel.process.path =/home/DLASilicon/dda/generadorExcel
excel.process.source.path =/home/DLASilicon/dda/generadorExcel/entradas
excel.process.target.path =/home/DLASilicon/dda/generadorExcel/salidas
excel.shellName =vti_crearExcelXlsx.sh
excel.process.source.data =CTV_VistaPrevia_Chile_01092015.xml
excel.process.source.style =vti_css.xml
excel.process.targetName =resultado.xlsx
excel.process.tipo =1
excel.process.bloqueo =2
excel.process.password =
......@@ -2,11 +2,11 @@
#Production version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=300000166
ordenInterna.idMaterial.transaccines=300000166
ordenInterna.idMaterial.licenseFee=300000166
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000259
ordenInterna.idMaterial.licenseFee=300000259
ordenInterna.centro=NT07
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
ordenInterna.precio=1
ordenInterna.indicadorIva=U0
......@@ -18,15 +18,15 @@ ordenInterna.idPosicionAcc=00010
ordenInterna.centroCostos=07UOVA0001
ordenInterna.idOrden=000000400098
ordenInterna.sociedad=NT07
ordenInterna.sociedad=NT09
ordenInterna.claseDoc.t=NT08
ordenInterna.claseDoc.t=CD06
ordenInterna.claseDoc.a=CD06
ordenInterna.claseDoc.na=CD06
ordenInterna.idProveedor=0030800000
ordenInterna.orgCompras=US01
ordenInterna.grupoCompras=Z01
ordenInterna.orgCompras=AMCO
ordenInterna.grupoCompras=N06
adendumEnmienda.idPosicion=00010
#************************************************************************
......@@ -67,17 +67,20 @@ uri.ws.carga.transacciones.procesarCargaTitulosPN = http://${servidor.re
uri.ws.carga.transacciones.asociarTitulosTransCntVigentes = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/asociarTitulosTransCntVigentes
uri.ws.contrato.transaccion.titulos.notificarInventarioTitulos = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/notificarInventarioTitulos
uri.ws.contrato.transaccion.titulos.procesarCargaTitulosTR = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosTR
uri.rest.carga.transaccion.vistaprevia = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
uri.rest.carga.titulos.license = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosLF
uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
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.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
factura.header.sociedad =NT07
factura.header.sociedad =NT09
factura.header.indicador =X
factura.header.tipoDocumento=RE
#moneda tambien se usa en Nota Credito
......
#***Propiedades para notificacion de sap desde pantalla de generales***
#Production version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000259
ordenInterna.idMaterial.licenseFee=300000259
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
ordenInterna.precio=1
ordenInterna.indicadorIva=U0
ordenInterna.tipoImputacion.noAmortizable=K
ordenInterna.tipoImputacion.siAmortizable=F
ordenInterna.idPosicionAcc=00010
ordenInterna.centroCostos=07UOVA0001
ordenInterna.idOrden=000000400098
ordenInterna.sociedad=NT09
ordenInterna.claseDoc.t=CD06
ordenInterna.claseDoc.a=CD06
ordenInterna.claseDoc.na=CD06
ordenInterna.idProveedor=0030800000
ordenInterna.orgCompras=AMCO
ordenInterna.grupoCompras=N06
adendumEnmienda.idPosicion=00010
#************************************************************************
#URL'S DE CONEXION DLA---->WEB SERVICES SAP (Rest Methods)
uri.rest.entradaMercancia = http://${servidor.rest.ws}/ddaContratoCWS/services/entradaMercancia
uri.rest.facturaNotifica = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/notificarFactura
uri.rest.movimientoFinal = http://${servidor.rest.ws}/ddaPedidoCompraCWS/services/pedidoCompraWS/enviaMovimientoFinal
uri.rest.ordenesInternas.apartado = http://${servidor.rest.ws}/ddaOrdenesInternasCWS/services/ordenesInternasWS/crearOrdenInterna
uri.rest.ordenesInternas.presupuesto = http://${servidor.rest.ws}/ddaOrdenesInternasCWS/services/ordenesInternasWS/modificarOrdenInterna
uri.rest.envia.correo = http://${servidor.rest.ws}/dla-services/email/enviaCorreo
uri.rest.validaPresupuesto = http://${servidor.rest.ws}/dla-services/presupuesto/validaPresupuesto
uri.rest.generaAmortizacion = http://${servidor.rest.ws}/dla-services/presupuesto/generaAmortizacion
uri.rest.enviaCorreoCalend = http://${servidor.rest.ws}/dla-services/seguimiento/getSeguimiento
uri.rest.obtenerSuscriptoresContrato = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/obtenerSuscriptoresContrato
uri.rest.carga.titulos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulos
uri.rest.calcularAmortizacionPorContrato= http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularAmortizacionPorContrato
uri.rest.generaAmortizacion2 = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularAmortizacionPorContrato
uri.rest.costoSuscriptores = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularCostoSuscriptores
uri.rest.validaMinimoSeleccion = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/validarMinimoSeleccion
uri.rest.costoTitulo = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/obtenerCostoTitulo
uri.rest.validarPresupuestoPorContrato = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/validarPresupuestoPorContrato
uri.rest.actualizar.id.broadview = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/actualizarIdBroadView
uri.rest.registro.sap.suscripcion = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPSuscripcion
uri.rest.registro.sap.transaccional = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPTransaccional
uri.rest.registro.sap.license.fee = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPLicenseFee
uri.rest.registro.sap.enmienda.suscripcion = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaSuscripcion
uri.rest.registro.sap.enmienda.transaccional = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaTransaccional
uri.rest.registro.sap.enmienda.license.fee = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaLicenseFee
uri.rest.notaCreditoCarga = http://${servidor.rest.ws}/ddaFacturacionCWS/services/facturasWS/cargarNotaCredito
uri.ws.carga.transacciones.procesarCargaTitulosPN = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosPN
uri.ws.carga.transacciones.asociarTitulosTransCntVigentes = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/asociarTitulosTransCntVigentes
uri.ws.contrato.transaccion.titulos.notificarInventarioTitulos = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/notificarInventarioTitulos
uri.ws.contrato.transaccion.titulos.procesarCargaTitulosTR = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosTR
uri.rest.carga.titulos.license = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosLF
uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
uri.ws.carga.visualizaciones.procesa = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosVS
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
factura.header.sociedad =NT09
factura.header.indicador =X
factura.header.tipoDocumento=RE
#moneda tambien se usa en Nota Credito
factura.header.moneda =USD
factura.detalle.impuesto =U0
#cantidad tambien se usa en Nota Credito
factura.detalle.cantidad =1
factura.detalle.isoMedida =90000163
envMov.indEntregaFinal =X
envMov.indFacturaFinal =X
envMov.noItem =00010
#*************************Propiedades para Nota Credito*******************
notaCredito.header.tipoDocumento=KG
notaCredito.detalle.isoMedida =SRV
......@@ -2,9 +2,9 @@
#QA version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=300000166
ordenInterna.idMaterial.transaccines=300000166
ordenInterna.idMaterial.licenseFee=300000166
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000259
ordenInterna.idMaterial.licenseFee=300000259
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
......@@ -76,6 +76,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.rest.titulosBroadView = http://localhost:5000/v1/broadview/titulos/
uri.rest.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
......
#***Propiedades para notificacion de sap desde pantalla de generales***
#QA version
ordenInterna.idPosicion=00010
ordenInterna.idMaterial.suscripcion=300000259
ordenInterna.idMaterial.transaccines=300000166
ordenInterna.idMaterial.licenseFee=300000166
ordenInterna.centro=NT09
ordenInterna.cantidad=12000.00
ordenInterna.precio=1
ordenInterna.indicadorIva=U0
ordenInterna.tipoImputacion.noAmortizable=K
ordenInterna.tipoImputacion.siAmortizable=F
ordenInterna.idPosicionAcc=00010
ordenInterna.centroCostos=0908A05000
ordenInterna.idOrden=000000400098
ordenInterna.sociedad=NT09
ordenInterna.claseDoc.t=CD06
ordenInterna.claseDoc.a=CD06
ordenInterna.claseDoc.na=CD06
ordenInterna.idProveedor=0030800000
ordenInterna.orgCompras=AMCO
ordenInterna.grupoCompras=N06
adendumEnmienda.idPosicion=00010
#************************************************************************
#URL'S DE CONEXION DLA---->WEB SERVICES SAP (Rest Methods)
uri.rest.entradaMercancia = http://${servidor.rest.ws}/ddaContratoCWS/services/entradaMercancia
uri.rest.facturaNotifica = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/notificarFactura
uri.rest.movimientoFinal = http://${servidor.rest.ws}/ddaPedidoCompraCWS/services/pedidoCompraWS/enviaMovimientoFinal
uri.rest.ordenesInternas.apartado = http://${servidor.rest.ws}/ddaOrdenesInternasCWS/services/ordenesInternasWS/crearOrdenInterna
uri.rest.ordenesInternas.presupuesto = http://${servidor.rest.ws}/ddaOrdenesInternasCWS/services/ordenesInternasWS/modificarOrdenInterna
uri.rest.envia.correo = http://${servidor.rest.ws}/dla-services/email/enviaCorreo
uri.rest.validaPresupuesto = http://${servidor.rest.ws}/dla-services/presupuesto/validaPresupuesto
uri.rest.generaAmortizacion = http://${servidor.rest.ws}/dla-services/presupuesto/generaAmortizacion
uri.rest.enviaCorreoCalend = http://${servidor.rest.ws}/dla-services/seguimiento/getSeguimiento
uri.rest.obtenerSuscriptoresContrato = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/obtenerSuscriptoresContrato
uri.rest.carga.titulos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulos
uri.rest.calcularAmortizacionPorContrato= http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularAmortizacionPorContrato
uri.rest.generaAmortizacion2 = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularAmortizacionPorContrato
uri.rest.costoSuscriptores = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/calcularCostoSuscriptores
uri.rest.validaMinimoSeleccion = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/validarMinimoSeleccion
uri.rest.costoTitulo = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/obtenerCostoTitulo
uri.rest.validarPresupuestoPorContrato = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/validarPresupuestoPorContrato
uri.rest.actualizar.id.broadview = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/actualizarIdBroadView
uri.rest.registro.sap.suscripcion = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPSuscripcion
uri.rest.registro.sap.transaccional = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPTransaccional
uri.rest.registro.sap.license.fee = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPLicenseFee
uri.rest.registro.sap.enmienda.suscripcion = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaSuscripcion
uri.rest.registro.sap.enmienda.transaccional = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaTransaccional
uri.rest.registro.sap.enmienda.license.fee = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/registrarSAPEnmiendaLicenseFee
uri.rest.notaCreditoCarga = http://${servidor.rest.ws}/ddaFacturacionCWS/services/facturasWS/cargarNotaCredito
uri.ws.carga.transacciones.procesarCargaTitulosPN = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosPN
uri.ws.carga.transacciones.asociarTitulosTransCntVigentes = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/asociarTitulosTransCntVigentes
uri.ws.contrato.transaccion.titulos.notificarInventarioTitulos = http://${servidor.rest.ws}/DDA_WSB_ClienteSAP/services/contrato/notificarInventarioTitulos
uri.ws.contrato.transaccion.titulos.procesarCargaTitulosTR = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosTR
uri.rest.carga.transaccion.vistaprevia = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
uri.rest.carga.titulos.license = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/procesarCargaTitulosLF
uri.rest.reporte.amortizacion.baseActivos = http://${servidor.rest.ws}/DDA_WSB_Procesos/services/proceso/generarReporte
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.crnExhibicion = http://localhost:8080/DDA_CRN_Exhibicion/servicio
uri.rest.crnClienteSAP = http://localhost:8080/DDA_CRN_ClienteSAP/servicioEnmienda
#*************************Propiedades para Facturacion*******************
#sociedad tambien se usa en Nota Credito
factura.header.sociedad =NT09
factura.header.indicador =X
factura.header.tipoDocumento=RE
#moneda tambien se usa en Nota Credito
factura.header.moneda =USD
factura.detalle.impuesto =U0
#cantidad tambien se usa en Nota Credito
factura.detalle.cantidad =1
factura.detalle.isoMedida =90000163
envMov.indEntregaFinal =X
envMov.indFacturaFinal =X
envMov.noItem =00010
#*************************Propiedades para Nota Credito*******************
notaCredito.header.tipoDocumento=KG
notaCredito.detalle.isoMedida =SRV
......@@ -7,6 +7,8 @@ import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.mx.dla.dda.admin.catalogos.estudios.daos.CatalogoEstudiosDAO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoContratoDTO;
import com.mx.dla.dda.catalogos.daos.CatalogosDAO;
import com.mx.dla.dda.catalogos.dtos.CatalogoDTO;
import com.mx.dla.dda.catalogos.dtos.CategoriaDTO;
......@@ -28,6 +30,9 @@ public class CatalogosBO {
@Autowired
private CatalogosDAO catalogosDAO;
@Autowired
private CatalogoEstudiosDAO contratosDAO;
public List<EstudioDTO> obtenListaEstudios() {
return catalogosDAO.obtenerEstudios();
......@@ -136,4 +141,8 @@ public class CatalogosBO {
}
/** RFD **/
public List<CatalogoContratoDTO> getContratosByEstudio(Long idEstudio) {
return contratosDAO.contratosByEstudio(idEstudio);
}
}
......@@ -127,7 +127,7 @@ public class TituloFeeBussinesBO extends BaseBO{
return ct;
}
public void procesoActualizacionTitulosEnmienda(Long idCto)
/*public void procesoActualizacionTitulosEnmienda(Long idCto)
{
InfoDetalleContratoDTO detalle = generalesDAO.obtenDetalleContrato(idCto);
if(detalle.getTipoMovimiento().intValue() == Movimiento.Enmienda.getValor().intValue())
......@@ -137,7 +137,7 @@ public class TituloFeeBussinesBO extends BaseBO{
for(Titulo t: titulos)
actualizarBanderasContratosAnteriores(t,"T");
}
}
}*/
/**
* @see Se actualizan banderas en bd para cambio en un titulo
......
......@@ -279,7 +279,7 @@ public class TituloBO extends BaseBO {
result.getDatosCarga().setTOTAL_REGISTROS(String.valueOf(titulos.size()));
for(ParamCargaCostosDTO precio : precios) {
if(Objects.nonNull(titulos.get(precio.getIdBroadView()))) {
if(!StringUtils.isNumeric(precio.getPrecio())) {
if(!esNumero(precio.getPrecio())) {
response.getErroresControlados().add(titulos.get(precio.getIdBroadView()));
titulos.remove(precio.getIdBroadView());
} else {
......@@ -312,6 +312,18 @@ public class TituloBO extends BaseBO {
response.setResponse(result);
return response;
}
private static boolean esNumero(String str) {
if (str == null || str.isEmpty()) {
return false;
}
try {
Double.parseDouble(str);
return true;
} catch (NumberFormatException e) {
return false;
}
}
public RespuestaCargaExcel cargaMasivaDeTitulos2(Titulo titulo, ContratoDTO contrato, TipoCargaDocumento tc,
File fileUpload, String fileName, Lista listaActual, String expediente) throws TituloException {
......
......@@ -74,6 +74,23 @@ public class DLARestClient {
client.setConnectTimeout(60000 * 10);
template = new RestTemplate(client);
template.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
template.getMessageConverters().add(new StringHttpMessageConverter());
//template.getInterceptors().add(new HeaderRequestInterceptor("Accept", MediaType.APPLICATION_JSON_VALUE));
//template.getInterceptors().add(new HeaderRequestInterceptor("Content-Type", MediaType.APPLICATION_JSON_VALUE));
System.out.println("URL: " + uri.concat(request));
T r = template.getForObject(uri.concat(request), responseType);
client.destroy();
return r;
}
public <T> T getJson(String request, Class<T> responseType) {
HttpComponentsClientHttpRequestFactory client = new HttpComponentsClientHttpRequestFactory();
client.setReadTimeout(60000 * 10);
client.setConnectTimeout(60000 * 10);
template = new RestTemplate(client);
template.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
template.getMessageConverters().add(new StringHttpMessageConverter());
template.getInterceptors().add(new HeaderRequestInterceptor("Accept", MediaType.APPLICATION_JSON_VALUE));
......@@ -84,6 +101,22 @@ public class DLARestClient {
client.destroy();
return r;
}
public <T> T getBv(String request, Class<T> responseType) {
HttpComponentsClientHttpRequestFactory client = new HttpComponentsClientHttpRequestFactory();
client.setReadTimeout(60000 * 10);
client.setConnectTimeout(60000 * 10);
template = new RestTemplate(client);
template.getMessageConverters().add(new MappingJacksonHttpMessageConverter());
template.getMessageConverters().add(new StringHttpMessageConverter());
template.getInterceptors().add(new HeaderRequestInterceptor("Accept", MediaType.APPLICATION_JSON_VALUE));
System.out.println("URL: " + uri.concat(request));
T r = template.getForObject(uri.concat(request), responseType);
client.destroy();
return r;
}
public void get(Object request) {
HttpComponentsClientHttpRequestFactory client = new HttpComponentsClientHttpRequestFactory();
......
This diff is collapsed.
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