基于javaweb的SSM汽车租赁管理系统(java+ssm+jsp+jquery+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

382323431807

392323431807

402323431807

412323431807

422323431807

442323431807

基于javaweb的SSM汽车租赁管理系统(java+ssm+jsp+jquery+mysql)

1
2
3
4
5
6
7
8
前台
user1 123456
user2 123456
user3 123456
user5 123456

后台访
admin 123456

项目介绍

系统分为前台用户租车和后台系统管理:

前台用户租车 用户注册、用户登录、用户中心、浏览车辆、车辆搜索 查看车辆明细、租赁车辆、我的订单 后台系统管理 用户管理:用户列表、添加用户、修改用户、删除用户、查询用户 新闻管理:新闻列表、添加新闻、修改新闻、删除新闻、查询新闻 车辆品牌管理:车辆品牌列表、添加车辆品牌、修改车辆品牌、删除车辆品牌 车辆管理:车辆列表、添加车辆、修改车辆、删除车辆、查询车辆 订单管理:订单列表、确认订单、删除订单 报表管理:统计信息查询和展示

环境需要

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等版本均可;

技术栈

后台框架:Spring、SpringMVC、MyBatis UI界面:JSP、jQuery 数据库:MySQL

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

  2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置,运行项目;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
     
fileName = request.getRealPath("/")+"/upfile/"+Info.generalFileName("a.xls");
String[] pros = prosstr.split("@");
try {
//首先要使用Workbook类的工厂方法创建一个可写入的工作薄(Workbook)对象
wwb = Workbook.createWorkbook(new File(fileName));
} catch (IOException e) {
e.printStackTrace();
}
if(wwb!=null){
//创建一个可写入的工作表
//Workbook的createSheet方法有两个参数,第一个是工作表的名称,第二个是工作表在工作薄中的位置
WritableSheet ws = wwb.createSheet("sheet1", 0);
ws.setColumnView(0,20);
ws.setColumnView(1,20);
ws.setColumnView(2,20);
ws.setColumnView(3,20);
ws.setColumnView(4,20);
ws.setColumnView(5,20);

try {


for(int i=0;i<pros.length;i++)
{
Label label1 = new Label(i, 0,"");

label1.setString(pros[i]);
ws.addCell(label1);
}

} catch (RowsExceededException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (WriteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

//下面开始添加单元格
/*int i=1;*/
/* for(List t:mlist){


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
			cmap.put("oid", null);
pmap.put("oid", null);
}else{
if(backs.getOid()!=null&&!backs.getOid().equals("")){
cmap.put("oid", backs.getOid());
pmap.put("oid", backs.getOid());
}
if(backs.getUid()!=null&&!backs.getUid().equals("")){
cmap.put("uid", backs.getUid());
pmap.put("uid", backs.getUid());
}
if(backs.getBid()!=null&&!backs.getBid().equals("")){
cmap.put("bid", backs.getBid());
pmap.put("bid", backs.getBid());
}
if(backs.getAid()!=null&&!backs.getAid().equals("")){
cmap.put("aid", backs.getAid());
pmap.put("aid", backs.getAid());
}
}
int total=backsService.getCount(cmap);
pageBean.setTotal(total);
List<Backs> list=backsService.getByPage(pmap);
List<Users> ulist=usersService.getAll(null);
List<Bike> blist=bikeService.getAll(null);
List<Orders> olist=ordersService.getAll(null);
map.put("page", pageBean);
map.put("list", list);
map.put("ulist", ulist);
map.put("blist", blist);
map.put("olist", olist);
session.setAttribute("p", 2);
return "admin/querybacks";
}
@RequestMapping("admin/deleteBacks.do")
public String deleteBacks(int id){
backsService.delete(id);
return "redirect:backsList.do";
}
}




1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//	处理编辑
@RequestMapping("admin/doUpdateArticle.do")
public String doUpdateArticle(int id,ModelMap map,Article article){
article=articleService.getById(id);
map.put("article", article);
return "admin/editarticle";
}
//
@RequestMapping("admin/updateArticle.do")
public String updateArticle(int id,ModelMap map,Article article){
articleService.update(article);
return "redirect:articleList.do";
}
// 所有新闻公告
@RequestMapping("articleList.do")
public String articleList(ModelMap map,HttpSession session){
map.put("list", articleService.getAll(null));
map.put("clist", cateService.getAll(null));
return "article";
}
// 分页查询
@RequestMapping("admin/articleList.do")
public String goodList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session){
/*if(session.getAttribute("user")==null){
return "login";
}*/
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), PageBean.PAGESIZE);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", pageBean.getPageSize());
Map<String, Object> bmap=new HashMap<String, Object>();
/*pmap.put("uid", ((Users)session.getAttribute("user")).getId());
bmap.put("uid", ((Users)session.getAttribute("user")).getId());*/
int total=articleService.getCount(bmap);
pageBean.setTotal(total);
List<Article> list=articleService.getByPage(pmap);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

@Controller
public class ArticleController {
@Resource
private ArticleServer articleService;
@Resource
private OrdersServer orderServer;
@Resource
private UsersServier userService;
@Resource
private CateServer cateService;

//
@RequestMapping("showArticle.do")
public String showArticle(int id,ModelMap map,HttpSession session){
/* Map<String,Object> bmap=new HashMap<String,Object>();
bmap.put("uid", id);*/
// map.put("blist", articleService.getAll(bmap));
map.put("article", articleService.getById(id));
return "read";
}

@RequestMapping("admin/addArticle.do")
public String addArticle(HttpServletRequest request,Article article,HttpSession session){
Timestamp time=new Timestamp(System.currentTimeMillis());
//Users u=(Users)session.getAttribute("user");
/*if(u==null||u.equals("")){
return "redirect:showIndex.do";
}else{*/
//bbs.setUid(u.getId());
/*bbs.setPubtime(time.toString());
bbs.setIsdel("1");*/
article.setAddtime(time.toString().substring(0, 19));
articleService.add(article);
return "redirect:articleList.do";
/*}*/


}

// 处理编辑
@RequestMapping("admin/doUpdateArticle.do")
public String doUpdateArticle(int id,ModelMap map,Article article){
article=articleService.getById(id);
map.put("article", article);
return "admin/editarticle";
}
//
@RequestMapping("admin/updateArticle.do")
public String updateArticle(int id,ModelMap map,Article article){
articleService.update(article);
return "redirect:articleList.do";
}
// 所有新闻公告
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
			long days = Math.abs(VeDate.getDays(orders.getStart(), VeDate.getStringDateShort())) + 1;
String total = "" + (days * Double.parseDouble(bike.getPrice()));
backs.setMoney(total);
backs.setUid(orders.getUid());
orders.setStatus("已归还");
orders.setId(backs.getOid());
ordersService.update(orders);
bike.setStatus("空闲");
bike.setId(orders.getBid());
bikeService.update(bike);
backsService.add(backs);
return "redirect:backsList.do";
}
}
@RequestMapping("admin/doUpdateBacks.do")
public String doUpdateBacks(ModelMap map,int id){
map.put("backs", backsService.getById(id));
return "admin/editbacks";
}
@RequestMapping("admin/updateBacks.do")
public String updateBacks(Backs backs){
backsService.update(backs);
return "redirect:backsList.do";
}
// 分页查询
@RequestMapping("admin/backsList.do")
public String goodList(@RequestParam(value="page",required=false)String page,
ModelMap map,HttpSession session){
if(page==null||page.equals("")){
page="1";
}
PageBean pageBean=new PageBean(Integer.parseInt(page), PageBean.PAGESIZE);
Map<String, Object> pmap=new HashMap<String,Object>();
pmap.put("pageno", pageBean.getStart());
pmap.put("pageSize", pageBean.getPageSize());
int total=backsService.getCount(map);
pageBean.setTotal(total);
List<Backs> list=backsService.getByPage(pmap);
List<Users> ulist=usersService.getAll(null);
List<Bike> blist=bikeService.getAll(null);
List<Orders> olist=ordersService.getAll(null);
map.put("page", pageBean);
map.put("list", list);
map.put("ulist", ulist);
map.put("blist", blist);
map.put("olist", olist);
session.setAttribute("p", 1);
return "admin/listbacks";


项目链接:
https://javayms.github.io?id=250023061907201bi
https://javayms.pages.dev?id=250023061907201bi