📄 secondindexcenter_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.sql.*;
import com.huashi.util.jdbc.*;
public final class secondIndexCenter_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
private static java.util.Vector _jspx_dependants;
public java.util.List getDependants() {
return _jspx_dependants;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html; charset=GBK");
pageContext = _jspxFactory.getPageContext(this, request, response,
"index1_error.jsp", true, 8192, true);
_jspx_page_context = pageContext;
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("<html>\r\n");
out.write(" <head>\r\n");
out.write(" <title>\r\n");
out.write(" 统计查询\r\n");
out.write(" </title>\r\n");
out.write(" </head>\r\n");
out.write(" <body bgcolor=\"#C0C0C0\">\r\n");
out.write("\r\n");
out.write(" <h1>\r\n");
out.write(" ");
Connection con = null;
try {
out.println("<table border=1 cellspacing=0 cellpadding=5 width=100% height=45>");
out.println("<tr><th width=50% ><font face=仿宋_GB2312 size=4>名称</font></th><th width=50% ><font face=仿宋_GB2312 size=4>数量</font></th></tr>");
int sum = 0;
// Class.forName("oracle.jdbc.driver.OracleDriver");
// con=DriverManager.getConnection("jdbc:oracle:oci:@ASCRAC","ascdata2","asc12345");
con = ConnectionUtil.getConnectionByJndiName("oracle/ascdb");
Statement statement_center = con.createStatement();
String sql_center = " select "+
" b.center_nm, count(a.tmnl_id) "+
" from "+
" asc_tmnl_info_tbl a ,asc_center_info_tbl b where a.center_id = b.center_id "+
" and "+
" test_stat=0 group by b.center_nm ";
ResultSet rs_center = statement_center.executeQuery(sql_center);
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u>分局安装统计</u></font><br/>");
sum = 0;
int total = 0;
while(rs_center.next()){
String centerName = rs_center.getString(1);
sum = rs_center.getInt(2);
total = total + sum;
out.println("<tr>");
out.println("<td width=50% height=17><font color=#000000 face=仿宋_GB2312 size=4><a href=subCenterDetail.jsp?centerName="+centerName+">"+centerName+"</a></font></td>");
out.println("<td align=center width=50% height=17><font color=#000000 face=仿宋_GB2312 size=4>"+sum+"</font></td>");
out.println("</tr>");
}
out.println("<tr>");
out.println("<th width=50% ><font face=仿宋_GB2312 size=4>合计</font></th>");
out.println("<td align=center width=50% height=17><font color=#000000 face=仿宋_GB2312 size=4>"+total+"</font></td>");
out.println("</tr>");
out.println("</table></br>");
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u><a href=secondIndexType.jsp>设备类型统计</a></u></font></br>");
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u><a href=secondIndexVehicle.jsp>车辆类型分布统计</a></u></font></br>");
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u><a href=secondIndexAlarm.jsp>报警统计</a></u></font></br>");
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u><a href=alarmcount.jsp>车机报警统计</a></u></font></br>");
out.println("<font color=#008080 face=仿宋_GB2312 size=5><u><a href=queryVehicle.jsp>车辆查询</a></u></font></br>");
statement_center.close();
con.close();
} catch (Exception e) {
out.println(e.getMessage());
try{con.close();}catch(Exception ex){}
}
out.write("\r\n");
out.write(" \r\n");
out.write(" </h1>\r\n");
out.write(" </body>\r\n");
out.write("</html>\r\n");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -