zl程序教程

您现在的位置是:首页 >  后端

当前栏目

基于java的小区物业管理系统_java做一个管理系统

JAVA管理系统系统 一个 基于 小区
2023-06-13 09:14:43 时间

基于java智慧小区物业管理系统

本系统采用java和mysql数据库开发的BS架构系统,本系统分为业主和物业管理员两个角色,在用户子系统中,使用者通过账号密码(用户)登入系统,进入主页,通过主页链接,进入小区服务,小区公告,信息查询,系统功能四个功能模块,在模块内可以完成报修,查看公告,查询房产相关信息,修改密码,退出系统等功能。在管理员子系统中,使用者通过帐号密码(管理员)登入系统,进入主页,通过主页链接进入管理员信息管理,物业管理,报修管理,保卫绿化,公告管理,系统功能六个功能模块。


一.技术环境

JDK版本:1.8 IDE工具:eclipse 数据库: mysql 5.5 编程语言: Java tomcat: 8.0 详细技术:HTML+CSS+JS+JSP+JAVA+SERVLET+MYSQL+JQUERY


二.项目文件


三.系统功能


四.代码示例

package com.lmu.controller;
/** * 和登陆有关的都在这里 */
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.UserUtils;
import org.apache.commons.collections.map.HashedMap;
import org.apache.struts2.ServletActionContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@Controller("loginController")
@Scope("prototype")
public class LoginController extends ActionSupport { 

@Autowired
private UserService userService;
@Autowired
private RoleService roleService;
private User user;
private Map<String, Object> map = new HashMap();
public User getUser() { 

return user;
}
public void setUser(User user) { 

this.user = user;
}
public UserService getUserService() { 

return userService;
}
public void setUserService(UserService userService) { 

this.userService = userService;
}
/** * 用户登陆 * @return */
public void index() throws IOException { 

User user1 = userService.getUser(user);
if (user1 != null){ 

if (user1.getIsSh() == 1){ 

if (user1.getRole().getEnName().equals("admin")){ 

ActionContext.getContext().getSession().put("user", user1);
}
if (user1.getRole().getEnName().equals("js")){ 

ActionContext.getContext().getSession().put("user1", user1);
}
if (user1.getRole().getEnName().equals("xs")){ 

ActionContext.getContext().getSession().put("user2", user1);
}
map.put("flag", 1);
map.put("url", "login_indexs.do");
map.put("id", user1.getId());
JsonUtils.toJson(map);
} else { 

map.put("flag", 2);
JsonUtils.toJson(map);
}
} else { 

map.put("flag", 3);
JsonUtils.toJson(map);
}
}
public String indexs() throws IOException { 

User u = UserUtils.getUser();
if (u != null){ 

ActionContext.getContext().put("user", u);
String ss = u.getRole().getEnName();
ActionContext.getContext().put("role", u.getRole().getEnName());
}
return SUCCESS;
}
//登陆页面
public String login() { 

return SUCCESS;
}
//退出
public String tuichu() { 

ActionContext ac = ActionContext.getContext();
Map session = ac.getSession();
session.remove("userName");
session.remove("userId");
ServletActionContext.getRequest().getSession().invalidate();
return "login";
}
}
---
# 五.项目截图
![在这里插入图片描述](https://img-blog.csdnimg.cn/550fedcae1cd4d158ca8946f59e80b88.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/8d61fbe0c7d8491ab7c622e523f7b474.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/1fd2022ae2a649829c35ffedabe7842c.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/ab273bc67bc14a2ba56ccc5dbe18c635.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/47972c0439c54d05b939f4b1a0c6fcd0.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/fd3f50a7ab0b43b5981081b13b221db8.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/8a677e6975ff4e01b1afa8285cce74cb.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/9099cf27a85d4e37b6491cb980bc0f0e.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/b572cf5c17a64402802e8854061a5ec6.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/130daddc91ff43aeb8ef7c3d9a934aa8.png#pic_center)
![在这里插入图片描述](https://img-blog.csdnimg.cn/ee7a264b4ca4467aaa30b86a9dc4b2e4.png#pic_center)

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/183649.html原文链接:https://javaforall.cn