毕业设计:基于SSM实现新生报道系统

Posted 编程指南针

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了毕业设计:基于SSM实现新生报道系统相关的知识,希望对你有一定的参考价值。

作者主页:编程指南针

 简介:Java领域优质创作者、CSDN博客专家  Java项目、简历模板、学习资料、面试题库、技术互助

文末获取源码

项目编号:BS-GX-035

一,项目说明:

    本项目基于SSM框架开发实现了一个高校新生报道信息管理系统,系统前后端分开,前端是新生用户信息查看及缴费的窗口,可以实现在线注册,登陆,查看公告、了解学校信息、查阅各专业并实现在线缴费、在线留言互动等功能。后台主要实现基于新生报道的相关信息管理功能,包含:首页的滚动图片管理、公告管理、学校基本信息管理、收费标准管理、宿舍管理、新生户籍迁移管理、学费收缴查看、宿舍分配管理、留言管理和报道新生信息管理等功能。

二,开发环境:

工具: IDEA或ECLIPSE

数据库:mysql5.7

JVM: JDK1.8

后台开发技术:SSM框架

前台开发技术:Bootstrap+Layui+Jquery

三,功能展示

下面展示一下系统的基本功能:

前端展示:

公告信息查看

收费及在线缴费

在线留言

用户注册

前端用户登陆

后台管理功能展示

滚动广告管理

公告管理

学校介绍

各专业收费管理

宿舍管理

学费收缴情况查看

留言及回复

新生管理:对已经缴费的可以实现分配宿舍和户口迁移

系统的核心功能代码如下:

package com.controller;

import com.dao.CategoryDao;
import com.dao.HujiDAO;
import com.dao.MemberDAO;
import com.dao.SysuserDAO;
import com.entity.Category;
import com.entity.Huji;
import com.entity.Member;
import com.entity.Sysuser;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.List;

@Controller
public class HujiController 
    @Resource
	HujiDAO hujiDao;
    @Resource
    MemberDAO memberDAO;


    //后台户籍迁移列表
	@RequestMapping("admin/hujiList")
	public String newsList(@RequestParam(defaultValue = "1",value = "pageNum") Integer pageNum,HttpServletRequest request) 
		String key = request.getParameter("key");
		HashMap map = new HashMap();
		map.put("key", key);
		PageHelper.startPage(pageNum,10);
		List<Huji> list = hujiDao.selectAll(map);
		for(Huji huji:list)
			Member student = memberDAO.findById(Integer.parseInt(huji.getStid()));
			huji.setStudent(student);
		
		PageInfo<Huji> pageInfo = new PageInfo<Huji>(list);
		request.setAttribute("key", key);
		request.setAttribute("pageInfo", pageInfo);
		return "admin/hujilist";
	
	
	@RequestMapping("admin/hujiLb")
	public String hujiLb(@RequestParam(defaultValue = "1",value = "pageNum") Integer pageNum,HttpServletRequest request) 
		Sysuser user = (Sysuser)request.getSession().getAttribute("admin");
		HashMap map = new HashMap();
		map.put("stid", user.getId());
		PageHelper.startPage(pageNum,10);
		List<Huji> list = hujiDao.selectAll(map);
		for(Huji huji:list)
			Member student = memberDAO.findById(Integer.parseInt(huji.getStid()));
			huji.setStudent(student);
		
		PageInfo<Huji> pageInfo = new PageInfo<Huji>(list);
		request.setAttribute("pageInfo", pageInfo);
		return "admin/hujilb";
	


	//删除户籍迁移
	@RequestMapping("admin/hujiDel")
	public String hujiDel(Integer id,HttpServletRequest request) 
		hujiDao.delete(id);
		return "redirect:hujiList.do";
	

	

	


package com.controller;



import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.dao.ImgadvDAO;
import com.entity.Imgadv;
import com.util.Info;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;

@Controller
public class ImgadvController 
    @Resource
	ImgadvDAO imgadvDao;


    //后台滚动图片列表
	@RequestMapping("admin/imgadvList")
	public String imgadvList(@RequestParam(defaultValue = "1",value = "pageNum") Integer pageNum,HttpServletRequest request) 
		PageHelper.startPage(pageNum,10);
		List<Imgadv> list = imgadvDao.selectAll();
		PageInfo<Imgadv> pageInfo = new PageInfo<Imgadv>(list);
		request.setAttribute("pageInfo", pageInfo);
		return "admin/imgadvlist";
	

	//添加滚动图片
	@RequestMapping("admin/imgadvAdd")
	public String imgadvAdd(Imgadv imgadv,HttpServletRequest request) 
		imgadvDao.add(imgadv);
		return "redirect:imgadvList.do";
	

	//删除滚动图片
	@RequestMapping("admin/imgadvDel")
	public String imgadvDel(Integer id,HttpServletRequest request) 
		imgadvDao.delete(id);
		return "redirect:imgadvList.do";
	




package com.controller;


import com.dao.AboutDAO;
import com.dao.CategoryDao;
import com.dao.ImgadvDAO;
import com.dao.NewsDAO;
import com.dao.SysuserDAO;


import com.entity.About;
import com.entity.Category;
import com.entity.Imgadv;
import com.entity.News;
import com.entity.Sysuser;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.util.Info;








import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

@Controller
public class IndexController 
    @Resource
    SysuserDAO sysuserDAO;
    @Resource
    CategoryDao categoryDao;
    @Resource
    NewsDAO newsDAO;
    @Resource
    ImgadvDAO imgadvDAO;
    @Resource
    AboutDAO aboutDAO;
    
  //前台首面
    @RequestMapping("index")
	public String qtindex(HttpServletRequest request) 
    	List<News> newslist = newsDAO.selectAll(null);
    	request.setAttribute("newslist", newslist);
    	List<Imgadv> imgadvlist = imgadvDAO.selectAll();
    	request.setAttribute("imgadvlist", imgadvlist);
    	About about = aboutDAO.findById(1);
    	request.setAttribute("about", about);
		return "index";
	
    
    
    //后台首面
    @RequestMapping("admin/adminIndex")
	public String adminIndex(HttpServletRequest request) 
    	Sysuser user = (Sysuser)request.getSession().getAttribute("admin");
    	HashMap map = new HashMap();
    	map.put("userid",user.getId());
		return "admin/index";
	
    
    
    //跳转页面
    @RequestMapping("admin/skipReg")
	public String skipReg(HttpServletRequest request) 
     List<Category> ctlist = categoryDao.selectAll(null);
     request.setAttribute("ctlist", ctlist);
     String suc  = request.getParameter("suc")==null?"":request.getParameter("suc");
     if(!suc.equals(""))
    	 request.setAttribute("suc", "注册成功");
     
     return "admin/reg";
	
    
    


package com.controller;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.util.Info;
import com.dao.CategoryDao;
import com.dao.MemberDAO;
import com.dao.SysuserDAO;
import com.entity.Category;
import com.entity.Member;

import java.util.*;

@Controller
public class MemberController 
	@Resource
	MemberDAO memberDAO;
	@Resource
	CategoryDao categoryDao;
	// 退出
	@RequestMapping("memberexit")
	public String memberexit(HttpServletRequest request) 
		request.getSession().removeAttribute("sessionmember");
		return "redirect:index.do";
	
	
	//跳转页面
	@RequestMapping("skiplr")
	public String skiplr(HttpServletRequest request) 
		String flag = request.getParameter("flag");
		if(flag.equals("login"))
			return "login";
		else
			List<Category> ctlist = categoryDao.selectAll(null);
			request.setAttribute("ctlist", ctlist);
			return "register";
		
	

	// 登录
	@RequestMapping("Login")
	public String Login(Member member, HttpServletRequest request,RedirectAttributes redirectAttributes) 
		HashMap map = new HashMap();
		map.put("uname", member.getUname());
		map.put("upass", member.getUpass());
		List<Member> list = memberDAO.selectAll(map);
		if (list.size() == 0) 
			redirectAttributes.addFlashAttribute("message","用户名或密码错误");
			return "redirect:skiplr.do?flag=login";
		 else 
			Member mmm = list.get(0);
			request.getSession().setAttribute("sessionmember", mmm);
			return "redirect:index.do";
		
	

	// 检查用户名的唯一性
	@RequestMapping("checkUname")
	public void checkUname(String uname, HttpServletRequest request,
			HttpServletResponse response) 
		try 
			PrintWriter out = response.getWriter();
			HashMap map = new HashMap();
			map.put("uname", uname);
			List<Member> list = memberDAO.selectAll(map);
			if (list.size() == 0) 
				out.print(0);
			 else 
				out.print(1);
			
		 catch (IOException e) 
			// TODO Auto-generated catch block
			e.printStackTrace();
		
	

	// 后台用户列表
	@RequestMapping("admin/memberList")
	public String userList(
			@RequestParam(defaultValue = "1", value = "pageNum") Integer pageNum,
			HttpServletRequest request) 
		String key = request.getParameter("key");
		HashMap map = new HashMap();
		map.put("key", key);
		PageHelper.startPage(pageNum, 10);
		List<Member> list = memberDAO.selectAll(map);
		for(Member member:list)
			Category category = categoryDao.findById(Integer.parseInt(member.getCategoryid()));
			member.setCategory(category);
		
		PageInfo<Member> pageInfo = new PageInfo<Member>(list);
		request.setAttribute("key", key);
		request.setAttribute("pageInfo", pageInfo);
		return "admin/memberlist";
	

	// 用户注册
	@RequestMapping("Register")
	public String Register(Member member, HttpServletRequest request,RedirectAttributes redirectAttributes) 
		member.setIsjf("未缴费");
		member.setSushe("未分配宿舍");
		memberDAO.add(member);
		redirectAttributes.addFlashAttribute("message","注册成功");
		return "redirect:skiplr.do?flag=register";
	

	// 添加用户
	@RequestMapping("admin/memberAdd")
	public String memberAdd(Member member, HttpServletRequest request) 
		memberDAO.add(member);
		return "redirect:memberList.do";
	

	// 编辑页面
	@RequestMapping("admin/memberCk")
	public String memberCk(int id, HttpServletRequest request) 
		Member member = memberDAO.findById(id);
		request.setAttribute("member", member);
		return "admin/memberedit";
	

	// 编辑用户
	@RequestMapping("admin/memberEdit")
	public String memberEdit(Member member, HttpServletRequest request) 
		memberDAO.update(member);
		return "redirect:memberList.do";
	

	// 个人信息页面
	@RequestMapping("memberShow")
	public String memberShow(int id, HttpServletRequest request) 
		String suc = request.getParameter("suc") == null ? "" : request
				.getParameter("suc");
		Member member = memberDAO.findById(id);
		request.setAttribute("member", member);
		if (!suc.equals("")) 
			request.setAttribute("suc", "编辑成功");
		
		List<Category> ctlist = categoryDao.selectAll(null);
		request.setAttribute("ctlist", ctlist);
		return "memberxg";
	

	// 个人信息修改
	@RequestMapping("memberxg")
	public String memberxg(Member member, HttpServletRequest request) 
		memberDAO.update(member);
		return "redirect:memberShow.do?id=" + member.getId() + "&suc=suc";
	

	// 删除用户
	@RequestMapping("admin/memberDel")
	public String memberDel(int id, HttpServletRequest request) 
		Member member = memberDAO.findById(id);
		member.setDelstatus("1");
		memberDAO.update(member);
		return "redirect:memberList.do";
	
	
	
	
	//缴费
	@RequestMapping("jiaofei")
	public String jiaofei(HttpServletRequest request,RedirectAttributes redirectAttributes) 
		Member mmm = (Member)request.getSession().getAttribute("sessionmember");
		Member member = memberDAO.findById(mmm.getId());
		String upass = request.getParameter("upass");
		if(upass.equals(member.getUpass()))
			member.setIsjf("已缴费");
			memberDAO.update(member);
			return "redirect:categoryMsg.do";
		else
			redirectAttributes.addFlashAttribute("message","密码输入错误");
			return "redirect:categoryMsg.do";
		
	


以上是关于毕业设计:基于SSM实现新生报道系统的主要内容,如果未能解决你的问题,请参考以下文章

基于Android的新生自主报道系统(ssm+uinapp+Mysql)

基于springboot的高校迎新系统设计与实现

基于jsp+ssm的新生入学报道系统

基于SSM+LayUI的宿舍管理系统设计与实现

Java+JSP+MySQL基于SSM的学生宿舍管理系统的设计与实现

基于SSM的学生宿舍管理系统