项目编号:BS-XX-129
一,项目简介
在现代智能化的普遍环境下,人们在精神上的需求已经在某种程度上超越了物质需求。这一切都源于人们的物质生活不断提升,生活质量发生了质的跃进。要想富先修路,这是一句民间口号同时也是一个简单的真理,人们也正是源于对这句口号的深入贯彻,所以我们的生活才能越来越好,路作为载体,它为不计其数的车辆提供了实现车辆价值的运输条件。从另外方面来看,最近几十年来汽车的普及应用,业己为现在整个社会的进步贡献了不可磨灭的推动力量。在一些地区,灵活用车的需求成了人们(特别是青少年年龄阶段)一个不可或缺的需求之一,例如:刚考完驾照的人,想过一把驾驶瘾,为日后的行车做好准备;出差去了某个地区临时紧急需要用车;自己的日常代步车损坏,需要一个替代品等等情况,所以汽车租赁公司的出现是十分的必要的,它可以为人们解决这样一些需要灵活用车的问题。而随着大量汽车租赁公司的出现,开发一套行之有效的汽车租赁管理系统则显得十分必要。
本项目基于Spring Boot与Vue.js的一个汽车租赁系统,系统整体功能完整,界面简洁大方,主要实现了用户管理、汽车管理、分类管理、库存查看、客户管理、定单管理、财务管理和收支的统计,并采用图形报表的方式来进行财务的统计信息等。可以做为毕业设计和课程设计或期未作业使用。
二,环境介绍
语言环境:Java: jdk1.8
数据库:Mysql: mysql5.7
应用服务器:Tomcat: tomcat8.5.31
开发工具:IDEA或eclipse
后端使用Spring Boot 与 MyBatis 、Redis集成
前端使用Vue.js 与 Require集成
三,系统展示
用户登陆
http://localhost:8010/car/index#/login
后台管理界面
用户管理
车辆管理
车辆库存
车辆类别管理
车辆管理
订单管理
订单结算
财务统计报表
四,核心代码展示
package com.shengyi.controller; import com.shengyi.common.Result; import com.shengyi.model.CarClass; import com.shengyi.service.CarClassService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller @RequestMapping(value = "/car/class/") public class CarClassController { @Autowired CarClassService carClassService; @PostMapping("getAllClass") @ResponseBody public Result<List<CarClass>> getAllClass(){ return carClassService.getAllClass(); } @PostMapping("addClass") @ResponseBody public Result<Boolean> addClass(@Param("className") String className){ return carClassService.addClass(className); } @PostMapping("modifyClass") @ResponseBody public Result<Boolean> modifyClass(@RequestBody CarClass carClass){ return carClassService.modifyClassNameById(carClass); } @PostMapping("removeClass") @ResponseBody public Result<Boolean> removeClassAndCarData(@Param("classId")Long classId){ return carClassService.removeClassAndCarData(classId); } }
package com.shengyi.controller; import com.shengyi.common.Result; import com.shengyi.common.result.PageResult; import com.shengyi.model.request.*; import com.shengyi.model.response.CarDataDto; import com.shengyi.model.response.CarStockDetailsDto; import com.shengyi.model.response.CarStockDto; import com.shengyi.service.CarDataService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller @RequestMapping(value = "/car/data/") public class CarDataController { @Autowired private CarDataService carDataService; @PostMapping(value = "getAllStock") @ResponseBody public PageResult<CarStockDto> getAllStock(@RequestBody PageRequest request){ return carDataService.getAllStock(request); } @PostMapping(value = "getStockDetails") @ResponseBody public PageResult<CarStockDetailsDto> getStockDetails(@RequestBody StockDetailsRequest request){ return carDataService.getStockDetails(request); } @PostMapping(value = "getAllCarData") @ResponseBody public PageResult<CarDataDto> getAllCarData(@RequestBody PageRequest request){ return carDataService.getAllCarData(request); } @PostMapping(value = "searchCarData") @ResponseBody public PageResult<CarDataDto> searchCarData(@RequestBody CarDataSearchRequest request){ return carDataService.searchCarDataByBrand(request); } @PostMapping(value = "modifyStatus") @ResponseBody public Result<Boolean> modifyStatus(@RequestBody CarDataStatusRequest request){ return carDataService.updateCarStatus(request); } @PostMapping(value = "removeCarData") @ResponseBody public Result<Boolean> removeCarData(@Param("id") Long id){ return carDataService.removeCarData(id); } @PostMapping(value = "getUserOptions") @ResponseBody public Result<List<OptionRequest>> getUserOptions(){ return carDataService.getUserOptions(); } @PostMapping(value = "getClassOptions") @ResponseBody public Result<List<OptionRequest>> getClassOptions(){ return carDataService.getClassOptions(); } @PostMapping(value = "modifyCarData") @ResponseBody public Result<Boolean> modifyCarData(@RequestBody CarDataDto carDataDto){ return carDataService.updateCarData(carDataDto); } @PostMapping(value = "addCarData") @ResponseBody public Result<Boolean> addCarData(@RequestBody CarDataDto carDataDto){ return carDataService.addCarData(carDataDto); } }
package com.shengyi.controller; import com.shengyi.common.Result; import com.shengyi.common.result.PageResult; import com.shengyi.model.CarData; import com.shengyi.model.CarRecord; import com.shengyi.model.request.CarRecordRequest; import com.shengyi.model.request.OptionRequest; import com.shengyi.model.request.SettlementRecordRequest; import com.shengyi.model.response.CarRecordDto; import com.shengyi.model.response.ClassOptions; import com.shengyi.service.CarRecordService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.Date; import java.util.List; @Controller @RequestMapping("/car/record/") public class CarRecordController { @Autowired private CarRecordService carRecordService; @PostMapping(value = "getRecordByTime") @ResponseBody public PageResult<CarRecordDto> getRecordByTime(@RequestBody CarRecordRequest carRecordRequest){ return carRecordService.getCarRecordByTime(carRecordRequest); } @PostMapping(value = "removeRecordById") @ResponseBody public Result<Boolean> removeRecordById(@Param("id") Long id){ return carRecordService.removeRecordById(id); } @PostMapping(value = "getOptions") @ResponseBody public Result<List<ClassOptions>> getOptios(){ return carRecordService.getOptions(); } @PostMapping(value = "getCustomerOptions") @ResponseBody public Result<List<OptionRequest>> getCustomerOptions(@Param("customerName") String customerName){ return carRecordService.getCustomerOptions(customerName); } @PostMapping(value = "getCurrentCarData") @ResponseBody Result<CarData> getCurrentCarData(@Param("id") Long id){ return carRecordService.getCarDataById(id); } @PostMapping(value = "addCarRecord") @ResponseBody Result<Boolean> addCarRecord(@RequestBody CarRecord carRecord){ return carRecordService.addRecord(carRecord); } @PostMapping(value = "getCurrentDate") @ResponseBody Result<Date> getCurrentDate(){ return carRecordService.getCurrentDate(); } @PostMapping(value = "settlement") @ResponseBody Result<Boolean> settlement(@RequestBody SettlementRecordRequest recordRequest){ return carRecordService.settlementRecord(recordRequest); } }
package com.shengyi.controller; import com.shengyi.common.Result; import com.shengyi.common.result.PageResult; import com.shengyi.model.CarCustomer; import com.shengyi.model.request.CustomerRequest; import com.shengyi.model.request.CustomerSearchRequest; import com.shengyi.model.response.CustomerDto; import com.shengyi.model.response.CustomerSexCountDto; import com.shengyi.service.CustomerService; import org.apache.ibatis.annotations.Param; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller @RequestMapping(value = "/car/customer/") public class CustomerController { @Autowired private CustomerService customerService; @PostMapping(value = "getAllCustomer") @ResponseBody public PageResult<CustomerDto> getAllCustomer(@RequestBody CustomerRequest request){ return customerService.getAllCustomer(request); } @PostMapping(value = "addCustomer") @ResponseBody public Result<Boolean> addCustomer(@RequestBody CarCustomer carCustomer){ return customerService.addCustomer(carCustomer); } @PostMapping(value = "modifyCustomer") @ResponseBody public Result<Boolean> modifyCustomer(@RequestBody CarCustomer carCustomer){ return customerService.updateCustomer(carCustomer); } @PostMapping(value = "removeCustomer") @ResponseBody public Result<Boolean> removeCustomer(@Param("id") Long id){ return customerService.deleteCustomer(id); } @PostMapping(value = "searchCustomer") @ResponseBody public PageResult<CustomerDto> searchCustomer(@RequestBody CustomerSearchRequest request){ return customerService.searchCustomerByName(request); } @PostMapping(value = "getAgeCount") @ResponseBody public Result<List<Integer>> getAgeCount(){ return customerService.getAgeCount(); } @PostMapping(value = "getSexCount") @ResponseBody public Result<List<CustomerSexCountDto>> getSexCount(){ return customerService.getSexCount(); } }
五,项目总结
传统的租车模式更多的是基于人力手动记账的方式来进行管理,或者是开发的基于C/S结构的简单管理系统,像以前有使用VB,Delphi等技术开发的C/S模式的管理系统。使用人工记账管理操作繁琐,早己被淘汰,而使用C/S结构开发的传统管理系统使用起来又不太方便,它的特点是必须在客户的机器上安装对应的客户端软件,这样才能登陆使用,这增加了客户端维护升级的难度。而我这次开发的汽车租赁管理系统,是使用了现在高频使用的另一种开发结构,基于浏览器客户端的方式来实现,它可以实现打开电脑自带的浏览器,输入系统地址就可以随时在有网络的电脑上登陆本租赁系统进行相应的管理操作,无论是从使用的便利性还是性能上都有较大的提升,这对于汽车租赁公司的管理有着很大的帮助。