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

电子政务应用

开发平台:

Java

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML>
  3. <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
  4. <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0" TopMargin=20 >
  5. <STYLE>
  6. #ssm2 A {
  7. FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
  8. }
  9. #ssm2 A:hover {
  10. COLOR: red
  11. }
  12. </STYLE>
  13. <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
  14. <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
  15. <script language = "javascript">
  16. function forWardIndex()
  17. {
  18.     window.location = "/login/enter";
  19. }
  20. </script>
  21.  
  22. <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
  23. <%@ page import="com.vnex.intranet.util.FieldUtil" %> 
  24. <%@ page import = "com.vnex.intranet.attendance.attendance.proxy.AttendanceProxyBean,com.vnex.intranet.pub.BusinessSession,com.vnex.intranet.system.loader.ConfigParaLoader.*" %>
  25. <%@ page import = "com.vnex.intranet.hr.employer_info.proxy.DivAttTimeProxy"%>
  26. <%
  27.     AttendanceProxyBean attProxy = new AttendanceProxyBean(); 
  28.     int empId = -1;
  29.     if ( BusinessName.getEmpId() != 0 )
  30.         empId = BusinessName.getEmpId();
  31. %>
  32. <DIV align=center>
  33. <form name="form1" method="post" action="">
  34.   <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
  35.     <TBODY> 
  36.     <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
  37.     <TR> 
  38.         <TD colSpan=3 align="center" class="iframestyle" valign="top"> <br>
  39.           <table width="600" border="1" cellspacing="1" bordercolor="#666666">
  40.             <tr valign="top"> 
  41.               <td >  
  42.                   <table width="600" border="0" cellspacing="0" cellpadding="2">
  43.                   <tr> 
  44.                       
  45.                     <td colspan="6" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>&gt;&gt;<a href="/mainctrl/attendance/attendance/employeeAttendance"><font color="#FFFFFF">登记考勤</font></a>&gt;&gt;上班登记</font> 
  46.                     </td>
  47.                     </tr>
  48.                     <tr bgcolor="#fafafa"> 
  49.                       <td colspan="6"></td>
  50.                     </tr>
  51.                   </table> 
  52.                  <table width="100%" cellpadding="0" cellspacing="0">
  53.                   
  54.                   <tr align="center" bgcolor="#fafafa"> 
  55.                     <td colspan="6"> 
  56.                       <table class=title width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
  57.                         <tr bgcolor="#e0e0e0"> 
  58.                           <td width="25%"><font class=strong>&nbsp;你好: </font></td>
  59.                           <td width="75%"><font class=strong>&nbsp;<%=BusinessName.getEmpName()%></font></td>
  60.                         </tr>
  61.                          <%
  62.                              
  63.                             //判断用户是否已经登录过上班.
  64.                             Calendar nowTime=Calendar.getInstance();
  65.                             int nowHour = 0;
  66.                             int nowMinute = 0;
  67.                             String amPm = "";
  68.                             String whetherCheckIn = "";
  69.                             String whetherCheckOff = "";
  70.                             int lateCount= 0;                          
  71.                             whetherCheckIn  = attProxy.judgeWhetherAlreadyCheckIn( empId ); 
  72.                             whetherCheckOff = attProxy.judgeWhetherAlreadyCheckOff( empId ); 
  73.                             if ( whetherCheckOff.equals("Yes") )
  74.                             {
  75.                                 out.println(" <tr bgcolor='#fafafa'> <td >&nbsp;<font class=strong>登陆上班失败:</td><td >&nbsp;您今天已经登录过下班,您再不能在登录上班.</font></td></tr>");
  76.                             }
  77.                             if ( whetherCheckIn.equals("Yes") && whetherCheckOff.equals("No") )
  78.                                out.println("<tr bgcolor='#fafafa'><td>&nbsp;<font class=strong>登陆上班失败:</td> <td ><font class=strong>&nbsp;今天您已经登录了一次上班.</font></td></tr>"); 
  79.                             if ( whetherCheckIn.equals("No") && whetherCheckOff.equals("No"))
  80.                             {       
  81.                                  nowHour = nowTime.get( Calendar.HOUR_OF_DAY );
  82.                                  nowMinute = nowTime.get( Calendar.MINUTE ); 
  83.                                  amPm = "";
  84.                                  if (nowHour < 12 )
  85.                                  {
  86.                                      amPm = "AM";
  87.                                  } 
  88.                                  if( nowHour >= 12)
  89.                                  {
  90.                                      amPm = "PM";
  91.                                  }
  92.                           %>
  93.                         <tr bgcolor="#fafafa"> 
  94.                           <td width="25%"><font class=strong>&nbsp;您登录的上班时间是:</font> 
  95.                           </td>
  96.                           <td width="75%">&nbsp;<%=nowHour%>:<%=nowMinute%> <%=amPm%></td>
  97.                         </tr>
  98.                          <%
  99.                               }
  100.                        %>
  101.                        <tr bgcolor="#e0e0e0"> 
  102.                           <td width="25%"><font class=strong>&nbsp;您的规定上班时间是:</font> 
  103.                           </td>
  104.                           <%
  105.                            DivAttTimeProxy datProxy = new DivAttTimeProxy();
  106.                            int setOnDutyHour = datProxy.getOnDutyHour(empId);
  107.                           %>
  108.                           <td width="75%">&nbsp;<%=setOnDutyHour%>&nbsp;:&nbsp;<%=datProxy.getOnDutyMinute(empId)%>&nbsp;&nbsp;<%=setOnDutyHour>11?"PM":"AM"%></td>
  109.                         </tr>
  110.                        <%
  111.                         if ( whetherCheckIn.equals("No") && whetherCheckOff.equals("No"))
  112.                         {       
  113.                             lateCount = attProxy.calculateLateTime(empId);
  114.                             if(lateCount > 0)
  115.                             {
  116.                             %>
  117.                             
  118.                           <tr valign="top" bgcolor="#fafafa"> 
  119.                           <td width="25%"> <font class=strong>&nbsp;状态:
  120.                           </td>
  121.                           <td width="75%">&nbsp;迟到<%=lateCount%>分钟</td>
  122.                          </tr>
  123.                          <%
  124.                            }
  125.                           %>
  126.                                
  127.                           <%
  128.                           String checkInNotes = request.getParameter("Notes");
  129.                           if( checkInNotes != null)
  130.                           {
  131.                           %>
  132.                           <tr valign="top" bgcolor="#e0e0e0"> 
  133.                           <td width="25%"> <font class=strong>&nbsp;您的备注是:</font> 
  134.                           </td>
  135.                           <td width="75%"> 
  136.                            &nbsp;<%=FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(checkInNotes))%>
  137.                           </td>
  138.                         </tr> 
  139.                                <%
  140.                                }  
  141.                                attProxy.addCheckInRecord(empId,checkInNotes);
  142.                           }
  143.                            %>
  144.                         <tr bgcolor="#e0e0e0"> 
  145.                           <td height="30" bgcolor="#fafafa" align="center" colspan="2"> 
  146.                             <input onClick="location='/mainctrl/personal/main'" type="button" value="返回" name="forwardIndex" class="file">
  147.                           </td>
  148.                         </tr>
  149.                       </table>
  150.                         </td>
  151.                     </tr>
  152.                     
  153.                   
  154.                   </table>
  155.               </td>
  156.             </tr>
  157.           </table>
  158.           <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
  159. </TD>
  160.     </TR>
  161.    <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
  162.     </TBODY>
  163.   </TABLE>
  164.   <BR>
  165.   <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
  166. </form></DIV>
  167. </BODY>
  168. </HTML>