首页 > 编程语言 >基于SpringBoot+Vue的火车订票管理系统设计与实现毕设(文档+源码)

基于SpringBoot+Vue的火车订票管理系统设计与实现毕设(文档+源码)

时间:2024-05-27 14:00:49浏览次数:18  
标签:map Vue SpringBoot gaiqiandingdanService gaiqiandingdan 源码 new public RequestMap

        

目录

一、项目介绍

二、开发环境

三、功能介绍

四、核心代码

五、效果图

六、源码获取:

        大家好呀,我是一个混迹在java圈的码农。今天要和大家分享的是 一款基于SpringBoot+Vue的火车订票管理系统,项目源码请点击文章末尾联系我哦~目前有各类成品 毕设 JavaWeb  SSM SpringBoot等等项目框架,源码丰富,欢迎咨询。 

一、项目介绍

        本论文主要论述了如何使用JAVA语言开发一个火车订票管理系统 ,本系统将严格按照软件开发流程进行各个阶段的工作,采用B/S架构,面向对象编程思想进行项目开发。在引言中,作者将论述火车订票管理系统的当前背景以及系统开发的目的,后续章节将严格按照软件开发流程,对系统进行各个阶段分析设计。

        火车订票管理系统的主要使用者分为管理员和用户,实现功能包括管理员:首页、个人中心、用户管理、车型信息管理、车次信息管理、购票订单管理、改签订单管理、退票订单管理、系统管理,用户:首页、个人中心、购票订单管理、改签订单管理、退票订单管理,前台首页;首页、车次信息、火车资讯、个人中心、后台管理等功能。由于本网站的功能模块设计比较全面,所以使得整个火车订票管理系统信息管理的过程得以实现。

        本系统的使用可以实现本火车订票管理系统管理的信息化,可以方便管理员进行更加方便快捷的管理,可以提高管理人员的工作效率。

关键词:火车订票管理系统 JAVA语言;MYSQL数据库;Spring Boot框架

二、开发环境

开发系统:Windows
JDK版本:Java JDK1.8(推荐)
开发工具:IDEA/MyEclipse(推荐IDEA)
数据库版本: mysql8.0(推荐)
数据库可视化工具: navicat
服务器:SpringBoot自带 apache tomcat
框架:springboot,vue

三、功能介绍

        火车订票管理系统 ,在系统首页可以查看首页、车次信息、火车资讯、个人中心、后台管理等内容。车次信息,在车次信息页面通过填写车次名称、火车名称、车牌、图片、起点站、终点站、途经、日期、出发时间、时长、座位类型、价格、票数等信息。管理员登录进入火车订票管理系统可以查看首页、个人中心、用户管理、车型信息管理、车次信息管理、购票订单管理、改签订单管理、退票订单管理、系统管理等信息。用户登录进入火车订票管理系统可以查看首页、个人中心、购票订单管理、改签订单管理、退票订单管理等内容。

四、核心代码


/**
 * 改签订单
 * 后端接口
 * @author 
 * @email 
 */
@RestController
@RequestMapping("/gaiqiandingdan")
public class GaiqiandingdanController {
    @Autowired
    private GaiqiandingdanService gaiqiandingdanService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,GaiqiandingdanEntity gaiqiandingdan, HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			gaiqiandingdan.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<GaiqiandingdanEntity> ew = new EntityWrapper<GaiqiandingdanEntity>();
		PageUtils page = gaiqiandingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gaiqiandingdan), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,GaiqiandingdanEntity gaiqiandingdan, HttpServletRequest request){
        EntityWrapper<GaiqiandingdanEntity> ew = new EntityWrapper<GaiqiandingdanEntity>();
		PageUtils page = gaiqiandingdanService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gaiqiandingdan), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( GaiqiandingdanEntity gaiqiandingdan){
       	EntityWrapper<GaiqiandingdanEntity> ew = new EntityWrapper<GaiqiandingdanEntity>();
      	ew.allEq(MPUtil.allEQMapPre( gaiqiandingdan, "gaiqiandingdan")); 
        return R.ok().put("data", gaiqiandingdanService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(GaiqiandingdanEntity gaiqiandingdan){
        EntityWrapper< GaiqiandingdanEntity> ew = new EntityWrapper< GaiqiandingdanEntity>();
 		ew.allEq(MPUtil.allEQMapPre( gaiqiandingdan, "gaiqiandingdan")); 
		GaiqiandingdanView gaiqiandingdanView =  gaiqiandingdanService.selectView(ew);
		return R.ok("查询改签订单成功").put("data", gaiqiandingdanView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        GaiqiandingdanEntity gaiqiandingdan = gaiqiandingdanService.selectById(id);
        return R.ok().put("data", gaiqiandingdan);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        GaiqiandingdanEntity gaiqiandingdan = gaiqiandingdanService.selectById(id);
        return R.ok().put("data", gaiqiandingdan);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody GaiqiandingdanEntity gaiqiandingdan, HttpServletRequest request){
    	gaiqiandingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gaiqiandingdan);
        gaiqiandingdanService.insert(gaiqiandingdan);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody GaiqiandingdanEntity gaiqiandingdan, HttpServletRequest request){
    	gaiqiandingdan.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(gaiqiandingdan);
        gaiqiandingdanService.insert(gaiqiandingdan);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody GaiqiandingdanEntity gaiqiandingdan, HttpServletRequest request){
        //ValidatorUtils.validateEntity(gaiqiandingdan);
        gaiqiandingdanService.updateById(gaiqiandingdan);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        gaiqiandingdanService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<GaiqiandingdanEntity> wrapper = new EntityWrapper<GaiqiandingdanEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}

		int count = gaiqiandingdanService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

五、效果图

六、源码获取:

标签:map,Vue,SpringBoot,gaiqiandingdanService,gaiqiandingdan,源码,new,public,RequestMap
From: https://blog.csdn.net/m0_48205251/article/details/138423764

相关文章

  • Yolov5——训练目标检测模型详解(含完整源码)
    项目的克隆打开yolov5官网(GitHub-ultralytics/yolov5atv5.0),下载yolov5的项目:环境的安装(免额外安装CUDA和cudnn)打开anaconda的终端,创建新的名为yolov5的环境(python选择3.8版本):condacreate-nyolov5python=3.8执行如下命令,激活这个环境:condaactivateyolov5......
  • vue测试环境打包文件不添加hash和生产环境打包不一致
    npmrunbuild:testnpmrunbuild:pro测试环境打包出来文件和生产包有差异.env.test-配置文件打包出来文件有hash值,加上下面的配置,打包就和pro一致NODE_ENV='production'NODE_ENV只能设置production和development两个参数开发环境是development,生产环境都是produ......
  • POETIZE个人博客系统源码 | 最美博客
    POETIZE个人博客系统源码|最美博客这是一个SpringBoot+Vue2+Vue3的产物,支持移动端自适应,配有完备的前台和后台管理功能。网站分两个模块:博客系统:具有文章,表白墙,图片墙,收藏夹,乐曲,视频播放,留言,友链,时间线,后台管理等功能。聊天室系统:具有朋友圈(时间线),好友,群等功能。......
  • Android 深入系统源码探讨 Activity、Window 和 View 的关系与实践
    文章目录1、概括2、AndroidWindow设计2.1、Window类2.2、PhoneWindow2.3、WindowManager2.4、ViewRootImpl2.5、DecorView3、AndroidActivity设计3.1、Activity的基本概念3.2.、Activity的生命周期3.3、Activity的内部结构4、AndroidView设计4.1、View的基本概......
  • 计算机毕业设计springboot+vue学生档案学籍信息管理系统java
    本文所设计的学籍系统的设计与实现拥有前端和后端,前端使用Vue.js框架和创建,后端使用Springboot框架创建,开发语言采用Java,使用Mysql数据库对后台数据进行存储。将IDEA作为主要的开发工具。接着进行系统的需求分析、功能设计、数据库设计,最后进行编码实现。技术栈ide工具:IDEA......
  • 1915springboot VUE 宠物寄养平台系统开发mysql数据库web结构java编程计算机网页源码m
    一、源码特点 springbootVUE宠物寄养平台系统是一套完善的完整信息管理类型系统,结合springboot框架和VUE完成本系统,对理解JSPjava编程开发语言有帮助系统采用springboot框架(MVC模式开发),系统具有完整的源代码和数据库,系统主要采用B/S模式开发。springbootVUE宠物寄养......
  • springboot宠物领养管理系统论文
    目录摘要IAbstractII第1章绪论31.1项目研究的背景31.2开发目的和意义31.3国内外研究现状4第2章系统开发工具52.1Java编程语言52.2B/S模式52.3MySQL数据库62.4后端框架介绍72.4.1SpringBoot介绍72.4.2Mybatis介绍72.4.3SpringMvc介......
  • vue2.2——cdn如何使用插槽
    <mynav><h1slot="h1">我是具名插槽</h1><h2slot="h2">我没有命名</h2></mynav>letcp_template={mynav:{template:`<divstyle="color:red;"><......
  • vue学习笔记(一)
    本文章是在B站学习vue中整理的简单笔记,课程是ant编程的vue入门(如果涉及商业等因素,请我联系删除文章)使用的脚手架是CLI,非Vite.创建项目安装npminstall-g@vue/cli创建项目vuecreate[项目名称]选择manually 选择babelroutervuexlinter 选择3.x 选择Y 选择第......
  • Vue2批量全局注册组件
    创建一个文件(例如global-components.js),并在其中实现批量注册组件的逻辑。//src/global-components.jsimportVuefrom'vue';//自动导入components目录下的所有.vue文件constrequireComponent=require.context(//组件目录的相对路径'./components',//是......