Ajustes de excepciones, codigo muerto e imports sin usar

parent 67504272
......@@ -3,6 +3,9 @@ package com.mx.dla.admin.dtos;
import java.io.Serializable;
import java.util.List;
import lombok.Data;
@Data
public class MenuDTO implements Serializable {
private static final long serialVersionUID = 1L;
......@@ -25,118 +28,6 @@ public class MenuDTO implements Serializable {
private List<MenuDTO> hijos = null;
public String getIdMenu() {
return this.idMenu;
}
public void setIdMenu(String valor) {
this.idMenu = valor;
}
public String getNombre() {
return this.nombre;
}
public void setNombre(String valor) {
this.nombre = valor;
}
public String getDescripcion() {
return this.descripcion;
}
public void setDescripcion(String valor) {
this.descripcion = valor;
}
public String getOrden() {
return this.orden;
}
public void setOrden(String valor) {
this.orden = valor;
}
public String getTipoMenu() {
return this.tipoMenu;
}
public void setTipoMenu(String valor) {
this.tipoMenu = valor;
}
public String getEstatus() {
return this.estatus;
}
public void setEstatus(String valor) {
this.estatus = valor;
}
public String getScript() {
return this.script;
}
public void setScript(String valor) {
this.script = valor;
}
public String getParametros() {
return this.parametros;
}
public void setParametros(String valor) {
this.parametros = valor;
}
public String getIconClass() {
return iconClass;
}
public void setIconClass(String iconClass) {
this.iconClass = iconClass;
}
public String getIdMenuPadre() {
return this.idMenuPadre;
}
public void setIdMenuPadre(String valor) {
this.idMenuPadre = valor;
}
public String getEnMtto() {
return this.enMtto;
}
public void setEnMtto(String valor) {
this.enMtto = valor;
}
public String getRuta() {
return ruta;
}
public void setRuta(String ruta) {
this.ruta = ruta;
}
public String getNivel() {
return nivel;
}
public void setNivel(String nivel) {
this.nivel = nivel;
}
public List<MenuDTO> getHijos() {
return hijos;
}
public void setHijos(List<MenuDTO> hijos) {
this.hijos = hijos;
}
public MenuDTO obtenerMenu(String idMenu) {
if (idMenu == null)
......
......@@ -4,6 +4,9 @@ import java.util.List;
import com.mx.dla.global.dtos.BaseDTO;
import lombok.Data;
@Data
public class PerfilDTO extends BaseDTO {
private static final long serialVersionUID = 1L;
......@@ -13,36 +16,4 @@ public class PerfilDTO extends BaseDTO {
private List<MenuDTO> menus = null;
public String getIdPerfil() {
return this.idPerfil;
}
public void setIdPerfil(String valor) {
this.idPerfil = valor;
}
public String getDescPerfil() {
return this.descPerfil;
}
public void setDescPerfil(String valor) {
this.descPerfil = valor;
}
public String getEstatusPerfil() {
return this.estatusPerfil;
}
public void setEstatusPerfil(String valor) {
this.estatusPerfil = valor;
}
public List<MenuDTO> getMenus() {
return menus;
}
public void setMenus(List<MenuDTO> menus) {
this.menus = menus;
}
}
......@@ -2,35 +2,13 @@ package com.mx.dla.dda.admin.catalogos.addons.dtos;
import java.io.Serializable;
import lombok.Data;
@Data
public class AddOnMenuDTO implements Serializable{
private static final long serialVersionUID = 7273988497345132540L;
private Integer idAddOn;
private String descripcionAddOn;
/**
* @return the idAddOn
*/
public Integer getIdAddOn() {
return idAddOn;
}
/**
* @param idAddOn the idAddOn to set
*/
public void setIdAddOn(Integer idAddOn) {
this.idAddOn = idAddOn;
}
/**
* @return the descripcionAddOn
*/
public String getDescripcionAddOn() {
return descripcionAddOn;
}
/**
* @param descripcionAddOn the descripcionAddOn to set
*/
public void setDescripcionAddOn(String descripcionAddOn) {
this.descripcionAddOn = descripcionAddOn;
}
}
package com.mx.dla.dda.admin.catalogos.addons.dtos;
import lombok.Data;
@Data
public class RelacionAddOnDTO{
private Long idRelacion;
private Long idEstudio;
private Long idPaisAddOn;
private Long estatus;
public Long getIdRelacion() {
return idRelacion;
}
public void setIdRelacion(Long idRelacion) {
this.idRelacion = idRelacion;
}
public Long getIdEstudio() {
return idEstudio;
}
public void setIdEstudio(Long idEstudio) {
this.idEstudio = idEstudio;
}
public Long getIdPaisAddOn() {
return idPaisAddOn;
}
public void setIdPaisAddOn(Long idPaisAddOn) {
this.idPaisAddOn = idPaisAddOn;
}
public Long getEstatus() {
return estatus;
}
public void setEstatus(Long estatus) {
this.estatus = estatus;
}
}
package com.mx.dla.dda.carga.transaccion.ws.procesarCargaTitulosPN;
import java.io.Serializable;
import com.mx.dla.dda.carga.transaccion.ws.procesarCargaTitulosPN.*;
/**
* Representa la respuesta que sera enviada al Front-End por parte de este componente al ejecutar el proceso de Carga de Titulos Transaccional
......
......@@ -2,4 +2,6 @@ package com.mx.dla.dda.catalogos.dtos;
public class MedioEntregaDTO extends RegistroCatalogoDTO {
private static final long serialVersionUID = 1L;
}
......@@ -2,4 +2,6 @@ package com.mx.dla.dda.catalogos.dtos;
public class ServicioDTO extends RegistroCatalogoDTO {
private static final long serialVersionUID = 1L;
}
package com.mx.dla.dda.reporte.cpview.dtos;
import java.awt.List;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import org.apache.log4j.Logger;
public class CostPerViewEstudioMensualDatosDTO implements Serializable {
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(CostPerViewEstudioMensualDatosDTO.class);
private String estudio;
private Double amortizacionEnero;
private Double visualizacionesEnero;
......@@ -381,16 +383,15 @@ public class CostPerViewEstudioMensualDatosDTO implements Serializable {
}
public void print() {
System.out.println("BEGIN");
log.info("BEGIN CostPerViewEstudioMensualDatosDTO.print()");
for (Field field : this.getClass().getDeclaredFields())
try {
System.out.println(field.get(this));
log.info(field.get(this));
}
catch (IllegalArgumentException | IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
log.error("Error: " + e.getMessage(), e.fillInStackTrace());
}
System.out.println("END");
log.info("END CostPerViewEstudioMensualDatosDTO.print()");
}
......
package com.mx.dla.dda.reporte.datosContrato.dtos;
import java.awt.List;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import org.apache.log4j.Logger;
public class DatosContratoDTO implements Serializable {
// datos generales
private static final long serialVersionUID = 1L;
private static Logger log = Logger.getLogger(DatosContratoDTO.class);
private String estudio;
private String noContraroDDA;
private String noContratoBV;
......@@ -389,16 +390,15 @@ public class DatosContratoDTO implements Serializable {
public void print() {
System.out.println("BEGIN");
log.info("BEGIN DatosContratoDTO.print()");
for (Field field : this.getClass().getDeclaredFields())
try {
System.out.println(field.get(this));
log.info(field.get(this));
}
catch (IllegalArgumentException | IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
log.error("Error: " + e.getMessage(), e.fillInStackTrace());
}
System.out.println("END");
log.info("END DatosContratoDTO.print()");
}
......
......@@ -43,8 +43,6 @@ public class InicioAction extends BaseContratoAction {
ActionContext.getContext().getSession().remove("pmn");
ActionContext.getContext().getSession().remove("pmnReturn");
getSession().put("permisos", menuBO.obtenPermisosPerfil(usuario.getPerfil().getIdPerfil()));
String retorno = SUCCESS;
if( !this.getPmn().equals("0") )
......@@ -52,6 +50,7 @@ public class InicioAction extends BaseContratoAction {
if( usuario != null )
{
getSession().put("permisos", menuBO.obtenPermisosPerfil(usuario.getPerfil().getIdPerfil()));
String idPerfil = usuario.getPerfil().getIdPerfil();
if( idPerfil != null )
......@@ -71,19 +70,15 @@ public class InicioAction extends BaseContratoAction {
menusUsuario = menuBO.armarArbolMenus( menusPerfil, idPerfil );
getSession().put("menus", perfil.getMenus() );
}
}
else
} else
{
retorno = "error_002";
}
}
else
} else
{
retorno = "error_002";
}
}
else
{
} else {
retorno = "error_001";
}
......
package com.mx.dla.admin.usuarios.perfil.actions;
import java.sql.SQLException;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.admin.dtos.UsuarioDTO;
import com.mx.dla.admin.usuarios.perfil.bos.UsuarioPerfilBO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class UsuarioPerfilAction extends BaseContratoAction{
public class UsuarioPerfilAction extends BaseContratoAction {
private static final long serialVersionUID = 1L;
......@@ -22,20 +27,27 @@ public class UsuarioPerfilAction extends BaseContratoAction{
@Override
public String execute() {
setUsuario((UsuarioDTO) this.getSession().get("usuario"));
//logger.debug("keys : [{}]", this.getSession().keySet());
//logger.debug("menus : [{}]", this.getSession().get("menus"));
//logger.debug("idContrato : [{}]", this.getSession().get("idContrato"));
this.getSession().put("pmn", null);
this.getSession().put("pmnReturn", null);
//logger.debug("usuario : [{}]", usuario);
//logger.debug("pmn : [{}] --- pmnReturn : [{}]", this.getPmn(), this.getPmnReturn());
return SUCCESS;
}
public String actulizaPropiedadesUsuario(){
public String actulizaPropiedadesUsuario() {
setUsuario((UsuarioDTO) this.getSession().get("usuario"));
setExito(usuarioPerfilBO.actulizaPropiedadUsuario(usuario.getExpediente(), correoElectronico, contrasena, operacion));
try {
setExito(usuarioPerfilBO.actulizaPropiedadUsuario(usuario.getExpediente(), correoElectronico, contrasena,
operacion));
setUsuario(usuarioPerfilBO.obtenerUsuario(usuario.getExpediente()));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException e) {
logger.error("Error. {}", e);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
this.getSession().put("usuario", usuario);
return SUCCESS;
}
......
package com.mx.dla.dda.admin.bloqueo.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.sql.SQLException;
import java.time.LocalDate;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import com.mx.dla.dda.carga.transaccion.bos.CargaTransaccionesBO;
import com.mx.dla.dda.carga.transaccion.dtos.FechaBloqueoDTO;
import com.mx.dla.dda.catalogos.dtos.RegionVentaDTO;
import com.mx.dla.dda.catalogos.dtos.TerritorioDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import com.opensymphony.xwork2.Action;
public class BloqueoSAPAction extends BaseAction {
private static final long serialVersionUID = -1L;
private static Logger log = Logger.getLogger(BloqueoSAPAction.class);
private boolean regresoAction;
private String anio;
private String mes;
private String dia;
......@@ -53,11 +48,15 @@ public class BloqueoSAPAction extends BaseAction {
try {
bdsp.ejecutaSP(fecha);
} catch (Exception e) {
addActionError("Ha ocurrido el siguiente error durante la consulta: "
+ e.getMessage());
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
log.error("Ha ocurrido el siguiente error durante la consulta: " + e.getMessage(), e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
log.error("Ha ocurrido el siguiente error durante la consulta: " + e.getMessage(), e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
log.error("Ha ocurrido el siguiente error durante la consulta: " + e.getMessage(), e);
}
return Action.SUCCESS;
......
package com.mx.dla.dda.admin.catalogos.addons.actions;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.grupoestudio.bos.GrupoEstudioBO;
import com.mx.dla.dda.admin.catalogos.grupoestudio.dtos.GrupoEstudioDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
public class AgregarAddOnAction extends BaseContratoAction{
private static final long serialVersionUID = 1L;
// public List<GrupoEstudioDTO> grupos;
// @Autowired
// private GrupoEstudioBO grupoEstudioBO;
@Override
public String execute() {
logger.debug("In AgregarAddOnAction.");
// setGrupos(grupoEstudioBO.obtenerGrupoEstudio(null));
this.getSession().put("pmn", this.getPmn());
this.getSession().put("pmnReturn", this.getPmnReturn());
return SUCCESS;
}
/*
public void setGrupos(List<GrupoEstudioDTO> grupos) {
this.grupos = grupos;
}
public List<GrupoEstudioDTO> getGrupos() {
return grupos;
}
*/
}
......@@ -2,9 +2,11 @@ package com.mx.dla.dda.admin.catalogos.addons.actions;
import java.io.File;
import java.io.InputStream;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DuplicateKeyException;
......@@ -14,12 +16,15 @@ import com.mx.dla.dda.admin.catalogos.addons.dtos.CatalogoAddOnDTO;
import com.mx.dla.dda.admin.catalogos.addons.dtos.EstudioAddonDTO;
import com.mx.dla.dda.admin.catalogos.estudios.bos.EstudioBO;
import com.mx.dla.dda.admin.catalogos.tipoCambioAddOns.dtos.PaisAddOnsVDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import com.opensymphony.xwork2.Action;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class CatalogoAddOnsAction extends BaseAction {
private static final long serialVersionUID = 1L;
......@@ -69,9 +74,14 @@ public class CatalogoAddOnsAction extends BaseAction {
public String listadoAddOns() {
try {
catalogoAddOns = addOnBO.catalogoAddOns();
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (Exception e) {
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
......@@ -103,11 +113,19 @@ public class CatalogoAddOnsAction extends BaseAction {
this.addOn = new CatalogoAddOnDTO();
this.addOnActualizado = false;
this.seRepitePais = true;
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
return "";
} catch (Exception e) {
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
......@@ -128,12 +146,22 @@ public class CatalogoAddOnsAction extends BaseAction {
this.addOnActualizado = true;
setIdAddOn(addOn.getIdAddOn());
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
} catch (Exception e) {
return "";
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
}
setPmns();
......@@ -143,27 +171,74 @@ public class CatalogoAddOnsAction extends BaseAction {
public String buscaAddOn() {
try {
setAddOn(addOnBO.catalogoAddOnsPorId(idAddOn));
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
} catch (Exception e) {
return "";
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
}
return "addOnConsultado";
}
public String obtnerAddOn() {
try {
setAddOn(addOnBO.catalogoAddOnsPorId(idAddOn));
setEstudios(estudioBO.catalogoEstudiosAddOn());
setPaises(addOnBO.obtenerPaisesAddOn());
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
return "";
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
}
return SUCCESS;
}
public String actualizaAddOnMod() {
try {
addOnBO.actulizaCatalogoAddOn(idAddOn, idEstudio, pais, revenueShare, precio, vat, precioNeto, vatFijo, precioNetoFijo,
tipoDeCambio, calculoMontoXPais, calculoRevenueShare, tarifaMinima, preferido);
this.addOn = addOnBO.catalogoAddOnsPorId(idAddOn);
this.addOnActualizado = true;
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
return "";
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
}
return SUCCESS;
}
......@@ -172,12 +247,22 @@ public class CatalogoAddOnsAction extends BaseAction {
try {
addOnBO.eliminaprecioAddOn(idAddOn,preferido,idRelacion);
this.addOnActualizado = true;
} catch (ResultMapException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (PersistenceException ibe) {
this.addOnActualizado = false;
logger.error("Error. {}", ibe);
} catch (Exception e) {
return "";
} catch (TransaccionException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
} catch (SQLException e) {
this.addOnActualizado = false;
logger.error("Error. {}", e);
return "";
}
return SUCCESS;
}
......
package com.mx.dla.dda.admin.catalogos.addons.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.addons.bos.EstudioAddonBO;
......@@ -10,6 +12,7 @@ import com.mx.dla.dda.admin.catalogos.addons.bos.ReporteAddOnsBO;
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.bos.EstudioBO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import lombok.Getter;
......@@ -17,7 +20,7 @@ import lombok.Setter;
@Getter
@Setter
public class EstudiosAddOnAction extends BaseAction{
public class EstudiosAddOnAction extends BaseAction {
private static final long serialVersionUID = 1L;
private List<EstudioAddonDTO> estudios;
......@@ -48,12 +51,34 @@ public class EstudiosAddOnAction extends BaseAction{
}
public String listadoEstudiosAddons() {
try {
setEstudios(estudioAddonBO.getEstudios());
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String dirigirAgregarEstudio() throws Exception {
try {
setReportes(reporteAddOnsBO.getTiposReporte(StringUtils.EMPTY));
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -65,21 +90,43 @@ public class EstudiosAddOnAction extends BaseAction{
addon.setReduClientes(redClientes);
addon.setAddon(adon);
addon.setDecimales("2");
addon.setAgrupado(agrupado == null ? "0":agrupado);
addon.setAgrupado(agrupado == null ? "0" : agrupado);
try {
estudioAddonBO.guardarAddon(addon);
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
public String obtnenAddon() {
try {
setEstudio(estudioAddonBO.getEstudioById(idEstudio));
setReportes(reporteAddOnsBO.getTiposReporte(StringUtils.EMPTY));
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
public String actualizaAddonMod() {
System.out.println("*************Agrupado*********" + agrupado);
logger.info("*************Agrupado*********" + agrupado);
EstudioAddonDTO addon = new EstudioAddonDTO();
addon.setIdEstudio(idEstudio.intValue());
addon.setNombre(nombreEstudio);
......@@ -87,12 +134,23 @@ public class EstudiosAddOnAction extends BaseAction{
addon.setReduClientes(redClientes);
addon.setAddon(adon);
addon.setDecimales("2");
addon.setAgrupado(agrupado == null ? "0":agrupado);
addon.setAgrupado(agrupado == null ? "0" : agrupado);
try {
ok = estudioAddonBO.modificaAddon(addon);
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error. {}", e);
}
return SUCCESS;
}
public void setPmns(){
public void setPmns() {
logger.debug("pmn : " + this.getPmn() + "pmnReturn : " + this.getPmnReturn());
this.getSession().put("pmn", 210);
this.getSession().put("pmnReturn", 210);
......
package com.mx.dla.dda.admin.catalogos.apartados.actions;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.apartados.bos.ApartadosBO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.excepcion.SuscriptorException;
import com.mx.dla.dda.contrato.generales.dtos.ApartadoDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class ApartadosAction extends BaseContratoAction{
public class ApartadosAction extends BaseContratoAction {
private static final long serialVersionUID = 6539076129813362003L;
......@@ -23,61 +28,93 @@ public class ApartadosAction extends BaseContratoAction{
@Autowired
private ApartadosBO apartadosBO;
public String CatalogoApartados(){
public String CatalogoApartados() {
try {
this.apartados = apartadosBO.selectBusquedaApartados(amortizable);
}catch(PersistenceException ibe){
this.mensaje = "Ocurri un error al obtener los datos.";
logger.error("Error.", ibe);
}catch(Exception e){
this.mensaje = "Ocurri un error al obtener los datos.";
logger.error("Error.", e);
} catch (ResultMapException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (PersistenceException ibe) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", ibe);
} catch (TransaccionException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SQLException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
}
return "listado";
}
public String generarApartado(){
public String generarApartado() {
try {
logger.debug(""+this.descripcion+":"+ this.idApartado +":"+this.amortizable);
logger.debug("" + this.descripcion + ":" + this.idApartado + ":" + this.amortizable);
this.mensaje = apartadosBO.generarApartado(this.descripcion, this.idApartado, this.amortizable);
if(this.mensaje != null)
if (this.mensaje != null)
this.idApartado = this.mensaje;
}catch(SuscriptorException se){
} catch (SuscriptorException se) {
this.mensaje = se.getMessage();
this.idApartado = null;
}catch(PersistenceException ibe){
this.mensaje = "Ocurri un error al obtener los datos.";
this.idApartado = null;
logger.error("Error.", ibe);
}catch(Exception e){
this.mensaje = "Ocurri un error al obtener los datos.";
this.idApartado = null;
logger.error("Error.", e);
} catch (ResultMapException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (PersistenceException ibe) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", ibe);
} catch (TransaccionException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SQLException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SocketTimeoutException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (IOException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
}
return "listado";
}
public String notificarSAP(){
public String notificarSAP() {
try {
logger.debug(""+this.descripcion+":"+ this.idApartado +":"+this.amortizable);
logger.debug("" + this.descripcion + ":" + this.idApartado + ":" + this.amortizable);
ApartadoDTO apartado = new ApartadoDTO(Long.parseLong(this.idApartado), this.descripcion);
logger.debug(apartado.toString());
apartadosBO.notificarApartadoNoAmortizablesSAP(apartado);
this.idApartado = apartado.getIdSap() != null || apartado.getIdSap().compareTo("") != 0 ? apartado.getIdSap() : null;
this.idApartado = apartado.getIdSap() != null || apartado.getIdSap().compareTo("") != 0
? apartado.getIdSap()
: null;
this.mensaje = "OK";
}catch(PersistenceException ibe){
logger.error("Error.", ibe);
}catch(Exception e){
logger.error("Error.", e);
} catch (ResultMapException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (PersistenceException ibe) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", ibe);
} catch (TransaccionException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SQLException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SocketTimeoutException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
} catch (IOException e) {
this.mensaje = "Ocurri un error.";
logger.error("Ocurri un error al obtener los datos.", e);
}
return "listado";
}
......@@ -85,18 +122,23 @@ public class ApartadosAction extends BaseContratoAction{
public List<ApartadoDTO> getApartados() {
return apartados;
}
public String getMensaje() {
return mensaje;
}
public void setDescripcion(String descripcion) {
this.descripcion = descripcion;
}
public void setIdApartado(String idApartado) {
this.idApartado = idApartado;
}
public String getIdApartado() {
return idApartado;
}
public void setAmortizable(String amortizable) {
this.amortizable = amortizable;
}
......
package com.mx.dla.dda.admin.catalogos.estudios.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.grupoestudio.bos.GrupoEstudioBO;
import com.mx.dla.dda.admin.catalogos.grupoestudio.dtos.GrupoEstudioDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class AgregarEstudioAction extends BaseContratoAction{
public class AgregarEstudioAction extends BaseContratoAction {
private static final long serialVersionUID = 1L;
......@@ -20,7 +24,17 @@ public class AgregarEstudioAction extends BaseContratoAction{
@Override
public String execute() {
logger.debug("In AgregarEstudioAction.");
try {
setGrupos(grupoEstudioBO.obtenerGrupoEstudio(null));
} catch (ResultMapException e) {
logger.error("Ocurri un error al obtener los datos.", e);
} catch (PersistenceException ibe) {
logger.error("Ocurri un error al obtener los datos.", ibe);
} catch (TransaccionException e) {
logger.error("Ocurri un error al obtener los datos.", e);
} catch (SQLException e) {
logger.error("Ocurri un error al obtener los datos.", e);
}
this.getSession().put("pmn", this.getPmn());
this.getSession().put("pmnReturn", this.getPmnReturn());
return SUCCESS;
......
package com.mx.dla.dda.admin.catalogos.estudios.actions;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.estudios.bos.EstudioBO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoEstudioDTO;
import com.mx.dla.dda.admin.catalogos.grupoestudio.bos.GrupoEstudioBO;
import com.mx.dla.dda.admin.catalogos.grupoestudio.dtos.GrupoEstudioDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import com.opensymphony.xwork2.Action;
......@@ -43,21 +46,24 @@ public class CatalogoEstudiosAction extends BaseAction {
return SUCCESS;
}
public String listadoEstudios(){
try
{
public String listadoEstudios() {
try {
catalogoEstudios = new ArrayList<CatalogoEstudioDTO>();
catalogoEstudios = estudioBO.catalogoEstudios();
}catch(PersistenceException ibe){
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
}catch(Exception e){
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return Action.SUCCESS;
}
public void setPmns(){
public void setPmns() {
logger.debug("pmn : " + this.getPmn() + "pmnReturn : " + this.getPmnReturn());
this.getSession().put("pmn", 42);
this.getSession().put("pmnReturn", 42);
......@@ -70,43 +76,53 @@ public class CatalogoEstudiosAction extends BaseAction {
return SUCCESS;
}
public String guardaEstudio(){
public String guardaEstudio() {
try{
try {
this.estudio = estudioBO.guardarEstudio(nombreEstudio);
this.estudioActualizado=true;
this.estudioActualizado = true;
}catch(PersistenceException ibe){
this.estudioActualizado=false;
} catch (ResultMapException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.estudioActualizado = false;
logger.error("Error. {}", ibe);
}catch(Exception e){
this.estudioActualizado=false;
} catch (TransaccionException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
}
setPmns();
return Action.SUCCESS;
}
public String actualizaEstudio() {
public String actualizaEstudio(){
try{
try {
estudio.setIdGrupo(campoGrupo);
logger.debug("[{}]", estudio);
estudioBO.updateEstudio(estudio);
int idEstudio = this.estudio.getIdEstudio();
this.estudio = estudioBO.catalogoEstudiosPorId(idEstudio);
this.estudioActualizado=true;
this.estudioActualizado = true;
setIdEstudio(estudio.getIdEstudio().longValue());
}catch(PersistenceException ibe){
this.estudioActualizado=false;
} catch (ResultMapException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.estudioActualizado = false;
logger.error("Error. {}", ibe);
}catch(Exception e){
this.estudioActualizado=false;
} catch (TransaccionException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
}
setPmns();
......@@ -114,50 +130,64 @@ public class CatalogoEstudiosAction extends BaseAction {
return "estudioActualizado";
}
public String buscaEstudio( ){
try{
public String buscaEstudio() {
try {
setGrupos(GrupoEstudioBO.obtenerGrupoEstudio(null));
this.estudio = estudioBO.catalogoEstudiosPorId(idEstudio.intValue());
}catch(PersistenceException ibe){
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
}catch(Exception e){
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return "estudioConsultado";
}
public String obtneEstudio() {
try {
setEstudio(estudioBO.catalogoEstudiosPorId(idEstudio.intValue()));
setGrupos(GrupoEstudioBO.obtenerGrupoEstudio(idEstudio));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String actualizaEstudioMod() {
setSeRepiteSigla(estudioBO.seRepiteSigla(idEstudio, sigla));
if(!getSeRepiteSigla()) {
estudioBO.actulizaCatalogoEstudio(idEstudio, sigla, campoGrupo, Integer.valueOf(esAddOn),nombreAddOn);
try {
if (!getSeRepiteSigla()) {
estudioBO.actulizaCatalogoEstudio(idEstudio, sigla, campoGrupo, Integer.valueOf(esAddOn), nombreAddOn);
this.estudio = estudioBO.catalogoEstudiosPorId(idEstudio.intValue());
this.estudioActualizado = true;
}
} catch (ResultMapException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.estudioActualizado = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.estudioActualizado = false;
logger.error("Error. {}", e);
}
return SUCCESS;
}
public List<CatalogoEstudioDTO> getCatalogoEstudios() {
return catalogoEstudios;
}
......
package com.mx.dla.dda.admin.catalogos.grupoestudio.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.grupoestudio.bos.GrupoEstudioBO;
import com.mx.dla.dda.admin.catalogos.grupoestudio.dtos.GrupoEstudioDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class GrupoEstudioAction extends BaseContratoAction{
public class GrupoEstudioAction extends BaseContratoAction {
private static final long serialVersionUID = 1L;
@Autowired
......@@ -29,17 +33,47 @@ public class GrupoEstudioAction extends BaseContratoAction{
}
public String obtnerGrupos() {
try {
setGrupos(grupoEstudioBO.obtenerGrupoEstudio(null));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return "regresaInformacion";
}
public String obtneGrupo() {
try {
setGrupo(grupoEstudioBO.obtenerGrupo(idGrupo));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String registraActualiza(){
public String registraActualiza() {
try {
grupoEstudioBO.registraActualizaGrupo(operacion, idGrupo, descripcion, estatus, orden, colapsa);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......
......@@ -3,6 +3,8 @@ package com.mx.dla.dda.admin.catalogos.materiales.actions;
import java.util.ArrayList;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -32,30 +34,10 @@ public class CatalogoMaterialesAction extends BaseAction {
catalogoMateriales = new ArrayList<CatalogoMaterialDTO>();
catalogoMateriales = catalogoMaterialesDAO.catalogoMateriales();
/**
* Temporal
*/
// EstudioDTO estudioDTO1 = new EstudioDTO();
// estudioDTO1.setIdEstudio(1);
// estudioDTO1.setIdApartado(1);
// estudioDTO1.setClavePais("US");
// estudioDTO1.setClaveMoneda("USD");
// estudioDTO1.setDescripcionEstudio("FOX ENTERTAINMENT INC");
// estudioDTO1.setCodigoSap("0030800000");
// estudioDTO1.setSiglaDda(null);
// estudioDTO1.setOrden(1);
// catalogoEstudios.add(estudioDTO1);
/**
* Fin Temporal
*/
// catalogoEmpresaFilial = catalogoEmpresaFilialDAO.catalogoEmpresaFilial();
}catch(Exception exc){
log.error(exc.getMessage());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
}
log.info("Catalogo de materiales");
......
package com.mx.dla.dda.admin.catalogos.pais.actions;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -12,6 +14,7 @@ import com.mx.dla.dda.admin.catalogos.pais.dtos.CatalogoPaisDTO;
import com.mx.dla.dda.catalogos.bos.CatalogosBO;
import com.mx.dla.dda.catalogos.dtos.RegionVentaDTO;
import com.mx.dla.dda.catalogos.dtos.TerritorioDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
public class CatalogoPaisAction extends BaseAction {
......@@ -38,54 +41,56 @@ public class CatalogoPaisAction extends BaseAction {
return SUCCESS;
}
public String listadoPais(){
public String listadoPais() {
try{
try {
catalogoPais = new ArrayList<CatalogoPaisDTO>();
catalogoPais = catalogoPaisBO.getCatalogoPais();
}catch(PersistenceException ibe){
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
log.error("Error en [" + this.getClass() +"]", e);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return "catalogoPaisLista";
}
public String guardaPais(){
public String guardaPais() {
try{
try {
regresoAction = true;
CatalogoPaisDTO paisNuevo = new CatalogoPaisDTO(this.pais);
catalogoPaisBO.guardarPais(paisNuevo);
paisActualizado=true;
}catch(PersistenceException ibe){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", e);
paisActualizado = true;
} catch (ResultMapException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.paisActualizado = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
}
getListados();
return "irCrearPais";
}
public String irCrearPais(){
public String irCrearPais() {
try{
getListados();
}catch(PersistenceException ibe){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", e);
}
return "irCrearPais";
}
public String buscaPais( ){
try{
public String buscaPais() {
try {
log.info("*************Busca pais: " + this.pais.getNombre());
int idPais = this.pais.getId();
......@@ -93,55 +98,72 @@ public class CatalogoPaisAction extends BaseAction {
getListados();
log.info("****"+catalogoTerritorio.toString());
log.info("****" + catalogoTerritorio.toString());
}catch(PersistenceException ibe){
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
log.error("Error en [" + this.getClass() +"]", e);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return "paisConsultado";
}
public String actualizaPais(){
public String actualizaPais() {
try{
try {
catalogoPaisBO.updatePais(pais);
int idPais = this.pais.getId();
this.pais = catalogoPaisBO.getPaisPorId(idPais);
this.paisActualizado=true;
this.regresoAction=true;
this.paisActualizado = true;
this.regresoAction = true;
getListados();
log.info("****"+catalogoTerritorio.toString());
}catch(PersistenceException ibe){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
this.paisActualizado=false;
log.error("Error en [" + this.getClass() +"]", e);
log.info("****" + catalogoTerritorio.toString());
} catch (ResultMapException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.paisActualizado = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
}
return "paisConsultado";
}
public void getListados(){
try{
public void getListados() {
try {
catalogoTerritorio = new ArrayList<TerritorioDTO>();
catalogoTerritorio = catalogosBO.obtenListaTerritorios();
catalogoRegion = new ArrayList<RegionVentaDTO>();
catalogoRegion = catalogosBO.getRegiones();
}catch(PersistenceException ibe){
log.error("Error en [" + this.getClass() +"]", ibe);
}catch(Exception e){
log.error("Error en [" + this.getClass() +"]", e);
} catch (ResultMapException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
this.paisActualizado = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
this.paisActualizado = false;
logger.error("Error. {}", e);
}
}
//Setter y getters
// Setter y getters
public CatalogoPaisDTO getPais() {
return pais;
}
......
package com.mx.dla.dda.admin.catalogos.tipoCambio.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.tipoCambio.bos.TipoCambioBO;
......@@ -39,11 +42,20 @@ public class TipoCambioAction extends BaseContratoAction {
annios = tipoCambioBO.obtenerAnnios();
try {
paises = tipoCambioBO.obtenerPaises();
}catch (TransaccionException e) {
error = e.getMessage();
} catch (ResultMapException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -52,22 +64,44 @@ public class TipoCambioAction extends BaseContratoAction {
try {
nombreTipos = tipoCambioBO.obtenerNombreTipos();
mesesTipos = tipoCambioBO.obtenerMesTipo(annio, pais, nombreTipos);
}catch (TransaccionException e) {
error = e.getMessage();
} catch (ResultMapException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String guardarCambio() {
try{
try {
exito = tipoCambioBO.guardarCambios(mesesTipos);
mensaje = "Se actualizaron los cambios.";
}catch (TransaccionException e) {
error = e.getMessage();
} catch (ResultMapException e) {
error = "Ocurrio un error.";
mensaje = error; // revisar el uso
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
mensaje = error; // revisar el uso
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
mensaje = error; // revisar el uso
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
mensaje = error; // revisar el uso
logger.error("Error. {}", e);
}
return SUCCESS;
......
......@@ -3,19 +3,23 @@ package com.mx.dla.dda.admin.catalogos.tipoCambioAddOns.actions;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.sql.SQLException;
import java.text.ParseException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.addons.dtos.EstudioAddonDTO;
import com.mx.dla.dda.admin.catalogos.estudios.bos.EstudioBO;
import com.mx.dla.dda.admin.catalogos.estudios.dtos.CatalogoEstudioDTO;
import com.mx.dla.dda.admin.catalogos.tipoCambio.dtos.TipoCambioDTO;
import com.mx.dla.dda.admin.catalogos.tipoCambioAddOns.bos.TipoCambioAddOnsBO;
import com.mx.dla.dda.admin.catalogos.tipoCambioAddOns.dtos.MesTiposAddOnsCTDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.dda.excelMapper.exceptions.ExcelMapperException;
import com.mx.dla.dda.reporte.cpview.exception.ReportCostPerViewException;
public class TipoCambioAddOnsAction extends BaseContratoAction {
......@@ -44,14 +48,24 @@ public class TipoCambioAddOnsAction extends BaseContratoAction {
private TipoCambioAddOnsBO tipoCambioAddOnsBO;
@Override
public String execute() throws Exception {
public String execute() {
return SUCCESS;
}
public String obtenerLista() {
try {
annios = tipoCambioAddOnsBO.obtenerAnnios();
estudios = estudioBO.catalogoEstudiosAddOn();
}catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -60,9 +74,18 @@ public class TipoCambioAddOnsAction extends BaseContratoAction {
try{
nombreTipos = tipoCambioAddOnsBO.obtenerNombreMeses();
tipoCambioAddOnsBO.cargaMasivaTipoCambioAddOn(Long.valueOf(annio), Long.parseLong(estudio), file, fileFileName, nombreTipos);
}catch(Exception e){
logger.error("Error ",e);
e.printStackTrace();
}catch (ResultMapException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
}
return SUCCESS;
......@@ -73,9 +96,23 @@ public class TipoCambioAddOnsAction extends BaseContratoAction {
try {
fileInputStream = tipoCambioAddOnsBO.obtenerStreamReporte(Long.parseLong(estudio),annio);
System.out.println("ao para descarga"+annio);
} catch (Exception e) {
System.out.println(e.getMessage());
logger.info("ao para descarga" + annio);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (IllegalArgumentException e) {
logger.error("Error. {}", e);
} catch (IllegalAccessException e) {
logger.error("Error. {}", e);
} catch (ParseException e) {
logger.error("Error. {}", e);
} catch (ExcelMapperException e) {
logger.error("Error. {}", e);
} catch (IOException e) {
logger.error("Error. {}", e);
} catch (ReportCostPerViewException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -85,8 +122,18 @@ public class TipoCambioAddOnsAction extends BaseContratoAction {
try {
nombreTipos = tipoCambioAddOnsBO.obtenerNombreMeses();
mesesTipos = tipoCambioAddOnsBO.obtenerMesTipo(Long.valueOf(estudio), annio, nombreTipos);
}catch (TransaccionException e) {
error = e.getMessage();
}catch (ResultMapException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
logger.error("Error. {}", e);
}
return SUCCESS;
......@@ -97,9 +144,22 @@ public class TipoCambioAddOnsAction extends BaseContratoAction {
try{
exito = tipoCambioAddOnsBO.guardarCambios(mesesTipos);
mensaje = "Se actualizaron los cambios.";
}catch (TransaccionException e) {
error = e.getMessage();
mensaje = error; // revisar el uso
}catch (ResultMapException e) {
error = "Ocurrio un error.";
mensaje = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
error = "Ocurrio un error.";
mensaje = "Ocurrio un error.";
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
error = "Ocurrio un error.";
mensaje = "Ocurrio un error.";
logger.error("Error. {}", e);
} catch (SQLException e) {
error = "Ocurrio un error.";
mensaje = "Ocurrio un error.";
logger.error("Error. {}", e);
}
return SUCCESS;
......
package com.mx.dla.dda.admin.catalogos.transacciones.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.transacciones.bos.TransaccionesBO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.CategoriasDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class CategoriasAction extends BaseAction {
private static final long serialVersionUID = 1L;
private List<CategoriasDTO> categorias;
private CategoriasDTO categoria;
private String nombreCategoria;
......@@ -28,7 +35,18 @@ public class CategoriasAction extends BaseAction {
}
public String listadoCategorias() {
try {
setCategorias(transacciones.getCategorias());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -48,7 +66,18 @@ public class CategoriasAction extends BaseAction {
public String guardaCategoria() {
CategoriasDTO categoria = new CategoriasDTO();
categoria.setNombre(nombreCategoria.toUpperCase());
try {
transacciones.agregarCategoria(categoria);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -57,13 +86,35 @@ public class CategoriasAction extends BaseAction {
CategoriasDTO categoria = new CategoriasDTO();
categoria.setIdCategoria(idCategoria);
categoria.setBorrado("0");
try {
transacciones.eliminarCategoria(categoria);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
public String llamaObtenCategorias() throws Exception {
try {
setCategoria(transacciones.getCategoriaById(idCategoria));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -72,7 +123,18 @@ public class CategoriasAction extends BaseAction {
CategoriasDTO categoria = new CategoriasDTO();
categoria.setIdCategoria(idCategoria);
categoria.setNombre(nombreCategoria.toUpperCase());
try {
transacciones.updateCategoria(categoria);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......
package com.mx.dla.dda.admin.catalogos.transacciones.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.transacciones.bos.TransaccionesBO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.EstudiosTransDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class EstudiosTransAction extends BaseAction {
private static final long serialVersionUID = 1L;
private List<EstudiosTransDTO> estudiosTrans;
private EstudiosTransDTO estudio;
private String nombreEstudio;
......@@ -30,7 +37,18 @@ public class EstudiosTransAction extends BaseAction {
}
public String listadoEstudiosTrans() {
try {
setEstudiosTrans(transacciones.getEstudiosTrans());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -51,7 +69,18 @@ public class EstudiosTransAction extends BaseAction {
EstudiosTransDTO estudio = new EstudiosTransDTO();
estudio.setNombre(nombreEstudio);
estudio.setRevenueShare(revenueShare);
try {
transacciones.agregarEstudioTrans(estudio);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -60,13 +89,35 @@ public class EstudiosTransAction extends BaseAction {
EstudiosTransDTO estudio = new EstudiosTransDTO();
estudio.setIdEstudio(idEstudio);
estudio.setBorrado("0");
try {
transacciones.eliminarEstudio(estudio);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
public String llamaObtenEstudio() throws Exception {
try {
setEstudio(transacciones.getEstudioTransById(idEstudio));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -77,7 +128,18 @@ public class EstudiosTransAction extends BaseAction {
estudio.setNombre(nombreEstudio);
estudio.setRevenueShare(revenueShare);
estudio.setBorrado("0");
try {
transacciones.updateEstudioTrans(estudio);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......
package com.mx.dla.dda.admin.catalogos.transacciones.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.transacciones.bos.TransaccionesBO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.EstudiosTransDTO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.ExcepcionesTransDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class ExcepcionesTransAction extends BaseAction {
private static final long serialVersionUID = 1L;
private List<ExcepcionesTransDTO> excepciones;
private List<EstudiosTransDTO> estudiosTrans;
private ExcepcionesTransDTO excepcion;
......@@ -37,7 +44,18 @@ public class ExcepcionesTransAction extends BaseAction {
}
public String listadoExcepciones() {
try {
setExcepciones(transacciones.getExcepciones());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -50,8 +68,23 @@ public class ExcepcionesTransAction extends BaseAction {
}
public String dirigirAgregar() throws Exception {
try {
setEstudiosTrans(transacciones.getEstudiosTrans());
excepcionActualizada = true;
} catch (ResultMapException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
excepcionActualizada = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -63,7 +96,10 @@ public class ExcepcionesTransAction extends BaseAction {
excepcion.setRevenueShare(revenueShare);
excepcion.setFechaInicio(fechaInicio);
excepcion.setFechaFin(fechaFin);
if(transacciones.validaExcepcionExistente(excepcion) == null && transacciones.validaMescerrado(excepcion) == null) {
try {
if (transacciones.validaExcepcionExistente(excepcion) == null
&& transacciones.validaMescerrado(excepcion) == null) {
setExcepcion(excepcion);
transacciones.agregarExcepcion(excepcion);
excepcionActualizada = true;
......@@ -71,6 +107,19 @@ public class ExcepcionesTransAction extends BaseAction {
setExcepcion(null);
excepcionActualizada = false;
}
} catch (ResultMapException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
excepcionActualizada = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -79,14 +128,36 @@ public class ExcepcionesTransAction extends BaseAction {
ExcepcionesTransDTO excepcion = new ExcepcionesTransDTO();
excepcion.setIdExcepcion(idExcepcion);
excepcion.setBorrado("0");
try {
transacciones.eliminarExcepcion(excepcion);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
public String llamaObtenExcepcion() throws Exception {
try {
setEstudiosTrans(transacciones.getEstudiosTrans());
setExcepcion(transacciones.getExcepcionesById(idExcepcion));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......@@ -99,7 +170,9 @@ public class ExcepcionesTransAction extends BaseAction {
excepcion.setRevenueShare(revenueShare);
excepcion.setFechaInicio(fechaInicio);
excepcion.setFechaFin(fechaFin);
if(transacciones.validaMescerrado(excepcion) == null) {
try {
if (transacciones.validaMescerrado(excepcion) == null) {
setExcepcion(excepcion);
transacciones.updateExcepcion(excepcion);
excepcionActualizada = true;
......@@ -107,6 +180,19 @@ public class ExcepcionesTransAction extends BaseAction {
setExcepcion(null);
excepcionActualizada = false;
}
} catch (ResultMapException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
excepcionActualizada = false;
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
} catch (SQLException e) {
excepcionActualizada = false;
logger.error("Error. {}", e);
}
setPmns();
return SUCCESS;
}
......
package com.mx.dla.dda.admin.catalogos.transacciones.actions;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.sql.SQLException;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.transacciones.bos.TransaccionesBO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.EstudiosTransDTO;
import com.mx.dla.dda.admin.catalogos.transacciones.dtos.ReporteGeneralDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class ReporteGeneralAction extends BaseAction {
private static final long serialVersionUID = 1L;
private List<EstudiosTransDTO> estudiosTrans;
private List<ReporteGeneralDTO> reporteGeneral;
private String estudio;
......@@ -34,7 +39,18 @@ public class ReporteGeneralAction extends BaseAction {
@Override
public String execute() throws Exception {
setPmns();
try {
setEstudiosTrans(transacciones.getEstudiosTrans());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -47,38 +63,82 @@ public class ReporteGeneralAction extends BaseAction {
}
public String generarReporte() throws Exception {
System.out.println("Datos para reporte Fecha: " + fecha + " Estudio: " + estudio);
String [] date = fecha.split("/");
setReporteGeneral(transacciones.reporteGeneral(date[0],date[1],estudio));
logger.info("Datos para reporte Fecha: " + fecha + " Estudio: " + estudio);
String[] date = fecha.split("/");
try {
setReporteGeneral(transacciones.reporteGeneral(date[0], date[1], estudio));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setPmns();
System.out.println("Recuperando reporte: " + getReporteGeneral().size());
logger.info("Recuperando reporte: " + getReporteGeneral().size());
return SUCCESS;
}
public String generarExcel() throws Exception {
System.out.println("Datos para reporte Fecha: " + fecha + " Estudio: " + estudio);
String [] date = fecha.split("/");
setFileInputStream(transacciones.obtenerReporteEnExcel(date[0],date[1],estudio));
logger.info("Datos para reporte Fecha: " + fecha + " Estudio: " + estudio);
String[] date = fecha.split("/");
try {
setFileInputStream(transacciones.obtenerReporteEnExcel(date[0], date[1], estudio));
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
setFileName(date[0] + "-" + date[1] + "-01");
setPmns();
return SUCCESS;
}
public String cerrarReporte(){
public String cerrarReporte() {
try {
transacciones.cerrarRporte(getfecha());
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String reabrirReporte(){
public String reabrirReporte() {
try {
transacciones.reabrirReporte(mes, anio);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (PersistenceException ibe) {
logger.error("Error. {}", ibe);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
public String getfecha() {
Integer year = Calendar.getInstance().get(Calendar.YEAR);
Integer month = Calendar.getInstance().get(Calendar.MONTH);
if(month == 0) {
year = year -1;
if (month == 0) {
year = year - 1;
month = 12;
}
setMes(StringUtils.leftPad(month.toString(), 2));
......
package com.mx.dla.dda.admin.catalogos.usuario.actions;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.admin.catalogos.usuario.bos.CatalogoUsuarioBO;
import com.mx.dla.dda.admin.catalogos.usuario.dtos.CatalogoUsuarioDTO;
import com.mx.dla.dda.catalogos.dtos.CatalogoDTO;
import com.mx.dla.global.actions.BaseAction;
public class CatalogoUsuarioAction extends BaseAction {
private static final long serialVersionUID = -7755051578399274173L;
private List<CatalogoUsuarioDTO> usuarios;
private List<CatalogoDTO> empresas;
private List<CatalogoDTO> areas;
private List<CatalogoDTO> perfiles;
private List<CatalogoDTO> estudios;
private CatalogoUsuarioDTO usuario;
private String errorMensaje;
@Autowired
private CatalogoUsuarioBO catalogoUsuarioBO;
@Override
public String execute() throws Exception {
return SUCCESS;
}
public String obtenerListaUsuarios() {
try {
logger.info("obtenerListaUsuarios");
usuarios = catalogoUsuarioBO.obtenListadoUsuarios();
logger.info("usuarios: {}", usuarios);
} catch (Exception e) {
errorMensaje = e.getMessage();
}
return SUCCESS;
}
public String obtenerCatalogos() {
try {
logger.info("obtenerCatalogos");
empresas = catalogoUsuarioBO.obtenCatalogoEmpresas();
areas = catalogoUsuarioBO.obtenCatalogoAreas();
perfiles = catalogoUsuarioBO.obtenCatalogoPerfiles();
// estudios = catalogoUsuarioBO.obtenCatalogoEstudios();
logger.info("empresas: {}", empresas);
logger.info("areas: {}", areas);
logger.info("perfiles: {}", perfiles);
// logger.info("estudios: {}", estudios);
} catch (Exception e) {
errorMensaje = e.getMessage();
}
return SUCCESS;
}
public String obtenerEstudiosDisponibles() {
try {
logger.info("obtenerEstudiosDisponibles");
logger.info("usuario: {}", usuario);
estudios = catalogoUsuarioBO.obtenEstudiosPorUsuario(usuario, false);
logger.info("estudios: {}", estudios);
} catch (Exception e) {
errorMensaje = e.getMessage();
}
return SUCCESS;
}
public String obtenerEstudiosElegidos() {
try {
logger.info("obtenerEstudiosElegidos");
logger.info("usuario: {}", usuario);
estudios = catalogoUsuarioBO.obtenEstudiosPorUsuario(usuario, true);
logger.info("estudios: {}", estudios);
} catch (Exception e) {
errorMensaje = e.getMessage();
}
return SUCCESS;
}
public String guardarUsuario() {
try {
logger.info("guardaUsuario");
logger.info("usuario: {}", usuario);
logger.info("estudios: {}", estudios);
catalogoUsuarioBO.guardaUsuario(usuario, estudios);
logger.info("Done!");
} catch (Exception e) {
errorMensaje = e.getMessage();
}
return SUCCESS;
}
public List<CatalogoUsuarioDTO> getUsuarios() {
return usuarios;
}
public void setUsuarios(List<CatalogoUsuarioDTO> usuarios) {
this.usuarios = usuarios;
}
public List<CatalogoDTO> getEmpresas() {
return empresas;
}
public void setEmpresas(List<CatalogoDTO> empresas) {
this.empresas = empresas;
}
public List<CatalogoDTO> getAreas() {
return areas;
}
public void setAreas(List<CatalogoDTO> areas) {
this.areas = areas;
}
public List<CatalogoDTO> getPerfiles() {
return perfiles;
}
public void setPerfiles(List<CatalogoDTO> perfiles) {
this.perfiles = perfiles;
}
public List<CatalogoDTO> getEstudios() {
return estudios;
}
public void setEstudios(List<CatalogoDTO> estudios) {
this.estudios = estudios;
}
public String getErrorMensaje() {
return errorMensaje;
}
public void setErrorMensaje(String errorMensaje) {
this.errorMensaje = errorMensaje;
}
public CatalogoUsuarioDTO getUsuario() {
return usuario;
}
public void setUsuario(CatalogoUsuarioDTO usuario) {
this.usuario = usuario;
}
}
\ No newline at end of file
package com.mx.dla.dda.admin.presupuestos.actions;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
......@@ -15,9 +17,10 @@ import com.mx.dla.dda.admin.presupuestos.bos.PresupuestoBO;
import com.mx.dla.dda.admin.presupuestos.dtos.PresupuestoApartadoDTO;
import com.mx.dla.dda.admin.presupuestos.dtos.PresupuestoDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.opensymphony.xwork2.Action;
public class PresupuestosAction extends BaseContratoAction{
public class PresupuestosAction extends BaseContratoAction {
private static final long serialVersionUID = 5280088693174941192L;
......@@ -31,17 +34,26 @@ public class PresupuestosAction extends BaseContratoAction{
@Autowired
private PresupuestoBO presupuestoBO;
public String index(){
public String index() {
return Action.SUCCESS;
}
public String guardaMonto(){
public String guardaMonto() {
System.out.println("Almacenando presupuesto");
try {
mensaje = presupuestoBO.almacenaMonto(anio,monto);
mensaje = presupuestoBO.almacenaMonto(anio, monto);
}catch(Exception e){
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
......@@ -49,39 +61,39 @@ public class PresupuestosAction extends BaseContratoAction{
return "SUCCESS";
}
public String cargarPresupuestos(){
try
{
public String cargarPresupuestos() {
try {
logger.debug("Obteniendo presupuestos");
presupuestos = presupuestoBO.obtenerPresptoXTipo(tipo);
logger.debug("Obtenido presupuestos");
}catch(PersistenceException ibe){
logger.error("Error. {}", ibe);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
return "json";
}
public String redirectEditPresupuesto(){
try
{
public String redirectEditPresupuesto() {
try {
this.getServletRequest().setAttribute("tipo", this.tipo);
this.getSession().put("pmn", this.getPmn());
}catch(PersistenceException ibe){
} catch (PersistenceException ibe) {
logger.error("Error.", ibe);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
logger.error("Error.", e);
mensaje = "Ocurrio un error en la operacion.";
}
return Action.SUCCESS;
}
public String guardarPresupuesto(){
public String guardarPresupuesto() {
ObjectMapper mapper = new ObjectMapper();
try {
logger.debug("Se inicia guarda presupuestos.");
......@@ -96,38 +108,51 @@ public class PresupuestosAction extends BaseContratoAction{
} catch (IOException ioe) {
logger.error("Error. {}", ioe);
mensaje = "Ocurrio un error en la operacion.";
}catch(PersistenceException ibe){
logger.error("Error. {}", ibe);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
return "json";
}
public String cargarApartadosAnio(){
try
{
public String cargarApartadosAnio() {
try {
logger.info("Se obtiene apartado x anio");
presupuesto = presupuestoBO.obtenerApartadosPresptoXAnio(this.tipo, this.anio.intValue());
logger.info("Se termina obtener apartado x anio");
}catch(PersistenceException ibe){
logger.error("Error. {}", ibe);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
return "json";
}
public String redistribuirPresupuesto(){
public String redistribuirPresupuesto() {
ObjectMapper mapper = new ObjectMapper();
try {
logger.debug("Se inicia redistribucion");
List<PresupuestoApartadoDTO> apartados = mapper.readValue(mensaje, new TypeReference<List<PresupuestoApartadoDTO>>(){});
List<PresupuestoApartadoDTO> apartados = mapper.readValue(mensaje,
new TypeReference<List<PresupuestoApartadoDTO>>() {
});
mensaje = null;
mensaje = presupuestoBO.redistribuirApartados(apartados, Integer.parseInt(tipo));
......@@ -138,22 +163,30 @@ public class PresupuestosAction extends BaseContratoAction{
} catch (IOException ioe) {
logger.error("Error. {}", ioe);
mensaje = "Ocurrio un error en la operacion.";
}catch(PersistenceException ibe){
logger.error("Error. {}", ibe);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
return "json";
}
public String redistribuirPresupuestoMontoDisp(){
public String redistribuirPresupuestoMontoDisp() {
ObjectMapper mapper = new ObjectMapper();
try {
logger.debug("Se inicia redistribucion con monto disponible");
List<PresupuestoApartadoDTO> apartados = mapper.readValue(mensaje, new TypeReference<List<PresupuestoApartadoDTO>>(){});
List<PresupuestoApartadoDTO> apartados = mapper.readValue(mensaje,
new TypeReference<List<PresupuestoApartadoDTO>>() {
});
mensaje = null;
mensaje = presupuestoBO.redistribuirApartadosMontoDispo(apartados, Integer.parseInt(tipo));
......@@ -164,25 +197,53 @@ public class PresupuestosAction extends BaseContratoAction{
} catch (IOException ioe) {
logger.error("Error. {}", ioe);
mensaje = "Ocurrio un error en la operacion.";
}catch(PersistenceException ibe){
logger.error("Error. {}", ibe);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}catch(Exception e){
} catch (PersistenceException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (TransaccionException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
} catch (SQLException e) {
logger.error("Error. {}", e);
mensaje = "Ocurrio un error en la operacion.";
}
return "json";
}
public PresupuestoDTO getPresupuesto() {
return presupuesto;
}
public PresupuestoDTO getPresupuesto() { return presupuesto; }
public String getTipo() { return tipo; }
public String getMensaje() { return mensaje; }
public List<PresupuestoDTO> getPresupuestos() {return presupuestos; }
public void setPresupuesto(PresupuestoDTO presupuesto) { this.presupuesto = presupuesto; }
public void setTipo(String tipo) { this.tipo = tipo; }
public void setMensaje(String mensaje) { this.mensaje = mensaje; }
public void setAnio(Integer anio) { this.anio = anio; }
public String getTipo() {
return tipo;
}
public String getMensaje() {
return mensaje;
}
public List<PresupuestoDTO> getPresupuestos() {
return presupuestos;
}
public void setPresupuesto(PresupuestoDTO presupuesto) {
this.presupuesto = presupuesto;
}
public void setTipo(String tipo) {
this.tipo = tipo;
}
public void setMensaje(String mensaje) {
this.mensaje = mensaje;
}
public void setAnio(Integer anio) {
this.anio = anio;
}
public double getMonto() {
return monto;
......
package com.mx.dla.dda.admin.revenue.actions;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.sql.SQLException;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import com.mx.dla.dda.carga.transaccion.bos.CargaTransaccionesBO;
import com.mx.dla.dda.catalogos.dtos.RegionVentaDTO;
import com.mx.dla.dda.catalogos.dtos.TerritorioDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
import com.opensymphony.xwork2.Action;
public class RevenuePorcAction extends BaseAction {
private static final long serialVersionUID = -1L;
private static Logger log = Logger.getLogger(RevenuePorcAction.class);
private boolean regresoAction;
@Autowired
private CargaTransaccionesBO bdsp;
//private BloqueoSAPBO BloqueoSAPBO;
private String fecha;
......@@ -38,16 +32,17 @@ public class RevenuePorcAction extends BaseAction {
public String ejecutaSP() {
try {
bdsp.ejecutaSP_porcR(fecha);
} catch (Exception e) {
addActionError("Ha ocurrido el siguiente error durante la consulta: "
+ e.getMessage());
} catch (ResultMapException e) {
log.error("Error. {}", e);
} catch (PersistenceException e) {
log.error("Error. {}", e);
} catch (TransaccionException e) {
log.error("Error. {}", e);
} catch (SQLException e) {
log.error("Error. {}", e);
}
return Action.SUCCESS;
}
......
......@@ -2,11 +2,13 @@ package com.mx.dla.dda.carga.suscriptor.actions;
import java.io.File;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
......@@ -17,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.carga.suscriptor.bos.CargaSuscriptorBO;
import com.mx.dla.dda.carga.suscriptor.dtos.CargaSuscripcionDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.opensymphony.xwork2.Action;
public class CargaSuscriptoresAction extends BaseContratoAction {
......@@ -39,18 +42,20 @@ public class CargaSuscriptoresAction extends BaseContratoAction {
private CargaSuscriptorBO cargaSuscriptorBO;
public String execute() {
try{
try {
listado = cargaSuscriptorBO.getDatosSuscripcion(mes, annio);
}catch(PersistenceException ibe){
} catch (ResultMapException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" +this.getClass() +"]", ibe);
}catch(Exception e){
logger.error("Error en [" + this.getClass() + "]", e);
} catch (PersistenceException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" +this.getClass() +"]", e);
logger.error("Error en [" + this.getClass() + "]", e);
} catch (TransaccionException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
} catch (SQLException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
}
return Action.SUCCESS;
......@@ -64,7 +69,8 @@ public class CargaSuscriptoresAction extends BaseContratoAction {
logger.debug("Actualizacion Carga:" + request);
listado = mapper.readValue(request, new TypeReference<List<CargaSuscripcionDTO>>(){});
listado = mapper.readValue(request, new TypeReference<List<CargaSuscripcionDTO>>() {
});
cargaSuscriptorBO.actualizarSuscriptores(listado);
logger.debug("Se actulizaron valores carga");
......@@ -73,20 +79,22 @@ public class CargaSuscriptoresAction extends BaseContratoAction {
} catch (JsonParseException | JsonGenerationException | JsonMappingException je) {
this.msgError = "Ocurrió un error al guardar los datos.";
logger.error("Error en [" +this.getClass() +"]", je);
logger.error("Error en [" + this.getClass() + "]", je);
} catch (IOException ioe) {
this.msgError = "Ocurrió un error al guardar los datos.";
logger.error("Error en [" +this.getClass() +"]", ioe);
}catch(PersistenceException ibe){
this.msgError = "Ocurrió un error al guardar los datos.";
logger.error("Error en [" +this.getClass() +"]", ibe);
return Action.ERROR;
}catch(Exception e){
this.msgError = "Ocurrió un error al guardar los datos.";
logger.error("Error en [" +this.getClass() +"]", e);
logger.error("Error en [" + this.getClass() + "]", ioe);
} catch (ResultMapException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
} catch (PersistenceException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
} catch (TransaccionException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
} catch (SQLException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
}
return Action.SUCCESS;
......@@ -94,15 +102,14 @@ public class CargaSuscriptoresAction extends BaseContratoAction {
public String cargaExcel() {
try{
try {
setInformacionExcel(cargaSuscriptorBO.obtenInformacionExcel(fileUpload, fileUploadFileName));
logger.debug("Se leyo la informacion.");
}catch(Exception ex) {
setErrores("Fallo la carga de excel.");
} catch (TransaccionException e) {
this.msgError = "Ocurrió un error al obtener los datos.";
logger.error("Error en [" + this.getClass() + "]", e);
}
logger.debug("Se termino el action");
return Action.SUCCESS;
}
......
......@@ -22,24 +22,17 @@ public class DescargaPlantillaAction extends BaseContratoAction{
private CargaSuscriptorBO cargaSuscriptorBO;
public String execute() throws Exception {
String[] empresasSplited = {"Clarovideo Brazil", "Net Servicios", "Clarovideo Argentina", "Clarovideo Chile",
"Clarovideo Colombia", "Clarovideo Costa Rica", "Clarovideo Dominicana", "Clarovideo Ecuador",
"Clarovideo El Salvador", "Clarovideo Guatemala", "Clarovideo Honduras", "Clarovideo Mxico",
"Clarovideo Nicaragua", "Clarovideo Per", "Clarovideo Uruguay"};
logger.debug(empresas);
if(empresas != null && !empresas.equals("")){
empresasSplited = empresas.split(",");
}
logger.debug("[{}]", empresasSplited);
fileInputStream = new ByteArrayInputStream(cargaSuscriptorBO.obtenPlantilla(empresasSplited));
fileName = "nombre";
return SUCCESS;
}
......
package com.mx.dla.dda.carga.transaccion.actions;
import java.io.File;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.sql.SQLException;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.admin.dtos.UsuarioDTO;
......@@ -54,9 +59,29 @@ public class CargaArchivoTransaccionesAction extends BaseContratoAction {
return SUCCESS;
} catch (ResultMapException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
} catch (PersistenceException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
} catch (TransaccionException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
} catch (SQLException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
} catch (SocketTimeoutException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
} catch (IOException e) {
error = e.getMessage();
logger.error("Error al invocar cargaTransaccionesBO : " + error);
return error;
}
......
package com.mx.dla.dda.carga.transaccion.actions;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -12,6 +16,7 @@ import com.mx.dla.dda.carga.transaccion.bos.CargaTransaccionesBO;
import com.mx.dla.dda.carga.transaccion.dtos.RowReporteCargaDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.listado.dtos.ContentType;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class DescargaArchivoVistaPreviaAction extends BaseContratoAction {
......@@ -29,14 +34,8 @@ public class DescargaArchivoVistaPreviaAction extends BaseContratoAction {
logger.info(algo);
String nombre;
byte[] vistaPreviac;
try {
vistaPreviac = cargaTransaccionesBO.descargaArchivoVistaPrevia(vistaPrevia);
System.out.println("algo..."+vistaPrevia);
nombre = "reporteVistaPreviaCargaTransacciones";
HttpServletResponse response = ServletActionContext.getResponse();
......@@ -48,16 +47,19 @@ public class DescargaArchivoVistaPreviaAction extends BaseContratoAction {
out.write(vistaPreviac);
out.flush();
out.close();
} catch (Exception e) {
error = e.getMessage();
} catch (ResultMapException e) {
logger.error("Error al invocar descargaArchivoVistaPrevia : " + error);
} catch (PersistenceException e) {
logger.error("Error al invocar descargaArchivoVistaPrevia : " + error);
} catch (TransaccionException e) {
logger.error("Error al invocar descargaArchivoVistaPrevia : " + error);
} catch (SQLException e) {
logger.error("Error al invocar descargaArchivoVistaPrevia : " + error);
} catch (IOException e) {
logger.error("Error al invocar descargaArchivoVistaPrevia : " + error);
}
return SUCCESS;
}
public void setError(String error) {
......
package com.mx.dla.dda.carga.transaccion.actions;
import java.io.BufferedWriter;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStreamWriter;
import java.sql.SQLException;
import java.util.List;
import java.util.Locale;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -22,8 +21,9 @@ import com.mx.dla.dda.carga.transaccion.dtos.RowRepErrResumenCargaDTO;
import com.mx.dla.dda.carga.transaccion.dtos.RowReporteCargaDTO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.listado.dtos.ContentType;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class DescargaArchivosTransaccionesAction extends BaseContratoAction{
public class DescargaArchivosTransaccionesAction extends BaseContratoAction {
private static final long serialVersionUID = 281552368437405368L;
private String error;
......@@ -37,9 +37,6 @@ public class DescargaArchivosTransaccionesAction extends BaseContratoAction{
private InputStream fileInputStream;
private String fileFileName;
@Autowired
private CargaTransaccionesBO cargaTransaccionesBO;
......@@ -50,9 +47,7 @@ public class DescargaArchivosTransaccionesAction extends BaseContratoAction{
byte[] vistaPrevia;
try {
System.out.println("si sirve..."+cargaTransacciones);
//HttpServletRequest request = ServletActionContext.getRequest();
//logger.debug("request : [{}], [{}]", request.getCharacterEncoding(), request.getContentType());
System.out.println("si sirve..." + cargaTransacciones);
vistaPrevia = cargaTransaccionesBO.descargarArchivoTransacciones(cargaTransacciones);
nombre = "reporteCargaTransacciones";
......@@ -60,138 +55,137 @@ public class DescargaArchivosTransaccionesAction extends BaseContratoAction{
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentLength(vistaPrevia.length);
response.setContentType(ContentType.EXCELX.name());
response.setHeader("Content-Disposition","attachment;filename="+nombre+".xlsx");
response.setHeader("Content-Disposition", "attachment;filename=" + nombre + ".xlsx");
ServletOutputStream out = response.getOutputStream();
out.write(vistaPrevia);
out.flush();
out.close();
} catch (Exception e) {
} catch (ResultMapException e) {
error = e.getMessage();
} catch (PersistenceException e) {
error = e.getMessage();
} catch (TransaccionException e) {
error = e.getMessage();
} catch (SQLException e) {
error = e.getMessage();
} catch (IOException e) {
error = e.getMessage();
}
return SUCCESS;
}
//funcion para descarga excel en vista previa
public String descargaArchivoVistaPrevia(){
// funcion para descarga excel en vista previa
public String descargaArchivoVistaPrevia() {
logger.info("se vista previa : [{}]", error);
String nombre;
byte[] vistaPreviac;
try {
vistaPreviac = cargaTransaccionesBO.descargaArchivoVistaPrevia(vistaPrevia);
//System.out.println("vistaprevia..."+vistaPrevia);
nombre = "reporteVistaPreviaCargaTransacciones";
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentLength(vistaPreviac.length);
response.setContentType(ContentType.EXCELX.name());
response.setHeader("Content-Disposition","attachment;filename="+nombre+".xlsx");
response.setHeader("Content-Disposition", "attachment;filename=" + nombre + ".xlsx");
ServletOutputStream out = response.getOutputStream();
out.write(vistaPreviac);
out.flush();
out.close();
} catch (Exception e) {
} catch (ResultMapException e) {
error = e.getMessage();
} catch (PersistenceException e) {
error = e.getMessage();
} catch (TransaccionException e) {
error = e.getMessage();
} catch (SQLException e) {
error = e.getMessage();
} catch (IOException e) {
error = e.getMessage();
}
return SUCCESS;
}
//may-17 action para descarga resumen error carga transacciones
/*public String descargaReporteErrorResumenCarga(){
String nombre;
try
{
byte [] repDetalleError = cargaTransaccionesBO.descargaArchivoResumenErroresCarga(detalleErroresCarga);
fileInputStream = new ByteArrayInputStream(repDetalleError);
nombre = "reporteDetalleErrorCargaTransacciones";
fileFileName = nombre;
return SUCCESS;
}
catch(Exception e)
{
logger.error("Error ",e);
error="Ocurrio un error al descargar el documento";
return ERROR;
}
}*/
public String descargaReporteErrorResumenCarga(){
// may-17 action para descarga resumen error carga transacciones
/*
* public String descargaReporteErrorResumenCarga(){ String nombre; try { byte
* [] repDetalleError =
* cargaTransaccionesBO.descargaArchivoResumenErroresCarga(detalleErroresCarga);
*
* fileInputStream = new ByteArrayInputStream(repDetalleError); nombre =
* "reporteDetalleErrorCargaTransacciones"; fileFileName = nombre;
*
* return SUCCESS; } catch(Exception e) { logger.error("Error ",e);
* error="Ocurrio un error al descargar el documento"; return ERROR; } }
*/
public String descargaReporteErrorResumenCarga() {
logger.info("se resumen carga : [{}]", error);
String nombre;
byte[] repDetalleError;
try {
nombre = "reporteDetalleErrorCargaTransacciones.xlsx";
//repDetalleError = cargaTransaccionesBO.descargaArchivoResumenErroresCarga(detalleErroresCarga);
repDetalleError = cargaTransaccionesBO.obtenerDetalleErroresCarga(mes);
System.out.println("mes: "+mes);
fileInputStream = new ByteArrayInputStream(repDetalleError);
fileFileName = nombre;
//return SUCCESS;
} catch (Exception e) {
} catch (ResultMapException e) {
error = e.getMessage();
logger.error("DescargaExcelDetalleErrorCargaT: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (PersistenceException e) {
error = e.getMessage();
logger.error("DescargaExcelDetalleErrorCargaT: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (TransaccionException e) {
error = e.getMessage();
logger.error("DescargaExcelDetalleErrorCargaT: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (SQLException e) {
error = e.getMessage();
System.out.println("DescargaExcelDetalleErrorCargaT: Error al procesar el archivo Excel..."+e+" ___ "+error);
logger.error("DescargaExcelDetalleErrorCargaT: Error al procesar el archivo Excel..." + e + " ___ " + error);
}
return SUCCESS;
}
//action para descarga de archivo excel dentro de asociacion de titulos
public String descargaReporteErrAsocTitulos(){
// action para descarga de archivo excel dentro de asociacion de titulos
public String descargaReporteErrAsocTitulos() {
logger.info("error en resumen carga : [{}]", error);
String nombre;
byte[] repAsocTitulos;
try {
//repAsocTitulos = cargaTransaccionesBO.descargaArchivoErrAsocTitulos(listadoErrAsociaTitulos);
repAsocTitulos = cargaTransaccionesBO.obtenerListaErrAsocTitulos(idCarga);
System.out.println("descargaArchivoErrAsocTitulos..."+repAsocTitulos);
System.out.println("idCarga..."+idCarga);
logger.info("descargaArchivoErrAsocTitulos..." + repAsocTitulos);
logger.info("idCarga..." + idCarga);
nombre = "reporteErroresAsociacionTitulos.xlsx";
fileInputStream = new ByteArrayInputStream(repAsocTitulos);
fileFileName = nombre;
} catch (Exception e) {
} catch (ResultMapException e) {
error = e.getMessage();
logger.error("descargaArchivoErrAsocTitulos: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (PersistenceException e) {
error = e.getMessage();
System.out.println("descargaArchivoErrAsocTitulos: Error al procesar el archivo Excel..."+e+" ___ "+error);
logger.error("descargaArchivoErrAsocTitulos: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (TransaccionException e) {
error = e.getMessage();
logger.error("descargaArchivoErrAsocTitulos: Error al procesar el archivo Excel..." + e + " ___ " + error);
} catch (SQLException e) {
error = e.getMessage();
logger.error("descargaArchivoErrAsocTitulos: Error al procesar el archivo Excel..." + e + " ___ " + error);
}
return SUCCESS;
}
public void setError(String error) {
this.error = error;
}
public String getError() {
return error;
}
......@@ -228,12 +222,21 @@ public class DescargaArchivosTransaccionesAction extends BaseContratoAction{
this.listadoErrAsociaTitulos = listadoErrAsociaTitulos;
}
public void setFileInputStream(InputStream fileInputStream) { this.fileInputStream = fileInputStream; }
public void setFileInputStream(InputStream fileInputStream) {
this.fileInputStream = fileInputStream;
}
public void setFileFileName(String fileFileName) {
this.fileFileName = fileFileName;
}
public void setFileFileName(String fileFileName) { this.fileFileName = fileFileName; }
public String getFileFileName() {
return fileFileName;
}
public String getFileFileName() { return fileFileName; }
public InputStream getFileInputStream() { return fileInputStream; }
public InputStream getFileInputStream() {
return fileInputStream;
}
public Long getIdCarga() {
return idCarga;
......
package com.mx.dla.dda.catalogos.actions;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
......@@ -12,6 +14,7 @@ import com.mx.dla.dda.catalogos.dtos.EstudioDTO;
import com.mx.dla.dda.catalogos.dtos.MedioEntregaDTO;
import com.mx.dla.dda.catalogos.dtos.ServicioDTO;
import com.mx.dla.dda.catalogos.dtos.TerritorioDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.global.actions.BaseAction;
@Controller
......@@ -39,12 +42,20 @@ public class CatalogosAction extends BaseAction {
}
public String metodo() {
try {
setIdContrato(catalogosBO.obtenSqIdContrato(tipoOperacion, idContrato));
setEstudios(catalogosBO.obtenListaEstudios());
setCategorias(catalogosBO.obtenListaCategorias());
setServicios(catalogosBO.obtenListaServicios());
setTerritorios(catalogosBO.obtenListaTerritorios());
setMediosEntrega(catalogosBO.obtenListaMediosEntrega());
} catch (ResultMapException e) {
logger.error("Error al invocar CatalogosAction.metodo : ", e);
} catch (SQLException e) {
logger.error("Error al invocar CatalogosAction.metodo : ", e);
} catch (TransaccionException e) {
logger.error("Error al invocar CatalogosAction.metodo : ", e);
}
return "OK";
}
......
package com.mx.dla.dda.contrato.amortizacion.actions;
import java.io.IOException;
import java.net.SocketTimeoutException;
import java.sql.SQLException;
import java.util.List;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.contrato.amortizacion.bos.AmortizacionBO;
......@@ -12,12 +16,10 @@ import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
import com.mx.dla.dda.contrato.titulo.dtos.Lista;
import com.mx.dla.dda.contrato.titulo.dtos.Titulo;
import com.mx.dla.dda.contrato.titulo.exception.TituloException;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class AmortizacionAction extends BaseContratoAction {
/**
*
*/
private static final long serialVersionUID = -1880333104009351799L;
@Autowired
......@@ -35,13 +37,22 @@ public class AmortizacionAction extends BaseContratoAction {
private String error;
@Override
public String execute() throws Exception {
public String execute() {
Long idC = (Long) getSession().get(ContratoConstats.ID_CONTRATO_SESSION);
ContratoDTO ct = generalesBO.obtenContrato(idC);
ContratoDTO ct;
try {
ct = generalesBO.obtenContrato(idC);
getSession().put(ContratoConstats.CONTRATO_SESSION, ct);
lista = amortizacionBO.buscarListaActual(ct);
getSession().put(ContratoConstats.LISTA_SESSION, lista);
logger.debug("sube objetos a la sesion");
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
}
return SUCCESS;
}
......@@ -54,10 +65,12 @@ public class AmortizacionAction extends BaseContratoAction {
titulos = amortizacionBO.busqueda(ct, li, titulo);
} catch (TituloException e) {
setError(e.getMessage());
}catch (Exception e)
{
logger.error("Error :",e);
setError("Ocurrio un error");
} catch (SocketTimeoutException e) {
setError(e.getMessage());
} catch (IOException e) {
setError(e.getMessage());
} catch (TransaccionException e) {
setError(e.getMessage());
}
return SUCCESS;
}
......@@ -68,10 +81,6 @@ public class AmortizacionAction extends BaseContratoAction {
titulos = amortizacionBO.busquedaDetalle( titulo);
} catch (TituloException e) {
setError(e.getMessage());
}catch (Exception e)
{
logger.error("Error :",e);
setError("Ocurrio un error");
}
return SUCCESS;
}
......
package com.mx.dla.dda.contrato.bdeal.actions;
import java.sql.SQLException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.generales.bos.GeneralesBO;
import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class BdealAction extends BaseContratoAction{
......@@ -15,10 +19,18 @@ public class BdealAction extends BaseContratoAction{
private Long idContrato;
private Long estatus;
public String execute() throws Exception {
public String execute() {
ContratoDTO contrato = null;
setIdContrato((Long)this.getSession().get("idContrato"));
try {
contrato = generalesBO.obtenContrato(idContrato);
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
}
setEstatus(contrato.getIdEstatus());
return SUCCESS;
......
......@@ -19,7 +19,7 @@ public class ExportarTitulosBdealAction extends BaseContratoAction {
@Autowired
private BdealBO bdealBO;
public String execute() throws Exception {
public String execute() {
Long idContrato = (Long) this.getSession().get("idContrato");
fileInputStream = bdealBO.seleccionaTipoDescarga(tipo, id);
......
......@@ -8,7 +8,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.admin.dtos.UsuarioDTO;
import com.mx.dla.dda.contrato.bdeal.bos.BdealBO;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.mx.dla.dda.contrato.ws.actualizaridbroadview.ResponseActualizaIdBVDTO;
import com.mx.dla.dda.excelMapper.exceptions.ExcelMapperException;
public class SubirDocumentoBdealAction extends BaseContratoAction {
......@@ -30,7 +32,7 @@ public class SubirDocumentoBdealAction extends BaseContratoAction {
private BdealBO bdealBO;
@Override
public String execute() throws Exception {
public String execute() {
UsuarioDTO usuario = null;
ResponseActualizaIdBVDTO response = null;
......@@ -50,8 +52,14 @@ public class SubirDocumentoBdealAction extends BaseContratoAction {
setIdCarga(Long.parseLong(response.getDatosCarga().getID_CARGA()));
}
}catch(IOException ex) {
logger.error("Error al subir documento [{}]", ex);
}catch(IOException e) {
logger.error("Error al subir documento [{}]", e);
error = "Error al subir documento.";
} catch (TransaccionException e) {
logger.error("Error al subir documento [{}]", e);
error = "Error al subir documento.";
} catch (ExcelMapperException e) {
logger.error("Error al subir documento [{}]", e);
error = "Error al subir documento.";
}
......
......@@ -13,9 +13,6 @@ import com.opensymphony.xwork2.Action;
public class ContratoBroadviewAction extends BaseContratoAction {
/**
*
*/
private static final long serialVersionUID = 1L;
private ContratoConsultaDTO contratoConsulta;
......@@ -35,7 +32,6 @@ public class ContratoBroadviewAction extends BaseContratoAction {
public String load() {
Long idCto = (Long) this.getSession().get("idContrato");
//idCto = 1L;
this.setIdContrato(idCto);
......@@ -45,7 +41,6 @@ public class ContratoBroadviewAction extends BaseContratoAction {
public String consultaBroadviewContrato() {
Long idCto = (Long) this.getSession().get("idContrato");
//idCto = 1L;
this.setIdContrato(idCto);
......@@ -58,7 +53,6 @@ public class ContratoBroadviewAction extends BaseContratoAction {
public String cargaInfoListas() {
Long idCto = (Long) this.getSession().get("idContrato");
//idCto = 1L;
this.setIdContrato(idCto);
......@@ -103,7 +97,6 @@ public class ContratoBroadviewAction extends BaseContratoAction {
public String actualizaBroadviewContrato() {
Long idCto = (Long) this.getSession().get("idContrato");
//idCto = 1L;
this.setIdContrato(idCto);
......@@ -116,7 +109,6 @@ public class ContratoBroadviewAction extends BaseContratoAction {
public String actualizaTitulosDDA() {
Long idCto = (Long) this.getSession().get("idContrato");
//idCto = 1L;
this.setIdContrato(idCto);
......
......@@ -12,9 +12,6 @@ import com.mx.dla.global.actions.BaseAction;
public class BaseContratoAction extends BaseAction {
/**
*
*/
private static final long serialVersionUID = -1880333104009351799L;
@Autowired
......@@ -26,7 +23,6 @@ public class BaseContratoAction extends BaseAction {
private Long estatusContrato;
protected String buscarJustificaciones() {
logger.debug("Se buscan justificaciones.");
Long idC = (Long) getSession().get(ContratoConstats.ID_CONTRATO_SESSION);
setJustificaciones(justificacionBO.buscarJustificaciones(idC));
return SUCCESS;
......
package com.mx.dla.dda.contrato.common.actions;
import java.io.File;
import java.io.IOException;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -10,9 +11,6 @@ import com.mx.dla.global.actions.BaseAction;
public class SubirDocumentoAction extends BaseAction {
/**
*
*/
private static final long serialVersionUID = -1880333104009351799L;
@Autowired
......@@ -26,18 +24,19 @@ public class SubirDocumentoAction extends BaseAction {
private String error;
@Override
public String execute() throws Exception {
try{
public String execute() {
try {
UsuarioDTO usuario = (UsuarioDTO) getSession().get("usuario");
logger.debug("Remplzar {}", idDoc);
if(this.getIdDoc() != null)
documentoBO.remplazarDocumento(fileUpload, fileUploadFileName, usuario.getExpediente(), (Long)this.getSession().get("idContrato"), this.getIdDoc());
if (this.getIdDoc() != null)
documentoBO.remplazarDocumento(fileUpload, fileUploadFileName, usuario.getExpediente(),
(Long) this.getSession().get("idContrato"), this.getIdDoc());
else
documentoBO.insertarDocumento(fileUpload, fileUploadFileName, usuario.getExpediente(), (Long)this.getSession().get("idContrato"));
}catch(Exception e)
{
logger.error("Error al subir documento ",e);
documentoBO.insertarDocumento(fileUpload, fileUploadFileName, usuario.getExpediente(),
(Long) this.getSession().get("idContrato"));
} catch (IOException e) {
logger.error("Error al subir documento ", e);
error = "Error al subir documento";
}
return SUCCESS;
......
......@@ -20,9 +20,6 @@ import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
public class CondicionesLicenseAction extends BaseContratoAction {
/**
*
*/
private static final long serialVersionUID = 7590885545520161328L;
@Autowired
......@@ -47,34 +44,33 @@ public class CondicionesLicenseAction extends BaseContratoAction {
return super.execute();
}
public String save() throws ParseException {
logger.debug("entro al save {} - {}",getCondiciones(),"");
ContratoDTO ct = (ContratoDTO) getSession().get( ContratoConstats.CONTRATO_SESSION);
public String save() {
logger.debug("entro al save {} - {}", getCondiciones(), "");
ContratoDTO ct = (ContratoDTO) getSession().get(ContratoConstats.CONTRATO_SESSION);
try {
condiciones.setIdContrato(ct.getIdContrato());
condiciones.setFechaInicio(ct.getFechaFin());
condiciones.setFechaFin(ct.getFechaFin());
if(getEstatusContrato()!= 1)
{
if (getEstatusContrato() != 1) {
throw new CondicionesLicenseException("Estatus incorrecto");
}
condicionesLicenseBO.guardarCondiciones(getCondiciones());
if(getJustificacion() != null && !"".equals(getJustificacion())){
if (getJustificacion() != null && !"".equals(getJustificacion())) {
guardarJustificacion();
setJustificacion("");
}
addActionMessage("Los datos fueron guardados con éxito");
buscarCondiciones(ct);
buscarJustificaciones();
} catch (CondicionesLicenseException e) {
addActionError("Ocurrió un error al guardar los datos");
//addActionError(e.getMessage());
} catch (ParseException e) {
addActionError("Ocurrió un error al guardar los datos");
}
buscarCondiciones(ct);
buscarJustificaciones();
return SUCCESS;
}
public String buscarSuscriptores() throws ParseException
{
public String buscarSuscriptores() throws ParseException {
List<PlfRangoDTO> susc = condicionesLicenseBO.buscarSuscriptores(getIdContrato());
condiciones = new PlicenseDTO();
condiciones.setRango(susc);
......@@ -82,8 +78,7 @@ public class CondicionesLicenseAction extends BaseContratoAction {
}
private void buscarCondiciones(ContratoDTO ct) throws ParseException {
if(condiciones== null )
{
if (condiciones == null) {
condiciones = new PlicenseDTO();
}
condiciones.setIdContrato(ct.getIdContrato());
......@@ -100,18 +95,15 @@ public class CondicionesLicenseAction extends BaseContratoAction {
this.condiciones = condiciones;
}
public List<TipoAnio> getTiposAnio()
{
public List<TipoAnio> getTiposAnio() {
return Arrays.asList(TipoAnio.values());
}
public List<CatalogoDTO> getTiposPeriodoPago()
{
public List<CatalogoDTO> getTiposPeriodoPago() {
return condicionesLicenseBO.buscarPeriodos();
}
public List<TipoCondicion> getTiposCondicion()
{
public List<TipoCondicion> getTiposCondicion() {
return Arrays.asList(TipoCondicion.values());
}
}
package com.mx.dla.dda.contrato.condicionesTransaccion.actions;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
......@@ -27,22 +30,21 @@ import com.mx.dla.dda.contrato.condicionesTransaccion.dtos.ContratoPtrsPrecioDTO
import com.mx.dla.dda.contrato.condicionesTransaccion.dtos.ContratoPtrsRdDTO;
import com.mx.dla.dda.contrato.condicionesTransaccion.dtos.DataInicialTransaccionDTO;
import com.mx.dla.dda.contrato.condicionesTransaccion.dtos.ReleaseDateDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.opensymphony.xwork2.Action;
public class CatalogosTransaccionAction extends BaseContratoAction
implements ServletRequestAware, ServletResponseAware{
implements ServletRequestAware, ServletResponseAware {
private static final long serialVersionUID = 1L;
private Logger log = Logger.getLogger(this.getClass());
//private static final long serialVersionUID = 1L;
private DataInicialTransaccionDTO catalogos = new DataInicialTransaccionDTO();
//private String request = "";
private HttpServletRequest request;
private HttpServletResponse response;
@Autowired
private CondicionesTransaccionBO transaccionBO;
public String execute() {
ObjectMapper mapper = new ObjectMapper();
......@@ -57,23 +59,22 @@ implements ServletRequestAware, ServletResponseAware{
List<CategoriaMgDTO> categoriaMgLista = transaccionBO.obtenerCategoriaMG();
List<ReleaseDateDTO> releaseDateLista = transaccionBO.obtenerReleaseDate();
try {
log.debug("CONTRATO "+getIdContrato());
log.debug("CONTRATO INT "+getIdContrato().intValue());
} catch (Exception e) {
log.error("ERROR: ",e);
log.error("CAUSA: "+e.getCause());
}
log.info("CONTRATO " + getIdContrato());
log.info("CONTRATO INT " + getIdContrato().intValue());
List<ContratoPtransDTO> ptrsLista = transaccionBO.verificaTransaccion(getIdContrato());
catalogos.setPtrsLista(ptrsLista);
if(!ptrsLista.isEmpty()){
for(int kPtrs=0;kPtrs<ptrsLista.size();kPtrs++){
ptrsAnnio.add(transaccionBO.cargaContratoPagoAnnio(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans()+"")));
ptrsCmg.add(transaccionBO.cargaContratoPagoCmg(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans()+"")));
ptrsCategorias.add(transaccionBO.cargaContratoPagoCategorias(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans()+"")));
ptrsRd.add(transaccionBO.cargaContratoPagoRD(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans()+"")));
ptrsPrecio.add(transaccionBO.cargaContratoPagoPrecio(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans()+"")));
if (!ptrsLista.isEmpty()) {
for (int kPtrs = 0; kPtrs < ptrsLista.size(); kPtrs++) {
ptrsAnnio.add(transaccionBO
.cargaContratoPagoAnnio(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans() + "")));
ptrsCmg.add(transaccionBO
.cargaContratoPagoCmg(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans() + "")));
ptrsCategorias.add(transaccionBO.cargaContratoPagoCategorias(
Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans() + "")));
ptrsRd.add(transaccionBO
.cargaContratoPagoRD(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans() + "")));
ptrsPrecio.add(transaccionBO
.cargaContratoPagoPrecio(Long.parseLong(ptrsLista.get(kPtrs).getIdContratoPtrans() + "")));
catalogos.setPtrsAnnio(ptrsAnnio);
catalogos.setPtrsCmg(ptrsCmg);
......@@ -87,7 +88,6 @@ implements ServletRequestAware, ServletResponseAware{
catalogos.setCategoriaMGLista(categoriaMgLista);
catalogos.setReleaseDateLista(releaseDateLista);
mapper.writeValueAsString(ptrsAnnio);
mapper.writeValueAsString(ptrsCmg);
mapper.writeValueAsString(ptrsCategorias);
......@@ -98,55 +98,35 @@ implements ServletRequestAware, ServletResponseAware{
mapper.writeValueAsString(categoriaMgLista);
mapper.writeValueAsString(releaseDateLista);
log.debug(catalogos.toString());
log.debug("ya cargo catalogos");
} catch (JsonParseException e) {
// TODO Auto-generated catch block
log.error("Error CatalogosListadoAction.", e);
} catch (JsonGenerationException e) {
// TODO Auto-generated catch block
log.error("Error CatalogosListadoAction.", e);
} catch (JsonMappingException e) {
// TODO Auto-generated catch block
log.error("Error CatalogosListadoAction.", e);
} catch (IOException e) {
// TODO Auto-generated catch block
log.error("Error CatalogosListadoAction.", e);
} catch (Exception e) {
// TODO Auto-generated catch block
} catch (ResultMapException e) {
log.error("Error CatalogosListadoAction.", e);
} catch (PersistenceException e) {
log.error("Error CatalogosListadoAction.", e);
} catch (TransaccionException e) {
log.error("Error CatalogosListadoAction.", e);
} catch (SQLException e) {
log.error("Error CatalogosListadoAction.", e);
}
return Action.SUCCESS;
}
public DataInicialTransaccionDTO getCatalogos() {
return catalogos;
}
public void setCatalogos(DataInicialTransaccionDTO catalogos) {
this.catalogos = catalogos;
}
public CondicionesTransaccionBO getTransaccionBO() {
return transaccionBO;
}
......@@ -155,41 +135,26 @@ implements ServletRequestAware, ServletResponseAware{
this.transaccionBO = transaccionBO;
}
public HttpServletRequest getRequest() {
return request;
}
public void setRequest(HttpServletRequest request) {
this.request = request;
}
public HttpServletResponse getResponse() {
return response;
}
public void setResponse(HttpServletResponse response) {
this.response = response;
}
@Override
public void setServletResponse(HttpServletResponse arg0) {
// TODO Auto-generated method stub
}
}
package com.mx.dla.dda.contrato.condicionesTransaccion.actions;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.generales.bos.GeneralesBO;
import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
public class CondicionesTransaccionAction extends BaseContratoAction{
public class CondicionesTransaccionAction extends BaseContratoAction {
private static final long serialVersionUID = 1L;
private Logger log = Logger.getLogger(this.getClass());
ContratoDTO contrato = new ContratoDTO();
......@@ -21,10 +18,9 @@ public class CondicionesTransaccionAction extends BaseContratoAction{
@Override
public String execute() throws Exception {
this.setIdContrato((Long)this.getSession().get("idContrato"));
this.setIdContrato((Long) this.getSession().get("idContrato"));
buscarJustificaciones();
contrato=generales.obtenContrato(getIdContrato());
contrato = generales.obtenContrato(getIdContrato());
getSession().put("contrato", contrato);
return SUCCESS;
......
package com.mx.dla.dda.contrato.condicionesTransaccion.actions;
import java.sql.SQLException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.apache.log4j.Logger;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
......@@ -12,48 +16,49 @@ import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
import com.mx.dla.dda.contrato.condicionesTransaccion.bos.CondicionesTransaccionBO;
import com.mx.dla.dda.contrato.condicionesTransaccion.dtos.CondicionesTransaccionDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
public class GuardarTransaccionAction extends BaseContratoAction
implements ServletRequestAware, ServletResponseAware{
public class GuardarTransaccionAction extends BaseContratoAction implements ServletRequestAware, ServletResponseAware {
private static final long serialVersionUID = 1L;
private Logger log = Logger.getLogger(this.getClass());
private String data;
ObjectMapper mapper = new ObjectMapper();
@Autowired
private CondicionesTransaccionBO transaccionBO;
private CondicionesTransaccionDTO transaccionDTO=new CondicionesTransaccionDTO();
private CondicionesTransaccionDTO transaccionDTO = new CondicionesTransaccionDTO();
private HttpServletRequest request;
@Override
public String execute() throws Exception {
log.debug("ESTOY ENTRANDO AL ACTION GUARDAR TRANSACCION");
//Long idContrato= null;
try {
log.debug("data "+data);
transaccionDTO = mapper.readValue(data, CondicionesTransaccionDTO.class);
log.debug("TRANSACCION:"+transaccionDTO.toString());
transaccionBO.guardar(transaccionDTO);
setJustificacion(transaccionDTO.getJustificacion());
//idContrato=Long.valueOf(transaccionDTO.getIdContrato());
setIdContrato( transaccionDTO.getIdContrato());
if(getJustificacion() != null && !"".equals(getJustificacion())){
setIdContrato(transaccionDTO.getIdContrato());
if (getJustificacion() != null && !"".equals(getJustificacion())) {
guardarJustificacion();
setJustificacion("");
}
} catch (Exception e) {
log.error("ERROR:",e);
log.error("Causa: "+e.getCause());
} catch (ResultMapException e) {
log.error("ERROR:", e);
log.error("Causa: " + e.getCause());
} catch (PersistenceException e) {
log.error("ERROR:", e);
log.error("Causa: " + e.getCause());
} catch (TransaccionException e) {
log.error("ERROR:", e);
log.error("Causa: " + e.getCause());
} catch (SQLException e) {
log.error("ERROR:", e);
log.error("Causa: " + e.getCause());
}
return SUCCESS;
}
@Override
......@@ -86,6 +91,4 @@ implements ServletRequestAware, ServletResponseAware{
this.request = request;
}
}
package com.mx.dla.dda.contrato.deal.actions;
import java.sql.SQLException;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.springframework.beans.factory.annotation.Autowired;
import com.mx.dla.dda.contrato.common.actions.BaseContratoAction;
......@@ -7,13 +11,11 @@ import com.mx.dla.dda.contrato.deal.bos.DealBO;
import com.mx.dla.dda.contrato.deal.dtos.DealDTO;
import com.mx.dla.dda.contrato.generales.bos.GeneralesBO;
import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.opensymphony.xwork2.Action;
public class ContratoDealAction extends BaseContratoAction {
/**
*
*/
private static final long serialVersionUID = 1L;
private DealDTO deal = new DealDTO();
......@@ -25,11 +27,6 @@ public class ContratoDealAction extends BaseContratoAction {
@Autowired
private GeneralesBO generalesBO;
public ContratoDealAction() {
}
public String load() {
try {
Long idContrato = (Long)this.getSession().get("idContrato");
......@@ -47,9 +44,17 @@ public class ContratoDealAction extends BaseContratoAction {
ContratoDTO cto = generalesBO.obtenContrato(this.getIdContrato());
this.estadoCto = cto.getIdEstatus();
} catch (Exception e) {
addActionError("Ha ocurrido el siguiente error durante la consulta: "
+ e.getMessage());
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (PersistenceException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
}
......@@ -80,9 +85,17 @@ public class ContratoDealAction extends BaseContratoAction {
addActionMessage("La informacion se ha guardado con exito");
} catch (Exception e) {
addActionError("Ha ocurrido el siguiente error durante el guardado: "
+ e.getMessage());
} catch (ResultMapException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (PersistenceException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (TransaccionException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
} catch (SQLException e) {
addActionError("Ha ocurrido un error.");
logger.error("Error en ["+this.getClass()+"]. Error:"+e);
}
......
......@@ -16,21 +16,14 @@ public class FacturasAction extends BaseContratoAction {
private List<FacturaViewDTO> facturas;
private Double costoTotal;
/**
*
*/
private static final long serialVersionUID = 3027003012196187865L;
@Override
public String execute() throws Exception {
logger.debug("entro al init materiales");
this.setIdContrato((Long)this.getSession().get("idContrato"));
logger.debug("{}",getIdContrato());
setFacturas(facturasBO.buscarFacturas(getIdContrato()));
//setCostoTotal(facturasBO.buscarCostoTotal(getIdContrato()));
return SUCCESS;
}
......
package com.mx.dla.dda.contrato.fees.actions;
import java.io.IOException;
import java.sql.SQLException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
......@@ -9,6 +11,7 @@ import java.util.List;
import java.util.Map;
import org.apache.ibatis.exceptions.PersistenceException;
import org.apache.ibatis.executor.result.ResultMapException;
import org.codehaus.jackson.JsonGenerationException;
import org.codehaus.jackson.JsonParseException;
import org.codehaus.jackson.map.JsonMappingException;
......@@ -26,13 +29,15 @@ import com.mx.dla.dda.contrato.fees.dtos.FeesContratoPagoDTO;
import com.mx.dla.dda.contrato.fees.dtos.FeesPagoBonoDTO;
import com.mx.dla.dda.contrato.fees.dtos.TipoSuscriptorDTO;
import com.mx.dla.dda.contrato.generales.bos.GeneralesBO;
import com.mx.dla.dda.contrato.generales.bos.PoblarGeneralesBO;
import com.mx.dla.dda.contrato.generales.dtos.ContratoDTO;
import com.mx.dla.dda.contrato.transaccion.exceptions.dtos.TransaccionException;
import com.opensymphony.xwork2.Action;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
@Data
@Getter
@Setter
public class FeesAction extends BaseContratoAction {
private static final long serialVersionUID = 1L;
......@@ -44,7 +49,7 @@ public class FeesAction extends BaseContratoAction {
private List<FeesContratoPagoDTO> datos;
private FeesPagoBonoDTO bonoSuscriptor;
private List<TipoSuscriptorDTO> tipoSuscriptorLista;
private List<CatalogoDTO> anioTipo;// tiempoVidaLista;
private List<CatalogoDTO> anioTipo;
private String requestEliminar;
private String requestBono;
private String periodosEliminar;
......@@ -94,14 +99,23 @@ public class FeesAction extends BaseContratoAction {
ContratoDTO contrato = generalesBO.obtenContrato(this.getIdContrato());
estatus = contrato.getIdEstatus();
this.getCatalogos();
} catch (PersistenceException ibe) {
} catch (ResultMapException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", ibe);
} catch (Exception e) {
logger.error("Error. {}", e);
} catch (PersistenceException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (TransaccionException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (SQLException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (ParseException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
logger.error("Error." + e);
}
return Action.SUCCESS;
}
......@@ -114,12 +128,7 @@ public class FeesAction extends BaseContratoAction {
feesContratoBO.guardarProcesoFees(request, requestBono, inflacion, getIdContrato(), operacion,
periodosEliminar, requestEliminar);
logger.info("fecha inicio cto." + fechaCtoInicio); // Se manda a
// traer el rest
// para
// actualizar
// los costos de
// titulos
logger.info("fecha inicio cto." + fechaCtoInicio);
commonRestBO.llamadaCostoTitulo(formatter.parse(fechaCtoInicio), this.getIdContrato(),
OrigenCodes.REAL.name());
......@@ -139,13 +148,21 @@ public class FeesAction extends BaseContratoAction {
} catch (IOException ioe) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", ioe);
} catch (PersistenceException ibe) {
} catch (ResultMapException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", ibe);
} catch (Exception e) {
logger.error("Error. {}", e);
} catch (PersistenceException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (TransaccionException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (SQLException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
} catch (ParseException e) {
this.msgError = "Ocurri un error al obtener los datos.";
logger.error("Error. {}", e);
logger.error("Error." + e);
}
return Action.SUCCESS;
}
......@@ -171,19 +188,27 @@ public class FeesAction extends BaseContratoAction {
public String actualizarCostosTitulos() {
Long idContrato = (Long) this.getSession().get("idContrato");
Double costoTotal = Double.parseDouble(request);
System.out.println("CostoTotal: " + costoTotal);
logger.info("CostoTotal: " + costoTotal);
Map<String, Object> paramNumeroContrato = new HashMap<String, Object>();
paramNumeroContrato.put("idContrato", idContrato);
paramNumeroContrato.put("costoTotal", costoTotal);
paramNumeroContrato.put("response","");
paramNumeroContrato.put("response", "");
feesContratoBO.actualizarCostoTitulos(paramNumeroContrato);
msgExito = (String)paramNumeroContrato.get("response");
System.out.println("msgExito: " + msgExito);
msgExito = (String) paramNumeroContrato.get("response");
logger.info("msgExito: " + msgExito);
return Action.SUCCESS;
}
private void getCatalogos() {
try {
tipoSuscriptorLista = catalogosBO.obtenerTipoSuscriptor();
} catch (ResultMapException e) {
logger.error("Error. {}", e);
} catch (SQLException e) {
logger.error("Error. {}", e);
} catch (TransaccionException e) {
logger.error("Error. {}", e);
}
anioTipo = new ArrayList<CatalogoDTO>();
CatalogoDTO cat1 = new CatalogoDTO("Contractual", "Contractual");
CatalogoDTO cat2 = new CatalogoDTO("Calendario", "Calendario");
......
......@@ -2,12 +2,14 @@ package com.mx.dla.dda.contrato.fees.actions;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -39,40 +41,35 @@ public class FeesArchivoAction extends BaseContratoAction {
private CustomResourceLoader customResourceLoader;
public String cargaArchivo() {
try
{
logger.debug("Type [{}] name [{}]",fileContentType,fileFileName);
try {
logger.debug("Type [{}] name [{}]", fileContentType, fileFileName);
UsuarioDTO usuario = (UsuarioDTO) getSession().get("usuario");
datosExcel = feesArchivoBO.obtenerDatosExcel(file, fileFileName, usuario.getExpediente(), (Long)this.getSession().get("idContrato"));
datosExcel = feesArchivoBO.obtenerDatosExcel(file, fileFileName, usuario.getExpediente(),
(Long) this.getSession().get("idContrato"));
logger.debug("Se termina de cargar los datos de excel.");
}catch(ExcelMapperException e)
{
logger.error("Error Al procesar Excel. {}",e);
} catch (ExcelMapperException e) {
logger.error("Error Al procesar Excel. {}", e);
this.msgError = "Ocurri un error al cargar los datos.";
}catch(Exception e)
{
logger.error("Error {}",e);
} catch (IOException e) {
logger.error("Error {}", e);
this.msgError = "Ocurri un error al cargar los datos.";
}
return SUCCESS;
}
public String descargarTemplate()
{
try
{
public String descargarTemplate() {
try {
logger.debug("llega descarga.");
if(request != null)
{
if (request != null) {
String name = request.compareTo("s") == 0 ? "dda_plantillaFeesSuscrip" : "dda_plantillaFeesFlat";
byte[] result = customResourceLoader.getFile2ByteArray("classpath:templateFees/"+name+".xlsx");
byte[] result = customResourceLoader.getFile2ByteArray("classpath:templateFees/" + name + ".xlsx");
fileInputStream = new ByteArrayInputStream(result);
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentLength(result.length);
response.setContentType(ContentType.EXCEL.name());
response.setHeader("Content-Disposition","attachment;filename="+name+".xlsx");
response.setHeader("Content-Disposition", "attachment;filename=" + name + ".xlsx");
ServletOutputStream out = response.getOutputStream();
......@@ -80,11 +77,13 @@ public class FeesArchivoAction extends BaseContratoAction {
out.flush();
out.close();
}
else
} else
this.msgError = "Error al descargar template.";
}catch (Exception ex){
} catch (IOException ex) {
this.msgError = "Error al descargar template.";
logger.error("Error {}.", ex);
} catch (InvalidFormatException ex) {
this.msgError = "Error al descargar template.";
logger.error("Error {}.", ex);
}
......@@ -92,22 +91,68 @@ public class FeesArchivoAction extends BaseContratoAction {
return null;
}
public String getFileContentType() { return fileContentType; }
public String getFileFileName() { return fileFileName; }
public File getFile() { return file; }
public String getRequest() { return request; }
public String getMsgError() { return msgError; }
public List<FilaExcelDTO> getDatosExcel() { return datosExcel; }
public String getMsgExito() { return msgExito; }
public InputStream getFileInputStream() { return fileInputStream; }
public void setFileContentType(String fileContentType) { this.fileContentType = fileContentType; }
public void setFileFileName(String fileFileName) { this.fileFileName = fileFileName; }
public void setRequest(String request) { this.request = request; }
public void setMsgError(String msgError) { this.msgError = msgError; }
public void setMsgExito(String msgExito) { this.msgExito = msgExito; }
public void setFile(File file) { this.file = file; }
public void setDatosExcel(List<FilaExcelDTO> datosExcel) { this.datosExcel = datosExcel; }
public void setFileInputStream(InputStream fileInputStream) { this.fileInputStream = fileInputStream; }
public String getFileContentType() {
return fileContentType;
}
public String getFileFileName() {
return fileFileName;
}
public File getFile() {
return file;
}
public String getRequest() {
return request;
}
public String getMsgError() {
return msgError;
}
public List<FilaExcelDTO> getDatosExcel() {
return datosExcel;
}
public String getMsgExito() {
return msgExito;
}
public InputStream getFileInputStream() {
return fileInputStream;
}
public void setFileContentType(String fileContentType) {
this.fileContentType = fileContentType;
}
public void setFileFileName(String fileFileName) {
this.fileFileName = fileFileName;
}
public void setRequest(String request) {
this.request = request;
}
public void setMsgError(String msgError) {
this.msgError = msgError;
}
public void setMsgExito(String msgExito) {
this.msgExito = msgExito;
}
public void setFile(File file) {
this.file = file;
}
public void setDatosExcel(List<FilaExcelDTO> datosExcel) {
this.datosExcel = datosExcel;
}
public void setFileInputStream(InputStream fileInputStream) {
this.fileInputStream = fileInputStream;
}
}
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