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

电子政务应用

开发平台:

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. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  8. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  9. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  10. <%
  11. String starDate = "";
  12. String endDate = "";
  13. int empId = 0;
  14. if(request.getParameter("stati") != null)
  15. {
  16. starDate = request.getParameter("starDate");
  17. endDate = request.getParameter("endDate");
  18. empId = new Integer(request.getParameter("empId")).intValue();
  19. }
  20. AttQueryProxy attProxy = new AttQueryProxy();
  21. %>
  22. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  23. <HTML>
  24. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  25. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" onload = alert("abc")>
  26. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  27. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  28. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  29. <script language="JavaScript" src="/vnex/validate.js"></script>
  30. <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
  31. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  32. <script language = "JavaScript">
  33. function do_submit()
  34.    if(form1.starDate.value == "" )   
  35.    {
  36.     alert("请选择统计开始日期.");
  37.     return false;
  38.    }
  39.    if(form1.endDate.value == "" )   
  40.    {
  41.     alert("请选择统计结束日期.");
  42.     return false;
  43.    }
  44.    if(form1.empId.value == 0)
  45.    {
  46.     alert("请选择员工.");
  47.     form1.empId.focus();
  48.     return false;
  49.    }
  50.    form1.action="/mainctrl/hr/attQueryByPersonResult?stati=1";
  51.    form1.submit();
  52. }
  53. function viewDetail(model)
  54. {
  55. form1.action = "/mainctrl/hr/detailRecords?model="+model+"&startDate="+form1.starDate.value+"&endDate="+form1.endDate.value+"&empId="+form1.empId.value;
  56. form1.submit();
  57. }
  58. </script>
  59. <DIV align=center>
  60. <form name="form1" method=POST >
  61.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0 >
  62.     <tbody>
  63.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  64.     <TR> 
  65.         <TD colSpan=3 align="center">
  66.           <br>
  67.           <!--休假事件表开始 -->
  68.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  69.              <tr bgcolor="#666666"> 
  70.                     <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>
  71.              </tr>
  72.             <tr>
  73.               <td> 
  74.               <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
  75.               <tr bgcolor="#fafafa">
  76.              <td >&nbsp;<font class=strong>&nbsp;选择统计起止日期:</font></td><td>
  77.                       <input type="text" name="starDate" readonly class=text size="20" value="">
  78.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(starDate);return false"> 
  79.                       &nbsp;至&nbsp;<input type="text" name="endDate" readonly class=text size="20" value="">
  80.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDate);return false"> 
  81.                     </td>
  82.                     
  83.              </tr>      
  84.              <tr bgcolor = "#e0e0e0">
  85.              <td >&nbsp;<font class=strong>选择员工:</font>
  86.              </td>
  87.              <td>
  88.                <select name="empId" size="1">
  89.                        <option value="0">-请选择-</option>
  90.                        <hr:EmployeeList divisionId='0'>
  91.                         <vnex:items> 
  92.                         <option value="<hr:EmployeeAttribute attribute="id" />" 
  93.                         <hr:EmployeeAttribute attribute="isSelected"/> > <hr:EmployeeAttribute attribute='<%= null %>' /> 
  94.                         </option>
  95.                         </vnex:items>
  96.                        </hr:EmployeeList>
  97.                      </select>
  98.              </td>
  99.              </tr>
  100.               <tr bgcolor = "#e0e0e0">
  101.               <td  height="30" align="center">
  102.                <input  type="button" value="查看统计结果" name="Submit2" onClick =do_submit() class=text style="width:80px">
  103.               </td>
  104.               <td  height="30" align="center">
  105.                <input  type="button" value="查看该段时间内该员工的所有记录" name="Submit2"   style="width:190px" onClick ="viewDetail('AllByPersonModel')" class=text>
  106.               </td>
  107.               </tr>
  108. <%
  109. if(request.getParameter("stati") != null)
  110. {
  111. %>      
  112.            </table>
  113.            <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
  114.              <tr>
  115.                  <td >
  116.                   <font class=strong>&nbsp;项目</font>
  117.                  </td>
  118.                  <td>
  119.                   <font class=strong>&nbsp;次数</font>
  120.                  </td>
  121.                  <td  align = "center">
  122.                   <font class=strong>&nbsp;查看详细记录</font>
  123.                  </td>
  124.              </tr>
  125.              <tr bgcolor="#e0e0e0">
  126.                  <td>
  127.                  &nbsp;<font class=strong>既没有登记上班,又没有登记下班</font>
  128.                  </td>
  129.                  <td align = "center">
  130.                   <%
  131.                   try
  132.                   {
  133.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnNoneOffStatiByPersonModel"));
  134.                   }
  135.                   catch(Exception e)
  136.                   {
  137.                   System.out.println("nJSP exception :"+e);
  138.           e.printStackTrace();
  139.           throw new RuntimeException("得到既没有登记上班,又没有登记下班次数时出错.");
  140.                   }
  141.                   %>
  142.                  
  143.                  </td>
  144.                  <td  align = "center">
  145.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("NoneOnNoneOffByPersonModel") class=text>
  146.                  </td>
  147.              </tr>            
  148.              <tr bgcolor="#fafafa">
  149.                  <td>
  150.                  &nbsp;<font class=strong>登记了上班,但没有登记下班</font>
  151.                  </td>
  152.                  <td align = "center">
  153.                  <%
  154.                      try
  155.                   {
  156.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"ExistOnNoneOffStaticByPersonModel"));
  157.                   }
  158.                   catch(Exception e)
  159.                   {
  160.                   System.out.println("nJSP exception :"+e);
  161.           e.printStackTrace();
  162.           throw new RuntimeException("得到登记了上班,但没有登记下班次数时出错.");
  163.                   }
  164.                   %>
  165.                  </td>
  166.                  <td align = "center">
  167.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("ExistOnNoneOffByPersonModel") class=text>
  168.                  </td>
  169.              </tr>
  170.              <tr bgcolor="#e0e0e0">
  171.                  <td>
  172.                  &nbsp;<font class=strong>没有登记上班,但登记下班</font>
  173.                  </td>
  174.                  <td align = "center">
  175.                    <%
  176.                      try
  177.                   {
  178.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnExistOffStatiByPersonModel"));
  179.                   }
  180.                   catch(Exception e)
  181.                   {
  182.                   System.out.println("nJSP exception :"+e);
  183.           e.printStackTrace();
  184.           throw new RuntimeException("得到没有登记上班,但登记下班次数时出错.");
  185.                   }
  186.                   %>
  187.                  </td>
  188.                  <td align = "center">
  189.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("NoneOnExistOffByPersonModel") class=text>
  190.                  </td>
  191.              </tr>
  192.              <tr bgcolor="#fafafa">
  193.                  <td>
  194.                 &nbsp;<font class=strong>迟到</font>
  195.                  </td>
  196.                   <td align = "center">
  197.                    <%
  198.                      try
  199.                   {
  200.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"LateStatiByPersonModel"));
  201.                   %>
  202.                   &nbsp;次&nbsp;合计
  203.                   <%
  204.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"LateMinutesStatiByPersonModel"));
  205.                   %>
  206.                   分钟
  207.                   <%
  208.                   }
  209.                   catch(Exception e)
  210.                   {
  211.                   System.out.println("nJSP exception :"+e);
  212.           e.printStackTrace();
  213.           throw new RuntimeException("得到迟到次数时出错.");
  214.                   }
  215.                   %>
  216.                  </td>
  217.                  <td align = "center">
  218.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("LateByPersonModel") class=text>
  219.                  </td>
  220.              </tr>
  221.              <tr bgcolor="#e0e0e0">
  222.                  <td>
  223.                  &nbsp;<font class=strong>早退</font>
  224.                  </td>
  225.                  <td align = "center">
  226.                    <%
  227.                      try
  228.                   {
  229.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"EarlyStatiByPersonModel"));
  230.                   %>
  231.                   &nbsp;次&nbsp;合计
  232.                   <%
  233.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"EarlyLeaveMinutesStatiByPersonModel"));
  234.                   %>
  235.                   分钟
  236.                   <%
  237.                  
  238.                   }
  239.                   catch(Exception e)
  240.                   {
  241.                   System.out.println("nJSP exception :"+e);
  242.           e.printStackTrace();
  243.           throw new RuntimeException("得到早退次数时出错.");
  244.                   }
  245.                   %>
  246.                  </td>
  247.                  <td align = "center">
  248.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("EarlyLeaveByPersonModel") class=text>
  249.                  </td>
  250.              </tr>
  251.              <tr bgcolor="#fafafa">
  252.                  <td>
  253.                  &nbsp;<font class=strong>正常上班记录</font>
  254.                  </td>
  255.                     <td align = "center">
  256.                    <%
  257.                      try
  258.                   {
  259.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoramlStatiByPersonModel"));
  260.                   }
  261.                   catch(Exception e)
  262.                   {
  263.                   System.out.println("nJSP exception :"+e);
  264.           e.printStackTrace();
  265.           throw new RuntimeException("得到正常上班记录时出错.");
  266.                   }
  267.                   %>
  268.                  </td>
  269.                  <td align = "center">
  270.                  <input  type="button" value="查找" name="Submit2" onClick =viewDetail("NormalByPersonModel") class=text>
  271.                  </td>
  272.              </tr>
  273.              <%
  274.              }
  275.              %>
  276.             
  277.               </table>
  278.              </td>
  279.             </tr>
  280.           </table>  
  281.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  282.         </TD>
  283.     </TR>
  284.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  285.     </TBODY> 
  286.     </TABLE>
  287.   <BR>
  288.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  289.   </form></DIV>
  290. </BODY></HTML>