attendance_check_off_result.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:13k
源码类别:
电子政务应用
开发平台:
Java
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <STYLE>
- #ssm2 A {
- FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
- }
- #ssm2 A:hover {
- COLOR: red
- }
- </STYLE>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu_person.js"></script>
- <script language="JavaScript1.2" src="/vnex/menu/dockmenu.js"></script>
- <script language = "javascript" >
- function checkoffOnly()
- {
- form1.action= "/mainctrl/attendance/attendance/checkOffOnly";
- form1.submit();
- }
- function checkOffOverDay()
- {
- form1.action= "/mainctrl/attendance/attendance/addOverDayCheckOff";
- form1.submit();
- }
- function cancleOper()
- {
- form1.action= "/mainctrl/attendance/attendance/employeeAttendance";
- form1.submit();
- }
- function forWardIndex()
- {
- window.location = "/vnex/index.jsp";
- }
- </script>
- <jsp:useBean id="BusinessName" scope="session" class="com.vnex.intranet.pub.BusinessSession" />
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <%@ page import = "com.vnex.intranet.attendance.attendance.proxy.AttendanceProxyBean" %>
- <%@ page import = "com.vnex.intranet.hr.employer_info.proxy.DivAttTimeProxy"%>
- <%
- AttendanceProxyBean attProxy = new AttendanceProxyBean();
- int empId = -1;
- if ( BusinessName.getEmpId() != 0)
- empId = BusinessName.getEmpId();
- %>
- <DIV align=center>
- <form name="form1" method="post" action="">
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <TBODY>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center" class="iframestyle" valign="top"> <br>
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr valign="top">
- <td >
- <table width="600" border="0" cellspacing="0" cellpadding="2">
- <tr>
- <td colspan="6" bgcolor="#666666"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/personal/main"><font color="#FFFFFF">个人办公</font></a>>><a href="/mainctrl/attendance/attendance/employeeAttendance"><font color="#FFFFFF">登记考勤</font></a>>>下班登记</font>
- </td>
- </tr>
- <tr bgcolor="#fafafa">
- <td colspan="6"></td>
- </tr>
- </table>
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr align="center" bgcolor="#fafafa">
- <td colspan="6">
- <table class=title width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
- <tr bgcolor="#e0e0e0">
- <td width="25%"><font class=strong> 你好: </font></td>
- <td width="75%"><font class=strong><%=BusinessName.getEmpName()%></font></td>
- </tr>
- <%
- String checkOffNotes = "";
- checkOffNotes = request.getParameter("Notes");
- %>
- <input type = "hidden" value = "<%=checkOffNotes%>" name = "checkOffNotes">
- <%
- //判断用户是否已经登录过上班.
- Calendar nowTime=Calendar.getInstance();
- int nowHour = 0;
- int nowMinute = 0;
- String amPm = "";
- String whetherCheckOff = "";
- String whetherCheckIn = "";
- String lastNotOffDate = "";
- int lateCount= 0;
- whetherCheckOff = attProxy.judgeWhetherAlreadyCheckOff( empId );
- whetherCheckIn = attProxy.judgeWhetherAlreadyCheckIn( empId );
- boolean whetherWorkOverDay = false;
- whetherWorkOverDay = attProxy.judgeWhetherWorkOverDay( empId );
- if (whetherCheckOff.equals("Yes"))
- {
- %>
- <tr bgcolor="#fafafa">
- <td width="25%"><font class=strong> 登录下班失败:</font>
- </td>
- <td width="75%"> 今天您已经登录了一次下班.</td>
- </tr>
- <%
- }
- if( whetherCheckOff.equals("No") && whetherCheckIn.equals("No"))
- {
- %>
- <tr bgcolor="#fafafa">
- <td width="25%"><font class=strong> 登录下班失败:</font>
- </td>
- <td width="75%"><font class=strong>您今天没有登录上班.</font></td>
- </tr>
- </table>
- <table class=title width="100%" border="0" align="center" cellpadding="2" cellspacing="1">
- <tr bgcolor="#e0e0e0">
- <td width="75%"><font class=strong> 如果您今天忘记登上班,现在仅能登录您今天的下班记录, 下班登记请单
- <br> 击:<br> 系统将记录当前时间为您今天的下班时间.</font>
- </td>
- <td width="25%"><font class=strong> <input type="button" value="登记下班" name="button" onclick = "checkoffOnly()" class=text></font></td>
- </tr>
- <%String bgColor3 = "";
- System.out.println("nnBefore getLastNotOffWorkDay()");
- try
- {
- System.out.println("attProxy.getLastNotOffWorkDay( empId ):"+attProxy.getLastNotOffWorkDay( empId ));
- if( !attProxy.getLastNotOffWorkDay( empId ).equals( "everOff" ))
- {
- bgColor3 = "#e0e0e0";
- System.out.println("nnBefore getLastNotOffWorkDay()");
- lastNotOffDate = attProxy.getLastNotOffWorkDay( empId ).substring(0,10);
- System.out.println("nn"+lastNotOffDate);
- %>
- <tr bgcolor="#fafafa">
- <td width="25%"><font class=strong>
- 您最晚一次没有登录下班的上班日期是: <%=lastNotOffDate%><br>
- <font class=strong> 您如果是从 <%=lastNotOffDate%> 日工作到现在, 请单击:<br> 系统将把您现在的下班时间记录为<%=lastNotOffDate%>的下班时间.</strong></td><td><input type="button" value="确认下班" onclick = "checkOffOverDay()" name="button" class=text></td></tr>
- <input type = "hidden" name = "lastNotOffYear" value ="<%=lastNotOffDate.substring(0,4)%>">
- <input type = "hidden" name = "lastNotOffMonth" value ="<%=lastNotOffDate.substring(5,7)%>">
- <input type = "hidden" name = "lastNotOffDay" value = "<%=lastNotOffDate.substring(8,10)%>">
- <%
- }
- else
- {
- bgColor3 = "#fafafa";
- }
- }
- catch(Exception e)
- {
- System.out.println("nnException at JSP: "+e+"n");
- e.printStackTrace();
- }
- %>
- <tr bgcolor="<%=bgColor3%>">
- <td width="75%"><font class=strong> 其他情况请单击:</font></td>
- <td><input type="button" value="取消操作" name="button" onclick = "cancleOper()" class=text></td>
- </tr>
- <%
- }
- if ( whetherCheckIn.equals("Yes") && whetherCheckOff.equals("No"))
- {
- nowHour = nowTime.get( Calendar.HOUR_OF_DAY );
- nowMinute = nowTime.get( Calendar.MINUTE );
- amPm = "";
- if (nowHour < 12 )
- {
- amPm = "AM";
- }
- if( nowHour >= 12)
- {
- amPm = "PM";
- }
- %>
- <tr bgcolor="#fafafa">
- <td width="25%"><font class=strong> 您登录的下班时间是:</font>
- </td>
- <td width="75%"><%=nowHour%>:<%=nowMinute%> <%=amPm%> </td>
- </tr>
- <%
- }
- %>
- <tr bgcolor="#e0e0e0">
- <td width="25%"><font class=strong> 您的规定下班时间是:</font>
- </td>
- <%
- DivAttTimeProxy datProxy = new DivAttTimeProxy();
- int setOffDutyHour = datProxy.getOffDutyHour(empId);
- %>
- <td width="75%"> <%=setOffDutyHour%> : <%=datProxy.getOffDutyMinute(empId)%> <%=setOffDutyHour>11?"PM":"AM"%></td>
- </tr>
- <%
- if ( whetherCheckIn.equals("Yes") && whetherCheckOff.equals("No") )
- {
- lateCount = attProxy.calculateEarlyLeaveTime(empId);
- if(lateCount > 0)
- {
- %>
- <tr valign="top" bgcolor="#fafafa">
- <td width="25%"> <font class=strong> 状态:</font>
- </td>
- <td width="75%">早退<%=lateCount%>分钟</td>
- </tr>
- <%
- }
- if( checkOffNotes != null)
- %>
- <tr valign="top" bgcolor="#e0e0e0">
- <td width="25%"> <font class=strong> 您的备注是:</font>
- </td>
- <td width="75%"> <%=FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(checkOffNotes))%>
- </td>
- </tr>
- <%
- attProxy.addCheckOffRecord( empId,checkOffNotes);
- }
- %>
- <tr bgcolor="#fafafa">
- <td height="30" bgcolor="#fafafa" align="center" colspan="2">
- <input onClick="location='/mainctrl/personal/main'" type="button" value="返回" name="Button" class="file">
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TBODY>
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>