detailRecordsByPerson.jsp
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:7k
源码类别:

电子政务应用

开发平台:

Java

  1. <%@ page errorPage="/vnex/ErrorPage.jsp" %>
  2. <%@ page import="com.vnex.intranet.attendance.statistic.value.*"%>
  3. <%@ page import="com.vnex.intranet.attendance.statistic.proxy.*"%>
  4. <%@ page import="com.vnex.intranet.util.*"%>
  5. <%@ page import="java.util.*" %>
  6. <%@ page import ="java.sql.*" %>
  7. <%
  8. System.out.println("here");
  9. String starDate = request.getParameter("startDate");
  10. String endDate = request.getParameter("endDate");
  11. int empId = new Integer(request.getParameter("empId")).intValue();
  12. String model = request.getParameter("model");
  13. Iterator iter = null;
  14. ArrayList  arrayResult =null;
  15. if(request.getParameter("model") != null)
  16. {
  17. AttQueryProxy attProxy = new AttQueryProxy();
  18. try
  19. {
  20. arrayResult =(ArrayList) attProxy.getAttQueryResultByPersonProxy(starDate,endDate,empId,model);
  21. iter = arrayResult.iterator();
  22. }
  23. catch(Exception e)
  24. {
  25. System.out.println("JSP exception :"+e);
  26. throw new RuntimeException("查询出错.");
  27. }
  28. }
  29.  
  30. %>
  31. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  32. <HTML>
  33. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  34. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" onload = alert("abc")>
  35. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  36. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  37. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  38. <script language="JavaScript" src="/vnex/validate.js"></script>
  39. <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
  40. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  41. <DIV align=center>
  42. <form name="form1" method=POST >
  43.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0 >
  44.     <tbody>
  45.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  46.     <TR> 
  47.         <TD colSpan=3 align="center"> 
  48.           <br>
  49.           <!--休假事件表开始 -->
  50.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  51.              <tr bgcolor="#666666"> 
  52.                     <td colspan="3"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>&gt;&gt;查看考勤统计详细记录</font></td>
  53.              </tr>
  54.             <tr>
  55.               <td> 
  56.          
  57.            <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
  58.               <tr>
  59.               <td>
  60.                 <font class=strong> 姓名</font>
  61.               </td>
  62.               <td>
  63.                <font class=strong> 日期</font>
  64.               </td>
  65.               <td>
  66.                  <font class=strong>上班时间</font>
  67.               </td>
  68.               <td>
  69.                <font class=strong>  迟到时间(分钟)</font>
  70.               </td>
  71.               <td>
  72.                 <font class=strong> 上班时的备注 </font>
  73.               </td>
  74.               <td>
  75.                  <font class=strong>下班时间 </font>
  76.               </td>
  77.               <td>
  78.                  <font class=strong>早退时间(分钟)</font>
  79.               </td>
  80.               <td>
  81.                  <font class=strong>下班时的备注 </font>
  82.               </td>
  83.               <td weight = 100>
  84.                  <font class=strong>状态 </font>
  85.               </td>
  86.               </tr>
  87.               <%
  88.               int start = 1;
  89.               int bgColor = 0;
  90.               int rowPerPage =com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
  91.            int size = arrayResult.size(); //总共有几行
  92.            if ( request.getParameter("start") != null && request.getParameter("start").length() >0  )
  93.            {
  94.              start = Integer.parseInt( request.getParameter("start") );
  95.            }
  96.              String action = "/mainctrl/hr/detailRecords?model="+model+"&startDate="+starDate+"&empId="+empId+"&endDate="+endDate; //提交到本页jsp
  97.            String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
  98.            int i = 0;
  99.             
  100.             try
  101.             {
  102.               while(iter.hasNext()   && i < ( start+rowPerPage-1))
  103.               {
  104.                 i++; 
  105.                 AttViewValueBean attView = (AttViewValueBean) iter.next();
  106.                 if ( i < start ) continue; 
  107.                  
  108.                 bgColor++;
  109.               
  110.                 
  111.               %>
  112.               <tr bgcolor = <%=bgColor%2==1?"#e0e0e0":"#fafafa"%>>
  113.                <td>
  114.                <%=attView.getName()%>
  115.                </td>
  116.                <td>
  117.                <%=((String) attView.getDate().toString()).substring(0,10)%>
  118.                </td>
  119.                <td>
  120.                <%=attView.getOnDutyTime()%>
  121.                </td>
  122.                <td>
  123.                <%=attView.getLateCount()%>
  124.                </td>
  125.                <td>
  126.                <%=attView.getOnDutyNote()%>
  127.                </td>
  128.                <td>
  129.                <%=attView.getOffDutyTime()%>
  130.                </td>
  131.                <td>
  132.                <%=attView.getEarlyLeaveCount()%>
  133.                </td>
  134.                <td>
  135.                <%=attView.getOffDutyNote()%>
  136.                </td>
  137.                <td>
  138.                <%
  139.                    if(attView.getStatus() != null)
  140.                    {
  141.                ArrayList colStatus = (ArrayList) attView.getStatus();
  142.                Iterator iterStatus = colStatus.iterator();
  143.                while(iterStatus.hasNext())
  144.                {
  145.                out.println((String) iterStatus.next() +"<br>");
  146.                }
  147.                    }
  148.                %>
  149.                </td>
  150.               </tr>
  151.               <%
  152.               
  153.                }//end while
  154.          %>
  155.           <tr bgcolor="#e0e0e0"> 
  156.                     <td colspan="9" align="left">&nbsp;&nbsp;<%= nav %></td>
  157.                   </tr>
  158.          <%      
  159.          }
  160.          catch(Exception e)
  161.          {
  162.           System.out.println("nJSP exception :"+e);
  163.           e.printStackTrace();
  164.           throw new RuntimeException("列表时出错.");
  165.          }
  166.          %>     
  167.          <tr bgcolor="#fafafa">
  168.          <td colspan = 9 align="center">
  169.           <input  type="button" value="返回" name="Submit2" onClick =history.back() class=text>
  170.          </td>
  171.          </tr>
  172.               </table>
  173.              </td>
  174.             </tr>
  175.           </table>  
  176.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  177.         </TD>
  178.     </TR>
  179.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  180.     </TBODY> 
  181.     </TABLE>
  182.   <BR>
  183.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  184.   </form></DIV>
  185. </BODY></HTML>