⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 select.jsp

📁 一套完整的档案管理系统
💻 JSP
字号:
<%@ page language="java" import="com.stsc.archive.file.*" %>
<%@ page  import="com.stsc.util.STPoolDataSet" %>
<%@ page  import="java.io.*" %>
<%@ page  import="com.stsc.util.STResultSet" %>
<%@ page  import="java.util.*" %>
<%@ page  import="java.text.SimpleDateFormat" %>

<%@ page contentType="text/html;charset=GB2312" %>
<%@ include file="/share/func.jsp"%>
<%@ include file="/share/share.jsp"%>


<%
//定义数据链接
 STPoolDataSet stpooldataset = new STPoolDataSet();
 STResultSet rs=null;
 Properties properties = new Properties();
properties.setProperty("dsJndiName", Constants.DATABASE_KEY);

String volumnno="",serialno="",archivetype="",sql="",title="",flowno="",eno="",r1="";
int int_serialno=0;
String nowyear="",code="",categray="",filedate="";
java.text.SimpleDateFormat sdf2 = new java.text.SimpleDateFormat("yyyy");
//取得当前年份
nowyear=sdf2.format(new java.util.Date());

serialno=request.getParameter("serialno");
//out.println("serialno====================="+serialno);
r1=request.getParameter("R1");
//out.println("r1====================="+r1);
if(r1!=null && !r1.equals("") && !r1.equals("null")){
	if(serialno==null || serialno.equals("") || serialno.equals("null")){
		serialno=(String) session.getAttribute("serialno");
	}
		//out.println("serialno====================="+serialno);

	//根据序号取得档案种类,案卷号
	if(serialno!=null && !serialno.equals("") && !serialno.equals("null")){
		int_serialno=Integer.parseInt(serialno);
		sql=" select * from farchive where serialno="+int_serialno;
		rs=stpooldataset.getSTResult(sql,properties);
		if(rs!=null && rs.next()){
			//取出档案种类
			archivetype=rs.getString("archivetype");
			//取出工程代号
			code=rs.getString("code");
			//取出类目号
			categray=rs.getString("category");
			//取出成文日期
			filedate=String.valueOf(rs.getDate("filedate"));
			//取出案卷号
			//volumnno=rs.getString("volumnno");
		}
	}
	//if(volumnno!=null && !volumnno.equals("") && !volumnno.equals("null")){
	//	volumnno="="+volumnno;
	//}
	if(filedate!=null && !filedate.equals("") && !filedate.equals("null")){
		nowyear=filedate.substring(0,4);
	}
	//取出文件标题,为生成电子档号作准备
	title=request.getParameter("title");
	//out.println("title=================="+title);
	if(title!=null && !title.equals("") && !title.equals("null")){
		//int_serialno=substring;
		int m=title.indexOf("(");
		int n=title.indexOf(")");
		flowno=title.substring(m+1,n);
		sql=" select volumnno from farchive where flowno='"+flowno+"'";
		rs=stpooldataset.getSTResult(sql,properties);
		if(rs!=null && rs.next()){
			volumnno=rs.getString("volumnno");
		}
	}
		share temp_share=new share();
		//生成电子档号
		eno=temp_share.toEcno(archivetype,nowyear,code,r1,categray,volumnno);
		sql=" update farchive set archiveno='"+eno+"' where serialno="+int_serialno;
		if(stpooldataset.executeSQL(sql,properties)){%>
<script language="javascript">
	alert("电子档号生成成功!");
	window.close();
</script>	
		<%}
}
%>
</body>
<form method="POST" name="frm1" action="" class=bb >
<table border="1" cellpadding="0" cellspacing="0" align="center" width="777" bgcolor="#3A5C9F" >
<tr>
<input type="hidden" name="serialno" value="<%=serialno%>">
<input type="radio" value="V1" checked name="R1" onclick="changetype(0)">增加新卷:
</tr>
<tr>
<input type="radio" value="V2"  name="R1" onclick="changetype(1)">归入旧卷:
</tr>
<tr>
	选择需要归入的旧卷
	  <select name="title" disabled>
	<%= getBcOptions("","title",volumnno,"farchive","flowno")%>
	</select></tr>
</table>
<input type="submit" value="确定" >
 <input type="button" value="关闭" onClick="window.close();">
</form>
<script language="JavaScript">
<!--
			
    function changetype(type) {
		if (type==0) {
            document.frm1.title.disabled=true;
    	    }
		if (type==1) {
            document.frm1.title.disabled=false;
    	    }

    }
   
//-->
</script>



</SCRIPT>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -