<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="java.util.*" %>
<%@ page import="net.sz600.tool.SzDateHelp"%>
<%@ page import="net.sz600.basicdata.*" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.database.SzPageInfo" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.drivingSchool.*" %>
<%@ include file="/sessionInfo.jsp"%>

<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../share/js/commonTool.js"></script>

</head>
<%
	//查询时间段
	//科目顺序
	String sSubjectOrder = SzConvert.strWriteData(request.getParameter("subjectOrder"));	 //科目
	
	//科目信息
	Subject subjectClass = new Subject();
	
	String sSearchBegin = SzConvert.strWriteData(request.getParameter("txtSearchBegin"));
	String sSearchEnd = SzConvert.strWriteData(request.getParameter("txtSearchEnd"));
	//教练
	int iSelectCoach = SzConvert.toInt(request.getParameter("selectCoach"));
	String selectWeek = SzConvert.toZeroStr(request.getParameter("selectWeek"));
	//获取选择的部门信息
	String BMID = SzConvert.toZeroStr(request.getParameter("BMID"));
	String BMMC = SzConvert.strWriteData(request.getParameter("BMMC"));
	//学号
	String XH = SzConvert.strWriteData(request.getParameter("XH"));
	//报名点
	String ZSR = SzConvert.strWriteData(request.getParameter("ZSR"));
	//条件sCond
	StringBuffer sCond = new StringBuffer("");
	//如果开始时间和结束时间都为空，就默认为当前月
	Date currentDate = null;
	
	//如果开始时间和结束时间都为空，就默认为当前月
	if(sSearchBegin.equals("")){
		sSearchBegin = SzDateHelp.dateToYMD(SzDateHelp.getFirstDateMonth());
	}
	if (sSearchEnd.equals("")){
		sSearchEnd = SzDateHelp.dateToYMD(SzDateHelp.getLastDateMonth());
	}
	//查询的结束时间
	String searchEnd = SzDateHelp.dateToYMD(SzDateHelp.nextDay(SzDateHelp.stringToDate(sSearchEnd)));
	//查询条件
	sCond.append(" AND XXMC24>='");
	sCond.append(sSearchBegin);
	sCond.append("' AND XXMC24<'");
	sCond.append(searchEnd);
	sCond.append("'");
	if (!ZSR.equals("")){
		sCond.append(" AND XXMC23='"+ ZSR +"'");
	}
	//
	Student student = new Student();
	//获取学员信息
	ArrayList statList = student.getStudentOfWYStat(sCond.toString());
	int iSize = statList.size();
	//学员
	String[] statInfo = null;

	Date date = null;
	ArrayList list = null;
%>	
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <tr>
    <td>  
<!--      学号<input type="text" name="XH" class="txtClassSearch" value="<%=XH %>">-->
      招收人员<input type="text" name="ZSR" class="txtClassSearch" value="<%=ZSR %>">   	
  	<input type="hidden" name="txtDate" value="">     
      开始<input type="text" name="txtSearchBegin" class="txtClassSearch" value="<%=sSearchBegin%>" readonly>
      <%=SzPageHelp.calendar2Select("../../","formBar.txtSearchBegin")%>
      结束<input type="text" name="txtSearchEnd" class="txtClassSearch" value="<%=sSearchEnd%>" readonly>
      <%=SzPageHelp.calendar2Select("../../","formBar.txtSearchEnd")%>
      <%=SzPageHelp.button("btnClass", "查询", "javascript:FormSubmit(formBar,'statStudentOfWY.jsp');", "btnSearch")%>
    </td>
  </tr>
  </form>
</table>
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formUpdate" method="post">
  <input type="hidden" name="OPERATOR" value="add"> 
  <input type="hidden" name="SzDLXM" value="<%=sDLXM_SESSION %>">
  <input type="hidden" name="SzDLID" value="<%=iDLID_SESSION %>">
  <input type="hidden" name="SzBMMC" value="<%=sBMMC_SESSION %>">
  <input type="hidden" name="SzBMID" value="<%=iBMID_SESSION %>">
  <input type="hidden" name="XH" value="<%=XH %>">
  <input type="hidden" name="ZSR" value="<%=ZSR %>">
  <input type="hidden" name="txtSearchBegin" value="<%=sSearchBegin%>">
  <input type="hidden" name="txtSearchEnd" value="<%=sSearchEnd%>">
  <input type="hidden" name="txtShijianduan" value="">
  <input type="hidden" name="txtDate" value="">
  
  <tr class="trClassTitle">
  	<td width="150">招收人</td>
	<td>人数</td>
	<td>学费总数</td>
  </tr>
  <%
		//ToSetUpCourse toSetUpCourse = new ToSetUpCourse();
		Iterator iterStat = statList.iterator();
		while (iterStat.hasNext()) {
			statInfo = (String[])iterStat.next();
	%>
  <tr>
  	<td align="center"><%=statInfo[1] %></td>
  	<td align="center"><%=statInfo[2] %></td>
  	<td align="center"><%=statInfo[3] %></td>
	<%		
		}
  %>
    </tr>
  </form>
</table>

<%
    ////如果要使用日历控件，必须输出这个calendarFrame
    out.println(SzPageHelp.calendar2Frame("../../"));
%>


