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

电子政务应用

开发平台:

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. <HTML>
  19. <head>
  20. <style type="text/css">
  21.    <!--
  22.       .whitePG { font-size: 24pt; font-family:"宋体";color: "#ffffff";    text-align: center}
  23.       .bluePG { font-size: 24pt; font-family:"宋体";color: "blue";    text-align: center style="cursor:hand" }
  24.    -->
  25.    </style>
  26. </head>
  27. <body onload = "do_print()">
  28. <div align = "center">
  29. <%
  30.       if(request.getParameter("stati")!=null)
  31.       {
  32. %>
  33.             <%
  34.               int empId = 0;
  35. String divName = "";
  36. if(Integer.parseInt(request.getParameter("Dep")) != 0)
  37. {
  38.             OrganizationProxyBean orgProxy = new OrganizationProxyBean();
  39.             DivisionValueBean divValue = orgProxy.getDivision(Integer.parseInt(request.getParameter("Dep")));
  40.             divName = divValue.getDivisionName();
  41.             }
  42.             else
  43.             {
  44.             divName  = "全部部门";
  45.             }
  46.            
  47.              
  48.             %>
  49.             <font class=strong size = "5"><%=divName%>考勤统计表<br></font>
  50.             <%=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)%>日
  51.             <table border="1" cellpadding="0" cellspacing="0" width="732" bordercolor="#000000">
  52.              <tr>
  53.     <td width="95" align = "center">
  54.                   <font class=strong>姓名</font>
  55.                  </td> 
  56.                  <td  align = "center" width="94">
  57.                   <font class=strong>正常<br>(天数)</font>
  58.                  </td>
  59.                  <td  align = "center" width="97">
  60.                   <font class=strong>迟到<br>(次数)</font>
  61.                  </td>
  62.                  <td  align = "center" width="104">
  63.                   <font class=strong>早退<br>(次数)</font>
  64.                  </td>
  65.                  <td align = "center" width="170">
  66.                   <font class=strong>未登记上、下班<br>(次数)</font>
  67.                  </td>
  68.                  <td  align = "center" width="172">
  69.                   <font class=strong>只登记了上班<br>(次数)</font>
  70.                  </td>
  71.                  <td  align = "center" width="172">
  72.                   <font class=strong>只登记了下班<br>(次数)</font>
  73.                  </td>
  74.                  
  75.                 
  76.              </tr>
  77.              <%
  78.              try{
  79.              AttQueryProxy attProxy = new AttQueryProxy();
  80.              MemberInfoProxyBean mProxy = new MemberInfoProxyBean();
  81.              ArrayList empArray = (ArrayList) mProxy.infoFind(Integer.parseInt(request.getParameter("Dep")),"");
  82.              Iterator iter = empArray.iterator();
  83.              while( iter.hasNext())
  84.              {
  85.              MemberSearchBean mBean = (MemberSearchBean) iter.next();
  86.              empId = mBean.getId();
  87.              %>
  88.              <tr >
  89.                  <td align = "center" width="95">
  90.                   <%=mBean.getName()%>
  91.                  </td>
  92.                      <td align = "center" width="94">
  93.                    <%
  94.                      try
  95.                   {
  96.                   %>
  97.                  
  98.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoramlStatiByPersonModel")%>
  99.                   <%
  100.                   }
  101.                   catch(Exception e)
  102.                   {
  103.                   System.out.println("nJSP exception :"+e);
  104.           e.printStackTrace();
  105.           throw new RuntimeException("得到正常上班记录时出错.");
  106.                   }
  107.                   %>
  108.                  </td>
  109.                      <td align = "center" width="97">
  110.                    <%
  111.                      try
  112.                   {
  113.                   %>
  114.                  
  115.                   <%
  116.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"LateStatiByPersonModel"));
  117.                   }
  118.                   catch(Exception e)
  119.                   {
  120.                   System.out.println("nJSP exception :"+e);
  121.           e.printStackTrace();
  122.           throw new RuntimeException("得到迟到次数时出错.");
  123.                   }
  124.                   %>
  125.                  </td>
  126.                  <td align = "center" width="104">
  127.                    <%
  128.                      try
  129.                   {
  130.                   %>
  131.                  
  132.                   <%
  133.                   out.println(attProxy.getAttStatiResultProxy(starDate,endDate,empId,"EarlyStatiByPersonModel"));
  134.                  
  135.                   }
  136.                   catch(Exception e)
  137.                   {
  138.                   System.out.println("nJSP exception :"+e);
  139.           e.printStackTrace();
  140.           throw new RuntimeException("得到早退次数时出错.");
  141.                   }
  142.                   %>
  143.                  </td>
  144.                  <td align = "center" width="92">
  145.                   <%
  146.                   try
  147.                   {
  148. %>
  149.                  
  150.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnNoneOffStatiByPersonModel")%>
  151.                  
  152.                   <%
  153.                   }
  154.                   catch(Exception e)
  155.                   {
  156.                   System.out.println("nJSP exception :"+e);
  157.           e.printStackTrace();
  158.           throw new RuntimeException("得到既没有登记上班,又没有登记下班次数时出错.");
  159.                   }
  160.                   %>
  161.                  
  162.                  </td>
  163.  
  164.                  <td align = "center" width="124">
  165.                  <%
  166.                      try
  167.                   {
  168.                  
  169.                  %>
  170.                  
  171.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"ExistOnNoneOffStaticByPersonModel")%>
  172.                  
  173.                  <%
  174.                   }
  175.                   catch(Exception e)
  176.                   {
  177.                   System.out.println("nJSP exception :"+e);
  178.           e.printStackTrace();
  179.           throw new RuntimeException("得到登记了上班,但没有登记下班次数时出错.");
  180.                   }
  181.                   %>
  182.                  </td>
  183.  
  184.                  <td align = "center" width="110">
  185.                    <%
  186.                      try
  187.                   {
  188.                   %>
  189.                  
  190.                   <%=attProxy.getAttStatiResultProxy(starDate,endDate,empId,"NoneOnExistOffStatiByPersonModel")%>
  191.                  
  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.   
  203.               
  204.                 
  205.              </tr>
  206.              <%
  207.              }//end while
  208.              }
  209.              catch(Exception e)
  210.              {
  211.              System.out.println("JSP Exception :"+e);
  212.              e.printStackTrace();
  213.              throw new RuntimeException("列表时出错.");
  214.              }
  215.             }//end if
  216.              %>
  217.             
  218.             
  219.                 </table>
  220.                 </div>
  221.                 
  222. </BODY></HTML>
  223. <script language="javascript">
  224. function do_print()
  225. {
  226. window.print();
  227. window.history.back();
  228. }
  229. </script>