非常完整的Java开发的网络办公系统
源代码在线查看: attendance_check_off_result.jsp
#ssm2 A {
FONT-SIZE: 12px; COLOR: black; FONT-FAMILY: verdana; TEXT-DECORATION: none
}
#ssm2 A:hover {
COLOR: red
}
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";
}
AttendanceProxyBean attProxy = new AttendanceProxyBean();
int empId = -1;
if ( BusinessName.getEmpId() != 0)
empId = BusinessName.getEmpId();
%>
首页>>个人办公>>登记考勤>>下班登记
你好:
String checkOffNotes = "";
checkOffNotes = request.getParameter("Notes");
%>
//判断用户是否已经登录过上班.
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"))
{
%>
登录下班失败:
今天您已经登录了一次下班.
}
if( whetherCheckOff.equals("No") && whetherCheckIn.equals("No"))
{
%>
登录下班失败:
您今天没有登录上班.
如果您今天忘记登上班,现在仅能登录您今天的下班记录, 下班登记请单
击: 系统将记录当前时间为您今天的下班时间.
System.out.println("\n\nBefore getLastNotOffWorkDay()");
try
{
System.out.println("attProxy.getLastNotOffWorkDay( empId ):"+attProxy.getLastNotOffWorkDay( empId ));
if( !attProxy.getLastNotOffWorkDay( empId ).equals( "everOff" ))
{
bgColor3 = "#e0e0e0";
System.out.println("\n\nBefore getLastNotOffWorkDay()");
lastNotOffDate = attProxy.getLastNotOffWorkDay( empId ).substring(0,10);
System.out.println("\n\n"+lastNotOffDate);
%>
您最晚一次没有登录下班的上班日期是:
您如果是从 日工作到现在, 请单击: 系统将把您现在的下班时间记录为的下班时间.
}
else
{
bgColor3 = "#fafafa";
}
}
catch(Exception e)
{
System.out.println("\n\nException at JSP: "+e+"\n");
e.printStackTrace();
}
%>
其他情况请单击:
}
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";
}
%>
您登录的下班时间是:
:
}
%>
您的规定下班时间是:
DivAttTimeProxy datProxy = new DivAttTimeProxy();
int setOffDutyHour = datProxy.getOffDutyHour(empId);
%>
: 11?"PM":"AM"%>
if ( whetherCheckIn.equals("Yes") && whetherCheckOff.equals("No") )
{
lateCount = attProxy.calculateEarlyLeaveTime(empId);
if(lateCount > 0)
{
%>
状态:
早退分钟
}
if( checkOffNotes != null)
%>
您的备注是:
attProxy.addCheckOffRecord( empId,checkOffNotes);
}
%>