📄 archivessearchinfo.jsp
字号:
<%--
模块名称:归档案卷管理
模块功能:档案列表显示
版 本:V1.0
著 作 人:谢永刚 SIMM(java)
著作日期:2001-10-24
该模块所需的文件:
使用说明:
主要技术说明:
参考文献:法律事务设计书
修改历史:= = = = = = = = = = = = = = = = = = = = = = = = = =
修改日期:
修 改 人:
修改理由:
修改出处:
= = = = = = = = = = = = = = = = = = = = = = = = = =
--%>
<%@ page language="java" import="java.util.Date,java.util.Locale,java.text.DateFormat"%>
<%@ page import="java.io.*,java.sql.*" contentType= "text/html; charset=gb2312" %>
<jsp:useBean id="db" class="dbconnection.DbConnection" scope="page" />
<%
String num = request.getParameter("pagenum");
int pagenum = 0, pagesize = 10, recordcount = 0, pagecount = 0;
if ((num == null) || (num.equals("")))
pagenum = 1;
else
pagenum = Integer.parseInt(num);
//获取参数
String archiveID = "",
caseReason = "",
caseID = "",
customerName = "",
lawyer = "",
caseType = "",
beginDate = "",
fromDate = "",
toDate = "",
archiveDate = "";
archiveID = request.getParameter("txtArchiveID");
archiveID= new String(archiveID.getBytes("ISO8859_1"));
customerName = request.getParameter("txtCustomer");
customerName = new String(customerName.getBytes("ISO8859_1"));
lawyer = request.getParameter("txtLawyer");
fromDate = request.getParameter("txtFromDate");
toDate = request.getParameter("txtToDate");
caseType = request.getParameter("txtCaseType");
caseReason = request.getParameter("txtCaseReason");
caseReason = new String(caseReason.getBytes("ISO8859_1"));
String condition = "";
if ((archiveID != null) && (!archiveID.equals(""))) {
condition = condition + " and archive_id='" + archiveID + "'";
}
if ((customerName != null) && (!customerName.equals(""))) {
condition = condition + " and customer_name like '%" + customerName + "%'";
}
if ((lawyer != null) && (!lawyer.equals(""))) {
condition = condition + " and employee_id='" + lawyer + "'";
}
if ((caseType != null) && (!caseType.equals(""))) {
condition = condition + " and case_type='" + caseType + "'";
}
if ((caseReason != null) && (!caseReason.equals(""))) {
condition = condition + " and case_reason like '%" + caseReason + "%'";
}
if((fromDate!=null) && (!fromDate.equals("")))
condition = condition + " and begin_date >= '" + fromDate + "'";
if((toDate!=null) && (!toDate.equals("")))
condition = condition + " and begin_date <= '" + toDate + "'";
String sql = "select case_id, archive_id,case_reason, archive_date " +
"from t_caseinfo " +
" where CASE_STATE = 'gdzt' "; //gdzt ---- 归档状态
sql = sql + condition + " order by archive_date DESC";
ResultSet rs = db.executeQuery(sql);
//分页处理
if (rs != null) {
rs.last();
recordcount = rs.getRow();
if (recordcount == recordcount/pagesize*pagesize)
pagecount = recordcount/pagesize;
else
pagecount = recordcount/pagesize + 1;
if (pagenum < 1)
pagenum = 1;
if (pagenum > pagecount)
pagenum = pagecount;
rs.absolute((pagenum-1)*pagesize+1);
}
%>
<html>
<head>
<title>归档案卷管理</title>
<%@ include file="../inc/config.jsp" %>
</head>
<body class=page>
<!--显示工具条-->
<table width="98%" align="center" cellspacing="0" cellpadding="0" border="0">
<tr>
<td><a href="Archives.jsp"><img src="../images/all.gif" height="22" border="0" alt="显示所有内容"></a><a href="ArchivesSearch.jsp"><img src="../images/query.gif" alt="查询内容" width="79" height="22" border="0"></a><a href="ArchivesRemove.jsp"><img src="../images/trim.gif" width="79" height="22" border="0"></a></td>
<td align="center" width="108" background="../images/title_bg.gif" height="30">
<SCRIPT language=JavaScript>
document.write("<span class=\"title\">"+document.title+"</span>");
</SCRIPT>
</td>
</tr>
</table>
<table width="98%" background="../images/line.gif" border="0" cellspacing="0" cellpadding="0" height="12" align="center">
<tr>
<td> </td>
</tr>
</table>
<!--显示工具条结束-->
<!--显示分页-->
<%@ include file="../inc/page1.jsp" %>
<!--显示分页结束-->
<!--显示内容-->
<table width="98%" cellspacing="1" cellpadding="5" height="25" align="center" border="0" class="table_bg">
<tr class="title_bg">
<td width="12%" align="center"> 案件编码</td>
<td width="12%" align="center"> 档案编号</td>
<td width="46%" align="center">
<p>案由</p>
</td>
<td width="15%" align="center"> 归档时间</td>
</tr>
<%
for (int i=1;(i<=pagesize)&&(pagecount > 0);i++)
{
caseID = rs.getString("case_id");
archiveID = rs.getString("archive_id");
if(archiveID == null) archiveID = "";
caseReason = rs.getString("case_reason");
archiveDate = rs.getString("archive_date");
if(archiveDate == null) archiveDate = ""; //判断空值,不显示为NULL
else archiveDate = archiveDate.substring(0,10); //时间格式转换
if(i%2 == 0)
{
%>
<tr class="tr_bg1">
<%
}
else
{
%>
<tr class="tr_bg2">
<%
}
%>
<td width="12%" align="right"><%=caseID%></td>
<td width="12%" align="right"><%=archiveID%></td>
<td width="46%" align="right"><a href="ArchivesInfo.jsp?caseID=<%=caseID%>"><%=caseReason%></a></td>
<td width="15%" align="center"><%=archiveDate%></td>
</tr>
<%
if(!rs.next())
break;
}
%>
</table>
<!--显示内容结束-->
<!--显示分页-->
<!--显示分页结束-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -