<%@ page contentType="text/html;charset=UTF-8" %>
<%@ 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.stat.*" %>
<%@ include file="/sessionInfo.jsp"%>

<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="<%=strSkin_SESSION%>/css2007.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../../../share/js/commonTool.js"></script>
</head>
<%
	
	
	StringBuffer sCond = new StringBuffer("1=1 AND XX.XXMC17='报废'");
	//获取对象信息
    Asset asset = new Asset();
	
	ArrayList assetList = asset.getAssetList(sCond.toString());
	int assetSize = assetList != null? assetList.size():0;
	
	
%>
<!-----上面的工具栏------>
<%@ include file="/share/title.jsp"%>
<table width="100%">
  <form name="formBar" method="post">
  <tr>
  	<td valign="bottom" style="padding-bottom: 5px;padding-top: 5px;" align="center">
  		<h4 style="display: inline;">报废资产统计</h4>
  	</td>
  </tr>
  
  </form>
</table>

<!-----信息列表----->
<table width="100%" border="1" bordercolorlight="#C0C0C0" bordercolordark="#FFFFFF" class="tableClass" cellpadding="1" cellspacing="0">
  <form name="formList" method="post">
  <tr class="trClassTitle_c">
    <td rowspan="2">分类名称</td>
    <td colspan="2">报废统计</td>
  </tr>
  <tr class="trClassTitle_c">
    <td>报废数量</td>
    <td>合计金额</td>
  </tr>
<%
	
	int count = 0;
	double sum = 0;
	Object[] value = null;
	int valueSize = 0;
    for (int i=0;i<assetSize;i++){
    	value = (Object[])assetList.get(i);
    	if (value == null){
    		continue;
    	}
    	valueSize =  value.length;
    	int value0 = Integer.valueOf(value[1].toString());
		double value1 = Double.valueOf(value[2].toString());
    	out.println("<tr align=\"center\">");
    	out.println("<td>"+ value[0].toString() +"&nbsp;</td>");
    	out.println("<td>"+ value0 +"&nbsp;</td>");
    	out.println("<td>"+ SzConvert.formatFloat2Str(value1) +"&nbsp;</td>");
    	
    	count = count + value0;
    	sum = sum + value1;
    }
    
    out.println("<tr class=\"trClassTitle2\" align=\"center\">");
    out.println("<td style=\"color: red;\">合计</td>");
    out.println("<td>"+ count +"&nbsp;</td>");
	out.println("<td>"+ SzConvert.formatFloat2Str(sum) +"&nbsp;</td>");
    out.println("<tr>");
    
    
%>

  </form>
</table>

<!-----下面的工具栏------>
<table width="100%">
  <form name="formPage" method="post">
  </form>
</table>

<!-----这里包含要提交的内容--->
<form name="formHidden" method="post">
</form>
<%
    ////如果要使用日历控件，必须输出这个calendarFrame
    out.println(SzPageHelp.calendar2Frame("../../../"));
%>
