【计算机毕业设计】忘忧小区物业管理系统
忘忧小区物业管理系统设计与实现
使用旧方法对忘忧小区物业管理信息进行系统化管理已经不再让人们信赖了,把现在的网络信息技术运用在忘忧小区物业管理信息的管理上面可以解决许多信息管理上面的难题,比如处理数据时间很长,数据存在错误不能及时纠正等问题。
这次开发的忘忧小区物业管理系统功能有个人中心,小区信息管理,住户管理,小区通知管理,缴费信息管理,房源信息管理,报修信息管理,维修指派管理,小区环境管理,住户交流,留言板管理,系统管理等。经过前面自己查阅的网络知识,加上自己在学校课堂上学习的知识,决定开发系统选择B/S模式这种高效率的模式完成系统功能开发。这种模式让操作员基于浏览器的方式进行网站访问,采用的主流的Java语言这种面向对象的语言进行忘忧小区物业管理系统程序的开发,在数据库的选择上面,选择功能强大的MySQL数据库进行数据的存放操作。
忘忧小区物业管理系统被人们投放于现在的生活中进行使用,该款管理类软件就可以让管理人员处理信息的时间介于十几秒之间。在这十几秒内就能完成信息的编辑等操作。有了这样的管理软件,忘忧小区物业管理信息的管理就离无纸化办公的目标更贴近了。
Java SSM小区物业管理系统,后端基于SSM框架进行开发设计,前端页面效果通过使用vue进行编码实现,主要实现了住户跟管理员角色,将实现小区通知管理、小区信息管理等功能。







package com.controller;import java.util.Arrays;
import java.util.Map;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("config")
@RestController
public class ConfigController{@Autowiredprivate ConfigService configService;/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ConfigEntity config){EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();PageUtils page = configService.queryPage(params);return R.ok().put("data", page);}/*** 列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ConfigEntity config){EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();PageUtils page = configService.queryPage(params);return R.ok().put("data", page);}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){ConfigEntity config = configService.selectById(id);return R.ok().put("data", config);}/*** 详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") String id){ConfigEntity config = configService.selectById(id);return R.ok().put("data", config);}/*** 根据name获取信息*/@RequestMapping("/info")public R infoByName(@RequestParam String name){ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));return R.ok().put("data", config);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);configService.insert(config);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);configService.updateById(config);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){configService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.XiaoqutongzhiEntity;
import com.entity.view.XiaoqutongzhiView;import com.service.XiaoqutongzhiService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 小区通知* 后端接口* @author * @email * @date 2021-05-09 10:58:53*/
@RestController
@RequestMapping("/xiaoqutongzhi")
public class XiaoqutongzhiController {@Autowiredprivate XiaoqutongzhiService xiaoqutongzhiService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request){EntityWrapper<XiaoqutongzhiEntity> ew = new EntityWrapper<XiaoqutongzhiEntity>();PageUtils page = xiaoqutongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xiaoqutongzhi), params), params));return R.ok().put("data", page);}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request){EntityWrapper<XiaoqutongzhiEntity> ew = new EntityWrapper<XiaoqutongzhiEntity>();PageUtils page = xiaoqutongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xiaoqutongzhi), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/lists")public R list( XiaoqutongzhiEntity xiaoqutongzhi){EntityWrapper<XiaoqutongzhiEntity> ew = new EntityWrapper<XiaoqutongzhiEntity>();ew.allEq(MPUtil.allEQMapPre( xiaoqutongzhi, "xiaoqutongzhi")); return R.ok().put("data", xiaoqutongzhiService.selectListView(ew));}/*** 查询*/@RequestMapping("/query")public R query(XiaoqutongzhiEntity xiaoqutongzhi){EntityWrapper< XiaoqutongzhiEntity> ew = new EntityWrapper< XiaoqutongzhiEntity>();ew.allEq(MPUtil.allEQMapPre( xiaoqutongzhi, "xiaoqutongzhi")); XiaoqutongzhiView xiaoqutongzhiView = xiaoqutongzhiService.selectView(ew);return R.ok("查询小区通知成功").put("data", xiaoqutongzhiView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){XiaoqutongzhiEntity xiaoqutongzhi = xiaoqutongzhiService.selectById(id);xiaoqutongzhi.setClicknum(xiaoqutongzhi.getClicknum()+1);xiaoqutongzhi.setClicktime(new Date());xiaoqutongzhiService.updateById(xiaoqutongzhi);return R.ok().put("data", xiaoqutongzhi);}/*** 前端详情*/@IgnoreAuth@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){XiaoqutongzhiEntity xiaoqutongzhi = xiaoqutongzhiService.selectById(id);xiaoqutongzhi.setClicknum(xiaoqutongzhi.getClicknum()+1);xiaoqutongzhi.setClicktime(new Date());xiaoqutongzhiService.updateById(xiaoqutongzhi);return R.ok().put("data", xiaoqutongzhi);}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request){xiaoqutongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xiaoqutongzhi);xiaoqutongzhiService.insert(xiaoqutongzhi);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request){xiaoqutongzhi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(xiaoqutongzhi);xiaoqutongzhiService.insert(xiaoqutongzhi);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request){//ValidatorUtils.validateEntity(xiaoqutongzhi);xiaoqutongzhiService.updateById(xiaoqutongzhi);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){xiaoqutongzhiService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<XiaoqutongzhiEntity> wrapper = new EntityWrapper<XiaoqutongzhiEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = xiaoqutongzhiService.selectCount(wrapper);return R.ok().put("count", count);}/*** 前端智能排序*/@IgnoreAuth@RequestMapping("/autoSort")public R autoSort(@RequestParam Map<String, Object> params,XiaoqutongzhiEntity xiaoqutongzhi, HttpServletRequest request,String pre){EntityWrapper<XiaoqutongzhiEntity> ew = new EntityWrapper<XiaoqutongzhiEntity>();Map<String, Object> newMap = new HashMap<String, Object>();Map<String, Object> param = new HashMap<String, Object>();Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();while (it.hasNext()) {Map.Entry<String, Object> entry = it.next();String key = entry.getKey();String newKey = entry.getKey();if (pre.endsWith(".")) {newMap.put(pre + newKey, entry.getValue());} else if (StringUtils.isEmpty(pre)) {newMap.put(newKey, entry.getValue());} else {newMap.put(pre + "." + newKey, entry.getValue());}}params.put("sort", "clicknum");params.put("order", "desc");PageUtils page = xiaoqutongzhiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xiaoqutongzhi), params), params));return R.ok().put("data", page);}}
package com.controller;import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;import com.entity.ForumEntity;
import com.entity.view.ForumView;import com.service.ForumService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;/*** 住户交流* 后端接口* @author * @email * @date 2021-05-09 10:58:53*/
@RestController
@RequestMapping("/forum")
public class ForumController {@Autowiredprivate ForumService forumService;/*** 后端列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,ForumEntity forum, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理员")) {forum.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, forum), params), params));return R.ok().put("data", page);}/*** 前端列表*/@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params,ForumEntity forum, HttpServletRequest request){if(!request.getSession().getAttribute("role").toString().equals("管理员")) {forum.setUserid((Long)request.getSession().getAttribute("userId"));}EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, forum), params), params));return R.ok().put("data", page);}/*** 列表*/@IgnoreAuth@RequestMapping("/flist")public R flist(@RequestParam Map<String, Object> params,ForumEntity forum, HttpServletRequest request){EntityWrapper<ForumEntity> ew = new EntityWrapper<ForumEntity>();PageUtils page = forumService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allEq(ew, forum), params), params));return R.ok().put("data", page);}/*** 查询*/@RequestMapping("/query")public R query(ForumEntity forum){EntityWrapper< ForumEntity> ew = new EntityWrapper< ForumEntity>();ew.allEq(MPUtil.allEQMapPre( forum, "forum")); ForumView forumView = forumService.selectView(ew);return R.ok("查询住户交流成功").put("data", forumView);}/*** 后端详情*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") Long id){ForumEntity forum = forumService.selectById(id);return R.ok().put("data", forum);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id){ForumEntity forum = forumService.selectById(id);return R.ok().put("data", forum);}/*** 论坛详情*/@IgnoreAuth@RequestMapping("/list/{id}")public R list(@PathVariable("id") String id){ForumEntity forum = forumService.selectById(id);getChilds(forum);return R.ok().put("data", forum);}private ForumEntity getChilds(ForumEntity forum) {List<ForumEntity> childs = new ArrayList<ForumEntity>();childs = forumService.selectList(new EntityWrapper<ForumEntity>().eq("parentid", forum.getId()));if(childs == null || childs.size()==0) {return null;}forum.setChilds(childs);for(ForumEntity forumEntity : childs) {getChilds(forumEntity);}return forum;}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody ForumEntity forum, HttpServletRequest request){forum.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(forum);forum.setUserid((Long)request.getSession().getAttribute("userId"));forumService.insert(forum);return R.ok();}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody ForumEntity forum, HttpServletRequest request){forum.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());//ValidatorUtils.validateEntity(forum);forum.setUserid((Long)request.getSession().getAttribute("userId"));forumService.insert(forum);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody ForumEntity forum, HttpServletRequest request){//ValidatorUtils.validateEntity(forum);forumService.updateById(forum);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){forumService.deleteBatchIds(Arrays.asList(ids));return R.ok();}/*** 提醒接口*/@RequestMapping("/remind/{columnName}/{type}")public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, @PathVariable("type") String type,@RequestParam Map<String, Object> map) {map.put("column", columnName);map.put("type", type);if(type.equals("2")) {SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");Calendar c = Calendar.getInstance();Date remindStartDate = null;Date remindEndDate = null;if(map.get("remindstart")!=null) {Integer remindStart = Integer.parseInt(map.get("remindstart").toString());c.setTime(new Date()); c.add(Calendar.DAY_OF_MONTH,remindStart);remindStartDate = c.getTime();map.put("remindstart", sdf.format(remindStartDate));}if(map.get("remindend")!=null) {Integer remindEnd = Integer.parseInt(map.get("remindend").toString());c.setTime(new Date());c.add(Calendar.DAY_OF_MONTH,remindEnd);remindEndDate = c.getTime();map.put("remindend", sdf.format(remindEndDate));}}Wrapper<ForumEntity> wrapper = new EntityWrapper<ForumEntity>();if(map.get("remindstart")!=null) {wrapper.ge(columnName, map.get("remindstart"));}if(map.get("remindend")!=null) {wrapper.le(columnName, map.get("remindend"));}int count = forumService.selectCount(wrapper);return R.ok().put("count", count);}}
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
