首页 > 其他分享 >座位管理系统|校园自习室预约管理系统

座位管理系统|校园自习室预约管理系统

时间:2023-12-09 11:32:52浏览次数:25  
标签:banjixinxi 管理系统 预约 org springframework new import com 自习室


作者简介:Java、前端、Python开发多年,做过高程,项目经理,架构师

主要内容:Java项目开发、Python项目开发、大学数据和AI项目开发、单片机项目设计、面试技术整理、最新技术分享

收藏点赞不迷路  关注作者有好处

文末获得源码

 项目编号:BS-XX-215

一,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

开发技术:Springboot和Vue

二,项目简介

项目基于Springboot和Vue开发实现了一套学校自习室预约管理平台。用户角色分为学生和管理员两类,学生注册登录后可以在线查看自习室、在校预约和举报、查看公告、在线交流、个人中心信息管理等;管理员登录可以进行学生管理、班级管理、自习室管理、预约管理、座位管理、签到管理、暂时离开管理和系统管理等模块。

三,系统展示

前端首页

座位管理系统|校园自习室预约管理系统_自习室管理

座位管理系统|校园自习室预约管理系统_自习室预约_02编辑

自习室信息查看

座位管理系统|校园自习室预约管理系统_自习室管理_03

座位管理系统|校园自习室预约管理系统_自习室管理_04编辑

在线预约和举报

座位管理系统|校园自习室预约管理系统_自习室预约_05

座位管理系统|校园自习室预约管理系统_自习室管理_06编辑

论坛交流

座位管理系统|校园自习室预约管理系统_自习室预约_07

座位管理系统|校园自习室预约管理系统_自习室预约_08编辑

平台公告

座位管理系统|校园自习室预约管理系统_自习室管理_09

座位管理系统|校园自习室预约管理系统_自习室预约_10编辑

个人中心

座位管理系统|校园自习室预约管理系统_自习室管理_11

座位管理系统|校园自习室预约管理系统_自习室管理_12编辑

系统管理员功能管理

座位管理系统|校园自习室预约管理系统_自习室预约_13

座位管理系统|校园自习室预约管理系统_自习室管理_14编辑

四,核心代码展示

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.BanjixinxiEntity;
import com.entity.view.BanjixinxiView;

import com.service.BanjixinxiService;
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-04-16 20:36:41
 */
@RestController
@RequestMapping("/banjixinxi")
public class BanjixinxiController {
    @Autowired
    private BanjixinxiService banjixinxiService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,BanjixinxiEntity banjixinxi,
		HttpServletRequest request){
        EntityWrapper<BanjixinxiEntity> ew = new EntityWrapper<BanjixinxiEntity>();
		PageUtils page = banjixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, banjixinxi), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,BanjixinxiEntity banjixinxi, HttpServletRequest request){
        EntityWrapper<BanjixinxiEntity> ew = new EntityWrapper<BanjixinxiEntity>();
		PageUtils page = banjixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, banjixinxi), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( BanjixinxiEntity banjixinxi){
       	EntityWrapper<BanjixinxiEntity> ew = new EntityWrapper<BanjixinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( banjixinxi, "banjixinxi")); 
        return R.ok().put("data", banjixinxiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(BanjixinxiEntity banjixinxi){
        EntityWrapper< BanjixinxiEntity> ew = new EntityWrapper< BanjixinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( banjixinxi, "banjixinxi")); 
		BanjixinxiView banjixinxiView =  banjixinxiService.selectView(ew);
		return R.ok("查询班级信息成功").put("data", banjixinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        BanjixinxiEntity banjixinxi = banjixinxiService.selectById(id);
        return R.ok().put("data", banjixinxi);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        BanjixinxiEntity banjixinxi = banjixinxiService.selectById(id);
        return R.ok().put("data", banjixinxi);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody BanjixinxiEntity banjixinxi, HttpServletRequest request){
    	banjixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(banjixinxi);
        banjixinxiService.insert(banjixinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody BanjixinxiEntity banjixinxi, HttpServletRequest request){
    	banjixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(banjixinxi);
        banjixinxiService.insert(banjixinxi);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody BanjixinxiEntity banjixinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(banjixinxi);
        banjixinxiService.updateById(banjixinxi);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        banjixinxiService.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<BanjixinxiEntity> wrapper = new EntityWrapper<BanjixinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = banjixinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;

import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.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 org.springframework.util.ResourceUtils;
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 org.springframework.web.multipart.MultipartFile;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

五,相关作品展示

基于Java开发、Python开发、PHP开发、C#开发等相关语言开发的实战项目

基于Nodejs、Vue等前端技术开发的前端实战项目

基于微信小程序和安卓APP应用开发的相关作品

基于51单片机等嵌入式物联网开发应用

基于各类算法实现的AI智能应用

基于大数据实现的各类数据管理和推荐系统

座位管理系统|校园自习室预约管理系统_自习室管理_15

座位管理系统|校园自习室预约管理系统_自习室管理_16编辑

座位管理系统|校园自习室预约管理系统_自习室预约_17

座位管理系统|校园自习室预约管理系统_自习室管理_18编辑

座位管理系统|校园自习室预约管理系统_自习室预约_19

座位管理系统|校园自习室预约管理系统_自习室预约_20编辑

座位管理系统|校园自习室预约管理系统_自习室管理_21

座位管理系统|校园自习室预约管理系统_自习室预约_22编辑

座位管理系统|校园自习室预约管理系统_自习室预约_23

座位管理系统|校园自习室预约管理系统_自习室预约_24编辑

座位管理系统|校园自习室预约管理系统_自习室管理_25

座位管理系统|校园自习室预约管理系统_自习室预约_26编辑

座位管理系统|校园自习室预约管理系统_自习室管理_27

座位管理系统|校园自习室预约管理系统_自习室预约_28编辑

座位管理系统|校园自习室预约管理系统_自习室管理_29

座位管理系统|校园自习室预约管理系统_自习室管理_30编辑



标签:banjixinxi,管理系统,预约,org,springframework,new,import,com,自习室
From: https://blog.51cto.com/u_16147814/8746718

相关文章

  • 毕业设计-基于JAVA的机场航班起降与协调管理系统
    作者简介:Java领域优质创作者、CSDN博客专家、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、腾讯课堂常驻讲师主要内容:Java项目、Python项目、前端项目、人工智能与大数据、简历模板、学习资料、面试题库、技术互助收藏点赞不迷路 关注作......
  • PACS医学影像报告管理系统源码带CT三维后处理技术
    从各种医学影像检查设备中获取、存储、处理影像数据,传输到体检信息系统中,生成图文并茂的体检报告,满足体检中心高水准、高效率影像处理的需要。自主知识产权:拥有完整知识产权,能够同其他模块无缝对接国际标准:按照国际规范DICON3.0标准处理医学影像数据无缝对接:无缝对接各种体检影......
  • .NET开源且好用的权限工作流管理系统
    前言系统权限管理、工作流是企业应用开发中很常见的功能,虽说开发起来难度不大,但是假如从零开始开发一个完整的权限管理和工作流平台的话也是比较耗费时间的。今天推荐一款.NET开源且好用的权限工作流管理系统(值得借鉴参考和使用):OpenAuth.Net。官方项目介绍.Net权限管理及快速开......
  • 天然气工程建设项目管理系统--业务子系统
    作者简介:Java、前端、Python开发多年,做过高程,项目经理,架构师主要内容:Java项目开发、Python项目开发、大学数据和AI项目开发、单片机项目设计、面试技术整理、最新技术分享收藏点赞不迷路 关注作者有好处文末获得源码 项目编号:BS-XX-168一,环境介绍语言环境:Java: jdk1.8数据库:My......
  • 物资管理|基于SpringBoot技术的防疫物资管理系统设计与实现
    作者简介:Java领域优质创作者、CSDN博客专家、CSDN内容合伙人、掘金特邀作者、阿里云博客专家、51CTO特邀作者、多年架构师设计经验、腾讯课堂常驻讲师主要内容:Java项目、Python项目、前端项目、人工智能与大数据、简历模板、学习资料、面试题库、技术互助收藏点赞不迷路 关注作......
  • 最新:2024年值得关注的15款顶级开源项目管理系统!
    推荐15个优秀的开源项目管理工具,比如:ProjectLibre、OpenProject、ERPNext、Redmine、禅道、Tuleap、Restyaboard等。项目经理面临各种复杂任务,包括追踪任务的进度、评估交付风险和管理整体工作量。为了顺利达成目标,一款靠谱的项目管理(PM)工具是必不可少的。但是,挑选项目管理工......
  • CRM客户管理系统,不止管理客户
     CRM系统现在已经成为企业与客户建立良好关系、提高销售业绩的优先选择。关于CRM的功能,不同的企业包括CRM软件厂商都对CRM系统有不同的定义。基于此,我们来聊聊CRM客户管理系统除了管客户还有什么功能?1、客户管理有些企业管理客户的方式仍然是通讯录,客户对企业来说只是一个名......
  • CRM客户管理系统的主要功能都有哪些
     我们都知道,CRM系统可以帮助企业加快业务增长。如果一个企业能提高业务效率、跨团队协作、有效管理客户、轻松共享和同步数据,那么企业竞争力将极大地提高。基于此,我们说说CRM客户关系管理系统的主要功能分析。完整的CRM是什么样的?完整的CRM系统应能实现营销、销售、服务等业......
  • java云HIS系统源码 区域HIS信息管理系统源码
    医院管理信息系统(HIS)是医院基本、重要的管理系统,是医院大数据的基础。“云”指系统采用云计算的技术和建设模式,具有可扩展、易共享、区域化、易协同、低成本、易维护、体验好的优势。“H”是医疗卫生,由原来医院(Hospital)到现在的医疗卫生(Healthcare),拓展了H的内涵与外延。云......
  • python-名片管理系统
    一、系统需求目的一、回顾前面学过的变量、流程控制、函数、模块等 程序启动,显示名片和欢迎界面,并提示用户进行操作用户选择不同的功能,执行不同的操作用户名片中要记录的信息:姓名、电话、联系方式、邮件用户查询到指定的名片,可以进行修改、删除操作二、步骤框架搭建......