Student dormitory management system based on JAVA SSM framework and jsp

        Computer information technology and the current office informatization, automation, and networking have greatly changed the information management methods of universities, enterprises and institutions. Efficient, fast, and accurate information management has become an important means of modern management in various industries. At present, dormitory management personnel are generally older, and the workload of using transcripts is heavy, and management is difficult. Using the student dormitory management system, dormitory management personnel can manage students conveniently. With the continuous expansion of the enrollment scale of colleges and universities across the country, the number of college students has repeatedly reached maximum.

        In addition to providing students with good hardware and accommodation conditions, universities also need to provide excellent management software to create a high-quality accommodation environment, which directly leads to the large number of students in college dormitories, the large amount of student and dormitory information, and the characteristics of complex management. Obviously, the management mode is not only a huge workload, but also prone to errors, which is not suitable for the current needs of dormitory management in colleges and universities. With the advancement of technology and the widespread popularization of computers, the traditional manual dormitory maintenance application can no longer meet the needs of students and managers. Therefore, we The theme is convenient and fast, and the theme is student dormitory. The management system has been established to improve the quality of student dormitories, reduce the workload of management personnel, and improve the work efficiency of management personnel.        

 

 

Implemented functions:

Administrator login and logout;

User login: administrators can use account and password to log in to the website;

Student management: Realize the addition, deletion, modification and query of student information, including gender, name, age and other information;

Class management: Realize the addition, deletion, modification and query of class information, including department names, administrators and other information;

Dormitory management: realize the management including dormitory, personnel information, maintenance registration, etc.;

Sanitation management: Realize the scoring and management of dormitory hygiene and student hygiene;

Visitor management: realize the registration of outsiders entering and leaving the dormitory;

The data of each module is exported to Excel.

Technologies used:

JAVA language, SSM framework, MySQl database, MD5 encryption, jsp page, layUI framework and other technologies.

 

 Part of the code display

/**
 * 用户控制器类
 */
@Controller
public class AdminController {
	// 依赖注入
	@Autowired
	private AdminService adminService;
	/**
	 * 用户登录
	 */
	/**
	 * 将提交数据(username,password)写入Admin对象
	 */
	@RequestMapping(value = "/login")
	public String login( Admin admin, Model model, HttpSession session, HttpServletRequest request) {
		// 通过账号和密码查询用户

		admin.setA_password(MD5Util.MD5EncodeUtf8(admin.getA_password()));
		Admin ad = adminService.findAdmin(admin);
		if(ad!=null){
			session.setAttribute("ad", ad);
			return "homepage";
		}
		model.addAttribute("msg", "用户名或密码错误,请重新登录!");
		return "login";
	}

	/**
	 * 退出登录
	 */
	@RequestMapping(value = "/loginOut")
	public String loginOut(Admin admin, Model model, HttpSession session) {
		session.invalidate();
		return "login";

	}

	/**
	 * 分页查询
	 */
	@RequestMapping(value = "/findAdmin")
	public String findAdmin(String a_username, String a_describe,Integer pageIndex,
							Integer a_id ,Integer pageSize, Model model) {

		PageInfo<Admin> ai = adminService.findPageInfo(a_username,a_describe,
								a_id,pageIndex,pageSize);
		model.addAttribute("ai",ai);
		return "admin_list";
	}

	/**
	 * 导出Excel
	 */
	@RequestMapping(value = "/exportadminlist" , method = RequestMethod.POST)
    @ResponseBody
	public List<Admin> exportAdmin(){
		List<Admin> admin = adminService.getAll();
		return admin;
	}

	/**
	 * 添加管理员信息
	 */
	@RequestMapping(value = "/addAdmin" ,method = RequestMethod.POST)
	@ResponseBody
	public String addAdmin( @RequestBody Admin admin) {

		admin.setA_password(MD5Util.MD5EncodeUtf8(admin.getA_password()));
		int a = adminService.addAdmin(admin);
		return "admin_list";
	}

	/**
	 * 删除管理员信息;将请求体a_id写入参数a_id
	 */
	@RequestMapping( "/deleteAdmin")
	@ResponseBody
	public String deleteAdmin(Integer a_id) {
		int a = adminService.deleteAdmin(a_id);
		return "admin_list";
	}

	/**
	 * 修改管理员信息
	 */
	/**
	 * 将提交数据(a_id,a_username...)写入Admin对象
	 */
	@RequestMapping( value = "/updateAdmin", method = RequestMethod.POST)
	public String updateAdmin(Admin admin) {

		admin.setA_password(MD5Util.MD5EncodeUtf8(admin.getA_password()));
		int a = adminService.updateAdmin(admin);
		return "redirect:/findAdmin";
	}


	/**
	 * 根据管理员Id搜索;将请求数据a_id写入参数a_id
	 */
	@RequestMapping( "/findAdminById")
	public String findAdminById( Integer a_id,HttpSession session) {
		Admin a= adminService.findAdminById(a_id);
		session.setAttribute("a",a);
		return "admin_edit";
	}

}

Based on JAVA SSM student dormitory management system

Guess you like

Origin blog.csdn.net/qq_28245905/article/details/131182797