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

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

430023462402

450023462402

460023462402

470023462402

480023462402

490023462402

500023462402

基于javaweb的SSM汽车出租管理系统(java+ssm+jsp+jquery+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.数据库:MySql 5.7版本; 6.是否Maven项目:否;

技术栈

  1. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jquery

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录

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
//跳转到添加车辆页面
@RequestMapping("/caradd.do")
public String caradd(HttpServletRequest request){

request.setAttribute("url", "caradd2.do");

request.setAttribute("title", "添加车辆");

return "car/caradd.jsp";

}




//添加车辆操作
@RequestMapping("/caradd2.do")
public void caradd2(HttpServletResponse response,HttpServletRequest request,Car bean,MultipartFile prodFile){


if(prodFile==null || prodFile.getSize()<=0 ){
this.getPrintWriter(response).print("<script language=javascript>alert('车辆图片不能为空');" +
"window.location.href='caradd.do';</script>");
return;
}

String pic = Util.uploadFile(request, prodFile);

bean.setPic(pic);

bean.setStatus("待租赁");
bean.setCtime(Util.getTime());

carService.insertBean(bean);


this.getPrintWriter(response).print("<script language=javascript>alert('操作成功');" +
"window.location.href='carlist.do';</script>");
}


//跳转到修改车辆页面
@RequestMapping("/carupdate.do")
public String carupdate(HttpServletRequest request,int id){

Car bean = carService.selectBeanById(id);

request.setAttribute("bean", bean);

request.setAttribute("url", "carupdate2.do?id="+id);

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


@Controller
@RequestMapping("/manage")
public class ManageController {

@Resource
private UserService userService;

@Resource
private CarService carService;

@Resource
private GonggaoService gonggaoService;

@Resource
private PicService picService;

@Resource
private JiluService jiluService;

@Resource
private YudingService yudingService;

@Resource
private LiuyanService liuyanService;

@Resource
private RiService riService;

@Resource
private YueService yueService;

@Resource
private VipService vipService;


@Value("#{jdbc.pageSize}")
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
	int currentpage = 1;
//获取当前页
if (pagenum != null) {
currentpage = Integer.parseInt(pagenum);
}

//查询列表
List<Jilu> list = jiluService.selectBeanList((currentpage - 1)
* pageSize, pageSize, chepai,sfz,xingming,"还车中,等待技术人员确认",0,0,0);

for(Jilu jilu:list){
jilu.setCar(carService.selectBeanById(jilu.getCarid()));
}

//列表返回页面
request.setAttribute("list", list);

//获取总数量
int total = jiluService.selectBeanCount(chepai,sfz,xingming,"还车中,等待技术人员确认",0,0,0);

//分页信息返回页面
request.setAttribute("pagerinfo", Pager.getPagerNormal(total, pageSize,
currentpage, "jilulist3.do", "共有" + total + "条记录"));

//查询按钮
request.setAttribute("url", "jilulist3.do");

//添加,更新,删除等按钮
request.setAttribute("url2", "jilu");

request.setAttribute("title", "待确认车辆");

return "jilu/jilulist3.jsp";

}



//跳转到输入确认信息页面
@RequestMapping("/jiluupdate5.do")
public String jiluupdate5(HttpServletRequest request,int id) throws ParseException{

Jilu bean = jiluService.selectBeanById(id);

Car car = carService.selectBeanById(bean.getCarid());
bean.setCar(car);

request.setAttribute("bean", bean);

request.setAttribute("url", "jiluupdate6.do?id="+id);

request.setAttribute("title", "输入确认信息");
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
	if (chepai != null && !"".equals(chepai)) {

request.setAttribute("chepai", chepai);
}
if (xingming != null && !"".equals(xingming)) {

request.setAttribute("xingming", xingming);
}
if (sfz != null && !"".equals(sfz)) {

request.setAttribute("sfz", sfz);
}

//分页功能默认第一页
int currentpage = 1;
//获取当前页
if (pagenum != null) {
currentpage = Integer.parseInt(pagenum);
}

//查询列表
List<Jilu> list = jiluService.selectBeanList((currentpage - 1)
* pageSize, pageSize, chepai,sfz,xingming,"还车中,等待技术人员确认",user.getId(),0,0);

for(Jilu jilu:list){
jilu.setCar(carService.selectBeanById(jilu.getCarid()));
}

//列表返回页面
request.setAttribute("list", list);

//获取总数量
int total = jiluService.selectBeanCount(chepai,sfz,xingming,"还车中,等待技术人员确认",user.getId(),0,0);

//分页信息返回页面
request.setAttribute("pagerinfo", Pager.getPagerNormal(total, pageSize,
currentpage, "jilulist2.do", "共有" + total + "条记录"));

//查询按钮
request.setAttribute("url", "jilulist2.do");

//添加,更新,删除等按钮
request.setAttribute("url2", "jilu");

request.setAttribute("title", "技术确认查询");

return "jilu/jilulist2.jsp";

}




//待确认车辆
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

}


//跳转到修改密码页面
@RequestMapping("/password.do")
public String password(HttpServletRequest request){

request.setAttribute("url", "password2.do");

request.setAttribute("title", "修改密码");

return "password.jsp";

}

//修改密码操作
@RequestMapping("/password2.do")
public void password2(HttpServletRequest request,HttpServletResponse response,String password1,String password2){

PrintWriter writer = this.getPrintWriter(response);

HttpSession session = request.getSession();

User user = (User)session.getAttribute("manage");

User bean = userService.userlogin(user.getUsername(), password1, user.getRole());

if(bean!=null){
bean.setPassword(password2);
userService.updateBean(bean);



}else{


}
}


//人员列表
@RequestMapping("/userlist.do")
public String userlist(HttpServletRequest request,String pagenum,String username){


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