<%@ page contentType="text/html;charset=gbk" %>
<%@ page import="net.sz600.tool.SzConvert" %>
<%@ page import="net.sz600.tool.SzDateHelp" %>
<%@ page import="net.sz600.organize.*" %>
<%@ page import="net.sz600.system.*" %>
<%@ page import="net.sz600.flow.*" %>
<%@ page import="net.sz600.formEngine2.*" %>
<%@ page import="java.util.*" %>
<%@ 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 type="text/javascript" src="<%=strLevel_SESSION%>/share/js/operatorWin.js"></script>
</style>
</head>
<%@ include file="/share/title.jsp"%>
<table width="98%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
<tr class="trClassTitle">
	<td>分类</td>
	<td>名称</td>
  <td>办理中数量</td>
  <td>已否决的数量</td>
  <td>已办结的数量</td>
  <td>合计</td>
</tr>
<%
	//取得分组
  ArrayList groupList = LcForm.FormGroupList;
  Map groupMap = LcForm.FormGroupMap;
  ArrayList idList = null;
  Iterator iterId = null;
  Iterator iter = groupList.iterator();
  String name = "";
  int iFormID = 0;
  int iCount1 = 0;
  int iCount2 = 0;
  int iCount3 = 0;
  int iCount4 = 0;
  int iCount5 = 0;
  int iCount1_total = 0;
  int iCount2_total = 0;
  int iCount3_total = 0;
  int iCount4_total = 0;
  int iCount5_total = 0;
  String sCount1 = "0";
  String sCount2 = "0";
  String sCount3 = "0";
  String sCount4 = "0";
  String sCount5 = "0";  
  BdFormControl formControl = new BdFormControl();
  BdValueControl valueControl = new BdValueControl();
  String sUrl = "";
  while (iter != null && iter.hasNext()) {
	  name = (String)iter.next();
	  if (name.equals("")) {
		  name = "其他";
	  }
	  out.println("<tr><td align='center'><b>[");	  
	  out.println(name);
	  out.println("]</b></td><td colspan='10'>&nbsp;</td></tr>");
	  //取得分组下的
	  idList = (ArrayList)groupMap.get(new String(name));
	  iterId = idList.iterator();
	  while (iterId.hasNext()) {
		  iFormID = SzConvert.toInt((String)iterId.next());
		  
		  //根据ID取得表单的信息
		  name = formControl.getFormDesc(iFormID);
		  //iCount1 = valueControl.getApplyCount(iFormID, iDLID_SESSION, "-1");	//草稿
		  iCount2 = valueControl.getManageCount(iFormID, "0");	//办理中
		  iCount3 = valueControl.getManageCount(iFormID, "1");	//否决
		  iCount4 = valueControl.getManageCount(iFormID, "2");	//办结
		  iCount5 = iCount1 + iCount2 + iCount3 + iCount4;
		  //iCount1_total += iCount1;
		  iCount2_total += iCount2;
		  iCount3_total += iCount3;
		  iCount4_total += iCount4;
		  iCount5_total += iCount5;
		  
		  //sCount1 = Integer.toString(iCount1);
		  sCount2 = Integer.toString(iCount2);
		  sCount3 = Integer.toString(iCount3);
		  sCount4 = Integer.toString(iCount4);
		  sCount5 = Integer.toString(iCount5);
		  
		  sUrl = formControl.getIndexUrl("../../",iFormID,5);
		  if (iCount1 > 0) {
			  sCount1 = "<b><a href=" +  sUrl + "&flowType=-1>" + iCount1 + "</a></b>";
		  } else {
			  sCount1= "&nbsp";
		  }
		  if (iCount2 > 0) {
			  sCount2 = "<b><a href=" +  sUrl + "&flowType=0>" + iCount2 + "</a></b>";
		  } else {
			  sCount2= "&nbsp";
		  }
		  if (iCount3 > 0) {
			  sCount3 = "<b><a href=" +  sUrl + "&flowType=1>" + iCount3 + "</a></b>";
		  } else {
			  sCount3= "&nbsp";
		  }
		  if (iCount4 > 0) {
			  sCount4 = "<b><a href=" +  sUrl + "&flowType=2>" + iCount4 + "</a></b>";
		  } else {
			  sCount4= "&nbsp";
		  }
		  if (iCount5 > 0) {
			  sCount5 = "<b><a href=" +  sUrl + "&flowType=-2>" + iCount5 + "</a></b>";
		  } else {
			  sCount5= "&nbsp";
		  }	  
		  
		  out.println("<tr><td>&nbsp;</td><td align='center' onMouseOver=\"javascript:this.className='trMouseOver'\" onMouseOut=\"javascript:this.className='trMouseOut'\">");
		  out.println("<a href=");
		  out.println(sUrl);
		  out.println(">");		  
		  out.println(name);
		  out.println("</a>");
		  out.println("<td align='center' onMouseOver=\"javascript:this.className='trMouseOver'\" onMouseOut=\"javascript:this.className='trMouseOut'\">");
		  out.println(sCount2);
		  out.println("</td>");
		  out.println("<td align='center' onMouseOver=\"javascript:this.className='trMouseOver'\" onMouseOut=\"javascript:this.className='trMouseOut'\">");
		  out.println(sCount3);
		  out.println("</td>");
		  out.println("<td align='center' onMouseOver=\"javascript:this.className='trMouseOver'\" onMouseOut=\"javascript:this.className='trMouseOut'\">");
		  out.println(sCount4);
		  out.println("</td>");		  
		  out.println("<td align='center' onMouseOver=\"javascript:this.className='trMouseOver'\" onMouseOut=\"javascript:this.className='trMouseOut'\">");
		  out.println(sCount5);
		  out.println("</td>");	
		  out.println("</td></tr>");		  
	  }
	  
	  
  }
%>
<tr class="trClassTitle2">
	<td colspan="2"><b>合计</b></td>
  <td><b><%=iCount2_total %></b></td>
  <td><b><%=iCount3_total %></b></td>
  <td><b><%=iCount4_total %></b></td>
  <td><b><%=iCount5_total %></b></td>
</tr>
</table>