首页 > 其他分享 >北京地铁车站系统

北京地铁车站系统

时间:2022-11-03 17:27:09浏览次数:55  
标签:北京地铁 String rs 车站 系统 public state ID name

 

 

 

chezhan.java

package bean;

public class chezhan {
int ID;
String name;
String no1;
String no2;
String no3;
String no4;
public int getID() {
    return ID;
}
public void setID(int iD) {
    ID = iD;
}
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public String getNo1() {
    return no1;
}
public void setNo1(String no1) {
    this.no1 = no1;
}
public String getNo2() {
    return no2;
}
public void setNo2(String no2) {
    this.no2 = no2;
}
public String getNo3() {
    return no3;
}
public void setNo3(String no3) {
    this.no3 = no3;
}
public String getNo4() {
    return no4;
}
public void setNo4(String no4) {
    this.no4 = no4;
}
public chezhan(int iD,String name,String no1,String no2,String no3,String no4)
{
    ID = iD;
    this.name = name;
    this.no1 = no1;
    this.no2 = no2;
    this.no3 = no3;
    this.no4 = no4;
}
}

 

 

dao.java

 

package dao;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.sql.ResultSet;
import java.sql.Statement;
import dbutil.DBUtil;
import bean.*;
import java.util.Collections;
public class dao {
    public static List<chezhan> selectkluxian(String chezhan1)
    { 
        
        String sql = "select * from chezhan where no1="+chezhan1;
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<chezhan> list = new ArrayList<>();
        ResultSet rs = null;
        int flag=0;
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            chezhan kc=null;
            while(rs.next())
            {
                int ID=rs.getInt("ID");
                String name=rs.getString("name");
                String no1=rs.getString("no1");
                String no2=rs.getString("no2");
                String no3=rs.getString("no3");
                String no4=rs.getString("no4");
                kc =new chezhan(ID,name,no1,no2,no3,no4);
                //System.out.println(name+"=========");
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public static List<chezhan> selectkzhantai(String no)
    { 
        //System.out.println("22222222222222");
        String sql = "select * from chezhan where name='"+no+"'";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<chezhan> list = new ArrayList<>();
        ResultSet rs = null;
        chezhan kc=null;
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            while(rs.next()) {
                
                int ID=rs.getInt("ID");
                String name=rs.getString("name");
                String no1=rs.getString("no1");
                String no2=rs.getString("no2");
                String no3=rs.getString("no3");
                String no4=rs.getString("no4");
                System.out.println(name);
                  no3="1"; 
                  if(rs.getString("no3")==null)
                  no3=" ";
                  if(rs.getString("no2")==null)
                      no2=" ";
                  if(rs.getString("no4")==null)
                      no4=" ";
                kc =new chezhan(ID,name,no1,no2,no3,no4);
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public static List<chezhan> chaxunluxian(String name1,String name2)
    { 
        //System.out.println("2--------");
        String sql = "select * from chezhan where name='"+name1+"'";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<chezhan> list = new ArrayList<>();
        ResultSet rs = null;
        List<chezhan> kc1=selectkzhantai(name2);
       // System.out.println(kc1.get(0).getNo1());
        try
        {
            chezhan kc=null;
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            while(rs.next()) {
                int ID=rs.getInt("ID");
                String name=rs.getString("name");
                String no1=rs.getString("no1");
                String no2=rs.getString("no2");
                String no3=rs.getString("no3");
                String no4=rs.getString("no4");
                kc =new chezhan(ID,name,no1,no2,no3,no4);
                //list4.add(kc);
                //System.out.println("++++++++++");
                System.out.println(kc.getNo1()+"         11111");
                System.out.println(kc1.get(0).getNo1()+"             222");
                if(kc.getNo1().equals(kc1.get(0).getNo1()))
                {
                    //System.out.println("------------");
                    list=yitiaoxian(kc.getID(),kc1.get(0).getID(),1);
                    break;
                }
                else {
                    List<chezhan> listzhuancheng1 = new ArrayList<>();
                    List<chezhan> list2 = new ArrayList<>();
                    int huanchengID=xunzhaohuanchengdian(no1,ID);
                    listzhuancheng1=fanhuizhuanzhanxinxi(huanchengID);
                    list=yitiaoxian(ID,huanchengID,1);
                    huanchengID=changeid(huanchengID,listzhuancheng1.get(0).getName());
                    list2=yitiaoxian(huanchengID,kc1.get(0).getID(),2);
                    list.addAll(list2);
                }
            }
            
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public static List<chezhan> yitiaoxian(int id1,int id2,int i)
    { 
        String sql;
        if(i==1) {
            if(id1<=id2)
            {
                sql = "select * from chezhan where ID>='"+id1+"' and ID<='"+id2+"' ";
            }
            else
            {
                sql = "select * from chezhan where ID>='"+id2+"' and ID<='"+id1+"' Order By ID Desc " ;
            }
        }
        else {
            if(id1<=id2)
            {
                sql = "select * from chezhan where ID>'"+id1+"' and ID<='"+id2+"' ";
            }
            else
            {
                sql = "select * from chezhan where ID>'"+id2+"' and ID<='"+id1+"' Order By ID Desc " ;
            }
        }
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<chezhan> list = new ArrayList<>();
        ResultSet rs = null; 
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            chezhan kc=null;
            while(rs.next())
            {
                int ID=rs.getInt("ID");
                String name=rs.getString("name");
                String no1=rs.getString("no1");
                String no2=rs.getString("no2");
                String no3=rs.getString("no3");
                String no4=rs.getString("no4");
                kc =new chezhan(ID,name,no1,no2,no3,no4);
                //System.out.println(name+"=========");
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public static int xunzhaohuanchengdian(String No1,int Id)
    { 
        int min=-9999;
        int dingwei=1;
        int w=0;
        String sql = "select ID from chezhan where no1='"+No1+"' and no2!='"+null+"'";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null; 
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            while(rs.next())
            {
                w++;
                int ID=rs.getInt("ID");
                //System.out.println(ID+"                 1");
                if(w==1)
                {
                    min=Math.abs(ID-Id); 
                }
                if(min>Math.abs(ID-Id))
                {
                    dingwei=ID;
                    min=Math.abs(ID-Id);
                     //System.out.println(dingwei+"      1111111111111");
                }
                //System.out.println(name+"=========");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
       
        return dingwei;
    }
    public static List<chezhan> fanhuizhuanzhanxinxi(int id)
    { 
        String sql = "select * from chezhan where ID='"+id+"' ";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<chezhan> list = new ArrayList<>();
        ResultSet rs = null; 
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            chezhan kc=null;
            while(rs.next())
            {
                int ID=rs.getInt("ID");
                String name=rs.getString("name");
                String no1=rs.getString("no1");
                String no2=rs.getString("no2");
                String no3=rs.getString("no3");
                String no4=rs.getString("no4");
                kc =new chezhan(ID,name,no1,no2,no3,no4);
                //System.out.println(name+"=========");
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public static int changeid(int Id,String Name)
    { 
        int ID=1;
        String sql = "select ID from chezhan where name='"+Name+"' and ID!='"+Id+"'";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null; 
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            while(rs.next())
            {
                 ID=rs.getInt("ID");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return ID;
    }
}

 

 

DBUtil.java

package dbutil;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBUtil {//这个类就是套模板如果需要用的时候只需要改数据库(db)的名字即可*******
    //public static String db_url="jdbc:mysql://localhost:3306/database?uerUnicode=true&characterEncoding=UTF-8";
    public static String db_url="jdbc:mysql://localhost:3306/ditie?serverTimezone=GMT%2B8&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8";//db是数据库的名字
    //这是连接数据库,servlet是数据库的名称,uerUnicode=true&characterEncoding=UTF-8是将字符集设置为utf-8,避免乱码。
    public static String db_user="root";//数据的用户名
    public static String db_password="UJuqCT-az5(f";//数据库的密码
    public static Connection getConn()//获取连接,返回Connection类型,必须设置为static这样才能在其他类中使用
    {
        Connection conn=null;
        try
        {
            Class.forName("com.mysql.cj.jdbc.Driver");//加载驱动
            conn=DriverManager.getConnection(db_url,db_user,db_password);//连接数据库
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return conn;
    }
    public static void close(Statement state,Connection conn)//关闭函数
    {
        if(state!=null)//只有状态和连接时,先关闭状态
        {
            try
            {
                state.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(conn!=null)
        {
            try
            {
                conn.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    public static void close(ResultSet rs,Statement state,Connection conn)
    {
        if(rs!=null)//有结果集,状态和连接时,先关闭结果集,在关闭状态,在关闭连接
        {
            try
            {
                rs.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(state!=null)

        {
            try
            {
                state.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(conn!=null)
        {
            try
            {
                conn.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
}

 

Servlet.java

 

package servlet;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.List;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import dao.*;
import bean.*;
import dao.*;
@WebServlet("/r2")//r3是资源路径
public class Servlet extends HttpServlet{
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException {
    /*    
     * 利用post获取体数据进行使用
        //获取请求消息体--请求参数
        //1 获取字符流
        BufferedReader br=request.getReader();
        //2 读取数据
        String line=null;
        while((line==br.readLine())    ) {
            System.out.println("line");
        }
        
        */
        return;
    }
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");// 设置字符集,避免乱码
        // 获取jsp界面需要进行的操作,
        String method = req.getParameter("method");//1 req.getParameter("参数名")根据参数名获取参数值
        //2 String[] getParametervalue("参数名"):根据参数名称获取参数值的数组
        //3 Enumeration<String>  getParameterNames():获取所有请求参数名称 如果是数组的话只能获取到第一个
        //4 Map<String,String[]> getParameterMap():获取所有参数map集合  就是字符或者字符串都能存储
        
        
        //System.out.println("============");
        if (method.equals("xianlu"))
        {
            selectluxian(req,resp);
        }
        if (method.equals("zhantai"))
        {
            selectzhantai(req,resp);
        }
        if (method.equals("chaxun"))
        {
            chaxunluxian(req,resp);
        }
    }
    private void selectluxian(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String luxian=req.getParameter("luxian");
//        System.out.println(req.getParameter("luxian")+"=========");
        List<chezhan> kc=dao.selectkluxian(luxian);
        String inf1="共拥有"+kc.size()+"站";
        req.setAttribute("kc", kc);
        req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("1daohang.jsp").forward(req, resp);
    }
    private void selectzhantai(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String zhantai=req.getParameter("name");
       // System.out.println(req.getParameter("name")+"=========");
        List<chezhan> kc=dao.selectkzhantai(zhantai);
        req.setAttribute("kc", kc);
        req.getRequestDispatcher("1xianlu.jsp").forward(req, resp);
    }
    private void chaxunluxian(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String name1=req.getParameter("name1");
        String name2=req.getParameter("name2");
        List<chezhan> kc=dao.chaxunluxian(name1,name2);
        req.setAttribute("kc", kc);
        req.getRequestDispatcher("1zhantai.jsp").forward(req, resp);
    }
 }

 

 

1.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
  <div class="layui-header">
    <div class="layui-logo layui-hide-xs layui-bg-black">layout demo</div>
    <!-- 头部区域(可配合layui 已有的水平导航) -->
    <ul class="layui-nav layui-layout-left">
      <!-- 移动端显示 -->
      <li class="layui-nav-item layui-show-xs-inline-block layui-hide-sm" lay-header-event="menuLeft">
        <i class="layui-icon layui-icon-spread-left"></i>
      </li>
      
      <li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
      <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
      <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
      <li class="layui-nav-item">
        <a href="javascript:;">nav groups</a>
        <dl class="layui-nav-child">
          <dd><a href="">menu 11</a></dd>
          <dd><a href="">menu 22</a></dd>
          <dd><a href="">menu 33</a></dd>
        </dl>
      </li>
    </ul>
    <ul class="layui-nav layui-layout-right">
      <li class="layui-nav-item layui-hide layui-show-md-inline-block">
        <a href="javascript:;">
          <img src="//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" class="layui-nav-img">
          tester
        </a>
        <dl class="layui-nav-child">
          <dd><a href="">Your Profile</a></dd>
          <dd><a href="">Settings</a></dd>
          <dd><a href="">Sign out</a></dd>
        </dl>
      </li>
      <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
        <a href="javascript:;">
          <i class="layui-icon layui-icon-more-vertical"></i>
        </a>
      </li>
    </ul>
  </div>
  
  <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
      <!-- 左侧导航区域(可配合layui已有的垂直导航) -->
      <ul class="layui-nav layui-nav-tree" lay-filter="test">
        <li class="layui-nav-item layui-nav-itemed">
          <a class="" href="javascript:;">menu group 1</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;">menu 1</a></dd>
            <dd><a href="javascript:;">menu 2</a></dd>
            <dd><a href="javascript:;">menu 3</a></dd>
            <dd><a href="">the links</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item">
          <a href="javascript:;">menu group 2</a>
          <dl class="layui-nav-child">
            <dd><a href="javascript:;">list 1</a></dd>
            <dd><a href="javascript:;">list 2</a></dd>
            <dd><a href="">超链接</a></dd>
          </dl>
        </li>
        <li class="layui-nav-item"><a href="javascript:;">click menu item</a></li>
        <li class="layui-nav-item"><a href="">the links</a></li>
      </ul>
    </div>
  </div>
  
  <div class="layui-body">
    <!-- 内容主体区域 -->
    <div style="padding: 15px;">内容主体区域。记得修改 layui.css 和 js 的路径</div>
  </div>
  
  <div class="layui-footer">
    <!-- 底部固定区域 -->
    底部固定区域
  </div>
</div>
<script src="./layui/layui.js"></script>
<script>
//JS 
layui.use(['element', 'layer', 'util'], function(){
  var element = layui.element
  ,layer = layui.layer
  ,util = layui.util
  ,$ = layui.$;
  
  //头部事件
  util.event('lay-header-event', {
    //左侧菜单事件
    menuLeft: function(othis){
      layer.msg('展开左侧菜单的操作', {icon: 0});
    }
    ,menuRight: function(){
      layer.open({
        type: 1
        ,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
        ,area: ['260px', '100%']
        ,offset: 'rt' //右上角
        ,anim: 5
        ,shadeClose: true
      });
    }
  });
  
});
</script>
</body>
</html>

 

1daohang.jsp

 

<%@page import="java.util.*"%>
<%@page import="bean.*"%>
<%@page import="dao.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
<style> 
</style>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-itemm"><a href="1daohang.jsp">站点查询</a></li>
  <li class="layui-nav-item"><a href="1xianlu.jsp">线路查询</a></li>
  <li class="layui-nav-item"><a href="1zhantai.jsp">起点-终点查询</a></li>
</ul>
<form action="/chezhan/r2?method=xianlu" method="post" aligen="center">
    <div class="layui-inline">
    <input type="text" name="luxian" required lay-verify="required" placeholder="请输入线路号" autocomplete="off" class="layui-input"> <input class="layui-btn layui-btn-sm" type="submit" value="查询">   
             
    </div>
</form>
${inf1}
        <table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>站点名称</th>
                    <th>所属线路</th>
                    <th>站点ID</th>
            </tr>
             <c:forEach items="${kc}" var="chezhan">
            <tr>
                <td><c:out value="${chezhan.name}"></c:out></td>
                <td><c:out value="${chezhan.no1}"></c:out></td>
                <td><c:out value="${chezhan.ID}"></c:out></td>
            </tr>
        </c:forEach>
        </table>
            <%--  
            <%List<chezhan> list=(List<chezhan>)request.getAttribute("kc");
                for(chezhan kc : list){
             %>
                <%=kc.getName() %> 
             <%      
                }
            %>
           --%>
    <script type="text/javascript">
        layui.use('element',function (){
        var element=layui.element;
});
        
    </script>

</body>
</html>

 

 

1xianlu.jsp

<%@page import="java.util.*"%>
<%@page import="bean.*"%>
<%@page import="dao.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
<style> 
</style>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item"><a href="1daohang.jsp">站点查询</a></li>
  <li class="layui-nav-item"><a href="1xianlu.jsp">线路查询</a></li>
  <li class="layui-nav-item"><a href="1zhantai.jsp">起点-终点查询</a></li>
</ul>
<form action="/chezhan/r2?method=zhantai" method="post" aligen="center">
    <div class="layui-inline">
    <input type="text" name="name" required lay-verify="required" placeholder="请输入站台号" autocomplete="off" class="layui-input"> <input class="layui-btn layui-btn-sm" type="submit" value="查询">   
             
    </div>
</form>
${inf1}
        <table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>站点名称</th>
                    <th>所属线路</th>
                    <th>站点ID</th>
            </tr>
             <c:forEach items="${kc}" var="chezhan">
            <tr>
                <td><c:out value="${chezhan.name}"></c:out></td>
                <td><c:out value="${chezhan.no1}"></c:out></td>
                <td><c:out value="${chezhan.ID}"></c:out></td>
            </tr>
        </c:forEach>
        </table>
    <script type="text/javascript">
        layui.use('element',function (){
        var element=layui.element;
});
    </script>

</body>
</html>

 

 

1zhantai.jsp

 

<%@page import="java.util.*"%>
<%@page import="bean.*"%>
<%@page import="dao.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
    <script src="layui/layui.js"></script>
<style> 
</style>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item"><a href="1daohang.jsp">站点查询</a></li>
  <li class="layui-nav-item"><a href="1xianlu.jsp">线路查询</a></li>
  <li class="layui-nav-item"><a href="1zhantai.jsp">起点-终点查询</a></li>
</ul>
<form action="/chezhan/r2?method=chaxun" method="post" aligen="center">
    <div class="layui-container">  
  <div class="layui-row">
    <div class="layui-col-md5">
                                                  
                                                           
    </div>
    <div class="layui-col-md3">
      <input type="text" name="name1" required lay-verify="required" placeholder="请输入起点站" autocomplete="off" class="layui-input">
    </div>
    <div class="layui-col-md2">
    <input type="text" name="name2" required lay-verify="required" placeholder="请输入终点站" autocomplete="off" class="layui-input">
    </div>
        <div class="layui-col-md2">
            <input class="layui-btn layui-btn-sm" type="submit" value="查询">
    </div>
  </div></div>
</form>
${inf1}
        <table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>站点名称</th>
                    <th>所属线路</th>
                    <th>站点ID</th>
            </tr>
             <c:forEach items="${kc}" var="chezhan">
            <tr>
                <td><c:out value="${chezhan.name}"></c:out></td>
                <td><c:out value="${chezhan.no1}"></c:out></td>
                <td><c:out value="${chezhan.ID}"></c:out></td>
            </tr>
        </c:forEach>
        </table>
    <script type="text/javascript">
        layui.use('element',function (){
        var element=layui.element;
});
    </script>

</body>
</html>

 

标签:北京地铁,String,rs,车站,系统,public,state,ID,name
From: https://www.cnblogs.com/1774323810com/p/16855143.html

相关文章

  • 如何在VM虚拟机里安装Linux系统
    很多企业在做数据抓取的时候往往需要多台服务器同时运行,在降低成本的同时还能方便操控服务器就显得尤为重要。这篇文章介绍了在VMware虚拟机里安装Linux操作系统的方法,文中......
  • 第一章 计算机系统漫游
    1.1信息就是位+上下文#include<stdio.h>intmain(){printf("hello,world\n");}其对应的ASCII文本表示如下#include......
  • 关于安科瑞火灾监控系统在地铁供配电系统中的应用
    陈盼安科瑞电气股份有限公司上海嘉定201801 【摘要】在地铁车站供配电系统中使用电气火灾监控系统对监控设备工况、预防电气火灾十分重要,地铁公司作为企业,还需充分考虑前......
  • 系统集成
    系统集成需要注意的点:1、减少因包装引起的调用工作量。具体来说,就是包装时应该减少不必要的调用工作量,对原产品的调用方式和返回的结果不因包装了一层而改变,即包装器完全是......
  • 打不开 github 的方法与推荐基于Vue3与Element plus的后台管理系统
    一、打不开github的方法1、打开本机hosts文件(C:\Windows\System32\drivers\etc)2、然后在hosts文件里的末尾放入一下两个IP地址:#GitHubStart140.82.114......
  • 记linux系统(centos7)的IP地址永久性配置
    记linux系统(centos7)的IP地址永久性配置实验开始:网络配置老几样:IP地址、子网掩码、网关、DNS永久性配置步骤一查看并对照网卡我使用的是NAT模式还要注意去虚拟网络编辑器里......
  • 做一个不崩溃的核酸系统有多难?
       热度已经过了,但还是觉得有必要从架构设计的角度来讨论一下此事。并用以往我的经验来设计一套负载能力更好一些的系统。先说一下基本的架构思路:最大限度的避......
  • 做一个不崩溃的核酸系统有多难?
       热度已经过了,但还是觉得有必要从架构设计的角度来讨论一下此事。并用以往我的经验来设计一套负载能力更好一些的系统。先说一下基本的架构思路:最大限度的避......
  • windows完全代理配置(包括UWP,应用商店,系统更新),所有应用走代理
    部分参考自知乎基本浏览器代理首先基本的浏览器代理设置,照常使用rayN等代理软件即可。建议在设置里启用局域网连接,特殊操作后可以通过热点共享代理。引用环境变量的......
  • WIN10系统系统无法升级的问题
    WIN10系统系统无法升级的问题利用软件MediaCreationTool来升级专业版更改注册表1.按下win+R组合键打开运行,键入:regedit点击确定打开注册表;2.在注册表“HKEY_L......