项目介绍
现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本班主任助理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此班主任助理系统利用当下成熟完善的SSM框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了学生基础数据的管理,班会通知管理,加站管理,住宿管理,实习管理等功能。班主任助理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。
4 系统设计
班主任助理系统的设计方案比如功能框架的设计,比如数据库的设计的好坏也就决定了该系统在开发层面是否高效,以及在系统维护层面是否容易维护和升级,因为在系统实现阶段是需要考虑用户的所有需求,要是在设计阶段没有经过全方位考虑,那么系统实现的部分也就无从下手,所以系统设计部分也是至关重要的一个环节,只有根据用户需求进行细致全面的考虑,才有希望开发出功能健全稳定的程序软件。
4.1 系统概要设计
本次拟开发的系统为了节约开发成本,也为了后期在维护和升级上的便利性,打算通过浏览器来实现系统功能界面的展示,让程序软件的主要事务集中在后台的服务器端处理,前端部分只用处理少量的事务逻辑。下面使用一张图(如图4.1所示)来说明程序的工作原理。
4.2 系统功能结构设计
在分析并得出使用者对程序的功能要求时,就可以进行程序设计了。如图4.2展示的就是管理员功能结构图,管理员主要负责填充学生和其类别信息,并对已填充的数据进行维护,包括修改与删除等。
开发环境
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序ue/爬虫/c#/asp.net
系统截图
5 系统实现
系统实现部分就是将系统分析,系统设计部分的内容通过编码进行功能实现,以一个实际应用系统的形式展示系统分析与系统设计的结果。前面提到的系统分析,系统设计最主要还是进行功能,系统操作逻辑的设计,也包括了存储数据的数据库方面的设计等内容,系统实现就是一个最终的实施阶段,将前面的设计成果进行物理转化,最终出具可以运用于实际的软件系统。
5.1 管理员功能介绍
5.1.1 学生信息管理
如图5.1显示的就是学生信息管理页面,此页面提供给管理员的功能有:添加学生,修改学生,删除学生,通过条件查看学生信息。
5.1.2 请假管理
如图5.2显示的就是请假管理页面,此页面提供给管理员的功能有:查看请假记录,审核请假,删除请假和查看统计功能。
5.1.3 成绩管理
如图5.3显示的就是成绩管理页面,此页面提供给管理员的功能有:添加某一次考试的科目的成绩,删除成绩,修改成绩,查看本次考试各门科目的平均分数。
5.1.4 住宿管理
如图5.4显示的就是住宿管理页面,此页面提供给管理员的功能有:对学生分配宿舍,修改学生的宿舍,删除宿舍。
部分代码
package com.controller;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.ShixiEntity;
import com.service.ShixiService;
import com.entity.view.ShixiView;
import com.service.YonghuService;
import com.entity.YonghuEntity;
import com.utils.PageUtils;
import com.utils.R;
/**
* 实习
* 后端接口
*/
@RestController
@Controller
@RequestMapping("/shixi")
public class ShixiController {
private static final Logger logger = LoggerFactory.getLogger(ShixiController.class);
@Autowired
private ShixiService shixiService;
@Autowired
private TokenService tokenService;
//级联表service
@Autowired
private YonghuService yonghuService;
//字典表map
Map<String, Map<Integer, String>> dictionaryMap;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(StringUtil.isNotEmpty(role) && "学生".equals(role)){
params.put("yonghuId",request.getSession().getAttribute("userId"));
}
PageUtils page = shixiService.queryPage(params);
//字典表数据转换
List<ShixiView> list =(List<ShixiView>)page.getList();
ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
dictionaryMap = (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
for(ShixiView c:list){
this.dictionaryConvert(c);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ShixiEntity shixi = shixiService.selectById(id);
if(shixi !=null){
//entity转view
ShixiView view = new ShixiView();
BeanUtils.copyProperties( shixi , view );//把实体数据重构到view中
//级联表
YonghuEntity yonghu = yonghuService.selectById(shixi.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//字典表字典转换
ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
dictionaryMap = (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
this.dictionaryConvert(view);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ShixiEntity shixi, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,shixi:{}",this.getClass().getName(),shixi.toString());
Wrapper<ShixiEntity> queryWrapper = new EntityWrapper<ShixiEntity>()
.eq("yonghu_id", shixi.getYonghuId())
.eq("shixigongsi", shixi.getShixigongsi())
.eq("shixi_content", shixi.getShixiContent())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ShixiEntity shixiEntity = shixiService.selectOne(queryWrapper);
if(shixiEntity==null){
shixi.setCreateTime(new Date());
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// shixi.set
// }
shixiService.insert(shixi);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ShixiEntity shixi, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,shixi:{}",this.getClass().getName(),shixi.toString());
//根据字段查询是否有相同数据
Wrapper<ShixiEntity> queryWrapper = new EntityWrapper<ShixiEntity>()
.notIn("id",shixi.getId())
.eq("yonghu_id", shixi.getYonghuId())
.eq("shixigongsi", shixi.getShixigongsi())
.eq("shixi_content", shixi.getShixiContent())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ShixiEntity shixiEntity = shixiService.selectOne(queryWrapper);
shixi.setStartTime(new Date());
shixi.setEndTime(new Date());
if(shixiEntity==null){
// String role = String.valueOf(request.getSession().getAttribute("role"));
// if("".equals(role)){
// shixi.set
// }
shixiService.updateById(shixi);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
shixiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
*字典表数据转换
*/
public void dictionaryConvert(ShixiView shixiView){
//当前表的字典字段
//级联表的字典字段
if(StringUtil.isNotEmpty(String.valueOf(shixiView.getSexTypes()))){
shixiView.setSexValue(dictionaryMap.get("sex_types").get(shixiView.getSexTypes()));
}
if(StringUtil.isNotEmpty(String.valueOf(shixiView.getPoliticsTypes()))){
shixiView.setPoliticsValue(dictionaryMap.get("politics_types").get(shixiView.getPoliticsTypes()));
}
if(StringUtil.isNotEmpty(String.valueOf(shixiView.getYonghuTypes()))){
shixiView.setYonghuValue(dictionaryMap.get("yonghu_types").get(shixiView.getYonghuTypes()));
}
}
}
论文参考
目 录
目 录 III
1 绪论 1
1.1 研究背景 1
1.2 目的和意义 1
1.3 论文结构安排 2
2 相关技术 3
2.1 SSM框架介绍 3
2.2 B/S结构介绍 3
2.3 Mysql数据库介绍 4
3 系统分析 6
3.1 系统可行性分析 6
3.1.1 技术可行性分析 6
3.1.2 经济可行性分析 6
3.1.3 运行可行性分析 6
3.2 系统性能分析 7
3.2.1 易用性指标 7
3.2.2 可扩展性指标 7
3.2.3 健壮性指标 7
3.2.4 安全性指标 8
3.3 系统流程分析 8
3.3.1 操作流程分析 8
3.3.2 登录流程分析 9
3.3.3 信息添加流程分析 10
3.3.4 信息删除流程分析 11
4 系统设计 12
4.1 系统概要设计 12
4.2 系统功能结构设计 12
4.3 数据库设计 13
4.3.1 数据库E-R图设计 13
4.3.2 数据库表结构设计 14
5 系统实现 18
5.1 管理员功能介绍 18
5.1.1 学生信息管理 18
5.1.2 请假管理 18
5.1.3 成绩管理 19
5.1.4 住宿管理 19
6 系统测试 21
6.1 系统测试的特点 21
6.2 系统功能测试 22
6.2.1 登录功能测试 22
6.2.2 添加类别功能测试 22
6.3 测试结果分析 22
结 论 24
致 谢 25
参考文献 26