añado jsp
This commit is contained in:
@@ -0,0 +1,453 @@
|
||||
<%@ page import="com.tarisan.control.*" %>
|
||||
<%@ page import="com.tarisan.data.*" %>
|
||||
<%@ page import="com.tarisan.excepcion.*" %>
|
||||
<%@ page import="com.tarisan.log.*" %>
|
||||
<%@ page import="com.tarisan.util.Utilidades" %>
|
||||
<%@ page import="java.sql.*" %>
|
||||
<%@ page import="java.util.Vector" %>
|
||||
<%@ page import="java.io.*" %>
|
||||
|
||||
|
||||
<%
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Inicio página de de mantenimiento de actos imputados (adm/mto_tamovext.jsp)");
|
||||
|
||||
response.setHeader("Expires", "0");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
HttpSession sesion = request.getSession(true);
|
||||
|
||||
if(sesion.isNew() || (sesion.getAttribute("USUARIO") == null))
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Sesión invalidada");
|
||||
response.sendRedirect("../../html/login.html");
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
//Obtención del perfil del usuario conectado
|
||||
StringBuffer perfil = new StringBuffer();
|
||||
perfil.append("|");
|
||||
perfil.append(sesion.getAttribute("PERFIL"));
|
||||
perfil.append("|");
|
||||
|
||||
// Definicion de variables
|
||||
String strParametroMenu = "";
|
||||
int CampoMedico = 0;
|
||||
String CampoFecha = "";
|
||||
String CampoApellido1 = "";
|
||||
String CampoApellido2 = "";
|
||||
String CampoNombre = "";
|
||||
int intPagina = 0;
|
||||
int intEliminar = 0;
|
||||
StringBuffer strSql = new StringBuffer();
|
||||
Object aCondiciones[] = null;
|
||||
|
||||
//Obtenemos los valores de los parametros que se pasan a la pagina
|
||||
//En caso de que no se le pasen parametros, quedaram inicializados
|
||||
//a sus valores por defecto
|
||||
|
||||
//parametro x para marcar la opcion del menu en la que se encuentra el usuario
|
||||
if (request.getParameter("x")!=null)
|
||||
strParametroMenu=(String)request.getParameter("x");
|
||||
|
||||
//parametro medico para las busquedas
|
||||
if (request.getParameter("medico")!=null)
|
||||
CampoMedico = Integer.parseInt(request.getParameter("medico"));
|
||||
|
||||
//parametro fecha para las busquedas
|
||||
if (request.getParameter("fecha")!=null)
|
||||
CampoFecha = (String)request.getParameter("fecha");
|
||||
|
||||
//parametro apellido1 para las busquedas
|
||||
if (request.getParameter("apellido1")!=null)
|
||||
CampoApellido1 = (String)request.getParameter("apellido1");
|
||||
|
||||
//parametro apellido2 para las busquedas
|
||||
if (request.getParameter("apellido2")!=null)
|
||||
CampoApellido2 = (String)request.getParameter("apellido2");
|
||||
|
||||
//parametro nombre para las busquedas
|
||||
if (request.getParameter("nombre")!=null)
|
||||
CampoNombre = (String)request.getParameter("nombre");
|
||||
|
||||
//parametro pagina para realizar la paginacion
|
||||
if (request.getParameter("pagina")!=null)
|
||||
intPagina=Integer.parseInt(request.getParameter("pagina"));
|
||||
|
||||
//parametro eliminar para eliminar un movimiento de tamovext
|
||||
if (request.getParameter("eliminar")!=null)
|
||||
intEliminar=Integer.parseInt(request.getParameter("eliminar"));
|
||||
|
||||
Tamensaje tamensaje = new Tamensaje();
|
||||
PersistenciaTamensaje pertamensaje = new PersistenciaTamensaje();
|
||||
|
||||
boolean mostrarNoticia = true;
|
||||
PersistenciaTanoticias perTaNo = new PersistenciaTanoticias();
|
||||
Vector vSeleccionNot = perTaNo.obtener_noticias_cabecera();
|
||||
Vector vNoticias = new Vector();
|
||||
String strNoticia = "";
|
||||
String noticias ="";
|
||||
String separador = " ---//--- ";
|
||||
if(vSeleccionNot.size()==0){
|
||||
mostrarNoticia = false;
|
||||
}else{
|
||||
mostrarNoticia = true;
|
||||
Tanoticias tanoticia = null;
|
||||
for(int i = 0; i < vSeleccionNot.size(); i++)
|
||||
{
|
||||
tanoticia = (Tanoticias)vSeleccionNot.elementAt(i);
|
||||
if (i!=0){
|
||||
strNoticia = strNoticia + separador + tanoticia.getNoticia();
|
||||
}else{
|
||||
strNoticia = tanoticia.getNoticia();
|
||||
}
|
||||
strNoticia = strNoticia.replaceAll("<br/>", " ");
|
||||
}
|
||||
}
|
||||
//Lo pongo a false para que no salga la noticia
|
||||
mostrarNoticia = false;
|
||||
%>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Mantenimiento autorizaciones</title>
|
||||
<link rel="STYLESHEET" type="text/css" href="../../css/estilos.css">
|
||||
<script language="JavaScript" src="../../js/inicio_tarisan.js"></script>
|
||||
<script language="JavaScript" src="../../js/funciones.js"></script>
|
||||
<script language="JavaScript" src="../../js/jquery-1.11.3.js"></script>
|
||||
<script language="JavaScript" src="../../js/menu_adm.js"></script>
|
||||
<script language="JavaScript" src="../../js/bloques_tarisan.js"></script>
|
||||
<script language="JavaScript">pNG="<%= perfil.toString() %>";</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function pasarAMayusculas(campo)
|
||||
{
|
||||
campo.value = campo.value.toUpperCase();
|
||||
}
|
||||
|
||||
function buscar()
|
||||
{
|
||||
pasarAMayusculas(document.frm_buscar.apellido1);
|
||||
pasarAMayusculas(document.frm_buscar.apellido2);
|
||||
pasarAMayusculas(document.frm_buscar.nombre);
|
||||
var fechaBuena = true;
|
||||
|
||||
if(document.frm_buscar.medico.value.length == 0)
|
||||
{
|
||||
alert("Introduce un numero de medico");
|
||||
document.frm_buscar.medico.focus();
|
||||
fechaBuena = false;
|
||||
}
|
||||
else if(isNaN(document.frm_buscar.medico.value))
|
||||
{
|
||||
alert("Solo puede introducir números en el campo médico");
|
||||
document.frm_buscar.medico.value = "";
|
||||
document.frm_buscar.medico.focus();
|
||||
fechaBuena = false;
|
||||
}
|
||||
else if (document.frm_buscar.fecha.value!="")
|
||||
{
|
||||
fechaBuena = valorFecha(document.frm_buscar.fecha);
|
||||
}
|
||||
|
||||
if (fechaBuena){
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
function paginacion(pagina)
|
||||
{
|
||||
document.frm_buscar.pagina.value = pagina;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
|
||||
function enfocar()
|
||||
{
|
||||
document.frm_buscar.medico.focus();
|
||||
}
|
||||
|
||||
function eliminar(medico,fecha,acto,ape1,ape2,nom,espe,numseq,col,pol,orden)
|
||||
{
|
||||
if (confirm("Desea eliminaar el acto seleccionado? \n Medico: "+ medico +" -- Acto: "+ acto +" -- Fecha: "+ fecha +" \n Asegurado: "+ ape1.trim() +" "+ ape2.trim() +", "+ nom.trim())) {
|
||||
document.frm_buscar.eliminar.value=1;
|
||||
document.frm_buscar.hiddenMedico.value=medico;
|
||||
document.frm_buscar.hiddenEspecialidad.value=espe;
|
||||
document.frm_buscar.hiddenActo.value=acto;
|
||||
document.frm_buscar.hiddenNumseq.value=numseq;
|
||||
document.frm_buscar.hiddenColectivo.value=col;
|
||||
document.frm_buscar.hiddenPoliza.value=pol;
|
||||
document.frm_buscar.hiddenOrden.value=orden;
|
||||
document.frm_buscar.hiddenFecha.value=fecha;
|
||||
document.frm_buscar.submit();
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="#43881A" bgcolor="#FFFFFF" onload="javascript:enfocar()">
|
||||
<div class="marco">
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td class="tdLogoCabecera"><img src="<%=request.getContextPath()%>/img/logo.png" class="logoCabecera"></td>
|
||||
<td>
|
||||
<table width="100%">
|
||||
<tr><td class="tituloTablaMedico" align="center"><%= sesion.getAttribute("USUARIO") %></td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id="contenedorNoticia">
|
||||
<br>
|
||||
<div class="tituloNoticia">
|
||||
<p class="marquee"><%=strNoticia %></p>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Cabecera de Navegación superior //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr>
|
||||
<td><script language="JavaScript">bloques();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<!-- Cuerpo de la página //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" align="center" style="width:95%">
|
||||
<tr valign="top">
|
||||
<!--<td width="180">//-->
|
||||
<td width="5%">
|
||||
<!-- Menú de navegación del módulo de navegación (zona izquierda) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0">
|
||||
<tr valign="top">
|
||||
<td colspan="2"><img src="../../img/sp.gif" width="180" height="12" border="0"></td>
|
||||
</tr>
|
||||
<tr valign="top">
|
||||
<td><script language="JavaScript">escribirMenuGst();</script></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<!--<td bgcolor="#CCCCCC"><img src="../../img/sp.gif" width="1" height="12" border="0"></td>//-->
|
||||
<td width="565">
|
||||
<!-- Tabla con el contenido de la página (zona central-derecha) //-->
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
||||
<tr>
|
||||
<!--<td><img src="../../img/sp.gif" width="4" height="261" border="0"></td>//-->
|
||||
<td width="1px" bgcolor="#CCCCCC" height="190px"></td>
|
||||
<td class="txt" valign="top">
|
||||
<img src="../../img/sp.gif" width="1" height="11" border="0"><br>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%
|
||||
if (intEliminar == 1)
|
||||
{
|
||||
int intMedico=Integer.parseInt(request.getParameter("hiddenMedico"));
|
||||
int intActo=Integer.parseInt(request.getParameter("hiddenActo"));
|
||||
int intEspe=Integer.parseInt(request.getParameter("hiddenEspecialidad"));
|
||||
int intNumseq=Integer.parseInt(request.getParameter("hiddenNumseq"));
|
||||
int intColec=Integer.parseInt(request.getParameter("hiddenColectivo"));
|
||||
int intPoliza=Integer.parseInt(request.getParameter("hiddenPoliza"));
|
||||
int intOrden=Integer.parseInt(request.getParameter("hiddenOrden"));
|
||||
String strFecha=(String)(request.getParameter("hiddenFecha"));
|
||||
|
||||
PersistenciaTamovext pert = new PersistenciaTamovext();
|
||||
boolean resultado = false;
|
||||
resultado = pert.EliminarMovimientoImputado(intMedico, intEspe, intActo, intNumseq, intColec, intPoliza, intOrden, strFecha);
|
||||
intEliminar=0;
|
||||
}
|
||||
|
||||
%>
|
||||
<form name="frm_buscar" action="mto_tamovext.jsp?x=<%=strParametroMenu%>" method="post" >
|
||||
<input type="hidden" name="pagina" value="1" />
|
||||
<input type="hidden" name="eliminar" value="0" />
|
||||
<input type="hidden" name="hiddenMedico" value="0" />
|
||||
<input type="hidden" name="hiddenEspecialidad" value="0" />
|
||||
<input type="hidden" name="hiddenActo" value="0" />
|
||||
<input type="hidden" name="hiddenNumseq" value="0" />
|
||||
<input type="hidden" name="hiddenColectivo" value="0" />
|
||||
<input type="hidden" name="hiddenPoliza" value="0" />
|
||||
<input type="hidden" name="hiddenOrden" value="0" />
|
||||
<input type="hidden" name="hiddenFecha" value="0" />
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(20).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="medico" name="medico" <%if(CampoMedico!=0){%>value="<%=CampoMedico %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<span class="txtnegrita"><%=pertamensaje.obtenerMensaje(25).getMensaje() %></span>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="fecha" name="fecha" <%if(CampoFecha!="" ){%>value="<%=CampoFecha %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(26).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="apellido1" name="apellido1" <%if(CampoApellido1!=""){%>value="<%=CampoApellido1 %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(27).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="apellido2" name="apellido2" <%if(CampoApellido2!=""){%>value="<%=CampoApellido2 %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">
|
||||
<label class="txtnegrita"><%=pertamensaje.obtenerMensaje(28).getMensaje() %></label>
|
||||
</td>
|
||||
<td>
|
||||
<input size="20" type="text" class="txt" id="nombre" name="nombre" <%if(CampoNombre!=""){%>value="<%=CampoNombre %>"<%}%>/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right">
|
||||
<a href="javascript:buscar()" class="enlace"><%=pertamensaje.obtenerMensaje(24).getMensaje() %></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" align="right"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<%if(CampoMedico > 0)
|
||||
{
|
||||
PersistenciaTamovext per = new PersistenciaTamovext();
|
||||
Vector<Object[]> vSeleccion = per.MovimientosImputados(intPagina,CampoMedico,CampoFecha,CampoApellido1,CampoApellido2,CampoNombre);
|
||||
if(vSeleccion.size()>0)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.DEBUG, "Los movimientos del medico "+CampoMedico+" estan en tamovext");
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<%if (intPagina != 0){ %>
|
||||
<tr>
|
||||
<td colspan="5" align="right"><span class="txt">Página <%=per.getPaginacion().getNumeroPagina()%> de <%=per.getPaginacion().getNumeroPaginasTotales()%></span></td>
|
||||
</tr>
|
||||
<% }%>
|
||||
<tr>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Médico</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Fecha</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Acto</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Asegurado</td>
|
||||
<td class="cabeceraTabla" align="center" bgcolor="#FFAAAA">Eliminar</td>
|
||||
</tr>
|
||||
<%
|
||||
String estilo = "";
|
||||
for(int i=0;i<vSeleccion.size();i++)
|
||||
{
|
||||
if (i % 2 == 0)
|
||||
{
|
||||
estilo = "filaA";
|
||||
}
|
||||
else
|
||||
{
|
||||
estilo = "filaB";
|
||||
}
|
||||
|
||||
Object[] aResultados = vSeleccion.elementAt(i);
|
||||
%>
|
||||
<tr>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[0] %></td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[1] %> </td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[2] %></td>
|
||||
<td class="<%=estilo%>" align="center"><%= aResultados[4] +" "+ aResultados[5] +", "+ aResultados[6]%> </td>
|
||||
<%if ((Integer.valueOf(aResultados[3].toString())) != 32){ %>
|
||||
<td class="<%=estilo%>" align="center"><a href="javascript:eliminar(<%= aResultados[0] %>,'<%= aResultados[1] %>',<%= aResultados[2] %>,'<%= aResultados[4] %>','<%= aResultados[5] %>','<%= aResultados[6] %>',<%= aResultados[7] %>,<%= aResultados[8] %>,<%= aResultados[9] %>,<%= aResultados[10] %>,<%= aResultados[11] %>)" class="enlace">Eliminar</a></td>
|
||||
<% }else { %>
|
||||
<td class="<%=estilo%>" align="center">Adeslas</td>
|
||||
<%} %>
|
||||
</tr>
|
||||
</form>
|
||||
<%
|
||||
}
|
||||
if (intPagina!=0){ //se tiene en cuenta la paginacion %>
|
||||
<tr><td colspan="5"></td></tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<table border="0" align="center">
|
||||
<tr>
|
||||
<%if (per.getPaginacion().esPrimeraPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">primero</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">anterior</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(1)" class="enlace">primero</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() - 1%>)" class="enlace">anterior</a></td>
|
||||
<%}%>
|
||||
<%if (per.getPaginacion().esUltimaPagina()){%>
|
||||
<td width="70" align="right"><span class="pagDesactivo">siguiente</span></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><span class="pagDesactivo">último</span></td>
|
||||
<%}else{%>
|
||||
<td width="70" align="right"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPagina() + 1%>)" class="enlace">siguiente</a></td>
|
||||
<td></td>
|
||||
<td width="70" align="left"><a href="javascript:paginacion(<%=per.getPaginacion().getNumeroPaginasTotales()%>)" class="enlace">último</a></td>
|
||||
<%}%>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<%
|
||||
} //fin if(pagina!=0) %>
|
||||
</table>
|
||||
<%
|
||||
}else{
|
||||
%>
|
||||
<table border="0" align="center" width="100%">
|
||||
<tr>
|
||||
<td class="txtnegrita"><%=pertamensaje.obtenerMensaje(29).getMensaje() %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
var jsMostrarNoticia = <%=mostrarNoticia %>;
|
||||
if (!jsMostrarNoticia){
|
||||
document.getElementById('contenedorNoticia').style.display="none";
|
||||
}else{
|
||||
<% strNoticia = strNoticia.replaceAll("\"", "'"); %>
|
||||
var not = "<%=strNoticia %>";
|
||||
tamanioNoticia(not);
|
||||
marquee($('.tituloNoticia'), $('.marquee'),not);
|
||||
}
|
||||
</script>
|
||||
<%
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
|
||||
sesion.setAttribute("ERROR", "Error en la presentación de la página al usuario.");
|
||||
response.sendRedirect("../error.jsp");
|
||||
}
|
||||
}
|
||||
LogTarisan.logger.log(NivelLog.INFO, "Final página de mantenimiento de actos imputados (adm/mto_tamovext.jsp)");
|
||||
%>
|
||||
Reference in New Issue
Block a user