create_archive_process.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:2k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page import="java.util.GregorianCalendar" %>
- <%@ page import="java.util.Calendar" %>
- <%@ page import="com.vnex.intranet.pub.BaseJdbcDAO" %>
- <%@ page import="com.vnex.intranet.util.TimeStamp" %>
- <jsp:useBean id="ab" scope="request" class="com.vnex.intranet.archives.value.ArchiveValueBean" />
- <jsp:useBean id="archiveProxy" scope="application" class="com.vnex.intranet.archives.proxy.ArchiveProxyBean" />
- <jsp:setProperty name="ab" property="*" />
- <%
- if(request.getParameter("createDate") != null && !request.getParameter("createDate").equals(""))
- {
- String createDate = request.getParameter("createDate")+" 00:00:00";
- ab.setCreateDate(TimeStamp.convertTimestampToCalendar(TimeStamp.toTimestamp(createDate)));
- }
- Calendar cal = TimeStamp.convertTimestampToCalendar(BaseJdbcDAO.getDBSystemDate());
- int y = cal.get(Calendar.YEAR);
- int m = cal.get(Calendar.MONTH)+1;
- int d = cal.get(Calendar.DAY_OF_MONTH);
- String year = ""+y;
- String month = m>10? ""+m:"0"+m;
- String day = d>10? ""+d:"0"+d;
- int sequence = archiveProxy.getMaxSequence();
- if(sequence <= 0)
- sequence = 1;
- else
- ++sequence;
- String surffix = "";
- if(sequence < 10)
- surffix = "00"+sequence;
- else if(sequence >=10 && sequence <100)
- surffix = "0"+sequence;
- else
- surffix = ""+sequence;
- ab.setSequence(sequence);
- String displayId = "TD-"+year+month+day+"-"+surffix;
- ab.setArchiveDisplayId(displayId);
- int archiveId = archiveProxy.createArchive(ab);
- %>
- <html>
- <head>
- <script language=javascript>
- function forward()
- {
- document.location = "/mainctrl/archive/archiveDetail?archiveId=<%=archiveId%>";
- }
- </script>
- </head>
- <body onload="javascript:forward()">
- </body>
- <html>