⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plantotalresult.jsp

📁 基于Java的地图数据管理软件。使用MySQL数据库管理系统。
💻 JSP
字号:
<%@page contentType="text/html; charset=gb2312"%>
<%@ page language="java" import="java.util.*,
    com.tongtu.util.PlanDetail,
    com.tongtu.util.QueryStr,
    com.tongtu.util.Page;" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
Page pages=(Page)request.getAttribute("page");
int pagenum=0;
 String pagen=(String)request.getAttribute("pagenum");
 String rows=(String)request.getAttribute("rowCount");
 if (pagen!=null) pagenum=Integer.parseInt(pagen);
 int userInt = 0; //当前页记录数
 int posInt  = 1; //开始位置
 int rowCount = 0;
 if (rows!= null) rowCount = Integer.parseInt(rows);
   if (page != null){
       List userList=pages.getList();
       userInt = userList.size();
     } 
 QueryStr qs = (QueryStr)session.getAttribute("totalStr") ;
 String [] showStr = qs.getResultStr();
 String str = "";
 for (int i = 0; i < showStr.length;i++){
    str += showStr[i]+";";
 }

%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="<%=path%>/css/css.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body,td,th {
	font-size: 12px;
}
-->
</style>
</head>

<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="6" height="11"  background="pic/beijing.jpg"><img src="pic/tupian.jpg" width="6" height="11" /></td>
        <td background="pic/beijing.jpg"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="25"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="61%">&nbsp;&nbsp;&gt;&gt;数据统计</td>
        <td width="39%">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
     <form name="planForm" aciotn="del.do">
	      <tr>
        <td height="5" colspan="2" ></td>
      </tr>
      <tr>
        <td height="25" align="left" bgcolor="#73CCF7"> <img src="pic/icon3.gif" width="16" height="16" align="absmiddle" />
        <a href="DownTable.do?table_id=计划统计&tableType=2" title="将计划的统计结果数据导出为Excel表格">导出Excel表格</a> 
          </td>
        <td height="25" align="right" bgcolor="#73CCF7"></td>
      </tr>
      <tr>
        <td height="1" colspan="2" bgcolor="#666666"></td>
      </tr>
      <tr>
        <td height="164" colspan="2" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="5" colspan="19"></td>
          </tr>
          <tr class="z">
             <%if (str.indexOf("1") != -1){ %>
            <td width="6" height="20" align="center" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">计划类型</td><%} %>
             <%if (str.indexOf("2") != -1){ %>
            <td width="6" height="20" align="center" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">行政村类型</td> <%} %>
              <%if (str.indexOf("3") != -1){ %>
            <td width="6" height="20" align="center" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">乡镇名称</td><%} %>
               <%if (str.indexOf("4") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">建设里程
               <a href="showTotalResult.do?typeId=1">
            <img src="<%if (qs.getMileType() == 1){ %>pic/jiantou.gif <%}else {%>pic/jiantou1.gif <%} %>" width="12" height="7" border="0"/></a></td>
       
            <%} %>
             <%if (str.indexOf("5") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">路面类型</td>
              <%} %>
            <%if (str.indexOf("6") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk"> 投资额 
                <a href="showTotalResult.do?typeId=4">
            <img src="<%if (qs.getInvestType() == 1){ %>pic/jiantou.gif <%}else {%>pic/jiantou1.gif <%} %>" width="12" height="7" border="0"/></a></td>
   
               <%} %>
            <%if (str.indexOf("7") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk"> 省补资金
                 <a href="showTotalResult.do?typeId=5">
                <img src="<%if (qs.getProType() == 1){ %>pic/jiantou.gif <%}else {%>pic/jiantou1.gif <%} %>" width="12" height="7" border="0"/></a></td>
   
                <%} %>
            <%if (str.indexOf("8") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">开工时间
                <a href="showTotalResult.do?typeId=6">
            <img src="<%if (qs.getStartType() == 1){ %>pic/jiantou.gif <%}else {%>pic/jiantou1.gif <%} %>" width="12" height="7" border="0"/></a></td>
   
                <%} %>
            <%if (str.indexOf("9") != -1){ %>
            <td width="6" bgcolor="#F2F4F6" class="bk"><img src="pic/sep_title.gif" width="2" height="21" /></td>
            <td width="100" align="left" bgcolor="#F2F4F6" class="bk">完工时间
                 <a href="showTotalResult.do?typeId=7">
             <img src="<%if (qs.getEndType() == 1){ %>pic/jiantou.gif <%}else {%>pic/jiantou1.gif <%} %>" width="12" height="7" border="0"/></a></td>
   
              <%} %>
            </tr>
                <%
             PlanDetail  plan = new PlanDetail();
             if (page != null){
              List planList=pages.getList();
              String planType = "";
              userInt = planList.size();
              
                for (int i = 0; i < planList.size();i++){
                   String villageType = "";
                   plan = (PlanDetail)planList.get(i);
                   //1沟通建制村,2非沟通建制村,3县道土路,4县道砂石路
                   if (plan.getPlanType() == 1) planType = "沟通建制村";
                   if (plan.getPlanType() == 2) planType = "非沟通建制村";
                   if (plan.getPlanType() == 3) planType = "县道土路";
                   if (plan.getPlanType() == 4) planType = "县道砂石路";
                   String [] viStr = plan.getVillageType().split(";");
                   for (int j = 0; viStr != null && j < viStr.length;j++){
                       if (viStr[j].equals("1") ) villageType += " 爱滋病村 ;";
                       if (viStr[j].equals("2") ) villageType += " 民蔟村 ;";
                       if (viStr[j].equals("3") ) villageType += " 干部挂职村 ;";
                       if (viStr[j].equals("4") ) villageType += " 千村百镇示范村 ;";
                          
                   } 
                   if (villageType.length() > 0)
                   villageType  = villageType.substring(0,villageType.length()-2); 
                    String roadType = "";
                   if (plan.getRoadSurfaceType() == 1) roadType = "沥青混凝土路面 ";
                   if (plan.getRoadSurfaceType() == 2) roadType = "水泥混凝土路面";
                   if (plan.getRoadSurfaceType() == 3) roadType = "简易铺装路面";
                   if (plan.getRoadSurfaceType() == 4) roadType = "砂石路面";
                   if (plan.getRoadSurfaceType() == 5) roadType = "石质路面";
                   if (plan.getRoadSurfaceType() == 6) roadType = "渣石路面";
                   if (plan.getRoadSurfaceType() == 7) roadType = "砖铺路面";
                   if (plan.getRoadSurfaceType() == 8) roadType = "无路面";  
             %>
          <tr class="z">
             <%if (str.indexOf("1") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=planType%>&nbsp;</td>
              <%} %>
              <%if (str.indexOf("2") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=villageType %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("3") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getTownName() %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("4") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getMilemeter() %>&nbsp;</td>
              <%} %>
              <%if (str.indexOf("5") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=roadType %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("6") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getInvest() %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("7") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getProvinceSubsidy() %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("8") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getStartTime() %>&nbsp;</td>
              <%} %>
                 <%if (str.indexOf("9") != -1){ %>
            <td height="25" class="bk">&nbsp;</td>
            <td height="25" class="bk"><%=plan.getEndTime() %>&nbsp;</td>
            <%} %>
          </tr>
          <%} }%>
        </table></td>
      </tr>
  <tr>
          
              <%
          int nextPageStart = 0;
          if (pages!=null) nextPageStart=pages.getStartOfNextPage();
          int previousPage=0;
          if (pages!=null) previousPage=pages.getStartOfPreviousPage();
          int start = 0;
           String startnum=(String)request.getAttribute("start");
           if (startnum!=null) start=Integer.parseInt(startnum);
           if (start != 0 )
             {
             posInt = start;
             userInt = start + userInt;
             }else {
                   userInt = posInt + userInt - 1;
             }
          int currentPage =  (start/rowCount)+1;
      
          int numPages = (int)Math.ceil((double)pagenum/(double)rowCount);
          if(numPages==0){
             currentPage=0;
           }
          %>
           <td height="25" align="left" bgcolor="#73CCF7">         
            <div align="left">&nbsp;共 <%=pagenum %> 条,列出第 <%=posInt %> 至 <%=userInt %> 条 &nbsp; </div></td>
        <td align="right" bgcolor="#73CCF7">
          第<font color="blue"><%=currentPage%></font>页/共<font color="blue"><%=numPages%></font>页&nbsp;&nbsp;|&nbsp;&nbsp;
          <%
             if(currentPage>1){
             
             %>
             <a href="showTotalResult.do?start=0" title="第一页">首页</a>
              &nbsp;&nbsp;|&nbsp;&nbsp;
             <%}else{%>
            首页
              &nbsp;&nbsp;|&nbsp;&nbsp;
             <%}%>
             <%
              if(pages!=null&&pages.isPreviousPageAvailable()){
		      %>
		    <a href="showTotalResult.do?start=<%=previousPage%>" title="上一页">上一页</a>
		     &nbsp;&nbsp;|&nbsp;&nbsp;
		     <%}
              if(nextPageStart<pagenum){
		     %>
		    <a href="showTotalResult.do?start=<%=nextPageStart%>" title="下一页">下一页</a>
		    &nbsp;&nbsp;|&nbsp;&nbsp;
		    <%}
              int lastStart = rowCount*(numPages-1);
              if(currentPage<numPages&&lastStart>0){
            %>
		    <a href="showTotalResult.do?start=<%=lastStart%>" title="最后一页">末页</a>
		    <%}else{%>
		     末页
		    <%}%>
		    转到
		    <select name="pageselect" onchange="javascrpt:pagesubmit();" >
		      <%for(int n=1;n<numPages+1;n++){%>
		         <% if(n==currentPage){%>
                  <option  value="<%=(n-1)*rowCount%>" selected><%=n%></option>
               <%}else{%>
                    <option value="<%=((n-1)*rowCount)%>"><%=n%></option>
              <%}}%>
             
            </select>
        
          &nbsp;</td>
          </tr>
        </table></td>
      </tr>
</table>
<br>
<br>
<br>
<table width="100%" height="55"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="44"><div align="center">主办:安徽省交通厅 &copy;2005-2006版权所有 维护单位:安徽省通途信息技术有限公司
     <br><br>联系电话:<span class="font"><SPAN class=A1>0551--5397484 5397494 </SPAN></span> <br></div></td>
  </tr>
</table>
<script language="JavaScript">
function pagesubmit()
{ 
  var start=document.all.pageselect.value;
  //alert(start);
  window.location.href="showTotalResult.do?start="+start;
}
</script>
</form>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -