大家好!我是程序猿老A,感谢您阅读本文,欢迎一键三连哦。
💞当前专栏:Java毕业设计
精彩专栏推荐👇🏻👇🏻👇🏻
开发环境
开发语言:Java
框架:ssm
JDK版本:JDK1.8
服务器:tomcat7
数据库:mysql 5.7
数据库工具:Navicat12
开发软件:eclipse/myeclipse/idea
Maven包:Maven3.3.9
浏览器:谷歌浏览器
源码下载地址:
https://download.csdn.net/download/2301_76953549/89088430
论文目录
【如需全文请按文末获取联系】
一、项目简介
可以管理首页、个人中心、用户管理,站点管理员管理、汽车信息管理,借车信息管理,我的收藏管理、系统管理等功能模块。
二、系统设计
2.1软件功能模块设计
系统结构图,如图4-3所示。
2.2数据库设计
管理员信息属性图如图4-5所示。
用户信息实体属性图如图4-6所示。
站点管理员信息实体属性图如图4-7所示。
汽车信息实体属性图如图4-8所示。
还车信息实体属性图如图4-9所示。
三、系统项目部分截图
3.1前台首页功能模块
新能源汽车在线租赁,在新能源汽车在线租赁可以查看首页、汽车信息、个人中心、后台管理等内容,如图5-1所示。
登录、用户注册,通过用户注册获取用户名、密码、姓名、性别、头像、身份证、手机等信息进行注册、登录,如图5-2所示。
汽车信息,在汽车信息页面可以填写汽车编号、汽车名称、汽车类型、品牌、颜色、车牌号、图片、租借点地址、日价格、出租状态等信息进行借车,如图5-3所示。
3.2管理员功能模块
管理员登录,通过填写用户名、密码、角色等信息,输入完成后选择登录即可进入新能源汽车在线租赁,如图5-5所示。
管理员登录进入新能源汽车在线租赁进行查看首页、个人中心、用户管理,站点管理员管理、汽车信息管理,借车信息管理,我的收藏管理、系统管理等内容,如图5-6所示。
站点管理员管理,在站点管理员管理页面可以查看账号、密码、姓名、性别、头像、联系电话、地址等信息,并可根据需要对站点管理员管理进行详情,修改,删除操作,如图5-7所示。
管理员在汽车信息管理页面可以查看汽车编号、汽车名称、汽车类型、品牌、颜色、车牌号、图片、租借点地址、日价格、出租状态等信息,并可根据需要对汽车信息管理进行详情、修改、删除操作,如图5-8所示。
3.3用户功能模块
用户登录进入新能源汽车在线租赁可以查看首页、个人中心、借车信息管理、还车信息管理、我的收藏管理等内容,如图5-11所示。
借车信息管理,在借车信息管理页面可以填写订单编号、汽车名称、汽车类型、品牌、车牌号、日价格、租赁天数、总价格、租赁日期、用户名、姓名、是否支付、审核回复等信息进行详情、修改、删除如图5-12所示。
还车信息管理,在还车信息管理页面可以填写订单编号、汽车名称、汽车类型、品牌、车牌号、照片、还车状况、还车日期、用户名、姓名、审核回复等信息进行详情、修改、删除如图5-14所示。
3.4站点管理员功能模块
站点管理员登录进入新能源汽车在线租赁可以查看首页、个人中心、汽车信息管理,借车信息管理、还车信息管理等内容,如图5-15所示。
汽车信息管理,在汽车信息管理页面可以填写汽车编号、汽车名称、汽车类型、品牌、颜色、车牌号、图片、租借点地址、日价格、出租状态等信息进行详情、修改、删除如图5-16所示。
借车信息管理,在借车信息管理页面可以填写订单编号、汽车名称、汽车类型、品牌、车牌号、日价格、租赁天数、总价格、租赁日期、用户名、姓名、是否支付、审核回复、审核等信息进行详情、修改、删除如图5-17所示。
四、部分核心代码
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.JiechexinxiEntity;
import com.entity.view.JiechexinxiView;
import com.service.JiechexinxiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MPUtil;
import com.utils.CommonUtil;
/**
* 借车信息
* 后端接口
* @author
* @email
* @date 2021-01-20 17:21:57
*/
@RestController
@RequestMapping("/jiechexinxi")
public class JiechexinxiController {
@Autowired
private JiechexinxiService jiechexinxiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,JiechexinxiEntity jiechexinxi, HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("zhandianguanliyuan")) {
jiechexinxi.setZhanghao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
jiechexinxi.setYonghuming((String)request.getSession().getAttribute("username"));
}
EntityWrapper<JiechexinxiEntity> ew = new EntityWrapper<JiechexinxiEntity>();
PageUtils page = jiechexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiechexinxi), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,JiechexinxiEntity jiechexinxi, HttpServletRequest request){
EntityWrapper<JiechexinxiEntity> ew = new EntityWrapper<JiechexinxiEntity>();
PageUtils page = jiechexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiechexinxi), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( JiechexinxiEntity jiechexinxi){
EntityWrapper<JiechexinxiEntity> ew = new EntityWrapper<JiechexinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiechexinxi, "jiechexinxi"));
return R.ok().put("data", jiechexinxiService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(JiechexinxiEntity jiechexinxi){
EntityWrapper< JiechexinxiEntity> ew = new EntityWrapper< JiechexinxiEntity>();
ew.allEq(MPUtil.allEQMapPre( jiechexinxi, "jiechexinxi"));
JiechexinxiView jiechexinxiView = jiechexinxiService.selectView(ew);
return R.ok("查询借车信息成功").put("data", jiechexinxiView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
JiechexinxiEntity jiechexinxi = jiechexinxiService.selectById(id);
return R.ok().put("data", jiechexinxi);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
JiechexinxiEntity jiechexinxi = jiechexinxiService.selectById(id);
return R.ok().put("data", jiechexinxi);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody JiechexinxiEntity jiechexinxi, HttpServletRequest request){
jiechexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiechexinxi);
jiechexinxiService.insert(jiechexinxi);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody JiechexinxiEntity jiechexinxi, HttpServletRequest request){
jiechexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(jiechexinxi);
jiechexinxiService.insert(jiechexinxi);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody JiechexinxiEntity jiechexinxi, HttpServletRequest request){
//ValidatorUtils.validateEntity(jiechexinxi);
jiechexinxiService.updateById(jiechexinxi);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
jiechexinxiService.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<JiechexinxiEntity> wrapper = new EntityWrapper<JiechexinxiEntity>();
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("zhandianguanliyuan")) {
wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("yonghu")) {
wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
}
int count = jiechexinxiService.selectCount(wrapper);
return R.ok().put("count", count);
}
}
获取源码或论文
如需对应的论文或源码,以及其他定制需求,也可以下方微❤联系。