小区物业管理系统

项目名称

基于SSM实现的小区物业管理系统

演示视频

=基于SSM实现的小区物业管理系统_哔哩哔哩_bilibili

系统介绍

3、系统总体设计

3.1 总体结构设计

系统总体架构设计是根据前期做出的详细需求分析,明确本系统采用基于SSM框架,并且进行合理的规划和总结后得出的结果,也就是相当于将总的复杂的设计任务规划为小的简单的设计任务,通过对这些小的简单的设计任务的实现来满足整个系统的总设计。本系统采用模块化的设计原理将整个系统分为多个模块,模块下又具体分为多个具体的功能,利用这个原理,得出小区物业管理系统的总体架构图。

本小区物业管理系统主要包括以下八大模块:房屋管理模块、业主管理模块

、停车场管理模块、报修管理模块、投诉管理模块、员工管理模块、设施管理模块。系统架构设计图,如图3.1所示:

图3.1 系统架构图

3.2 模块详细设计

1、房屋管理模块

房屋管理模块是小区物业管理系统的主要功能之一,同时与之对应的功能也是很多,所以本小区物业管理系统的开发将会把房屋管理放在首位,系统的其他功能将会以此展开。

房屋管理模块不仅包括房屋基本信息的管理,同时也会涉及到楼房管理、房型管理、业主管理三个部分。楼房管理模块是管理小区内所有的楼栋,包括其名称以及备注等相关信息;房型管理是小区内所有房屋的户型管理,包括房屋的类型、面积、使用情况、房屋数量等信息;房屋管理则是在楼房管理和房型管理上对具体的房屋进行的管理,包括房屋的业主、使用情况、房屋类型等信息进行统一管理。具体如图3.2所示:

图 3.2 房屋模块架构图

2、业主管理模块

业主管理模块只要是本系统对业主信息的综合管理,主要功能分为两部分:管理员管理业主和业主维护个人信息。在管理员后台,系统的管理员可以对业主用户进行相应的增删改查,同时可以查询现有业主的所有基本信息,包括个人的基本信息(姓名、电话、身份证号码等)和房产信息(具体的房屋信息)。具体的架构图3.3如所示。

图3.3 停车场管理架构图

3、停车场管理模块

停车场管理模块主要是用于小区物业对于停车场能够合理规划的功能,同时记录停车场的具体使用情况和停车场中具体停车位的状态(已售或者未售),最大程度的使停车场能够进行系统的管理,减少小区物业对于停车场付出的巨大人力物力。具体的停车场管理图如图3.4所示:

图3.4 停车场管理架构图

4、收费管理模块

收费管理模块是针对小区物业和业主双方的管理模块,业主可以通过该模块进行相应费用的缴纳,小区物业也可以对其进行合理的管理和统计。收费的项目主要包括:物业费、水电费、煤气费。

鉴于技术的原因,个人并不能获得支付端口,从而无法实现在线支付相应的集成支付系统,而是采用线下转账的支付方式缴纳相关的费用,小区缴纳固定费用后可以将相关的缴纳支付凭证以截图的方式上传到系统,管理员会根据小区物业的流水账单对其进行相应的审核,确认是否已缴纳完成。具体的流程图如图3.5所示:

图3.5 收费模块流程图

5、报修管理模块

报修管理模块主要针对解决业主对于自身房屋设备的维修管理,在本系统中,业主登录后可以发送对应的报修消息,管理员后台会实时接收并且对相应的请求进行处理。

报修管理模块也是小区物业管理系统中重要的组成部分,同时它将会是该系统使用最频繁的功能之一。发起者为业主,业主同构登录系统后发送维修申请给管理员,管理员会根据业主发送的申请进行处理,包括派遣具体的维修工作人员,报修完成后管理员会将修改状态更改为完成。具体报修模块的流程图如图3.6所示:

图3.6 报修模块流程图

6、投诉管理模块

投诉管理模块主要适用于业主,期望使业主能够合法的使用监督权监督小区物业的一系列服务,减少和不断改进小区物业的缺陷,使其小区物业能够更加快捷、更加方便的服务业主。

该投诉管理模块包含两部分:一部分是业主的投诉,另一部分是管理员对此做出的反馈。活动的发起者是业主,业主通过登录系统后可以添加投诉信息,具体的内容包括:投诉时间、投诉内容、投诉事件等,业主在线发送请求以后,管理员会接收到业主的请求,并对所投诉的内容进行相关的处理,最终反馈给业主。具体的流程图如图3.7所示:

图3.7 投诉模块流程图

7、员工管理模块

员工管理模块主要是小区物业对于内部员工的管理,以便能够更加合理的安排员工的具体工作,目前来说,国内的大部分小区还会存在大量的工作人员,因此员工的管理工作也是小区物业工作中的关键一步。具体如图3.8所示。

具体的工作流程如下:系统管理员登录小区物业管理系统后台后,可针对实际情况对新入职的物业工作人员进行登记,同时还会对系统中已经存在的小区物业工作人员的信息进行删除、修改和查询。具体流程图如图3.9所示。

图3.8 人员管理模块架构图

图3.9 人员管理模块流程图

8、设施管理模块

设施管理模块是针对小区物业来合理规划小区中存在的一些列公共设施的模块,主要包括:设施的名称、投放数量、投放时间等等,期望能够更加清晰的安排设施的投放以及安置情况。具体如图3.10所示。

图3.10 设施管理模块架构图

系统截图

环境需要

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. 将项目中springmvc-servlet.xml配置文件中的数据库配置改为自己的配置;
4. 运行项目,在浏览器中输入http://localhost:8080/ 登录

 用户管理控制层:

package com.houserss.controller;

import javax.servlet.http.HttpSession;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.houserss.common.Const;
import com.houserss.common.Const.Role;
import com.houserss.common.ServerResponse;
import com.houserss.pojo.User;
import com.houserss.service.IUserService;
import com.houserss.service.impl.UserServiceImpl;
import com.houserss.util.MD5Util;
import com.houserss.util.TimeUtils;
import com.houserss.vo.DeleteHouseVo;
import com.houserss.vo.PageInfoVo;

/**
 * Created by admin
 */
@Controller
@RequestMapping("/user/")
public class UserController {
    @Autowired
    private IUserService iUserService;

    /**
     * 用户登录
     * @param username
     * @param password
     * @param session
     * @return
     */
    @RequestMapping(value = "login.do",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse<User> login(User user,String uvcode, HttpSession session){
        String code = (String)session.getAttribute("validationCode");
        if(StringUtils.isNotBlank(code)) {
            if(!code.equalsIgnoreCase(uvcode)) {
                return ServerResponse.createByErrorMessage("验证码不正确");
            }
        }
        ServerResponse<User> response = iUserService.login(user.getUsername(),user.getPassword());
        if(response.isSuccess()){
            session.setAttribute(Const.CURRENT_USER,response.getData());
        }
        return response;
    }

  
    
    
}

管理员管理控制层:


package com.sxl.controller.admin;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sxl.controller.MyController;

@Controller("adminController")
@RequestMapping(value = "/admin")
public class AdminController extends MyController {
	

	@RequestMapping(value = "/index")
	public String frame(Model model, HttpServletRequest request)throws Exception {
		return "/admin/index";
	}
	
	@RequestMapping(value = "/main")
	public String main(Model model, HttpServletRequest request)throws Exception {
		return "/admin/main";
	}
	
	@RequestMapping(value = "/tj1")
	public String tj1(Model model, HttpServletRequest request)throws Exception {
		String sql="select DATE_FORMAT(insertDate,'%Y-%m-%d') dates,sum(allPrice) price from t_order order by DATE_FORMAT(insertDate,'%Y-%m-%d')  desc";
		List<Map> list = db.queryForList(sql);
		model.addAttribute("list", list);
		System.out.println(list);
		return "/admin/tj/tj1";
	}
	
	
	@RequestMapping(value = "/password")
	public String password(Model model, HttpServletRequest request)throws Exception {
		return "/admin/password";
	}
	
	
	@RequestMapping(value = "/changePassword")
	public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {
		Map admin = getAdmin(request);
		if(oldPassword.equals(admin.get("password").toString())){
			String sql="update t_admin set password=? where id=?";
			db.update(sql, new Object[]{newPassword,admin.get("id")});
			return renderData(true,"1",null);
		}else{
			return renderData(false,"1",null);
		}
	}
}

修改密码业务逻辑:


package com.sxl.controller.admin;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sxl.controller.MyController;

@Controller("userController")
@RequestMapping(value = "/user")
public class UserController extends MyController {
	

	@RequestMapping(value = "/index")
	public String frame(Model model, HttpServletRequest request)throws Exception {
		return "/user/index";
	}
	
	@RequestMapping(value = "/main")
	public String main(Model model, HttpServletRequest request)throws Exception {
		return "/user/main";
	}
	
	
	@RequestMapping(value = "/password")
	public String password(Model model, HttpServletRequest request)throws Exception {
		return "/user/password";
	}
	
	
	@RequestMapping(value = "/changePassword")
	public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {
		Map user = getUser(request);
		if(oldPassword.equals(user.get("password").toString())){
			String sql="update t_user set password=? where id=?";
			db.update(sql, new Object[]{newPassword,user.get("id")});
			return renderData(true,"1",null);
		}else{
			return renderData(false,"1",null);
		}
	}
	@RequestMapping(value = "/mine")
	public String mine(Model model, HttpServletRequest request)throws Exception {
Map user =getUser(request);Map map = db.queryForMap("select * from t_user where id=?",new Object[]{user.get("id")});model.addAttribute("map", map);		return "/user/mine";
	}
	
	

	@RequestMapping(value = "/mineSave")
	public ResponseEntity<String> mineSave(Model model,HttpServletRequest request,Long id
		,String username,String password,String name,String gh,String mobile) throws Exception{
		int result = 0;
			String sql="update t_user set name=?,gh=?,mobile=? where id=?";
			result = db.update(sql, new Object[]{name,gh,mobile,id});
		if(result==1){
			return renderData(true,"操作成功",null);
		}else{
			return renderData(false,"操作失败",null);
		}
	}
	}

通用管理模块:

package com.sxl.controller;


import java.nio.charset.Charset;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;

import com.sxl.util.JacksonJsonUtil;
import com.sxl.util.StringUtil;
import com.sxl.util.SystemProperties;


public class BaseController {
	public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1天

	@Autowired
	private SystemProperties systemProperties;

	/**
	 * 获得配置文件内容
	 */
	public String getConfig(String key) {
		return systemProperties.getProperties(key);
	}

	/**
	 * 返回服务器地址 like http://192.168.1.1:8441/UUBean/
	 */
	public String getHostUrl(HttpServletRequest request) {
		String hostName = request.getServerName();
		Integer hostPort = request.getServerPort();
		String path = request.getContextPath();

		if (hostPort == 80) {
			return "http://" + hostName + path + "/";
		} else {
			return "http://" + hostName + ":" + hostPort + path + "/";
		}
	}

	/***
	 * 获取当前的website路径 String
	 */
	public static String getWebSite(HttpServletRequest request) {
		String returnUrl = request.getScheme() + "://"
				+ request.getServerName();

		if (request.getServerPort() != 80) {
			returnUrl += ":" + request.getServerPort();
		}

		returnUrl += request.getContextPath();

		return returnUrl;
	}



	/**
	 * 初始化HTTP头.
	 * 
	 * @return HttpHeaders
	 */
	public HttpHeaders initHttpHeaders() {
		HttpHeaders headers = new HttpHeaders();
		MediaType mediaType = new MediaType("text", "html",
				Charset.forName("utf-8"));
		headers.setContentType(mediaType);
		return headers;
	}

	/**
	 * 返回 信息数据
	 * 
	 * @param status
	 * @param msg
	 * @return
	 */
	public ResponseEntity<String> renderMsg(Boolean status, String msg) {
		if (StringUtils.isEmpty(msg)) {
			msg = "";
		}
		String str = "{\"status\":\"" + status + "\",\"msg\":\"" + msg + "\"}";
		ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,
				initHttpHeaders(), HttpStatus.OK);
		return responseEntity;
	}

	/**
	 * 返回obj数据
	 * 
	 * @param status
	 * @param msg
	 * @param obj
	 * @return
	 */
	public ResponseEntity<String> renderData(Boolean status, String msg,
			Object obj) {
		if (StringUtils.isEmpty(msg)) {
			msg = "";
		}
		StringBuffer sb = new StringBuffer();
		sb.append("{");
		sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\",");
		sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");
		sb.append("}");

		ResponseEntity<String> responseEntity = new ResponseEntity<String>(
				sb.toString(), initHttpHeaders(), HttpStatus.OK);
		return responseEntity;
	}


	/***
	 * 获取IP(如果是多级代理,则得到的是一串IP值)
	 */
	public static String getIpAddr(HttpServletRequest request) {
		String ip = request.getHeader("x-forwarded-for");
		if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
			ip = request.getHeader("Proxy-Client-IP");
		}

		if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
			ip = request.getHeader("WL-Proxy-Client-IP");
		}

		if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
			ip = request.getRemoteAddr();
		}

		if (ip != null && ip.length() > 0) {
			String[] ips = ip.split(",");
			for (int i = 0; i < ips.length; i++) {
				if (!"unknown".equalsIgnoreCase(ips[i])) {
					ip = ips[i];
					break;
				}
			}
		}

		return ip;
	}

	/**
	 * 国际化获得语言内容
	 * 
	 * @param key
	 *            语言key
	 * @param args
	 * @param argsSplit
	 * @param defaultMessage
	 * @param locale
	 * @return
	 */
	public static String getLanguage(String key, String args, String argsSplit,
			String defaultMessage, String locale) {
		String language = "zh";
		String contry = "cn";
		String returnValue = defaultMessage;

		if (!StringUtil.isEmpty(locale)) {
			try {
				String[] localeArray = locale.split("_");
				language = localeArray[0];
				contry = localeArray[1];
			} catch (Exception e) {
			}
		}

		try {
			ResourceBundle resource = ResourceBundle.getBundle("lang.resource",
					new Locale(language, contry));
			returnValue = resource.getString(key);
			if (!StringUtil.isEmpty(args)) {
				String[] argsArray = args.split(argsSplit);
				for (int i = 0; i < argsArray.length; i++) {
					returnValue = returnValue.replace("{" + i + "}",
							argsArray[i]);
				}
			}
		} catch (Exception e) {
		}

		return returnValue;
	}
}

  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值