StatiAll.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:13k
源码类别:
电子政务应用
开发平台:
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.*" %>
- <%@ page import ="com.vnex.intranet.hr.employer_info.proxy.*"%>
- <%@ page import ="com.vnex.intranet.hr.employer_info.value.*"%>
- <%@ page import ="com.vnex.intranet.organization.proxy.*"%>
- <%@ page import ="com.vnex.intranet.organization.value.*"%>
- <%@ taglib uri="/vnex.tld" prefix="vnex" %>
- <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
- <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
- <%
- String starDate = request.getParameter("starDate");
- String endDate = request.getParameter("endDate");
- %>
- <!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.starDate.value == "" )
- {
- alert("请选择统计开始日期.");
- return false;
- }
- if(form1.endDate.value == "" )
- {
- alert("请选择统计结束日期.");
- return false;
- }
- form1.action="/mainctrl/hr/StatiAll?stati=1";
- 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="starDate" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(starDate);return false">
- 至 <input type="text" name="endDate" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDate);return false">
- </td>
- </tr>
- <tr bgcolor = "#e0e0e0">
- <td>
- <font class=strong> 选择部门:</font>
- </td>
- <td >
- <org:DivisionList>
- <select name="Dep">
- <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 colspan = 2 height="30" align="center">
- <input type="button" value="查找" name="Submit2" onClick =do_submit() class=text>
- <%
- if(request.getParameter("stati")!=null)
- {
- %>
- <input type="button" value="打印" name="do_print" onClick ="location='/mainctrl/hr/attStatistic/printPage?stati=1&starDate=<%=starDate%>&endDate=<%=endDate%>&Dep=<%=request.getParameter("Dep")%>'" class=text>
- <%
- }
- %>
- <input type="button" value="返回" name="to_hr_main" onClick ="location='/mainctrl/hr/main'" class=text>
- </td>
- </tr>
- <%
- if(request.getParameter("stati")!=null)
- {
- %>
- </table>
- <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
- <tr bgcolor="#e0e0e0">
- <td colspan = 7 align = "center">
- <%
- String divName = "";
- if(Integer.parseInt(request.getParameter("Dep")) != 0)
- {
- OrganizationProxyBean orgProxy = new OrganizationProxyBean();
- DivisionValueBean divValue = orgProxy.getDivision(Integer.parseInt(request.getParameter("Dep")));
- divName = divValue.getDivisionName();
- }
- else
- {
- divName = "全部部门";
- }
- %>
- <font class=strong><%=divName%>考勤统计表<br>
- <%=request.getParameter("starDate").substring(0,4)%>年<%=request.getParameter("starDate").substring(5,7)%>月<%=request.getParameter("starDate").substring(8,10)%>日--<%=request.getParameter("endDate").substring(0,4)%>年<%=request.getParameter("endDate").substring(5,7)%>月<%=request.getParameter("endDate").substring(8,10)%>日
- </td>
- </tr>
- <tr>
- <td align = "center">
- <font class=strong>姓名</font>
- </td>
- <td align = "center">
- <font class=strong>正常<br>(天数)</font>
- </td>
- <td align = "center">
- <font class=strong>迟到<br>(次数)</font>
- </td>
- <td align = "center">
- <font class=strong>早退<br>(次数)</font>
- </td>
- <td align = "center">
- <font class=strong>未登记上、下班<br>(次数)</font>
- </td>
- <td align = "center">
- <font class=strong>只登记了上班<br>(次数)</font>
- </td>
- <td align = "center">
- <font class=strong>只登记了下班<br>(次数)</font>
- </td>
- </tr>
- <%
- try{
- AttQueryProxy attProxy = new AttQueryProxy();
- MemberInfoProxyBean mProxy = new MemberInfoProxyBean();
- ArrayList empArray = (ArrayList) mProxy.infoFind(Integer.parseInt(request.getParameter("Dep")),"");
- Iterator iter = empArray.iterator();
- int bgColor = 0;
- int empId = 0;
- int start = 1;
- int rowPerPage =com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
- int size = empArray.size(); //总共有几行
- if ( request.getParameter("start") != null && request.getParameter("start").length() >0 )
- {
- start = Integer.parseInt( request.getParameter("start") );
- }
- String action = "/mainctrl/hr/StatiAll?stati=1&starDate="+starDate+"&endDate="+endDate+"&Dep="+request.getParameter("Dep"); //提交到本页jsp
- String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
- int i = 0;
- while( iter.hasNext() && i < ( start+rowPerPage-1))
- {
- i++;
- MemberSearchBean mBean = (MemberSearchBean) iter.next();
- if ( i < start ) continue;
- bgColor++;
- empId = mBean.getId();
- %>
- <tr bgcolor = <%=bgColor%2==1?"#e0e0e0":"#fafafa"%>>
- <td align = "center">
- <%=mBean.getName()%>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoramlStatiByPersonModel")%>
- <%
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到正常上班记录时出错.");
- }
- %>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%
- out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"LateStatiByPersonModel"));
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到迟到次数时出错.");
- }
- %>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%
- out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"EarlyStatiByPersonModel"));
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到早退次数时出错.");
- }
- %>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnNoneOffStatiByPersonModel")%>
- <%
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到既没有登记上班,又没有登记下班次数时出错.");
- }
- %>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"ExistOnNoneOffStaticByPersonModel")%>
- <%
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到登记了上班,但没有登记下班次数时出错.");
- }
- %>
- </td>
- <td align = "center">
- <%
- try
- {
- %>
- <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnExistOffStatiByPersonModel")%>
- <%
- }
- catch(Exception e)
- {
- System.out.println("nJSP exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("得到没有登记上班,但登记下班次数时出错.");
- }
- %>
- </td>
- </tr>
- <%
- }//end while
- %>
- <tr bgcolor="#e0e0e0">
- <td colspan="9" align="left"> <%=nav%></td>
- </tr>
- <%
- }
- catch(Exception e)
- {
- System.out.println("JSP Exception :"+e);
- e.printStackTrace();
- throw new RuntimeException("列表时出错.");
- }
- }//end if
- %>
- </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>