基于Java Web的墓地管理系统的设计与实现+第五稿+文档

该系统分为用户、管理员和初始化信息管理员三个角色,每个角色具有不同权限。用户可进行墓地管理、选位等操作;管理员负责信息管理、统计等全面工作;初始化信息管理员则涉及更广泛的系统维护和管理功能。系统基于Spring、SpringMVC、Mybatis框架开发,采用JSP作为前端技术,并提供了详细的环境配置和运行说明。
摘要由CSDN通过智能技术生成

    博主介绍:✌在职Java研发工程师、专注于程序设计、源码分享、技术交流、专注于Java技术领域和毕业设计

项目名称

基于Java Web的墓地管理系统的设计与实现+第五稿+文档

视频演示

视频去哪了呢?_哔哩哔哩_bilibili

系统介绍

3.3 角色分析

本系统一共分为四个角色,不同的角色拥有不同的数据权限进行数据的操作,以下是它们对应的功能模块划分:

3.3.1 用户用例

用户模块拥有墓地管理、选位、空余位置、通知公告、通知信息、交流管理、帖子管理等功能模块,用户用例图如下图3-4所示。

图3-4 用户用例图

3.3.2 管理员用例

管理员模块集成了多种功能,如初始化信息管理、用户信息管理、各类信息管理(包括管理员、园区、用户、墓地),墓地类型设置,信用积分管理,通知公告发布,以及数据统计(违规统计、选位统计等),为墓地管理提供全面、高效的支持,管理员用例图如下图3-5所示。

图3-5 管理员用例图

3.3.3 初始化信息管理员用例

初始化信息管理员模块具备丰富的功能,包括墓地管理系统整体维护、初始化信息管理、用户信息管理、角色管理、菜单管理、日志管理等。同时,涵盖了各类信息管理(如管理员、园区、用户、墓地)、墓地类型设定、信用积分管理、选位管理(包括选位、空余位置查询等)、通知公告发布、交流管理(如帖子管理)以及数据统计(如违规统计、选位统计等)。这些功能模块共同为墓地管理提供全面、高效的支持,初始化信息管理员用例图如下图3-6所示。

图3-6 初始化信息管理员用例图

4 系统设计

4.1 设计需求注释介绍

4.1.1 总体描述

它主要由三种用户角色进行功能模块的设计分别是用户、管理员、初始化信息管理员,每个角色用户对应着不同的功能权限信息。

  1. 用户模块涵盖了墓地管理、信用积分管理、选位管理等关键功能,同时提供通知公告查阅和交流管理等辅助功能,以满足使用者在墓地管理方面的需求,实现便捷高效的操作体验。如图4-1所示。

图4-1  用户功能模块图

  1. 管理员模块包含用户信息管理、墓地管理、信用积分管理、通知公告发布、初始化信息管理等核心功能,辅以数据统计功能,为管理员提供全面、高效的管理支持,确保墓地运营的顺利进行。如图4-2所示。

图4-2  管理员功能模块图

  1. 初始化信息管理员模块集成了用户信息管理、墓地管理、信用积分管理、选位管理等核心功能,同时提供通知公告发布、交流管理、初始化信息管理及数据统计等辅助功能,确保对墓地管理系统的全面、高效掌控,满足各种运营需求。如图4-3所示。

图4-3  初始化信息管理员功能模块图

环境需要

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;
	}
}

下载地址:http://www.muqin.com.cn/soft/ax.rar 程序演示地址:http://www.muqin.com.cn/ax/index.asp http://ax.muqin.com.cn后台管理:admin/index.asp 未设密码▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔☆ 网墓程序之母亲安息 V1.0版 http://ax.muqin.com.cn ☆▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔本网墓程序的开发由中国母亲网完成,本程序使用权归中国母亲网版权所有,免费提供使用、交流,商业用途请购买网墓程序之母亲安息 V1.5无错版。如果您使用了该网墓程序,请您保留本网墓程序的版权,并在登陆页和母亲安息网主页面加上本网站的链接(http://ax.muqin.com.cn),以便将来能为您提供更强、更美的程序,THankS==================================================== 网墓程序介绍  有生命,就有死亡。每天都会有逝者离开我们所生存的这个世界--传统的公墓正在变得越来越拥挤。每到春节、清明或忌日,人们都要到逝者的墓前扫墓、祭奠,以了结自己的一份心愿。随着网络社会的逐步到来,逝者也将拥有网络上的天堂:一个完全数字化的网上公墓--这就是母亲安息网公墓。  在传统公墓里,逝者所拥有的只是一块冷冰冰的墓碑,以及无尽的孤独与凄凉。但在母亲安息网公墓中,逝者却能拥有一个有声有色的世界,所有的亲友可以在这里陪伴着他,所有的爱心可以在这里围绕着他!首先,每个逝者都可以在母亲安息网公墓得到拥有无限空间的网上墓室。逝者生前的音容笑貌、生平事迹、作品文字等等都可以在这里永存,使后人能全面地、系统地了解逝者的一生--这里既是逝者在网络世界中的灵魂立足之地,也是逝者在网上的一座个人纪念馆;同时,母亲安息网公墓所特有的网络信息平台功能,使五湖四海的亲友和访客都走到了一起,他们可以非常方便地在这里进行信息上的交流与沟通,如网上祭奠和纪念活动等。  其次,母亲安息网公墓将没有时间上的限制,它没有物理性的损耗,不会风化或坍塌,也不会损坏或被盗,相反,它可以根据用户的需要,随时进行各种各样的修改和更新,并且在数字化的网络社会里永存下去。同时,它还拥有费用低廉、不占用一寸土地、完全绿色和环保、并且摆脱了时空与地域的限制等诸多优点。所以,母亲安息网公墓必然在网络社会中成为人们的最佳选择。  母亲安息网公墓使逝者的英魂长存于英特网的数字空间中,流传万世,永不泯灭!=================================================== 网墓程序使用说明 用户注册:新用户可在此注册成为母亲安息网公墓的正式用户,享受母亲安息网公墓提供的各项服务。 母亲墓地及纪念管理: 用户可在这里对所申请的逝者母亲墓室各部分内容进行全面管理,如新建墓地、定制墓碑、新建母亲纪念馆、管理母亲纪念馆、修改资料、上传照片、制作家族墓群和亲情链接等。 网上祭奠: 用户可在逝者母亲的墓地及纪念馆里完成献花、上供、送钱、烧香、焚烛、点歌、留言以及带有女性个性化的的献首饰、献服饰、献化妆品等祭奠和纪念活动。 另:本程序使用完善的虚拟货币购物机制,采心币用积分来获取操作权限。备注:1:使用免费版的个人用户本站不提供技术支持,在使用过程中出现的任何问题 本站不承但连带责任. 2:对本程序有任何意见和介绍可在母亲安息论坛里留言 http://www.muqin.com.cn/forum_list.asp?forum_id=34====================================================网站名称:中国母亲网程序设计:网上幽灵QQ:251200452公司名称:湖南永正企划有限责任公司地址:http://www.muqin.com.cn联系电子邮件: muqin@muqin.com.cn====================================================
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

全职计算机毕业设计

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值