⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 employee_stipend_statistic.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%
/**
 *	$RCSfile: employee_stipend_statistic.jsp,v $
 *	$Revision: 1.0 $
 *	$Date: 2001/05/17 20:57:46 $
 *	/mainctrl/intranet/hr/salary_statistic
 */
%>
<%@ page errorPage="/vnex/ErrorPage.jsp" %>
<%@ page import="com.vnex.intranet.hr.employer_info.value.*"%>
<%@ page import="com.vnex.intranet.hr.employer_info.process.*"%>
<%@ page import="com.vnex.intranet.hr.util.*"%>

<%@ page import="java.util.*" %>
<%@ page import="java.sql.Timestamp" %>
<%@ page import="java.text.DecimalFormat" %>
<%@ taglib uri="/vnex.tld" prefix="vnex" %>
<%@ taglib uri="/vnex_organization.tld" prefix="org" %>
<%@ taglib uri="/vnex_hr.tld" prefix="hr" %>

<jsp:useBean id="salaryProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.SalaryProxyBean" scope="application" />
<jsp:useBean id="hrProxyBean" class="com.vnex.intranet.hr.employer_info.proxy.MemberInfoProxyBean" scope="application" />
<%
    String sDate = request.getParameter("sYear") + "-" + request.getParameter("sMonth") + "-01";
    Collection pageAllColl = new ArrayList();
    int emp_id = -1;
    int deIdTemp = -1;
    DecimalFormat dFormat = new DecimalFormat("##.##");
    if ( request.getParameter("emp_id") != null )
    {
        emp_id = Integer.parseInt( request.getParameter("emp_id") );
    }
//    if ( request.getParameter("doChange") != null )
//    {
    if ( request.getParameter("devisionId") != null )
        deIdTemp = Integer.parseInt( request.getParameter("devisionId") );
//    }
    String emp_name = request.getParameter("emp_name");
    MemberDateSalary pageColl = new MemberDateSalary();
    //String sDate = request.getParameter("sDate");
    //查询员工单月工资单
    if ( sDate != null && sDate.length()>0 && emp_id >0 && request.getParameter("doSearch") != null )
    {
        pageColl = salaryProxyBean.dateFind( emp_id, sDate );
        if ( pageColl.getComponent().size() > 0 )
        {
            pageAllColl.add( pageColl );
        }
    }
    //查询部门所有员工单月工资情况
    else if ( sDate != null && emp_id == -1 && deIdTemp > 0 && request.getParameter("doSearch") != null )
    {
        pageAllColl = salaryProxyBean.dateFindByDep( deIdTemp, sDate );
    }
    //查询员工所有月份工资单情况,暂时不会执行
    else if ( emp_id >0 && request.getParameter("doSearch") != null )
    {
        pageAllColl = salaryProxyBean.dateFind( emp_id );
    }
    //查询公司所有员工的工资单情况
    else if ( sDate != null && deIdTemp == 0 && sDate.length()>0 && emp_id <0 && request.getParameter("doSearch") != null )
    {
        pageAllColl = salaryProxyBean.dateFind( sDate );
    }
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<jsp:include page="/vnex/page/FORM_HEAD.jsp" />
<script language="JavaScript1.2" src="/vnex/menu/dockmenu_hr.js"></script>
<script language="JavaScript" src="/vnex/menu/dockmenu.js"></script>
<script language="JavaScript" src="/vnex/validate.js"></script>
<script language=JavaScript>
function change(select)
{
    form1.action="/mainctrl/intranet/hr/salary_statistic?doChange=1";
    form1.submit();
}

</script>
<BODY text=#000000 vLink=#000000 aLink=#000000 link=#000000 bgColor=#ffffff topMargin=20 leftmargin="0" marginwidth="0" marginheight="0">
<DIV align=center>
<form name="form1" method="post" action="/mainctrl/intranet/hr/salary_statistic?doSearch=1">
  <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"> 
          <br>
		 <table width="600" border="1" cellspacing="1" bordercolor="#666666">
            <tr>
              <td bgcolor="#fafafa">  
                <table class=title cellspacing=1 width="600" border=0>
                  <tr bgcolor="#666666"> 
                    <td colspan="2"><font class="strongw"><a href="/mainctrl/home/index"><font color="#FFFFFF">首页</font></a>&gt;&gt;<a href="/mainctrl/hr/main"><font color="#FFFFFF">人力资源</font></a>&gt;&gt;<a href="/mainctrl/intranet/hr/salary_statistic_main"><font color="#FFFFFF">薪酬统计</font></a>&gt;&gt;部门薪酬统计</font></td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="113"><font class="strong">&nbsp;工资年月:</font></td>
                    <td width="478"> 
                      <%
                      //在此四个下拉框分别输出起止年月.
                      //得到当前日期年月日
                      Calendar nowTime=Calendar.getInstance();
                      int nowYear = nowTime.get( Calendar.YEAR);
                      int nowMonth = nowTime.get(Calendar.MONTH)+1;
                      String ifSelect = "";
                      //输出起始年下拉框并默认选中当前年.
                    
                    %>
                      <select name = "sYear">
                        <%
                      for(int sYear = 1930;sYear < 2099 ; sYear++ )
                      {
                          if (sYear == nowYear)
                          {
                              ifSelect = "selected";
                          }
                          else
                          {
                              ifSelect = "";
                          }
                      %>
                        <option value = "<%=sYear%>"  <%=ifSelect%>><%=sYear%></option>
                        <%
                      }
                      %>
                      </select>
                      <select name = "sMonth">
                        <%
                      //按照两位的格式输出起始月下拉框并默认选中当前月.
                      String strSMonth = "";
                     
                      for(int sMonth = 1;sMonth <= 12 ; sMonth++ )
                      {
                        if(sMonth < 10)
                        {
                            strSMonth = "0"+String.valueOf(sMonth);
                        }
                        else
                        {
                            strSMonth = String.valueOf(sMonth);
                        }
                        if (sMonth == nowMonth)
                        {
                            ifSelect = "selected";
                        }
                        else
                        {
                            ifSelect = "";
                        }
                       %>
                        <option value = "<%=strSMonth%>"  <%=ifSelect%>><%=strSMonth%></option>
                        <%
                      }
                      %>
                      </select>
                      月</td>
                  </tr>
                  <tr bgcolor="#fafafa"> 
                    <td width="113"><font class="strong">&nbsp;选择部门:</font></td>
                    <td width="478"> 
                    <!--部门列表开始-->
                    <select name="devisionId" class=choice onChange=change(this)>
                    <org:DivisionList>
                    <option value='0'>全部部门</option>
                    <vnex:items select='<%= deIdTemp+"" %>' >
                    <option value=<org:DivisionAttribute attribute="id"/> <org:DivisionAttribute attribute="isSelected"/> >
                    <org:DivisionAttribute attribute="levelStr"/>+<org:DivisionAttribute attribute="name"/></option>
                    </vnex:items>
                    </org:DivisionList>
                    </select>
                    </td>
                  </tr>
                  <tr bgcolor="#e0e0e0"> 
                    <td width="113" height="12"><font class="strong">&nbsp;选择员工:</font></td>
                    <td width="478" height="12"> 
                    <select name="emp_id">
                      <option value=-1>--全部--</option>
                    <hr:EmployeeList divisionId='<%= deIdTemp %>'>		            		            
		            <vnex:items >
		            <option value="<hr:EmployeeAttribute attribute="id" />"  >
		            <hr:EmployeeAttribute attribute='<%= null %>' /></option>
		            </vnex:items>		           
		            </hr:EmployeeList> 		           
		            </select>
                    </td>
                  </tr>
                  <tr bgcolor="#fafafa" align="center"> 
                    <td colspan="2" height="30"> 
                      <input type="submit" value="统计" name="Submit" class=text>&nbsp;&nbsp; 
                      <input type="button" value="返回" name="B2" onClick="location='/mainctrl/intranet/hr/salary_statistic_main'"  class=text>
                    </td>
                  </tr>
                </table>
                          <table class=title cellspacing=1 cellpadding=2 border=0>
<%
    String bgcolor = null;
    int color_i = 0;
    double totalCount = 0;
    double sCount = 0;
    boolean doComList = false;
    Iterator iterAll = pageAllColl.iterator();
    Iterator iter = null;
    while ( iterAll.hasNext() )
    {
        pageColl = (MemberDateSalary)iterAll.next();
        color_i++;
        if( color_i%2==0 )
        {
            bgcolor = "#e0e0e0";
        }
        else
        {
            bgcolor = "#fafafa";
        }

%>
    <%
        if ( !doComList )
        {
    %>
                <tr> 
                  <td  align="center" ><font class=strong>姓名</font></td>
                  <td  align="center" ><font class=strong>时间</font></td>
        <%
            iter = pageColl.getComponent().iterator();
            while ( iter.hasNext() )
            {
                doComList = true;
                DateComponentBean sc = (DateComponentBean)iter.next();
        %>
                  <td align="center"><font class=strong><%= sc.getName() %><input type=hidden name=component_id value=<%= sc.getId() %>></font></td>
        <%
            }
        %>
                  <td  align="center"><font class=strong>总额</font></td>

                </tr>
    <%
        }
    %>
            <tr bgcolor="<%= bgcolor %>"> 
              <td align="center"><%= pageColl.getEmpName() %></td>
              <td align="center"><%= pageColl.getSDate() %></td>
    <%
        sCount = 0;
        iter = pageColl.getComponent().iterator();
        while ( iter.hasNext() )
        {
            DateComponentBean sc = (DateComponentBean)iter.next();
            sCount += sc.getCount();
    %>
              <td align="center"><%= sc.getCount() %></td>
    <%
        }
        totalCount +=sCount;
       // System.out.println("******************total is:"+totalCount);
    %>
              <td align="center"><%= dFormat.format(sCount) %></td>
            </tr>
<%
    }
%>
<%
    if ( doComList )
    {
%>
            <tr bgcolor="#e0e0e0"> 
              <td align="center">合计:</td>
              <td align="center"><%= dFormat.format(totalCount) %>&nbsp;&nbsp;(元)</td>
            </tr>
<%
    }
%>
          </table>

              </td>
            </tr>
          </table>
          <br>
          <br>
          <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>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -