statisic_attenance_result.jsp
资源名称:NetOffice.rar [点击查看]
上传用户:guhaomin
上传日期:2007-06-10
资源大小:23203k
文件大小:13k
源码类别:
电子政务应用
开发平台:
Java
- <jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
- <HTML>
- <jsp:include page="/vnex/page/FORM_HEAD.jsp" />
- <script Language="JavaScript" src="/vnex/intranet/calendar/Popup.js"></script>
- <script language="JavaScript" src="/vnex/validate.js"></script>
- <script language = "JavaScript">
- function do_submit()
- {
- var sDate = document.form1.sDate.value;
- var eDate = document.form1.eDate.value;
- if( sDate == "" || eDate == "" )
- {
- alert("请您选择统计起止日期.");
- return false;
- }
- if( document.form1.sDate.value > document.form1.eDate.value )
- {
- alert("您选择的起始时间晚于结束时间,请重新选择统计起止日期.");
- return false;
- }
- form1.action="/mainctrl/attendance/statistic/statisticAttendanceResult";
- form1.submit();
- }
- </script>
- <BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff
- topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
- <script language="JavaScript" src="/vnex/menu/dockmenu_hr.js"></script>
- <script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
- <%@ page import="com.vnex.intranet.util.FieldUtil" %>
- <%@ page language="java" %>
- <%@ page import = "com.vnex.intranet.attendance.statistic.proxy.AttendanceStatisticProxyBean"%>
- <%@ page import = "com.vnex.intranet.attendance.statistic.value.AttendanceStatisticValueBean"%>
- <%@ page import = "com.vnex.intranet.hr.employer_info.value.MemberInfo"%>
- <%@ page import = "com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean"%>
- <%
- int empId = -1;
- String strEmpId = request.getParameter("empId");
- if ( strEmpId != null)
- empId = Integer.parseInt( strEmpId );
- %>
- <%
- AttendanceStatisticProxyBean statProxy = new AttendanceStatisticProxyBean();
- AttendanceStatisticValueBean statValue = new AttendanceStatisticValueBean();
- statValue.setStartYear(String.valueOf(request.getParameter("sDate")).substring(0,4));
- statValue.setStartMonth(String.valueOf(request.getParameter("sDate")).substring(5,7));
- statValue.setStartDay(String.valueOf(request.getParameter("sDate")).substring(8,10));
- statValue.setEndYear(String.valueOf(request.getParameter("eDate")).substring(0,4));
- statValue.setEndMonth(String.valueOf(request.getParameter("eDate")).substring(5,7));
- statValue.setEndDay(String.valueOf(request.getParameter("eDate")).substring(8,10));
- int colorNum = 0;
- String bgColor = "";
- MemberInfoProxyBean mbProxy = new MemberInfoProxyBean();
- MemberInfo mbInfo = new MemberInfo();
- if( empId > 0)
- mbInfo = mbProxy.infoFind(empId);
- %>
- <DIV align=center>
- <form name="form1" >
- <input type = "hidden" name = "empId" value = <%=empId%>>
- <TABLE class=outter cellSpacing=0 cellPadding=0 width=600 border=0>
- <jsp:include page="/vnex/page/TTOA_TABLE_TOP.jsp" />
- <TR>
- <TD colSpan=3 align="center">
- <!--菜单开始 -->
- <!--菜单结束 -->
- <br>
- <!--个人信息开始 -->
- <table width="600" border="1" cellspacing="1" bordercolor="#666666">
- <tr>
- <td bgcolor="#fafafa">
- <table class=title cellspacing=1 cellpadding=2 width="600" border=0>
- <tr bgcolor="#666666">
- <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>>><a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>>><a href="/mainctrl/intranet/hr/search_result"><font color="#FFFFFF">员工信息</font></a>>><font color="#FFFFFF">考勤统计结果</font></td>
- </tr>
- <tr>
- <td bgcolor="#fafafa" width="100%" colspan=3 align="left"><font class=strong> 选择统计日期区间:</font>
- <input type="text" name="sDate" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(sDate);return false">
- 至
- <input type="text" name="eDate" readonly class=text size="20" value="">
- <img src="/vnex/intranet/calendar/datetime.gif" style="cursor:hand;" align="absmiddle" alt="弹出日历下拉菜单" onClick="fPopUpCalendarDlg(eDate);return false">
- <input type="button" value="查找" name="Submit2" onClick = "do_submit()" class=text>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600"
- border=0>
- <%
- int lateTimes = statProxy.getLateTimes(empId ,statValue);
- int lateTotal = statProxy.getLateTotal(empId ,statValue);
- int earlyLeaveTimes = statProxy.getEarlyLeaveTimes(empId ,statValue);
- int earlyLeaveTotal = statProxy.getEarlyLeaveTotal(empId ,statValue);
- %>
- <tr>
- <td colspan=5 bgcolor="#e0e0e0">
- 姓名:<%=mbInfo.getName()%>
- 统计阶段: <%=statValue.getStartYear()%>.<%=statValue.getStartMonth()%>.<%=statValue.getStartDay()%>--
- <%=statValue.getEndYear()%>.<%=statValue.getEndMonth()%>.<%=statValue.getEndDay()%>
- </td>
- </tr>
- <tr align=middle>
- <td width="300"><font class=strong>迟到次数</font></td>
- <td width="300"><font class=strong>总计迟到时间</font></td>
- </tr>
- <tr align=middle bgcolor="#e0e0e0">
- <td width="300" bgcolor="#e0e0e0"><%=lateTimes%> 次 <br>
- </td>
- <td width="300"><%=lateTotal%> 分钟 <br>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600"
- border=0>
- <%
- String workDate = "";
- String checkInTime = "";
- String lateCount = "";
- java.util.Collection coll = statProxy.getLateRecord(empId ,statValue);
- java.util.Iterator iter = coll.iterator();
- String inNotes = "";
- if(iter.hasNext())
- {
- %>
- <tr>
- <td width="146" align="center"><font class=strong>日期</font></td>
- <td width="140" align="center"><font class=strong>上班时间</font></td>
- <td width="152" align="center"><font class=strong>迟到时间</font></td>
- <td colspan="2" width="137" align="center"><font class=strong>备注</font>
- </td>
- <%
- while (iter.hasNext())
- {
- //交错显示颜色
- colorNum++;
- if(colorNum%2==0)
- {
- bgColor = "#e0e0e0";
- }
- else
- {
- bgColor = "#fafafa";
- }
- com.vnex.intranet.attendance.statistic.value.AttendanceLateValueBean bean =
- (com.vnex.intranet.attendance.statistic.value.AttendanceLateValueBean ) iter.next();
- out.println("<tr bgColor="+bgColor+">");
- workDate = bean.getWorkDate();
- workDate = workDate.substring(0,10);
- if ( workDate.equals("null"))
- {
- workDate = "";
- }
- if ( bean.getCheckInTime().equals("null" ) )
- {
- checkInTime = "";
- }
- else
- {
- checkInTime = bean.getCheckInTime().toString().substring(0,16);
- }
- if ( bean.getLateCount().equals("null" ) )
- {
- lateCount = "";
- }
- else
- {
- lateCount = bean.getLateCount();
- }
- if( bean.getInNotes()==null )
- {
- inNotes = "";
- }
- else
- {
- inNotes = FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(bean.getInNotes()));
- }
- if( !checkInTime.equals("") && !lateCount.equals("") )
- {
- out.println(" <td width='23%' align='center'>" + workDate + "</td>");
- out.println(" <td width='23%' align='center'>" + checkInTime + "</td>");
- out.println(" <td width='23%' align='center'>" + lateCount + "</td>");
- out.println(" <td width='23%' align='center'>" +inNotes + "</td>");
- out.println("</tr>");
- }
- }
- }
- %>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600"
- border=0>
- <tr align=middle>
- <td width="300"><font class=strong>早退次数</font></td>
- <td width="300"><font class=strong>总计早退时间</font></td>
- </tr>
- <tr align=middle bgcolor="#e0e0e0">
- <td width="300" bgcolor="#e0e0e0"><%=earlyLeaveTimes%> 次 <br>
- </td>
- <td width="300"><%=earlyLeaveTotal%> 分钟<br>
- </td>
- </tr>
- </table>
- <table class=title cellspacing=1 cellpadding=2 width="600"
- border=0>
- <%
- java.util.Collection earlyLeaveColl = statProxy.getEarlyLeaveRecord(empId ,statValue);
- java.util.Iterator earlyLeaveIter = earlyLeaveColl.iterator();
- String offNotes = "";
- String checkOffTime = "";
- String leaveCount = "";
- String offNote = "";
- if(earlyLeaveIter.hasNext())
- {
- %>
- <tr>
- <td width="149" align="center"><font class=strong> 日期</font></td>
- <td width="139" align="center"><font class=strong>下班时间 </font></td>
- <td width="152" align="center"><font class=strong>早退时间</font></td>
- <td colspan="2" width="137" align="center"><font class=strong>备注</font>
- </td>
- </tr>
- <%
- while (earlyLeaveIter.hasNext())
- {
- colorNum++;
- if(colorNum%2==0)
- {
- bgColor = "#e0e0e0";
- }
- else
- {
- bgColor = "#fafafa";
- }
- com.vnex.intranet.attendance.statistic.value.AttendanceLateValueBean earlyLeaveBean =
- (com.vnex.intranet.attendance.statistic.value.AttendanceLateValueBean ) earlyLeaveIter.next();
- out.println("<tr bgColor="+bgColor+">");
- workDate = earlyLeaveBean.getWorkDate();
- workDate = workDate.substring(0,10);
- if ( workDate == null )
- {
- workDate = "";
- }
- if( earlyLeaveBean.getCheckOffTime() == null )
- {
- checkOffTime = "";
- }
- else
- {
- checkOffTime = earlyLeaveBean.getCheckOffTime().toString().substring(0,16);
- }
- if( earlyLeaveBean.getEarlyLeaveCount() == null )
- {
- leaveCount = "";
- }
- else
- {
- leaveCount = earlyLeaveBean.getEarlyLeaveCount();
- }
- if( earlyLeaveBean.getOffNotes()== null )
- {
- offNote = "";
- }
- else
- {
- offNote = FieldUtil.filterScriptTag(FieldUtil.filterQuotTag(earlyLeaveBean.getOffNotes()));
- }
- if ( !checkOffTime.equals("") && !leaveCount.equals("") )
- {
- out.println(" <td width='23%' align='center'>" + workDate + "</td>");
- out.println(" <td width='23%' align='center'>" + checkOffTime + "</td>");
- out.println(" <td width='23%' align='center'>" + leaveCount + "</td>");
- out.println(" <td width='23%' align='center'>" + offNote + "</td>");
- out.println("</tr>");
- }
- }
- }
- %>
- </table>
- </td>
- </tr>
- </table>
- <!--个人信息结束 -->
- <!--休假事件表结束 -->
- <jsp:include page="/vnex/page/TTOA_HELP.jsp" />
- </TD>
- </TR>
- <jsp:include page="/vnex/page/TTOA_TABLE_BOTTOM.jsp" />
- </TABLE>
- <BR>
- <jsp:include page="/vnex/page/TTOA_PRODUCER_LOGO.jsp" />
- </form></DIV>
- </BODY></HTML>