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

电子政务应用

开发平台:

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. <%@ page import ="com.vnex.intranet.hr.employer_info.proxy.*"%>
  8. <%@ page import ="com.vnex.intranet.hr.employer_info.value.*"%>
  9. <%@ page import ="com.vnex.intranet.organization.proxy.*"%>
  10. <%@ page import ="com.vnex.intranet.organization.value.*"%>
  11. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  12. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  13. <%@ taglib uri="/vnex_hr.tld" prefix="hr" %>
  14. <%
  15. String starDate = request.getParameter("starDate");
  16. String endDate = request.getParameter("endDate");
  17. %>
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  19. <HTML>
  20. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  21. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" onload = alert("abc")>
  22. <%@ taglib uri="/vnex.tld" prefix="vnex" %>
  23. <%@ taglib uri="/vnex_organization.tld" prefix="org" %>
  24. <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
  25. <script language="JavaScript" src="/vnex/validate.js"></script>
  26. <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
  27. <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
  28. <script language = "JavaScript">
  29. function do_submit()
  30.    if(form1.starDate.value == "" )   
  31.    {
  32.     alert("请选择统计开始日期.");
  33.     return false;
  34.    }
  35.    if(form1.endDate.value == "" )   
  36.    {
  37.     alert("请选择统计结束日期.");
  38.     return false;
  39.    }
  40.    form1.action="/mainctrl/hr/StatiAll?stati=1";
  41.    form1.submit();
  42. }
  43. </script>
  44. <DIV align=center>
  45. <form name="form1" method=POST >
  46.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0 >
  47.     <tbody>
  48.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  49.     <TR> 
  50.         <TD colSpan=3 align="center"> 
  51.           <br>
  52.           <!--休假事件表开始 -->
  53.            <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  54.              <tr bgcolor="#666666"> 
  55.                     <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>
  56.              </tr>
  57.             <tr>
  58.               <td> 
  59.               <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
  60.               <tr bgcolor="#fafafa">
  61.              <td >&nbsp;<font class=strong>&nbsp;选择统计起止日期:</font></td><td>
  62.                       <input type="text" name="starDate" readonly class=text size="20" value="">
  63.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(starDate);return false"> 
  64.                       &nbsp;至&nbsp;<input type="text" name="endDate" readonly class=text size="20" value="">
  65.                       &nbsp;<img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(endDate);return false"> 
  66.                     </td>
  67.                     
  68.              </tr>     
  69.              <tr bgcolor = "#e0e0e0">
  70.               <td>
  71.               &nbsp;<font class=strong>&nbsp;选择部门:</font>
  72.               </td>
  73.               <td >
  74.               <org:DivisionList>
  75. <select name="Dep">
  76. <option value='0'>全部部门</option>
  77. <vnex:items >
  78. <option value="<org:DivisionAttribute attribute="id"/>" >
  79. <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/>
  80. </option>
  81. </vnex:items>
  82. </select>
  83. </org:DivisionList>
  84.               </td>
  85.              </tr> 
  86.               <tr bgcolor = "#fafafa">
  87.               <td colspan = 2 height="30" align="center">
  88.                <input  type="button" value="查找" name="Submit2" onClick =do_submit() class=text>
  89.                <%
  90.                if(request.getParameter("stati")!=null)
  91.                {
  92.                %>
  93.                &nbsp;&nbsp;&nbsp;<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>
  94.                <%
  95.                }
  96.                %>
  97.                &nbsp;&nbsp;&nbsp;<input  type="button" value="返回" name="to_hr_main" onClick ="location='/mainctrl/hr/main'" class=text>
  98.               </td>
  99.               </tr>
  100.      <%
  101.       if(request.getParameter("stati")!=null)
  102.       {
  103.      %>
  104.            </table>
  105.            <table class=title cellspacing=1 cellpadding=2 border=0 width="600">
  106.             <tr bgcolor="#e0e0e0">
  107.             <td colspan = 7 align = "center">
  108.             <%
  109. String divName = "";
  110. if(Integer.parseInt(request.getParameter("Dep")) != 0)
  111. {
  112.             OrganizationProxyBean orgProxy = new OrganizationProxyBean();
  113.             DivisionValueBean divValue = orgProxy.getDivision(Integer.parseInt(request.getParameter("Dep")));
  114.             divName = divValue.getDivisionName();
  115.             }
  116.             else
  117.             {
  118.             divName  = "全部部门";
  119.             }
  120.            
  121.              
  122.             %>
  123.            
  124.             <font class=strong><%=divName%>考勤统计表<br>
  125.             <%=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)%>日
  126.             </td>
  127.             </tr>
  128.              <tr>
  129.                  <td align = "center">
  130.                   <font class=strong>姓名</font>
  131.                  </td>
  132.                  <td  align = "center">
  133.                   <font class=strong>正常<br>(天数)</font>
  134.                  </td>
  135.                  <td  align = "center">
  136.                   <font class=strong>迟到<br>(次数)</font>
  137.                  </td>
  138.                  <td  align = "center">
  139.                   <font class=strong>早退<br>(次数)</font>
  140.                  </td>
  141.                  <td align = "center">
  142.                   <font class=strong>未登记上、下班<br>(次数)</font>
  143.                  </td>
  144.                  <td  align = "center">
  145.                   <font class=strong>只登记了上班<br>(次数)</font>
  146.                  </td>
  147.                  <td  align = "center">
  148.                   <font class=strong>只登记了下班<br>(次数)</font>
  149.                  </td>
  150.              </tr>
  151.              <%
  152.              try{
  153.              AttQueryProxy attProxy = new AttQueryProxy();
  154.              MemberInfoProxyBean mProxy = new MemberInfoProxyBean();
  155.              ArrayList empArray = (ArrayList) mProxy.infoFind(Integer.parseInt(request.getParameter("Dep")),"");
  156.              Iterator iter = empArray.iterator();
  157.              int bgColor = 0;
  158.             
  159.              int empId = 0;
  160.              int start = 1;
  161.                int rowPerPage =com.vnex.intranet.system.loader.ConfigParaLoader.getParameterByInt("rowNum");
  162.             int size = empArray.size(); //总共有几行
  163.            
  164.             if ( request.getParameter("start") != null && request.getParameter("start").length() >0  )
  165.             {
  166.               start = Integer.parseInt( request.getParameter("start") );
  167.             }
  168.               String action = "/mainctrl/hr/StatiAll?stati=1&starDate="+starDate+"&endDate="+endDate+"&Dep="+request.getParameter("Dep"); //提交到本页jsp
  169.             String nav = NavBar.makeNavbar(start, size, rowPerPage, action);
  170.             int i = 0;
  171.            
  172.              while( iter.hasNext() && i < ( start+rowPerPage-1))
  173.              {
  174.             
  175.              i++;
  176.              MemberSearchBean mBean = (MemberSearchBean) iter.next();
  177.                  if ( i < start ) continue; 
  178.                  bgColor++;
  179.              empId = mBean.getId();
  180.              %>
  181.              <tr bgcolor = <%=bgColor%2==1?"#e0e0e0":"#fafafa"%>>
  182.                  <td align = "center">
  183.                   <%=mBean.getName()%>
  184.                  </td>
  185.                  <td align = "center">
  186.                    <%
  187.                      try
  188.                   {
  189.                   %>
  190.                  
  191.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoramlStatiByPersonModel")%>
  192.                   <%
  193.                   }
  194.                   catch(Exception e)
  195.                   {
  196.                   System.out.println("nJSP exception :"+e);
  197.           e.printStackTrace();
  198.           throw new RuntimeException("得到正常上班记录时出错.");
  199.                   }
  200.                   %>
  201.                  </td>
  202.                  <td align = "center">
  203.                    <%
  204.                      try
  205.                   {
  206.                   %>
  207.                  
  208.                   <%
  209.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"LateStatiByPersonModel"));
  210.                   }
  211.                   catch(Exception e)
  212.                   {
  213.                   System.out.println("nJSP exception :"+e);
  214.           e.printStackTrace();
  215.           throw new RuntimeException("得到迟到次数时出错.");
  216.                   }
  217.                   %>
  218.                  </td>
  219.                  <td align = "center">
  220.                    <%
  221.                      try
  222.                   {
  223.                   %>
  224.                  
  225.                   <%
  226.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"EarlyStatiByPersonModel"));
  227.                  
  228.                   }
  229.                   catch(Exception e)
  230.                   {
  231.                   System.out.println("nJSP exception :"+e);
  232.           e.printStackTrace();
  233.           throw new RuntimeException("得到早退次数时出错.");
  234.                   }
  235.                   %>
  236.                  </td>
  237.                  <td align = "center">
  238.                   <%
  239.                   try
  240.                   {
  241. %>
  242.                  
  243.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnNoneOffStatiByPersonModel")%>
  244.                  
  245.                   <%
  246.                   }
  247.                   catch(Exception e)
  248.                   {
  249.                   System.out.println("nJSP exception :"+e);
  250.           e.printStackTrace();
  251.           throw new RuntimeException("得到既没有登记上班,又没有登记下班次数时出错.");
  252.                   }
  253.                   %>
  254.                  
  255.                  </td>
  256.  
  257.                  <td align = "center">
  258.                  <%
  259.                      try
  260.                   {
  261.                  
  262.                  %>
  263.                  
  264.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"ExistOnNoneOffStaticByPersonModel")%>
  265.                  
  266.                  <%
  267.                   }
  268.                   catch(Exception e)
  269.                   {
  270.                   System.out.println("nJSP exception :"+e);
  271.           e.printStackTrace();
  272.           throw new RuntimeException("得到登记了上班,但没有登记下班次数时出错.");
  273.                   }
  274.                   %>
  275.                  </td>
  276.  
  277.                  <td align = "center">
  278.                    <%
  279.                      try
  280.                   {
  281.                   %>
  282.                  
  283.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnExistOffStatiByPersonModel")%>
  284.                  
  285.                   <%
  286.                   }
  287.                   catch(Exception e)
  288.                   {
  289.                   System.out.println("nJSP exception :"+e);
  290.           e.printStackTrace();
  291.           throw new RuntimeException("得到没有登记上班,但登记下班次数时出错.");
  292.                   }
  293.                   %>
  294.                  </td>
  295.              </tr>
  296.              <%
  297.              }//end while
  298.              %>
  299.               <tr bgcolor="#e0e0e0"> 
  300.                     <td colspan="9" align="left">&nbsp;&nbsp;<%=nav%></td>
  301.                   </tr>
  302.              <%
  303.              }
  304.              catch(Exception e)
  305.              {
  306.              System.out.println("JSP Exception :"+e);
  307.              e.printStackTrace();
  308.              throw new RuntimeException("列表时出错.");
  309.              }
  310.             }//end if
  311.              %>
  312.             
  313.               </table>
  314.              </td>
  315.             </tr>
  316.           </table>  
  317.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  318.         </TD>
  319.     </TR>
  320.      <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  321.     </TBODY> 
  322.     </TABLE>
  323.   <BR>
  324.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  325.   </form></DIV>
  326. </BODY></HTML>