QueryByDate.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:9k
源码类别:
电子政务应用
开发平台:
Java
- <%@ page errorPage="/vnex/ErrorPage.jsp" %>
- <%@ page import="com.vnex.intranet.attendance.statistic.value.*"%>
- <%@ page import="com.vnex.intranet.attendance.statistic.proxy.*"%>
- <%@ page import="com.vnex.intranet.util.*"%>
- <%@ page import="java.util.*" %>
- <%@ page import ="java.sql.*" %>
- <%
- Iterator iter = null;
- ArrayList arrayResult =null;
- String model ="";
- String selectedDate = null;
- String selectedDep = null;
- if(request.getParameter("model") != null)
- {
- model = request.getParameter("model");
- selectedDate = request.getParameter("sDate");
- selectedDep = request.getParameter("sDep");
- AttQueryProxy attProxy = new AttQueryProxy();
- try
- {
- arrayResult =(ArrayList) attProxy.getAttQueryResultByDateProxy(selectedDate,(new Integer(selectedDep)).intValue(),model);
- iter = arrayResult.iterator();
- }
- catch(Exception e)
- {
- System.out.println("JSP exception :"+e);
- throw new RuntimeException("查询出错.");
- }
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" onload = alert("abc")>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <script language = "JavaScript">
- function do_submit()
- {
- if(form1.sDate.value == "" )
- {
- alert("请选择查询日期.");
- return false;
- }
- form1.action="/mainctrl/hr/attQueryByDateResult?model="+form1.model.value;
- form1.submit();
- }
- </script>
- <DIV align=center>
- <form name="form1" method=POST >
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0 >
- <tbody>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <br>
- <!--休假事件表开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr bgcolor="#666666">
- <td colspan="3"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>>>按日期查看考勤情况</font></td>
- </tr>
- <tr>
- <td>
- <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
- <tr bgcolor="#fafafa">
- <td > <font class=strong>选择查询日期:</font></td><td>
- <input type="text" name="sDate" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(sDate);return false">
- </td>
- </tr>
- <tr bgcolor = "#e0e0e0">
- <td > <font class=strong>选择部门:</font>
- </td>
- <td>
- <org:DivisionList>
- <select name="sDep">
- <option value='0'>全部部门</option>
- <vnex:items >
- <option value="<org:DivisionAttribute attribute="id"/>" >
- <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
- </option>
- </vnex:items>
- </select>
- </org:DivisionList>
- </td>
- </tr>
- <tr bgcolor = "#fafafa">
- <td>
- <font class=strong>选择查看方式:</font></td><td>
- <select name = "model">
- <option value = "AllByDateModel">该日的所有记录</option>
- <option value = "NoneOnNoneOffByDateModel">该日上班下班都没有登记的记录</option>
- <option value = "ExistOnNoneOffByDateModel">该日登记了上班却没有登记下班的记录</option>
- <option value = "NoneOnExistOffByDateModel">该日没有登记上班却没有登记下班的记录</option>
- <option value = "LateByDateModel">该日迟到的记录</option>
- <option value = "EarlyLeaveByDateModel">该日早退的记录</option>
- <option value = "NormalByDateModel">该日正常的记录</option>
- </select>
- </td>
- </tr>
- <tr bgcolor = "#e0e0e0">
- <td colspan = 2 height="30" align="center">
- <input type="button" value="查找" name="Submit2" onClick =do_submit() class=text>
- </td>
- </tr>
- <%
- try
- {
- if(request.getParameter("model")!= null)
- {
- %>
- </table>
- <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
- <tr>
- <td>
- <font class=strong> 姓名</font>
- </td>
- <td>
- <font class=strong> 日期</font>
- </td>
- <td>
- <font class=strong>上班时间</font>
- </td>
- <td>
- <font class=strong> 迟到时间(分钟)</font>
- </td>
- <td>
- <font class=strong> 上班时的备注 </font>
- </td>
- <td>
- <font class=strong>下班时间 </font>
- </td>
- <td>
- <font class=strong>早退时间(分钟)</font>
- </td>
- <td>
- <font class=strong>下班时的备注 </font>
- </td>
- <td weight = 100>
- <font class=strong>状态 </font>
- </td>
- </tr>
- <%
- int start = 1;
- int bgColor = 0;
- int rowPerPage =com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
- int size = arrayResult.size(); //总共有几行
- if ( request.getParameter("start") != null && request.getParameter("start").length() >0 )
- {
- start = Integer.parseInt( request.getParameter("start") );
- }
- String action = "/mainctrl/hr/attQueryByDateResult?model="+model+"&sDate="+selectedDate+"&sDep="+selectedDep; //提交到本页jsp
- String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
- int i = 0;
- while(iter.hasNext() && i < ( start+rowPerPage-1))
- {
- i++;
- AttViewValueBean attView = (AttViewValueBean) iter.next();
- if ( i < start ) continue;
- bgColor++;
- %>
- <tr bgcolor = <%=bgColor%2==1?"#e0e0e0":"#fafafa"%>>
- <td>
- <%=attView.getName()%>
- </td>
- <td>
- <%=((String) attView.getDate().toString()).substring(0,10)%>
- </td>
- <td>
- <%=attView.getOnDutyTime()%>
- </td>
- <td>
- <%=attView.getLateCount()%>
- </td>
- <td>
- <%=attView.getOnDutyNote()%>
- </td>
- <td>
- <%=attView.getOffDutyTime()%>
- </td>
- <td>
- <%=attView.getEarlyLeaveCount()%>
- </td>
- <td>
- <%=attView.getOffDutyNote()%>
- </td>
- <td>
- <%
- if(attView.getStatus() != null)
- {
- ArrayList colStatus = (ArrayList) attView.getStatus();
- Iterator iterStatus = colStatus.iterator();
- while(iterStatus.hasNext())
- {
- out.println((String) iterStatus.next() +"<br>");
- }
- }
- %>
- </td>
- </tr>
- <%
- }//end while
- %>
- <tr bgcolor="#e0e0e0">
- <td colspan="9" align="left"> <%= nav %></td>
- </tr>
- <%
- }//end if
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("列表时出错.");
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>