基于springboot开发的嘟嘟火车票预定管理系统

摘  要

随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。作为计算机应用的一部分使用计算机对火车票预订信息进行管理,具有手工管理所无法比拟的优点。例:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。这些优点能够极大地提高火车票信总管理的效率,也是企业的科学化、正规化管理,与世界接轨的重要条件。

本文针对火车站的订票实际情况,按照软件工程的结构化设计思想,经过项日的可行性研究和需求分析,总体设计,详细设计,以及编码实现和调试等步骤设计开发了火车票网上预订系统。并运用数据流图和数据字典,E-R图和数据库逻辑结构,层次图,系统流程图,以及程序流程图,对该系统的数据需求,数据库,系统软件结构,系统流程,以及处理过程等进行了分析和设计。

本论文为了解决当前宿舍管理方式不够方便快捷的问题,以宿舍管理为研究对象,基于Spring、Spingboot、Mybatis框架整合成SSM框架作为后瑞开发框架,设计并实现一款网上预定火车票系统,可以方便出行人员预定车票,也方便火车站管理员管理车票。本系统基于B/S结构,采用MySQL数据库来保存宿舍管理员的信息以及宿舍和学生的信息,Tomcat为该系统的服务器,再选择idea作为开发环境,令本系统具有安全性,易维护性的特点。该系统分为普通管理员与用户,该系统功能模块包括:用户登录、车次管理、车票预订、注册用户管理等功能;实现了每个模块的修改删除查询和添加的功能。

【关键词】火车票预订、java、springboot,jsp编程技术,B/S结构,mysql数据库

Abstract

With the continuous improvement of science and technology, computer science is becoming increasingly mature, and its powerful functions have been deeply recognized by people. It has entered various fields of human society and is playing an increasingly important role. As a part of computer applications, using computers to manage train ticket booking information has unparalleled advantages over manual management. Example: Fast retrieval, convenient search, high reliability, large storage capacity, good confidentiality, long life, low cost, etc. These advantages can greatly improve the efficiency of train ticket and letter management, and are also important conditions for enterprises to achieve scientific and standardized management and connect with the world.

According to the actual situation of railway station ticket booking, this paper designs and develops a railway ticket online booking system based on the structured design idea of software engineering, through feasibility study and demand analysis, overall design, detailed design, and coding implementation and debugging steps. Using data flow diagrams and data dictionaries, E-R diagrams, database logical structures, hierarchical diagrams, system flow charts, and program flow charts, the data requirements, databases, system software structures, system processes, and processing processes of the system are analyzed and designed.

In order to solve the problem that the current dormitory management method is not convenient and efficient, this paper takes dormitory management as the research object, integrates the SSM framework based on Spring, Springboot, and Mybatis frameworks as the development framework of the later Swiss, and designs and implements an online reservation train ticket system, which can facilitate travel personnel to book tickets and train station administrators to manage tickets. The system is based on a B/S structure, using a MySQL database to store dormitory administrator information and dormitory and student information. Tomcat is the server of the system, and IDEA is selected as the development environment, making the system safe and easy to maintain. The system is divided into ordinary administrators and users. The functional modules of the system include: user login, train management, ticket booking, registered user management, and other functions; The functions of modifying, deleting, querying, and adding each module are implemented.

[Key words] Train ticket booking, Java, spring boot, jsp programming technology, B/S structure, MySQL database.

目  录

摘  要

Abstract

第1章 绪论

1.1 课题的目的及意义

1.1.1 课题的目的

1.2 研究现状

第2章 系统分析

2.1 可行性分析

2.1.1 技术可行性

2.1.2 经济可行性

2.2 系统需求

2.2.1 用户需求

2.2.3 系统功能分析

2.2.4 功能描述

2.3 开发工具介绍

2.3.1 J2SE平台

2.3.2 IDEA简介

2.3.3 SSM简介

2.3.4 jsp嵌入式脚本

2.3.5 数据库选型

2.3.6SpringBoot

2.4 本章小结

第3章 总体设计

3.1 系统功能模块设计

3.2 数据库设计

3.2.1 设计依据

3.2.2 数据库的概念结构设计

3.2.3 数据库的逻辑结构设计

3.3 本章小结

第4章 详细设计

4.1 用户各功能模块

4.1.2车票管理模块的实现

4.1.3车次信息管理模块

4.1.4站点管理模块的实现

4.3 本章小结

第5章 系统测试

5.1 系统测试的基本原则

5.2 软件测试方法

5.3 系统测试用例

5.4 本章小结

结  论

致  谢

参考文献

附 录 1

附 录 2

附 录 3

第1章 绪论

1.1 课题的目的及意义

1.1.1 课题的目的

随着我国国力的增强,交通行业也逐步发展起来。人们较高的生活水平,使得出差或旅游的频率也在提高。正因如此,交通客流量在不断增加,服务效率的低下则成为交通运输业的一个大问题。而有效地进行火车购票管理对于交通运输的正常运转有着举足轻重的作用。

信息处理的繁琐费时与交通服务效率的低下,使得传统的火车购票方式已经不再适合现代运输的客观要求,在这样的背景下,网上火车购票系统的开发则显得尤为重要。购票是交通运输过程中很重要的一步,网上购票系统的开发方使了人们了解火车票的信息,及时地进行预订。这样一来,麻烦的售票、购票过程已不再是困扰,网上购票系统的开发将大大提高火车站人员的工作效率并降低了工作量。

1.1.2 课题的意义

本系统的设计与实现,可以让普通用户订票变得更为方便快捷,一方面可以加强火牛站自身的规范管理,给车站带来一定的经济效益,另一方面又客的及时需要,节省了时间,避免了很多麻烦。本设计结合java的优秀平台扩展能力和My SQL的快速、免费、多线程等优点共同开发了本系统。一方面便于用户在不同平台访问系统,另一方面则提高系统的查询速度,提高效率。正因如此,人们的出行也变得方使快捷,一定程度上讲,网上购票系统为人们的出行提高了便利与快捷,也促进了人们生活水平的提高,当然也为火车站购票服务减少了很多麻烦,带来了很人的社会效益与经济效益。总的来说,网上购票系统的开发适应了社会的需求,促进了社会的发展。

1.2 研究现状

火车站市场的管理和规范问题,是困扰我们多年的一个老问题,也是政府管理中的一个难点,订票是客运业务中的一个最基本的业务,表面上看,它只是火车站业务的一个简单的部分,但是它涉及到管理与客户服务等多方面,因此,过去传统的售票方式已经不能满足现代客运业务流量剧增的客观要求,这就要求一种全新的订票方式一网上订票,来缓解订票高峰时期的客运压力,并为用户提供方使快捷的订票服务。

中国现在拥有非常先进、发达的铁路系统,但目前的售票系统还是上世纪60年代开发的。2003年以后,中国铁路开始加快现代化建设,近儿年来中国的铁路售票系统已经逐步走向现代化,订票全路联网,实现了信息化管理。但是铁路历史由来的“老人难”问题,售票问题,一直无法得到解决。每年的各大节假口,全国人民总会为买票问题而苦恼,一部分人更是无缘牛票。虽然目前的电话订票,也极大地方使了旅客,然而最贴近现代化发展水平的还是网上订票项目,国家也积极推进。

1.本课题主要研究内容

实现本次火车票预定系统过程中主要采用Spring、Spring Boot、MyBatis框架,MySQL数据库技术,前台采用html,css,jsp等技术。首先对项目进行需求分析,通过查阅资料或其他方式来了解与火车票预定系统相关的过程,了解这个有助于我更好的进行需求分析。接下来分别从可行性分析、性能分析、功能分析这几个方面对系统进行了完善的系统分析。系统分析完毕后就是对各个本系统的各个功能模块进行详细的设计并完成代码编写,最后进行代码简化以及对系统进行系统测试,分别从两个方面对系统进行测试,一个是单元测试,一个是集成测试。本项目的论文的内容大概由以下几个部分组成:(1)绪论:主要对火车票预定系统的开发目的和意义,国内外发展现状进行了阐述。(2)系统所用的技术:对本次系统设计的时候所用到的一些主流技术进行简要的讲解,以及对比其他相似技术来说,运用这些技术的好处。(3)需求分析:先对项目进行可行性分析,从多个方面分析系统是可以被开发的;在对系统进行功能分析,分析应该需要拥有的功能以及可以待开发的功能。(4)系统总体设计:系统设计就是对刚刚进行的功能分析后所设计的功能,用代码进行实现。然后在展示出系统数据库里面表的数据以及一些功能结构图。(5)系统的实现:分别介绍系统所能实现的所有功能,其目的以及如何操作,并且加以配图展现的更加详细,清晰。(6)系统测试:先进行单元测试,待单元测试完善完毕后进行集成测试,来判断系统的功能以及各接口处是否能达到预期的功能效果。

第2章 系统分析

2.1 可行性分析

开发一个系统,在时间上和能源上经常存在或多或少的限定。为了节省能源,避免人力资源,财力资源以及物力资源的浪费,在完成一个系统的开发之前,需进行必要的可行性分析。本系统的可行性分析主要从以下四个方面进行阐述。

以下是部分运行截图

 

 

 

 

 

以下是部分代码  需要的私我

package com.my.am.service.station;

import com.my.am.dao.StationDAO;
import com.my.am.entity.Station;
import com.my.common.DAOFactory;

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 javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * Servlet implementation class CreateStationServlet
 */
@WebServlet("/CreateStationServlet")
public class CreateStationServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public CreateStationServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		String stationName = request.getParameter("stationName");
		System.out.println(stationName);
		String level = request.getParameter("level");
		String describe = request.getParameter("describe");
		HttpSession session = request.getSession();
		String admin = (String) session.getAttribute("admin");
		if(admin == null)
			System.out.println("请以管理员登陆");
		else{
		StationDAO stationDao = DAOFactory.getIStationDAOInstance();
		
		 try {
			if(stationDao.findStation(stationName).size()==0)
			{
				Station station = new Station();
				station.setName(stationName);
				station.setLevel(level);
				station.setDescribe(describe);
				StationDAO stationDao1 = DAOFactory.getIStationDAOInstance();
				stationDao1.doCreateStation(station);
				System.out.println("添加成功");
				 request.getRequestDispatcher("adSite.jsp").forward(request, response);
				 request.setAttribute("msg", true);
			}
			else
			{
				System.out.println("该站点已存在");
			}
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		}
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
package com.my.am.service.station;

import com.my.am.dao.StationDAO;
import com.my.common.DAOFactory;

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 javax.servlet.http.HttpSession;
import java.io.IOException;

/**
 * Servlet implementation class DeleteStationServlet
 */
@WebServlet("/DeleteStationServlet")
public class DeleteStationServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public DeleteStationServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
//		response.getWriter().append("Served at: ").append(request.getContextPath());
		String stationName = request.getParameter("stationName");
		System.out.println(stationName);
	//	String level = request.getParameter("level");
		//String describe = request.getParameter("describe");
		HttpSession session = request.getSession();
		String admin = (String) session.getAttribute("admin");
		if(admin == null)
			System.out.println("请以管理员登陆");
		else{
		StationDAO stationDao = DAOFactory.getIStationDAOInstance();
		
		 try {
			 
			 if(stationDao.doDeleteStation(stationName))
			 {
				 System.out.println("删除成功");
				 request.getRequestDispatcher("adSite.jsp").forward(request, response);
				 request.setAttribute("msg", true);
			 }
				else
				{
					request.setAttribute("msg", false);
				}
			}
		catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		 
	}
	}
		
	
	

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
package com.my.am.service.route;

import com.my.am.dao.RouteDAO;
import com.my.am.entity.Route;
import com.my.common.DAOFactory;

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 javax.servlet.http.HttpSession;
import java.io.IOException;
import java.sql.Timestamp;

/**
 * Servlet implementation class CreateRoute
 */
@WebServlet("/CreateRouteServlet")
public class CreateRouteServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public CreateRouteServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		//response.getWriter().append("Served at: ").append(request.getContextPath());
		HttpSession session = request.getSession();
		String admin = (String) session.getAttribute("admin");
//		if(admin == null)
//			System.out.println("请以管理员登陆");
//		else{
		String routeName = request.getParameter("routeName");
		String routeType = request.getParameter("routeType");
		String fromStation = request.getParameter("fromStation");
		String toStation = request.getParameter("toStation");
		
		String departureTime= request.getParameter("departureTime"); 
		System.out.println(Timestamp.valueOf(departureTime));
		System.out.println(departureTime);

		String arrivalTime = request.getParameter("arrivalTime");
		
		
		String businessSeatCount = request.getParameter("businessSeatCount");
		String bPrice = request.getParameter("bPrice");
		String specialSeatCount = request.getParameter("specialSeatCount");
		String spPrice = request.getParameter("spPrice");
		String softSeatCount = request.getParameter("softSeatCount");
		String sfPrice = request.getParameter("sfPrice");
		String hardSeatCount = request.getParameter("hardSeatCount");
		String hPrice = request.getParameter("hPrice");
		String noSeatCount = request.getParameter("noSeatCount");
		String nPrice = request.getParameter("nPrice");
		String remark = request.getParameter("remark");
		//String fromStationId = request.getParameter("fromStationId");
		//String toStationId = request.getParameter("toStationId" );
		Integer bS = Integer.parseInt(businessSeatCount);
		Integer spS = Integer.parseInt(specialSeatCount);
		Integer sfS = Integer.parseInt(softSeatCount);
		Integer hS = Integer.parseInt(hardSeatCount);
		Integer nS = Integer.parseInt(noSeatCount);
		Integer bP = Integer.parseInt(bPrice);
		Integer spP = Integer.parseInt(spPrice);
		Integer sfP = Integer.parseInt(sfPrice);
		Integer hP = Integer.parseInt(hPrice);
		Integer nP = Integer.parseInt(nPrice);
		//Long fSId = Long.parseLong(fromStationId);
		//Long tSId = Long.parseLong(toStationId);
		
		Route route = new Route();
		
		RouteDAO routeDao = DAOFactory.getIRouteDAOInstance();
		
		route.setName(routeName);
		route.setType(routeType);
		route.setFromStation(fromStation);
		route.setToStation(toStation);
		route.setDepartureTime(Timestamp.valueOf(departureTime));
		route.setArrivalTime(Timestamp.valueOf(arrivalTime));
		route.setBusinessSeatCount(bS);
		route.setbPirce(bP);
		route.setSpecialSeatCount(spS);
		route.setSpPrice(spP);
		route.setSoftSeatCount(sfS);
		route.setSfPrice(sfP);
		route.setHardSeatCount(hS);
		route.sethPrice(hP);
		route.setNoSeatCount(nS);
		route.setnPrice(nP);
		route.setRemark(remark);
		System.out.println("route   "+ route.getDepartureTime());
		//route.setFromStationId(fSId);
		//route.setToStationId(tSId);
		try {
			if(routeDao.doCreateRoute(route))
			{
				System.out.println(" 添加成功");
				 request.getRequestDispatcher("adRoute.jsp").forward(request, response);
			}
			else 

需要源码和文章的私我 或评论

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值