基于javaweb的JSP+Servlet智能小区物业管理系统(java+jsp+bootstrap+javascript+servlet+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

360023592402

370023592402

380023592402

390023592402

400023592402

410023592402

420023592402

430023592402

440023592402

基于javaweb的JSP+Servlet智能小区物业管理系统(java+jsp+bootstrap+javascript+servlet+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. 后端:Servlet 2. 前端:JSP+CSS+JavaScript+jquery+bootstrap

使用说明

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

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
	rd.forward(request, response);

}else if("inspectionAdd".equals(action)){

String person = request.getParameter("person");
String type = request.getParameter("type");
String itime = request.getParameter("itime");
String conductor = request.getParameter("conductor");
String party = request.getParameter("party");
String result = request.getParameter("result");
String memo = request.getParameter("memo");

Inspection i = new Inspection();
i.setPerson(person);
i.setType(type);
i.setItime(itime);
i.setConductor(conductor);
i.setParty(party);
i.setResult(result);
i.setMemo(memo);

iis.save(i);

response.sendRedirect("inspection?action=inspectionList");
}else if("findById".equals(action)){
String id = request.getParameter("id");

Inspection i = iis.findById(id);

request.setAttribute("inspection", i);

RequestDispatcher rd = request.getRequestDispatcher("inspection/inspection-edit.jsp");
rd.forward(request, response);


}else if("inspectionEdit".equals(action)){
int id = Integer.parseInt(request.getParameter("id"));
String person = request.getParameter("person");
String type = request.getParameter("type");
String itime = request.getParameter("itime");
String conductor = request.getParameter("conductor");
String party = request.getParameter("party");
String result = request.getParameter("result");
String memo = request.getParameter("memo");

Inspection i = new Inspection();
i.setId(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
39
40
41
42
43
			String title=request.getParameter("title");
String uper=request.getParameter("uper");
int id= Integer.parseInt(request.getParameter("id"));
Notice n=new Notice();
n.setId(id);
n.setContent(content);
n.setNdate(ndate);
n.setTitle(title);
n.setUper(uper);
noticeservice.Update(n);
response.sendRedirect("notice?action=noticelist");
}
else if("noticeview".equals(action)){
String id=request.getParameter("id");
Notice n=noticeservice.Select(id);
request.setAttribute("notice", n);
RequestDispatcher rd =request.getRequestDispatcher("notice/notice-view.jsp");
rd.forward(request,response);
}
else if("listforuser".equals(action)){
List<Notice> list=new ArrayList<Notice>();
list=noticeservice.FindAll();
request.setAttribute("notice", list);
RequestDispatcher rd=request.getRequestDispatcher("notice/user-notice-list.jsp");
rd.forward(request,response);
}
}

}


package com.cissst.servlet;




public class InspectionServlet extends HttpServlet{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
String action = request.getParameter("action");
IInspectionService iis = new InspectionServiceImpl();
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
}
package com.cissst.servlet;




public class HouseServlet extends HttpServlet{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
String action = request.getParameter("action");
IHouseService ihs = new HouseServiceImpl();
if("houseList".equals(action)){
List<House> list = ihs.findAllHouse();
request.setAttribute("houses", list);
RequestDispatcher rd = request.getRequestDispatcher("house/house-list.jsp");
rd.forward(request, response);

}else if("houseAdd".equals(action)){

// int id = Integer.parseInt(request.getParameter("id"));
String num = request.getParameter("num");
String dep = request.getParameter("dep");
String type = request.getParameter("type");
String area = request.getParameter("area");
String sell = request.getParameter("sell");
String unit = request.getParameter("unit");
String floor = request.getParameter("floor");
String direction = request.getParameter("direction");
String memo = request.getParameter("memo");
String ownerid = request.getParameter("ownerid");

House h = new House();
// h.setId(id);
h.setNum(num);
h.setDep(dep);
h.setType(type);
h.setArea(area);
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
			i.setId(id);
i.setPerson(person);
i.setType(type);
i.setItime(itime);
i.setConductor(conductor);
i.setParty(party);
i.setResult(result);
i.setMemo(memo);

iis.update(i);

response.sendRedirect("inspection?action=inspectionList");
}else if("inspectionDelete".equals(action)){
String id = request.getParameter("id");
iis.delete(id);
response.sendRedirect("inspection?action=inspectionList");
}
}
}
package com.cissst.servlet;




public class UserServlet extends HttpServlet{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String action = request.getParameter("action");
IAdminService as = new AdminServiceImpl();
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
			
response.sendRedirect("inspection?action=inspectionList");
}else if("inspectionDelete".equals(action)){
String id = request.getParameter("id");
iis.delete(id);
response.sendRedirect("inspection?action=inspectionList");
}
}
}
package com.cissst.servlet;




public class UserServlet extends HttpServlet{
@Override
protected void service(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
String action = request.getParameter("action");
IAdminService as = new AdminServiceImpl();
ICustomAccountService cs = new CustomAccountServiceImpl();
HttpSession session = request.getSession();
if("login".equals(action)){
String name = request.getParameter("username");
String password = MD5Util.encode(request.getParameter("password"));
String usertype = request.getParameter("usertype");
Admin a = as.findBynp(name, password);
CustomAccount c = cs.findBynp(name, password);
if(a != null){
String n = a.getName();
String p = a.getPassword();
if(n.equals(name) && p.equals(password)&&"admin".equals(usertype)){
session.setAttribute("admin", a);
response.sendRedirect("index.jsp");


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