基于javaweb+mysql的springboot汽车租赁管理系统(java+springboot+ssm+jsp+js+mysql)
运行环境
Java≥8、MySQL≥5.7
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SpringBoot汽车租赁管理系统(java+springboot+ssm+jsp+js+mysql)
项目介绍角色:管理员、用户
用户登录进入汽车租赁系统 可以查看首页、个人中心、租赁信息管理、续租信息管理、归还信息管理、违章记录管理
管理员登录进入汽车租赁系统可以查看首页、个人中心、汽车类型管理,汽车信息管理,租赁信息管理,用户管理、续租信息管理、归还信息管理、保险信息管理、违章记录管理、留言板管理、系统管理等
环境需要 1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7/8.0等版本均可;
技术栈 后端:SpringBoot+SSM(Spring+SpringMVC+Mybatis)+JSP
使用说明 1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;
String filePath = AppFileUtils.updateFileName(carVo.getCarimg(),SysConstast.FILE_UPLOAD_TEMP);
carVo.setCarimg(filePath);
//把原来的删除
Car car = this.carService.queryCarByCarNumber(carVo.getCarnumber());
AppFileUtils.removeFileByPath(car.getCarimg());
this.carService.updateCar(carVo);
return ResultObj.UPDATE_SUCCESS;
} catch (Exception e) {
e.printStackTrace();
return ResultObj.UPDATE_ERROR;
/*
* 批量删除车辆
@RequestMapping("toOpernameYearGradeStat")
public String toOpernameYearGradeStat() {
return "stat/opernameYearGradeStat";
/*
* 跳转到公司年度统计
*/
@RequestMapping("toCompanyYearGradeStat")
public String toLadcompanyYearGradeStat() {
return "stat/componyYearGradeStat";
/*
* 加载客户地区统计
* 加载公司年度月份销售额
*/
@RequestMapping("loadCompanyYearGradeStat")
@ResponseBody
public List<Double> toLoadCompanyYearGradeStat(String year){
List<Double> entities = this.statService.loadCompanyYearGradeStatList(year);
for (int i = 0; i < entities.size(); i++) {
if (null==entities.get(i)) {
entities.set(i, 0.0);
return entities;
/*
* 导出客户数据
/*
* 统计分析
*/
@RequestMapping("stat")
@Controller
public class StatController {
@Autowired
private StatService statService;
@Autowired
private CustomerService customerService;
@Autowired
private RentService rentService;
/*
@RequestMapping("loadOpernameYearGradeStat")
@ResponseBody
public Map<String, Object> loadOpernameYearGradeStat(String year){
List<BaseEntity> entities = this.statService.loadOpernameYearGradeList(year);
Map<String, Object> map = new HashMap<>();
List<String> names = new ArrayList<>();
List<Double> values = new ArrayList<>();
for (BaseEntity baseEntity : entities) {
names.add(baseEntity.getName());
values.add(baseEntity.getValue());
* 加载客户地区统计
*/
@RequestMapping("loadOpernameYearGradeStat")
@ResponseBody
public Map<String, Object> loadOpernameYearGradeStat(String year){
List<BaseEntity> entities = this.statService.loadOpernameYearGradeList(year);
Map<String, Object> map = new HashMap<>();
List<String> names = new ArrayList<>();
List<Double> values = new ArrayList<>();
for (BaseEntity baseEntity : entities) {
names.add(baseEntity.getName());
values.add(baseEntity.getValue());
map.put("name", names);
map.put("value", values);
/*
* 修改车辆
*/
@RequestMapping("updateCar")
public ResultObj updateCar(CarVo carVo) {
try {
String carimg = carVo.getCarimg();
if (carimg.endsWith(SysConstast.FILE_UPLOAD_TEMP)) {
String filePath = AppFileUtils.updateFileName(carVo.getCarimg(),SysConstast.FILE_UPLOAD_TEMP);
carVo.setCarimg(filePath);
//把原来的删除
@RequestMapping("toCompanyYearGradeStat")
public String toLadcompanyYearGradeStat() {
return "stat/componyYearGradeStat";
/*
* 加载客户地区统计
*/
@RequestMapping("loadCustomerAreaStatJson")
@ResponseBody
public List<BaseEntity> loadCustomerAreaStatJson(){
return this.statService.loadCustomerAreaStatList();
/*
* 加载客户地区统计
*/
Map<String, Object> map = new HashMap<>();
List<String> names = new ArrayList<>();
List<Double> values = new ArrayList<>();
for (BaseEntity baseEntity : entities) {
names.add(baseEntity.getName());
values.add(baseEntity.getValue());
map.put("name", names);
map.put("value", values);
return map;
/*
@Autowired
private CustomerService customerService;
@Autowired
private RentService rentService;
/*
* 跳转到客户地区统计页面
*/
@RequestMapping("toCustomerAreaStat")
public String toCustomerAreaStat() {
return "stat/customerAreaStat";
/*
private CustomerService customerService;
@Autowired
private RentService rentService;
/*
* 跳转到客户地区统计页面
*/
@RequestMapping("toCustomerAreaStat")
public String toCustomerAreaStat() {
return "stat/customerAreaStat";
/*
* 跳转到业务员年度销售额
//设置下载的文件名称
header.setContentDispositionFormData("attachment", filename);
return new ResponseEntity<Object>(bos.toByteArray(),header,HttpStatus.CREATED);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
车辆管理控制层:
/**
* 车辆管理控制器
*/
@RestController
@RequestMapping("car")
return new ResponseEntity<Object>(bos.toByteArray(),header,HttpStatus.CREATED);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
车辆管理控制层:
/**
* 车辆管理控制器
*/
@RestController
@RequestMapping("car")
public class CarController {
@Autowired
private CarService carService;
e.printStackTrace();
return ResultObj.DELETE_ERROR;
/*
* 修改车辆
*/
@RequestMapping("updateCar")
public ResultObj updateCar(CarVo carVo) {
try {
String carimg = carVo.getCarimg();
if (carimg.endsWith(SysConstast.FILE_UPLOAD_TEMP)) {
String filePath = AppFileUtils.updateFileName(carVo.getCarimg(),SysConstast.FILE_UPLOAD_TEMP);
carVo.setCarimg(filePath);
Customer customer = customerService.queryCustomerByIdentity(rentVo.getIdentity());
if (null!=customer) {
return ResultObj.STATUS_TRUE;
}else {
return ResultObj.STATUS_FALSE;
/**
* 初始化添加出租单的表单数据
*/
@RequestMapping("initRentFrom")
public RentVo initRentFrom(RentVo rentVo) {
e.printStackTrace();
return ResultObj.ADD_ERROR;
/***********出租单管理******************/
/**
* 查询
*/
@RequestMapping("loadAllRent")
public DataGridView loadAllRent(RentVo rentVo) {
return this.rentService.queryAllRent(rentVo);
/**
* 删除出租单信息
*/
@RequestMapping("deleteRent")
//设置下载的文件名称
header.setContentDispositionFormData("attachment", filename);
return new ResponseEntity<Object>(bos.toByteArray(),header,HttpStatus.CREATED);
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
/*
* 导出出租单
*/
@RequestMapping("exportRent")
public ResponseEntity<Object> exportRent(String rentid) {
//根据出租单号查询出租单信息