晚上别打游戏啦、做一个Java高校心理健康毕业设计项目吧

1,581 阅读5分钟

一起养成写作习惯!这是我参与「掘金日新计划 · 4 月更文挑战」的第10天,点击查看活动详情

前言介绍:

      随着社会经济的发展,医疗卫生事业取得了巨大进步,在心理健康教育占据越来越重要的地位,什么是心理健康:心理健康,从广义上讲,是指一种高效而满意的、持续的心理状态。从狭义上讲,心理健康是指人的基本心理活动的过程内容完整、协调一致,即认识、情感、意志、行为、人格完整和协调,能适应社会,与社会保持同步。

全国有20.23%的大学生存在不同程度的心理障碍甚至心理疾患,25%的大学生需要精神卫生服务,10%有明显的心理障碍症状,急需心理咨询与心理治疗。心理障碍已成为当今大学生身心健康的最大威胁。心理健康教育显得十分必要,

心理健康教育开发使系统能够更加方便学生捷,同时也促使心理健康教育变的更加系统化、有序化。系统界面较友好,易于操作。具体在系统设计上,采用B/S结构,java技术动态页面上进行了设计,Mysql数据库进行储存,是一个非常优秀的心理健康教育系统。

系统设计:

管理员功能设计;首页、个人中心、学生管理、咨询师管理、文章信息管理、预约信息管理、测试题目管理、测试信息管理、测试结果管理、试题管理、留言板管理、系统管理结构图,如图: 

系统结构图如下图所示:

登录模块顺序图:登录模块主要满足了管理员以及其他用户的权限登录,登录模块顺序图如图

 添加信息模块顺序图: 管理员以及其他用户登录后均可进行添加信息操作,添加信息模块顺序图

功能截图:

用户前端功能:

系统首页: 系统前端主要包括首页、咨询师、首页、文章信息、测试题目、留言反馈、个人中心、后台管理等

登录注册: 输入个人的账号、密码、角色登录系统,这时候系统的数据库就会在进行查找相关的信息,如果我们输入的账号、密码不正确,数据库就会提示出错误的信息提示,同时会提示管理员重新输入自己的账号、密码,直到账号密码输入成功后,会提登录成功的信息

文章信息:

 查看文章信息,可进行收藏、评论操作

测试题目: 可以进行查看详情、修改、删除等操作

 点击可以进行题目测试心情查看、填写测试答案等

留言反馈:

个人中心: 个人中心:学生通过个人信息页面查看学号、密码、姓名、性别、头像、身份证、手机等信息可进行添加、修改、删除操作。

学生端后台功能:

学生进入后台页面查看首页、个人中心、预约信息管理、测试信息管理、测试结果管理、留言板管理、我的收藏管理等信息

咨询师后台功能:

咨询师进入后台页面查看首页、个人中心、预约信息管理、预约信息审核、测试信息管理、测试结果管理、留言板管理、我的收藏管理等信息

管理员后台功能:

管理员可以进行个人中心、学生管理、咨询师管理、文章信息管理、预约信息管理、测试题目管理、测试信息管理、测试结果管理、留言板管理、我的收藏管理、系统管理等模块的管理

学生管理: 管理员对学生信息管理进行查看学号、密码、姓名、性别、头像、身份证、手机等信息进行删除、修改以及查看等操作

文章信息管理:

预约信息管理: 管理员可以对预约信息管理查看详情可进行修改、删除等操作

测试题目管理:

测试信息管理: 管理员可以对测试题目查看详情可进行修改、删除等操作

测试结果管理:

留言板管理:

系统录播图管理: 管理员通过系统管理页面查看轮播图管理等进行上传图片进行添加、删除、修改以及查看并对整个系统进行维护等操作

代码实现:

/**
 * 预约信息
 * 后端接口
 * @author 
 * @email 
 * @date 2022-01-08 11:11:36
 */
@RestController
@RequestMapping("/yuyuexinxi")
public class YuyuexinxiController {
    @Autowired
    private YuyuexinxiService yuyuexinxiService;
    
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,YuyuexinxiEntity yuyuexinxi, HttpServletRequest request){

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("zixunshi")) {
			yuyuexinxi.setZhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("xuesheng")) {
			yuyuexinxi.setXuehao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<YuyuexinxiEntity> ew = new EntityWrapper<YuyuexinxiEntity>();
		PageUtils page = yuyuexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuyuexinxi), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,YuyuexinxiEntity yuyuexinxi, HttpServletRequest request){
        EntityWrapper<YuyuexinxiEntity> ew = new EntityWrapper<YuyuexinxiEntity>();
		PageUtils page = yuyuexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, yuyuexinxi), params), params));
        return R.ok().put("data", page);
    }

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(YuyuexinxiEntity yuyuexinxi){
        EntityWrapper< YuyuexinxiEntity> ew = new EntityWrapper< YuyuexinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( yuyuexinxi, "yuyuexinxi")); 
		YuyuexinxiView yuyuexinxiView =  yuyuexinxiService.selectView(ew);
		return R.ok("查询预约信息成功").put("data", yuyuexinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
        YuyuexinxiEntity yuyuexinxi = yuyuexinxiService.selectById(id);
        return R.ok().put("data", yuyuexinxi);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") String id){
        YuyuexinxiEntity yuyuexinxi = yuyuexinxiService.selectById(id);
        return R.ok().put("data", yuyuexinxi);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody YuyuexinxiEntity yuyuexinxi, HttpServletRequest request){
    	yuyuexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(yuyuexinxi);

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

        yuyuexinxiService.insert(yuyuexinxi);
        return R.ok();
    }

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

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

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("zixunshi")) {
			wrapper.eq("zhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("xuesheng")) {
			wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
		}

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


}

论文参考:

源码获取:

大家点赞、收藏、关注、评论啦 、查看👇🏻👇🏻👇🏻主页获取联系方式👇🏻👇🏻👇🏻

打卡 文章 更新 253/  365天