当前位置:网站首页>SSM student achievement information management system
SSM student achievement information management system
2022-07-02 07:19:00 【Night Weiyang 5788】
Author URI : In the middle of the night 5788
brief introduction :Java Quality creators in the field 、Java project 、 Learning materials 、 Technical assistance
Get the source code at the end of the article
Project introduction
The project is divided into administrators 、 Teachers' 、 Students have three roles ,
The administrator role includes the following functions :
Announcement management , Write an announcement , Students add, delete, modify and check , Teachers add, delete, modify and check , View performance report , Administrator home page , Add, delete, modify and check the curriculum .
The teacher role includes the following functions :
Change Password , Query according to the conditions , Check student information , Management courses , Landing page and other functions .
The student role includes the following functions :
View score information , Check course information , Course selection operation and other functions .
Environmental needs
1. Running environment : It is best to java jdk 1.8, We run on this platform . Other versions can, in theory .
2.IDE Environmental Science :IDEA,Eclipse,Myeclipse Fine . recommend IDEA;
3.tomcat Environmental Science :Tomcat 7.x,8.x,9.x All versions are available
4. Hardware environment :windows 7/8/10 1G Above memory ; perhaps Mac OS;
5. database :MySql 5.7 edition ;
6. whether Maven project : no ;
Technology stack
1. Back end :Spring+SpringMVC+Mybatis
2. front end :HTML+LayUI
Instructions
1. Use Navicat Or other tools , stay mysql Create a database with the corresponding name in , And import the sql file ;
2. Use IDEA/Eclipse/MyEclipse Import the project ,Eclipse/MyEclipse Import time , if maven Item, please select maven;
if maven project , After importing successfully, please execute maven clean;maven install command , And then run ;
3. In the project application.yml Change the database configuration in the configuration file to your own configuration ;
4. Run the project , Input localhost:8080/ Sign in
Run a screenshot
Related codes
BaseController
@Controller
@RequestMapping(value="/basecourse")
public class BaseCourseController {
@Autowired
private BaseCourseService baseCourseService;
@ResponseBody
@RequestMapping(value="/list")
public String getBaseCourseList(@RequestParam(defaultValue="0")int curr,@RequestParam(defaultValue="10")int nums,
@RequestParam(defaultValue="")String searchKey) {
Pagination<BaseCourse> page = new Pagination<BaseCourse>();
page.setTotalItemsCount(baseCourseService.getTotalItemsCount(searchKey));
page.setPageSize(nums);
page.setPageNum(curr);
List<BaseCourse> list = baseCourseService.getBaseCourse(page, searchKey);
String jsonStr = StrUtil.RETURN_JONS_PRE_STR + page.getTotalItemsCount()
+ StrUtil.RETURN_JONS_MID_STR
+ JSON.toJSONString(list) + StrUtil.RETURN_JONS_END_STR;
System.out.println(jsonStr);
return jsonStr;
}
@ResponseBody
@RequestMapping(value="/listForSelect")
public String getBaseCourseListForSelect(@RequestParam(defaultValue="") String searchKey) {
List<BaseCourse> list = baseCourseService.getBaseCourseForSelect(searchKey);
String jsonStr = StrUtil.RETURN_JONS_PRE_STR + list.size()
+ StrUtil.RETURN_JONS_MID_STR
+ JSON.toJSONString(list) + StrUtil.RETURN_JONS_END_STR;
return jsonStr;
}
@RequestMapping(value="/addPage")
public ModelAndView toAddPage() {
return new ModelAndView("/baseCourseAdd");
}
/**
* increase , Or modify BaseCourse
* @param BaseCourse
* @return
*/
@ResponseBody
@RequestMapping(value="/add")
public String addBaseCourse(BaseCourse baseCourse) {
int res = 0;
if (baseCourse.getId() == null || baseCourse.getId().equals("")) {
try {
res = baseCourseService.addBaseCourse(baseCourse);
} catch (Exception e) {
System.out.println(" Add failure !");
return " Add failure !";
}
if (res > 0)
return StrUtil.RESULT_TRUE;
return " Add failure ";
} else {
res = baseCourseService.updateBaseCourse(baseCourse);
if (res > 0) return StrUtil.RESULT_TRUE;
return " Modification failed !";
}
}
@ResponseBody
@RequestMapping(value="/delete")
public String deleteStudnet(BaseCourse t) {
if (baseCourseService.deleteBaseCourse(t) > 0) return StrUtil.RESULT_TRUE;
return " Delete failed !";
}
/**
* Batch deletion
* @param tIds
* @return
*/
@ResponseBody
@RequestMapping(value="/deleteList")
public String deleteStudnetList(String cIds) {
List<Integer> list = new ArrayList<Integer>();
try {
String[] ids = cIds.split(",");
for (String id: ids) {
list.add(Integer.parseInt(id));
}
if (baseCourseService.deleteBaseCourse(list) > 0) {
return StrUtil.RESULT_TRUE;
}
} catch (Exception e) {
e.printStackTrace();
return " Delete failed ! Parameter error !";//
}
return " Delete failed !";
}
@ResponseBody
@RequestMapping("/import")
public String impotr(HttpServletRequest request, MultipartFile file) {
// Get uploaded files
InputStream in = null;
try {
in = file.getInputStream();
// Data import
int res = baseCourseService.importExcelInfo(in,file);
if (res > 0) {
return StrUtil.RETURN_JONS_PRE_STR+"0"
+StrUtil.RETURN_JONS_MID_STR+"true"
+StrUtil.RETURN_JONS_END_STR;
} else {
return StrUtil.RETURN_JONS_PRE_STR+"0"
+StrUtil.RETURN_JONS_MID_STR+"false"
+StrUtil.RETURN_JONS_END_STR;
}
} catch (Exception e) {
e.printStackTrace();
return StrUtil.RETURN_JONS_PRE_STR+"0"
+StrUtil.RETURN_JONS_MID_STR+"error"
+StrUtil.RETURN_JONS_END_STR;
} finally {
if (in != null)
try {
in.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
Main controller
@Controller
@RequestMapping(value="/main")
public class MainController {
@Autowired
CourseService courseService;
@RequestMapping(value="/index")
public ModelAndView toIndexPage(HttpSession session) {
User user = (User) session.getAttribute(StrUtil.USER);
if (user.getUserType().equals(StrUtil.ADMIN)) {
user = (Admin) user;
} else if (user.getUserType().equals(StrUtil.TEACHER)) {
user = (Teacher) user;
} else if (user.getUserType().equals(StrUtil.STUDENT)) {
user = (Student) user;
}
ModelAndView mav = new ModelAndView("index");
mav.addObject("user");
return mav;
}
@RequestMapping(value="/student")
public ModelAndView toStudentListPage(HttpSession session) {
return new ModelAndView("studentList");
}
@RequestMapping(value="/teacher")
public ModelAndView toTeacherListPage() {
return new ModelAndView("teacherList");
}
@RequestMapping(value="/course")
public ModelAndView toCourseListPage(HttpSession session, ModelAndView mav) {
String userType = ((User) session.getAttribute(StrUtil.USER)).getUserType();
if (userType.equals(StrUtil.ADMIN)) {
mav = new ModelAndView("courseList");
} else if(userType.equals(StrUtil.TEACHER)){
mav = new ModelAndView("teacher/courseList");
} else {
mav = new ModelAndView("student/courseList");
}
return mav;
}
@RequestMapping(value="/score")
public ModelAndView toScoreListPage(HttpSession session, ModelAndView mav) {
User user = (User) session.getAttribute(StrUtil.USER);
String userType = user.getUserType();
if (userType.equals(StrUtil.ADMIN)) {
mav = new ModelAndView("scoreList");
} else if(userType.equals(StrUtil.TEACHER)){
mav = new ModelAndView("teacher/studentScoreList");
List<Course> list = courseService.getCourseListByTid(null, ((Teacher)user).getId());
mav.addObject("courseList", list);
} else {
mav = new ModelAndView("student/scoreList");
}
return mav;
}
@RequestMapping(value="/notice")
public ModelAndView toNoticeListPage(ModelAndView mav) {
mav = new ModelAndView("noticeList");
return mav;
}
@RequestMapping(value="/system")
public ModelAndView toSystemListPage(ModelAndView mav) {
mav = new ModelAndView("systemAuth");
return mav;
}
}
If you want to learn this system , Now get . reply :065ssm
边栏推荐
- parser.parse_args 布尔值类型将False解析为True
- php中删除指定文件夹下的内容
- SQL injection closure judgment
- RMAN incremental recovery example (1) - without unbacked archive logs
- 矩阵的Jordan分解实例
- @Transational踩坑
- The first quickapp demo
- Explain in detail the process of realizing Chinese text classification by CNN
- spark sql任务性能优化(基础)
- ORACLE EBS ADI 开发步骤
猜你喜欢
ssm超市订单管理系统
Changes in foreign currency bookkeeping and revaluation general ledger balance table (Part 2)
Oracle EBs and apex integrated login and principle analysis
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool
ssm+mysql实现进销存系统
架构设计三原则
Principle analysis of spark
CSRF攻击
The boss said: whoever wants to use double to define the amount of goods, just pack up and go
Yaml file of ingress controller 0.47.0
随机推荐
php中计算树状结构数据中的合计
Changes in foreign currency bookkeeping and revaluation general ledger balance table (Part 2)
Oracle EBS ADI development steps
Cloud picture says | distributed transaction management DTM: the little helper behind "buy buy buy"
Oracle段顾问、怎么处理行链接行迁移、降低高水位
view的绘制机制(三)
sqli-labs通關匯總-page2
一个中年程序员学习中国近代史的小结
读《敏捷整洁之道:回归本源》后感
Oracle apex Ajax process + dy verification
pySpark构建临时表报错
Yolov5 practice: teach object detection by hand
php中的二维数组去重
数仓模型事实表模型设计
Ding Dong, here comes the redis om object mapping framework
TCP attack
Oracle segment advisor, how to deal with row link row migration, reduce high water level
ORACLE EBS接口开发-json格式数据快捷生成
使用MAME32K进行联机游戏
Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool