- 浏览: 147440 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
jkleeo:
原创到底在哪里?
XMLBEANS的使用总结 -
wangacidlemon:
强帖啊,博主小强小强的
XMLBEANS的使用总结 -
failure5152:
好文,正在学习xmlbean
XMLBEANS的使用总结 -
henry_j2ee:
非常感谢!不错!
项目中用到了xmlbean,谢谢分享
XMLBEANS的使用总结 -
Kaede:
好文,赞
XMLBEANS的使用总结
<%@ page contentType="text/html; charset=gb2312" %>
<%@ page import="com.hisun.mvqq.bean.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.math.*"%>
<%@ page import="java.lang.*,com.hisun.res.Config"%>
<%@include file="/jsp/validate/validate.jsp"%>
<jsp:useBean id="userInfo" scope="session" type="com.hisun.mvqq.bean.UserInfo"/>
<script language="javascript">
function output()
{
//拷贝
var elTable = document.getElementById("data_table");
var oRangeRef = document.body.createTextRange();
oRangeRef.moveToElementText( elTable );
oRangeRef.execCommand( "Copy" );
//粘贴
try{
var appExcel = new ActiveXObject( "Excel.Application" );
appExcel.Visible = true;
appExcel.Workbooks.Add().Worksheets.Item(1).Paste();
//appExcel = null;
}catch(e){
alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。");
}
var elTable1 = document.getElementById("sum_table");
var oRangeRef1 = document.body.createTextRange();
oRangeRef1.moveToElementText( elTable1 );
oRangeRef1.execCommand( "Copy" );
//粘贴
try{
appExcel.Visible = true;
appExcel.Worksheets.Item(2).Paste();
appExcel1 = null;
}catch(e){
alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。");
}
}
</script>
<%
String AAADBUser = Config.getProperty("AAADBUSER");
//MaxTime maxtime=new MaxTime();
// String MTime=maxtime.Max_Time("ACA_BUSIDETAIL_LATN_HOUR");
//if(MTime!=null && MTime.length()>8)
// MTime=MTime.substring(0,4)+"-"+MTime.substring(4,6)+"-"+MTime.substring(6,8)+" "+MTime.substring(8,10)+"时";
//if(MTime!=null)
// MTime=MTime+"时";
%>
<%
String sp_ID=userInfo.getSpCode();
String sp_name=userInfo.getSpName();
String cStatUserName=userInfo.getUserName();
String querytype=request.getParameter("querytype");//以sp还是以接入号方式查询
String prefixtype=request.getParameter("prefixtype"); //以号段方式还是多个业务方式
String qprefix=request.getParameter("prefix"); //输入一个或多个接入号
String prefixstart=request.getParameter("prefixstart"); //开始接入号
String prefixend=request.getParameter("prefixend"); //结束接入号
String cTable=sp_name;
String spID=request.getParameter("sp");
String busType=request.getParameter("busType");
String callType=request.getParameter("callType");
String statType=request.getParameter("statType");
String userType=request.getParameter("userType");
String sYear=request.getParameter("sYear");
String sMonth=request.getParameter("sMonth");
String sDay=request.getParameter("sDay");
String sHour=request.getParameter("sHour") ;
String sDate=sYear+"-"+sMonth+"-"+sDay+" "+sHour;
//System.out.println(sDate);
spStatDate sD=new spStatDate();
//sDate=sD.resDate(sDate);
String eYear=request.getParameter("eYear");
String eMonth=request.getParameter("eMonth");
String eDay=request.getParameter("eDay");
String eHour=request.getParameter("eHour");
String eDate=eYear+"-"+eMonth+"-"+eDay+" "+eHour;
String durl="";
//eDate=sD.resDate(eDate);
// System.out.print(eDate);
Vector statData=new Vector();
Vector statClass=new Vector();
try{
spStatMete stat=new spStatMete();
String prefixStr="";
if (prefixtype.equals("0"))
prefixStr=qprefix;
else
prefixStr=prefixstart+","+prefixend;
if (querytype.equals("1")){
statData=stat.statMete(querytype,spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+spID+"&serid="+busType+"&callType="+callType+"&statType="+statType+"&userType="+userType;
durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
}
else{
statData=stat.statMete(querytype,prefixtype,prefixStr,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+prefixtype+"&serid="+prefixStr+"&callType="+callType+"&statType="+statType+"&userType="+userType;
durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
}
statClass=stat.statMeteClass(spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
//out.println(busType);
if(sp_ID.equals("0001")){
sp_name=stat.sp_Name(spID);
}
}catch(Exception e){
e.printStackTrace();
}
GregorianCalendar createTime = new GregorianCalendar();
%>
<html>
<head>
<title>【电信语音服务平台】</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/main.css" rel="stylesheet" type="text/css">
</head>
<script src="../event.js"></script>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="/jsp/images/index_16.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" align="center"><img src="/jsp/images/index_19.gif" width="32" height="29"></td>
<td class="link1">统计分析 业务量情况分析</td>
</tr>
</table> </td>
<td width="9" valign="top" bgcolor="#ffffff"><img src="/jsp/images/index_6.gif" width="9" height="29"></td>
</tr>
<tr>
<td height="6" background="/jsp/images/index_22.gif"></td>
<td width="9" background="/jsp/images/index_22.gif" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF">
<br>
<form name="statForm" method="post" action="" onSubmit="return subm()">
<font size="4"><b><font color="#0000FF"><%=sp_name%>业务量分布情况</font></b></font><br>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42%">统计分析日期:<font color=red><%=sDate%><%//=sDate.substring(0,4)%><%//=sDate.substring(4,6)%><%//=sDate.substring(6,8)%> <%//=sDate.substring(8,10)%>时</font>至<font color=red><%=eDate%><%//=eDate.substring(0,4)%><%//=eDate.substring(4,6)%><%//=eDate.substring(6,8)%> <%//=eDate.substring(8,10)%>时</font></td>
<td width="39%" align="right"></td>
<td width="19%" align="right">
<input name="oexcel" type="image" id="oexcel" value="导出excel" src="../../images/b_excel.gif" width="70" height="19" onClick="javascript:output()">
<input name="printw" type="image" id="printw" value="打印" src="../../images/b_dayin.gif" width="45" height="19" onClick="javascript:window.print()">
</td>
</tr>
</table>
<table id="data_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#f5f5f5>
<td align=center width="10%">业务名称</td>
<td align="center" width="9%">业务代码</td>
<td align=center width="10%">呼叫用户数</td>
<td align=center width="10%">呼叫次数</td>
<td align=center width="10%">计费时长(分)</td>
<td align=center width="10%">平均计费时长(分/次)</td>
<td align=center width="10%">信息费(元)</td>
<td align=center width="10%">通讯费(元)</td>
<td align=center width="10%">计费费用(元)</td>
<td align=center width="10%">分解数据到</td>
</tr>
<%
//合计信息
String sername_all="合计";
int user_count_all=0;
int record_count_all=0;
//float uticket_duration_all=0.00F;
float avageTime_all=0.00F;
float billing_duration_all=0.00F;
float BILL_CHARGE_all=0.00F;
float INFO_CHARGE_all=0.00F;
float SEC_BILLING_CHARGE_all=0.00F;
//System.out.println("durl:"+durl);
if(statData.size()>0)
for(int i=0;i<statData.size();i++){
//System.out.println("statData.size:"+i);
Hashtable hash = (Hashtable)statData.elementAt(i);
//out.print((String)hash.get("sql"));
String serid=(String)hash.get("serid");
String sername = (String)hash.get("sername");
String prefix1=(String)hash.get("prefix");
String user_count = (String)hash.get("user_count");
String record_count = (String)hash.get("record_count");
//String uticket_duration = (String)hash.get("uticket_duration");
String billing_duration = (String)hash.get("billing_duration");
String avageTime = (String)hash.get("avageTime");
String sp_id=(String)hash.get("sp_id");
String url="stYeWuLiang_ShiJian.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
url=url+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
url=url+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
//String surl="stYeWuLiang_ShengFen.jsp?sp="+spID+"&serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
//String url="stYeWuLiang_DiShi.jsp?sp="+spID+"&serid="+serID+"&callType="+callType+"&statType="+statType+"&userType="+userType+"&Province_id="+Province_id;
String surl="stYeWuLiang_DiShi.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
surl=surl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
surl=surl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
String INFO_CHARGE=(String)hash.get("INFO_CHARGE");
String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE");
user_count_all=user_count_all+Integer.parseInt(user_count);
record_count_all=record_count_all+Integer.parseInt(record_count);
//uticket_duration_all=uticket_duration_all+Float.parseFloat(uticket_duration);
avageTime_all=avageTime_all+Float.parseFloat(avageTime);
//System.out.println("avageTime_all:"+avageTime_all);
billing_duration_all=billing_duration_all+Float.parseFloat(billing_duration);
//System.out.println("billing_duration_all:"+billing_duration_all);
BILL_CHARGE_all=BILL_CHARGE_all+Float.parseFloat(BILL_CHARGE);
INFO_CHARGE_all=INFO_CHARGE_all+Float.parseFloat(INFO_CHARGE);
SEC_BILLING_CHARGE_all=SEC_BILLING_CHARGE_all+Float.parseFloat(SEC_BILLING_CHARGE);
%>
<tr bgcolor=#ffffff>
<td align="center"><%=sername%></td>
<td align="center"><%=prefix1%></td>
<td align="center"><%=user_count%></td>
<td align="center"><%=record_count%></td>
<td align="center"><%=billing_duration%></td>
<td align="center"><%=avageTime%></td>
<td align="center"><%=INFO_CHARGE%></td>
<td align="center"><%=SEC_BILLING_CHARGE%></td>
<td align="center"><%=BILL_CHARGE%></td>
<td align="center"><a href="<%=surl%>">各地市</a> <a href="<%=url%>">每天</a></td>
</tr>
<%
}
String BILLING_DURATION_ALL = String.valueOf(String.valueOf(String.valueOf(billing_duration_all))).concat("000");
BILLING_DURATION_ALL = BILLING_DURATION_ALL.substring(0, BILLING_DURATION_ALL.indexOf(".") + 3);
String BILL_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(BILL_CHARGE_all))).concat("000");
BILL_CHARGE_ALL = BILL_CHARGE_ALL.substring(0, BILL_CHARGE_ALL.indexOf(".") + 3);
String AVG_BILL_ALL="0";
if (record_count_all!=0)
{
AVG_BILL_ALL=String.valueOf(String.valueOf(String.valueOf(billing_duration_all/record_count_all))).concat("000");
AVG_BILL_ALL=AVG_BILL_ALL.substring(0, AVG_BILL_ALL.indexOf(".") + 3);
}
String INFO_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(INFO_CHARGE_all))).concat("000");
INFO_CHARGE_ALL = INFO_CHARGE_ALL.substring(0, INFO_CHARGE_ALL.indexOf(".") + 3);
String SEC_BILLING_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(SEC_BILLING_CHARGE_all))).concat("000");
SEC_BILLING_CHARGE_ALL = SEC_BILLING_CHARGE_ALL.substring(0, SEC_BILLING_CHARGE_ALL.indexOf(".") + 3);
%>
<tr bgcolor=#ffffff>
<td align="center"><%=sername_all%></td>
<td align="center">/</td>
<td align="center"><%=user_count_all%></td>
<td align="center"><%=record_count_all%></td>
<td align="center"><%=BILLING_DURATION_ALL%></td>
<td align="center"><%=AVG_BILL_ALL%></td>
<td align="center"><%=INFO_CHARGE_ALL%></td>
<td align="center"><%=SEC_BILLING_CHARGE_ALL%></td>
<td align="center"><%=BILL_CHARGE_ALL%></td>
<td align="center"><a href="<%=durl%>">各地市</a></td>
</tr>
</tbody>
</table>
<br>
<table id="sum_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#f5f5f5>
<td align=center width="12%">总计</td>
<td align=center width="11%">呼叫用户数</td>
<td align=center width="11%">呼叫次数</td>
<td align=center width="11%">计费时长(分)</td>
<td align=center width="11%">平均计费时长(分/次)</td>
<td align=center width="11%">信息费(元)</td>
<td align=center width="11%">通讯费(元)</td>
<td align=center width="11%">计费费用(元)</td>
</tr>
<%
//System.out.print("汇总");
if(statClass.size()>0){
for(int i=0;i<statClass.size();i++){
Hashtable hash = (Hashtable)statClass.elementAt(i);
String serid = (String)hash.get("sername");
String user_count = (String)hash.get("user_count");
String record_count = (String)hash.get("record_count");
// String uticket_duration = (String)hash.get("uticket_duration");
String billing_duration = (String)hash.get("billing_duration");
String avageTime = (String)hash.get("avageTime");
//System.out.println("jsp avageTime"+avageTime);
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
String INFO_CHARGE=(String)hash.get("INFO_CHARGE");
String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE");
%>
<tr bgcolor=#ffffff>
<td align="center"><font color="#0000FF"><%=serid%></font></td>
<td align="center"><font color="#0000FF"><%=user_count%></font></td>
<td align="center"><font color="#0000FF"><%=record_count%></font></td>
<td align="center"><font color="#0000FF"><%=billing_duration%></font></td>
<td align="center"><font color="#0000FF"><%=avageTime%></font></td>
<td align="center"><%=INFO_CHARGE%></td>
<td align="center"><%=SEC_BILLING_CHARGE%></td>
<td align="center"><%=BILL_CHARGE%></td>
<td align=center ></td>
</tr>
<%
}
}else{
%>
<tr bgcolor=#ffffff>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<%--<td align="center">0</td>--%>
<td align="center">0</td>
</tr>
<%
}
%>
</tbody>
</table>
<br>
<table cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#ffffff>
<td align="center">
<table width="10%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--呼叫用户数------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="呼叫用户数|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String user_count = (String)hash.get("user_count");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=user_count%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--呼叫次数--------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="呼叫次数|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String record_count = (String)hash.get("record_count");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=record_count%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--标题------------------------------------------------------------------------>
<td rowspan="2"><applet code="PiechartApplet.class" archive="all.jar" width="180" height="400">
<param name="valuepresym" value="">
<param name="valuepostsym" value=" ">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="20,80">
<param name="legendtitle" value="业务名称">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="标题|400,400||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="400,400,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|"+serid+"||";
%><param name="<%=labelname%>" value="<%=serid%>">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="0"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
</tr>
<tr>
<!--计费时长--------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="业务类型">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="计费时长|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String billing_duration= (String)hash.get("billing_duration");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=billing_duration%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--信息费----------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="业务类型">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="信息费|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
//String record_count = (String)hash.get("record_count");
//String uticket_duration = (String)hash.get("uticket_duration");
//String avageTime = (String)hash.get("avageTime");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=BILL_CHARGE%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%">制表时间:
<%=sD.nowDate()%>
</td>
<td align="right" width="30%">制表人:<%=cStatUserName%> <font color=red><<%=cTable%>></font></td>
</tr>
</table>
<br><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%"> </td>
<td align="right" width="30%"> </td>
</tr>
</table>
</form> </td>
<td width="9" bgcolor="#ffffff"></td>
</tr>
<tr>
<td height="8" align="left" background="/jsp/images/index_11-bg.gif" bgcolor="#FFFFFF"><img src="/jsp/images/index_11.gif" width="15" height="15"></td>
<td width="9" height="8" bgcolor="#FFFFFF"><img src="/jsp/images/index_11-2.gif" width="9" height="15"></td>
</tr>
</table>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function subm()
{
return false;
}
</script>
确实很让人伤心,都什么年代了,还会出现这么长的JSP。
另外提一句,完全没有必要这么麻烦。既然可以创建activex来处理excel,则完全可以将表格选中,然后发送复制命令,再发送粘贴命令给excel,再保存,就可以了。前提是必须在windows下使用IE,并把安全级别降低。
另外,不可预知的干扰因素太多。
<%@ page import="com.hisun.mvqq.bean.*"%>
<%@ page import="java.util.*"%>
<%@ page import="java.math.*"%>
<%@ page import="java.lang.*,com.hisun.res.Config"%>
<%@include file="/jsp/validate/validate.jsp"%>
<jsp:useBean id="userInfo" scope="session" type="com.hisun.mvqq.bean.UserInfo"/>
<script language="javascript">
function output()
{
//拷贝
var elTable = document.getElementById("data_table");
var oRangeRef = document.body.createTextRange();
oRangeRef.moveToElementText( elTable );
oRangeRef.execCommand( "Copy" );
//粘贴
try{
var appExcel = new ActiveXObject( "Excel.Application" );
appExcel.Visible = true;
appExcel.Workbooks.Add().Worksheets.Item(1).Paste();
//appExcel = null;
}catch(e){
alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。");
}
var elTable1 = document.getElementById("sum_table");
var oRangeRef1 = document.body.createTextRange();
oRangeRef1.moveToElementText( elTable1 );
oRangeRef1.execCommand( "Copy" );
//粘贴
try{
appExcel.Visible = true;
appExcel.Worksheets.Item(2).Paste();
appExcel1 = null;
}catch(e){
alert("使用此功能必须在浏览器中设置:Internet选项->安全->将本站加入“受信任的站点”。");
}
}
</script>
<%
String AAADBUser = Config.getProperty("AAADBUSER");
//MaxTime maxtime=new MaxTime();
// String MTime=maxtime.Max_Time("ACA_BUSIDETAIL_LATN_HOUR");
//if(MTime!=null && MTime.length()>8)
// MTime=MTime.substring(0,4)+"-"+MTime.substring(4,6)+"-"+MTime.substring(6,8)+" "+MTime.substring(8,10)+"时";
//if(MTime!=null)
// MTime=MTime+"时";
%>
<%
String sp_ID=userInfo.getSpCode();
String sp_name=userInfo.getSpName();
String cStatUserName=userInfo.getUserName();
String querytype=request.getParameter("querytype");//以sp还是以接入号方式查询
String prefixtype=request.getParameter("prefixtype"); //以号段方式还是多个业务方式
String qprefix=request.getParameter("prefix"); //输入一个或多个接入号
String prefixstart=request.getParameter("prefixstart"); //开始接入号
String prefixend=request.getParameter("prefixend"); //结束接入号
String cTable=sp_name;
String spID=request.getParameter("sp");
String busType=request.getParameter("busType");
String callType=request.getParameter("callType");
String statType=request.getParameter("statType");
String userType=request.getParameter("userType");
String sYear=request.getParameter("sYear");
String sMonth=request.getParameter("sMonth");
String sDay=request.getParameter("sDay");
String sHour=request.getParameter("sHour") ;
String sDate=sYear+"-"+sMonth+"-"+sDay+" "+sHour;
//System.out.println(sDate);
spStatDate sD=new spStatDate();
//sDate=sD.resDate(sDate);
String eYear=request.getParameter("eYear");
String eMonth=request.getParameter("eMonth");
String eDay=request.getParameter("eDay");
String eHour=request.getParameter("eHour");
String eDate=eYear+"-"+eMonth+"-"+eDay+" "+eHour;
String durl="";
//eDate=sD.resDate(eDate);
// System.out.print(eDate);
Vector statData=new Vector();
Vector statClass=new Vector();
try{
spStatMete stat=new spStatMete();
String prefixStr="";
if (prefixtype.equals("0"))
prefixStr=qprefix;
else
prefixStr=prefixstart+","+prefixend;
if (querytype.equals("1")){
statData=stat.statMete(querytype,spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+spID+"&serid="+busType+"&callType="+callType+"&statType="+statType+"&userType="+userType;
durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
}
else{
statData=stat.statMete(querytype,prefixtype,prefixStr,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
durl="stYeWuLiang_ShengFen.jsp?querytype="+querytype+"&sp="+prefixtype+"&serid="+prefixStr+"&callType="+callType+"&statType="+statType+"&userType="+userType;
durl=durl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
durl=durl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
}
statClass=stat.statMeteClass(spID,busType,callType,statType,userType,sDate,eDate,userInfo.getLoginNo(),userInfo.getIpAddress());
//out.println(busType);
if(sp_ID.equals("0001")){
sp_name=stat.sp_Name(spID);
}
}catch(Exception e){
e.printStackTrace();
}
GregorianCalendar createTime = new GregorianCalendar();
%>
<html>
<head>
<title>【电信语音服务平台】</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../../css/main.css" rel="stylesheet" type="text/css">
</head>
<script src="../event.js"></script>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="30" background="/jsp/images/index_16.gif">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="30" align="center"><img src="/jsp/images/index_19.gif" width="32" height="29"></td>
<td class="link1">统计分析 业务量情况分析</td>
</tr>
</table> </td>
<td width="9" valign="top" bgcolor="#ffffff"><img src="/jsp/images/index_6.gif" width="9" height="29"></td>
</tr>
<tr>
<td height="6" background="/jsp/images/index_22.gif"></td>
<td width="9" background="/jsp/images/index_22.gif" bgcolor="#FFFFFF"></td>
</tr>
<tr>
<td align="center" valign="top" bgcolor="#FFFFFF">
<br>
<form name="statForm" method="post" action="" onSubmit="return subm()">
<font size="4"><b><font color="#0000FF"><%=sp_name%>业务量分布情况</font></b></font><br>
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="42%">统计分析日期:<font color=red><%=sDate%><%//=sDate.substring(0,4)%><%//=sDate.substring(4,6)%><%//=sDate.substring(6,8)%> <%//=sDate.substring(8,10)%>时</font>至<font color=red><%=eDate%><%//=eDate.substring(0,4)%><%//=eDate.substring(4,6)%><%//=eDate.substring(6,8)%> <%//=eDate.substring(8,10)%>时</font></td>
<td width="39%" align="right"></td>
<td width="19%" align="right">
<input name="oexcel" type="image" id="oexcel" value="导出excel" src="../../images/b_excel.gif" width="70" height="19" onClick="javascript:output()">
<input name="printw" type="image" id="printw" value="打印" src="../../images/b_dayin.gif" width="45" height="19" onClick="javascript:window.print()">
</td>
</tr>
</table>
<table id="data_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#f5f5f5>
<td align=center width="10%">业务名称</td>
<td align="center" width="9%">业务代码</td>
<td align=center width="10%">呼叫用户数</td>
<td align=center width="10%">呼叫次数</td>
<td align=center width="10%">计费时长(分)</td>
<td align=center width="10%">平均计费时长(分/次)</td>
<td align=center width="10%">信息费(元)</td>
<td align=center width="10%">通讯费(元)</td>
<td align=center width="10%">计费费用(元)</td>
<td align=center width="10%">分解数据到</td>
</tr>
<%
//合计信息
String sername_all="合计";
int user_count_all=0;
int record_count_all=0;
//float uticket_duration_all=0.00F;
float avageTime_all=0.00F;
float billing_duration_all=0.00F;
float BILL_CHARGE_all=0.00F;
float INFO_CHARGE_all=0.00F;
float SEC_BILLING_CHARGE_all=0.00F;
//System.out.println("durl:"+durl);
if(statData.size()>0)
for(int i=0;i<statData.size();i++){
//System.out.println("statData.size:"+i);
Hashtable hash = (Hashtable)statData.elementAt(i);
//out.print((String)hash.get("sql"));
String serid=(String)hash.get("serid");
String sername = (String)hash.get("sername");
String prefix1=(String)hash.get("prefix");
String user_count = (String)hash.get("user_count");
String record_count = (String)hash.get("record_count");
//String uticket_duration = (String)hash.get("uticket_duration");
String billing_duration = (String)hash.get("billing_duration");
String avageTime = (String)hash.get("avageTime");
String sp_id=(String)hash.get("sp_id");
String url="stYeWuLiang_ShiJian.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
url=url+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
url=url+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
//String surl="stYeWuLiang_ShengFen.jsp?sp="+spID+"&serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
//String url="stYeWuLiang_DiShi.jsp?sp="+spID+"&serid="+serID+"&callType="+callType+"&statType="+statType+"&userType="+userType+"&Province_id="+Province_id;
String surl="stYeWuLiang_DiShi.jsp?serid="+serid+"&callType="+callType+"&statType="+statType+"&userType="+userType;
surl=surl+"&sYear="+sYear+"&sMonth="+sMonth+"&sDay="+sDay+"&sHour="+sHour;
surl=surl+"&eYear="+eYear+"&eMonth="+eMonth+"&eDay="+eDay+"&eHour="+eHour;
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
String INFO_CHARGE=(String)hash.get("INFO_CHARGE");
String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE");
user_count_all=user_count_all+Integer.parseInt(user_count);
record_count_all=record_count_all+Integer.parseInt(record_count);
//uticket_duration_all=uticket_duration_all+Float.parseFloat(uticket_duration);
avageTime_all=avageTime_all+Float.parseFloat(avageTime);
//System.out.println("avageTime_all:"+avageTime_all);
billing_duration_all=billing_duration_all+Float.parseFloat(billing_duration);
//System.out.println("billing_duration_all:"+billing_duration_all);
BILL_CHARGE_all=BILL_CHARGE_all+Float.parseFloat(BILL_CHARGE);
INFO_CHARGE_all=INFO_CHARGE_all+Float.parseFloat(INFO_CHARGE);
SEC_BILLING_CHARGE_all=SEC_BILLING_CHARGE_all+Float.parseFloat(SEC_BILLING_CHARGE);
%>
<tr bgcolor=#ffffff>
<td align="center"><%=sername%></td>
<td align="center"><%=prefix1%></td>
<td align="center"><%=user_count%></td>
<td align="center"><%=record_count%></td>
<td align="center"><%=billing_duration%></td>
<td align="center"><%=avageTime%></td>
<td align="center"><%=INFO_CHARGE%></td>
<td align="center"><%=SEC_BILLING_CHARGE%></td>
<td align="center"><%=BILL_CHARGE%></td>
<td align="center"><a href="<%=surl%>">各地市</a> <a href="<%=url%>">每天</a></td>
</tr>
<%
}
String BILLING_DURATION_ALL = String.valueOf(String.valueOf(String.valueOf(billing_duration_all))).concat("000");
BILLING_DURATION_ALL = BILLING_DURATION_ALL.substring(0, BILLING_DURATION_ALL.indexOf(".") + 3);
String BILL_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(BILL_CHARGE_all))).concat("000");
BILL_CHARGE_ALL = BILL_CHARGE_ALL.substring(0, BILL_CHARGE_ALL.indexOf(".") + 3);
String AVG_BILL_ALL="0";
if (record_count_all!=0)
{
AVG_BILL_ALL=String.valueOf(String.valueOf(String.valueOf(billing_duration_all/record_count_all))).concat("000");
AVG_BILL_ALL=AVG_BILL_ALL.substring(0, AVG_BILL_ALL.indexOf(".") + 3);
}
String INFO_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(INFO_CHARGE_all))).concat("000");
INFO_CHARGE_ALL = INFO_CHARGE_ALL.substring(0, INFO_CHARGE_ALL.indexOf(".") + 3);
String SEC_BILLING_CHARGE_ALL=String.valueOf(String.valueOf(String.valueOf(SEC_BILLING_CHARGE_all))).concat("000");
SEC_BILLING_CHARGE_ALL = SEC_BILLING_CHARGE_ALL.substring(0, SEC_BILLING_CHARGE_ALL.indexOf(".") + 3);
%>
<tr bgcolor=#ffffff>
<td align="center"><%=sername_all%></td>
<td align="center">/</td>
<td align="center"><%=user_count_all%></td>
<td align="center"><%=record_count_all%></td>
<td align="center"><%=BILLING_DURATION_ALL%></td>
<td align="center"><%=AVG_BILL_ALL%></td>
<td align="center"><%=INFO_CHARGE_ALL%></td>
<td align="center"><%=SEC_BILLING_CHARGE_ALL%></td>
<td align="center"><%=BILL_CHARGE_ALL%></td>
<td align="center"><a href="<%=durl%>">各地市</a></td>
</tr>
</tbody>
</table>
<br>
<table id="sum_table" cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#f5f5f5>
<td align=center width="12%">总计</td>
<td align=center width="11%">呼叫用户数</td>
<td align=center width="11%">呼叫次数</td>
<td align=center width="11%">计费时长(分)</td>
<td align=center width="11%">平均计费时长(分/次)</td>
<td align=center width="11%">信息费(元)</td>
<td align=center width="11%">通讯费(元)</td>
<td align=center width="11%">计费费用(元)</td>
</tr>
<%
//System.out.print("汇总");
if(statClass.size()>0){
for(int i=0;i<statClass.size();i++){
Hashtable hash = (Hashtable)statClass.elementAt(i);
String serid = (String)hash.get("sername");
String user_count = (String)hash.get("user_count");
String record_count = (String)hash.get("record_count");
// String uticket_duration = (String)hash.get("uticket_duration");
String billing_duration = (String)hash.get("billing_duration");
String avageTime = (String)hash.get("avageTime");
//System.out.println("jsp avageTime"+avageTime);
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
String INFO_CHARGE=(String)hash.get("INFO_CHARGE");
String SEC_BILLING_CHARGE = (String)hash.get("SEC_BILLING_CHARGE");
%>
<tr bgcolor=#ffffff>
<td align="center"><font color="#0000FF"><%=serid%></font></td>
<td align="center"><font color="#0000FF"><%=user_count%></font></td>
<td align="center"><font color="#0000FF"><%=record_count%></font></td>
<td align="center"><font color="#0000FF"><%=billing_duration%></font></td>
<td align="center"><font color="#0000FF"><%=avageTime%></font></td>
<td align="center"><%=INFO_CHARGE%></td>
<td align="center"><%=SEC_BILLING_CHARGE%></td>
<td align="center"><%=BILL_CHARGE%></td>
<td align=center ></td>
</tr>
<%
}
}else{
%>
<tr bgcolor=#ffffff>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<td align="center">0</td>
<%--<td align="center">0</td>--%>
<td align="center">0</td>
</tr>
<%
}
%>
</tbody>
</table>
<br>
<table cellspacing=0 bordercolordark=#ffffff cellpadding=2 width="96%"
align=center bgcolor=#dddddd bordercolorlight=#dddddd border=1>
<tbody>
<tr bgcolor=#ffffff>
<td align="center">
<table width="10%" border="0" cellspacing="0" cellpadding="0">
<tr>
<!--呼叫用户数------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="呼叫用户数|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String user_count = (String)hash.get("user_count");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=user_count%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--呼叫次数--------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="呼叫次数|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String record_count = (String)hash.get("record_count");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=record_count%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--标题------------------------------------------------------------------------>
<td rowspan="2"><applet code="PiechartApplet.class" archive="all.jar" width="180" height="400">
<param name="valuepresym" value="">
<param name="valuepostsym" value=" ">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="20,80">
<param name="legendtitle" value="业务名称">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="标题|400,400||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="400,400,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|"+serid+"||";
%><param name="<%=labelname%>" value="<%=serid%>">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="0"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
</tr>
<tr>
<!--计费时长--------------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="业务类型">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="计费时长|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String serid = (String)hash.get("sername");
String billing_duration= (String)hash.get("billing_duration");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=billing_duration%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
<!--信息费----------------------------------------------------------------->
<td><applet code="PiechartApplet.class" archive="all.jar" width="250" height="200">
<param name="valuepresym" value="">
<param name="valuepostsym" value="">
<param name="labelcolor" value="50,50,50">
<param name="legendfont" value="">
<param name="legendposition" value="250,20">
<param name="legendtitle" value="业务类型">
<param name="LegendBackground" value="255,255,255">
<param name="LegendBorder" value="125,125,125">
<param name="LegendtextColor" value="0,0,0">
<param name="title" value="信息费|10,30||grey">
<%if(statData.size()>0){
%><param name="Pie1" value="60,80,120,<%=statData.size()%>,10"><%
for(int i=0;i<statData.size();i++){
String color[]={"115,152,164","99,99,156","185,53,8","239,214,115","0,63,68","17,97,158","0,128,0","128,128,0","0,0,128","0,128,128","128,0,0" ,"128,0,128","128,128,128","192,192,192","0,255,0","255,0,255","255,0,0","0,0,255","255,255,0","0,255,255","100,0,0","200,0,0","0,100,0","0,200,0","0,0,100","0,0,200","100,100,0","100,0,100","0,100,100","200,200,0","200,0,200" ,"0,200,200","100,100,100","200,200,200","150,150,150","50,50,50","150,0,0","0,0,150","50,50,0","0,50,50"};
Hashtable hash = (Hashtable)statData.elementAt(i);
String BILL_CHARGE = (String)hash.get("BILL_CHARGE");
//String record_count = (String)hash.get("record_count");
//String uticket_duration = (String)hash.get("uticket_duration");
//String avageTime = (String)hash.get("avageTime");
String labelname="pie1label"+java.lang.String.valueOf(i+1);
String segmentname="segment"+java.lang.String.valueOf(i+1);
String dataname="data"+java.lang.String.valueOf(i+1)+"series1";
String segmentvalue=color[i%40]+"|||";
%><param name="<%=labelname%>" value="">
<param name="<%=segmentname%>" value="<%=segmentvalue%>">
<param name="<%=dataname%>" value="<%=BILL_CHARGE%>"><%
}
}else{
%><param name="Pie1" value="60,80,120,1,0">
<param name="pie1label1" value="">
<param name="segment1" value="128,128,128|空||">
<param name="data1series1" value="0"><%
}%>
</applet></td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<br>
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%">制表时间:
<%=sD.nowDate()%>
</td>
<td align="right" width="30%">制表人:<%=cStatUserName%> <font color=red><<%=cTable%>></font></td>
</tr>
</table>
<br><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="70%"> </td>
<td align="right" width="30%"> </td>
</tr>
</table>
</form> </td>
<td width="9" bgcolor="#ffffff"></td>
</tr>
<tr>
<td height="8" align="left" background="/jsp/images/index_11-bg.gif" bgcolor="#FFFFFF"><img src="/jsp/images/index_11.gif" width="15" height="15"></td>
<td width="9" height="8" bgcolor="#FFFFFF"><img src="/jsp/images/index_11-2.gif" width="9" height="15"></td>
</tr>
</table>
</body>
</html>
<script language="JavaScript" type="text/javascript">
function subm()
{
return false;
}
</script>
评论
6 楼
together
2007-01-12
j2eeqk 写道
而且这个JSP让我看了很伤心。
确实很让人伤心,都什么年代了,还会出现这么长的JSP。
另外提一句,完全没有必要这么麻烦。既然可以创建activex来处理excel,则完全可以将表格选中,然后发送复制命令,再发送粘贴命令给excel,再保存,就可以了。前提是必须在windows下使用IE,并把安全级别降低。
另外,不可预知的干扰因素太多。
5 楼
yongweiking
2007-01-11
写的有点莫名奇妙,很奇怪,就是想发表,请先整理一下再说吧
4 楼
j2eeqk
2007-01-10
我不觉得这个贴有什么技术在其中。JS访问Excel或者JAVA访问Excel都已经是成型的技术了。不知作者是否另有其意。而且这个JSP让我看了很伤心。真的。
3 楼
daoger
2007-01-10
怎么什么都没有?
2 楼
泡泡
2007-01-09
boin 写道
我汗,楼主可以用 []把它们框起来么。。。FF差点挂掉了。
恶意代码,FF挂掉了。
1 楼
boin
2007-01-09
我汗,楼主可以用 []把它们框起来么。。。FF差点挂掉了。
相关推荐
- 该示例中的 `getExcelFile()` 方法并未给出具体实现,实际应用中需要结合特定的库(如 js-xlsx 或 SheetJS)来完成表格数据到 Excel 文件的转换。 - Excel 文件格式较为复杂,简单的文本导出可能无法完全保留原 ...
在处理JavaScript导出Excel表格的过程中,开发者们经常会遇到一些特有的技术挑战。例如,在某些情况下,导出的数据会涉及到超出26位英文字符的字段,这可能会影响到Excel表格中列的显示与格式。本文提供了使用ES6...
通过jQuery技术,把页面上的表格导出Excel,导出时解决纯数据导出后显示科学计数法和日期型导出后为#号显示问题
excel.js(导出excel表格)
总结来说,这个“简单的导出excel表格列子”提供了一种实用且高效的方法,通过纯JavaScript在Web页面上实现Excel导出功能,无需依赖任何插件,代码简洁易懂,对开发者来说具有很高的学习价值。通过阅读和实践压缩包...
js导出excel,可设置excel属性
标题 "xlsx.full.min.js-导入导出excel获取数据demo.zip" 提到的核心知识点是使用 "xlsx.full.min.js" 库来实现Excel文件的导入、导出以及数据获取功能。这个库是一个压缩包,其中包含了演示这些功能的代码示例。...
layui数据表格导出Excel插件是一款为layui框架设计的实用工具,它允许用户方便地将layui数据表格中的数据导出到Excel文件中。layui是一款轻量级的前端UI框架,以其简洁、优雅的代码风格和丰富的组件库深受开发者喜爱...
在JavaScript编程领域,导出Excel是一项常见的需求,特别是在Web应用中,用户可能需要将数据显示在Excel表格中以便进一步处理或存储。"js导出excel.zip"这个压缩包提供了一个解决方案,它结合了EasyUI和DataGrid组件...
总结一下,JavaScript导出Excel和Word的关键步骤包括: 1. 获取Table数据和样式信息。 2. 将数据转化为适合Excel或Word的格式。 3. 使用库(如SheetJS、docx)生成相应格式的文件。 4. 创建下载链接或通过服务器完成...
总结,使用JavaScript导出Excel插件,你需要选择合适的库,配置到你的项目中,根据业务需求编写导出逻辑,处理好兼容性和性能问题。在实现过程中,务必注意代码的可维护性和用户友好性,确保导出功能的稳定性和高效...
在前端开发中,导出Excel表格是一项常见的需求,特别是在数据可视化和报表生成的场景下。SheetJS是一个强大的JavaScript库,用于读写多种电子表格格式,包括Microsoft Excel (XLS / XLSX) 和OpenDocument (ODS) 等。...
总的来说,使用JavaScript导出带样式的Excel表格涉及了对数据的组织、样式定义以及文件生成等多个环节。通过SheetJS库,我们可以轻松地实现这一功能,提供给用户高质量的导出体验。在实际项目中,还可以根据需求进行...
Javascript导出excel为xlsx格式,兼容IE6+和主流浏览器,下载下来直接可以使用。 其他javascript导出excel插件可看作者文章:https://blog.csdn.net/qq_21693027/article/details/80459677
js导入excel表格或者导出为excel格式,用到的js文件xlsx.full.min.js资源
在实际开发中,你可能还需要处理数据的格式化、错误处理、用户交互等细节问题,但以上内容已经涵盖了Vue.js中使用`Blob`和`Export2Excel`导出Excel表格的基础知识。通过这些技术,你可以为用户提供方便的数据导出...
elementui+vue3+sheetjs导出excel不需要filesave依赖 安装依赖 pnm install xlsx
在网页开发中,有时我们...提供的`js浏览器导出Excel`资源应该包含了一个示例,你可以参考这个示例代码来理解并应用到自己的项目中。这种方法简单易用,适用于各种网页表格导出需求,极大地提高了前端开发的灵活性。
js 实现 用JavaScript导出图像到Excel! 值得下载看看!资源免费,大家分享!!