añado jsp

This commit is contained in:
2025-06-09 13:55:08 +02:00
parent ce54d7a756
commit e1227c3b2a
118 changed files with 44926 additions and 0 deletions
+140
View File
@@ -0,0 +1,140 @@
<%@ page import="com.tarisan.control.*" %>
<%@ page import="com.tarisan.data.*" %>
<%@ page import="com.tarisan.excepcion.*" %>
<%@ page import="java.util.Vector" %>
<%@ page import="com.tarisan.log.*" %>
<%@ page import="com.tarisan.util.Utilidades" %>
<%@ page import="com.tarisan.persistencia.PersistenciaParametros" %>
<%@ page import="java.text.SimpleDateFormat" %>
<%
LogTarisan.logger.log(NivelLog.INFO, "Inicio p&aacute;gina de impresion de pacientes (imp/impDetallePacientes.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&oacute;n invalidada");
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion_sesion.html';
//-->
</script>
<%
}
else
{
try
{
// Definicion de variables
SimpleDateFormat sdfFormateadorFecha=new SimpleDateFormat(PersistenciaParametros.formatoFechas);
String strFecha = (String)request.getParameter("fecha");
String[] arrFecha = strFecha.split("-");
java.sql.Date dtFecha = new java.sql.Date(java.sql.Date.valueOf(arrFecha[2] + "-" + arrFecha[1] + "-" + arrFecha[0]).getTime());
double dblImporteTotal=0;
%>
<html>
<head>
<title>Impresi&oacute;n Detalle Pacientes</title>
<link rel="STYLESHEET" type="text/css" href="<%=request.getContextPath()%>/css/estilos.css">
<script language="JavaScript" src="<%=request.getContextPath()%>/js/imprimir.js"></script>
</head>
<body>
<table width="100%" border="0" cellpadding="5">
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<tr>
<td class="txtImpresion" colspan="3" align="left">--- RELAci&oacute;n ACTOS M&eacute;dicoS REALIZADOS ---</td>
</tr>
<tr>
<td colspan="3">
<table border="0">
<tr>
<td class="txtImpresion">FECHA:</td>
<td class="txtImpresion"><%=strFecha%></td>
<td class="txtImpresion">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class="txtImpresion"><%=((Usuario)sesion.getAttribute("USUARIO")).getNombreCab()%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<tr>
<td class="txtImpresion" align="left">Nombre Paciente</td>
<td class="txtImpresion" align="left">Acto realizado</td>
<td class="txtImpresion" align="right">Importe</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3"><hr width="100%"></hr></td>
</tr>
<%
PersistenciaVTamovextTaclient per = new PersistenciaVTamovextTaclient();
Integer medico = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getMedico() );
Integer especialidad = Integer.valueOf( ((Usuario)sesion.getAttribute("USUARIO")).getEspecialidad() );
Vector vSeleccion = per.detalle_pacientes(medico, especialidad, dtFecha);
VTamovextTaclient vTamovextTaclient = null;
for(int i = 0; i < vSeleccion.size(); i++)
{
vTamovextTaclient = (VTamovextTaclient)vSeleccion.elementAt(i);
dblImporteTotal+=vTamovextTaclient.getPrecioActoMedico();
%>
<tr>
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getNombre() + " " + vTamovextTaclient.getApellidos()%></td>
<td class="txtImpresion" align="left"><%=vTamovextTaclient.getDescripcionActoMedico()%></td>
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(vTamovextTaclient.getPrecioActoMedico(),PersistenciaParametros.decimales)%></td>
</tr>
<%
}
%>
<tr>
<td class="txtImpresion" colspan="3">&nbsp;</td>
</tr>
<tr>
<td class="txtImpresion" colspan="3">&nbsp;</td>
</tr>
<tr>
<td class="txtImpresion"></td>
<td class="txtImpresion" align="left">Importe ....</td>
<td class="txtImpresion" align="right"><%=Utilidades.formatearDouble(dblImporteTotal,PersistenciaParametros.decimales)%></td>
</tr>
</table>
<script language="JavaScript" type="text/javascript">
<!--
imprimirHTML();
//-->
</script>
</body>
</html>
<%
}
catch(Exception ex)
{
LogTarisan.logger.log(NivelLog.ERROR, "Exception: " + ex);
%>
<script language="JavaScript" type="text/javascript">
<!--
top.contenidoPrincipal.location.href = '<%=request.getContextPath()%>/html/imp/error_impresion.html';
//-->
</script>
<%
}
}
LogTarisan.logger.log(NivelLog.INFO, "Final p&aacute;gina impresion de pacientes (imp/impDetallePacientes.jsp)");
%>