基于javaweb的SSM+Maven学生综合素质评价系统(java+ssm+thymeleaf+html+layui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

160023572402

170023572402

180023572402

190023572402

200023572402

210023572402

582024573108

基于javaweb的SSM+Maven学生综合素质评价系统(java+ssm+thymeleaf+html+layui+mysql)

项目介绍

基于SSM的学生综合素质评价系统设计与实现,系统共分三种角色,包括管理员、教师、学生; 管理员主要功能包括: 权限中心:用户组权限控制、用户组信息管理; 系统设置:菜单管理、系统日志、成绩比例修改; 信息管理:教师信息管理、学生信息管理、课程信息管理、班级信息管理、学期信息管理、状态信息管理、用户账号管理; 教师主要功能包括: 活动管理:活动记录管理; 信息维护:个人信息修改、学生信息管理; 综合评测:综合成绩管理、学生异议处理、学生成绩分析; 成绩管理:学生成绩管理; 学生主要功能包括: 学生个人信息:个人信息修改; 信息查询:活动记录查询、成绩查询、综合成绩查询; 异议申报:学生异议申报;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目  6.数据库:MySql 5.7版本;

技术栈

  1. 后端:SSM(Spring SpringMVC MyBatis) 2. 前端:thymeleaf和layui

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置 4. 运行项目,在浏览器中输入http://localhost:8080/ 登录;  注意项目路径必须配置为/,否则会出错;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    users.setUpassword(UtilPacket.Md5MD5String("123456"));
if (usersService.insertSelective(users) != 0) {
setLog.setlod(httpServletRequest, "成功创建账户为" + username + "的账号", logService);
return true;
} else
return false;
}

/*添加活动记录*/
@RequestMapping("Inserthdjlgl")
public boolean Inserthdjlgl(@RequestParam String aname,
@RequestParam String adate,
@RequestParam String axx,
@RequestParam String add,
@RequestParam String alx,
@RequestParam int ssuid,
HttpServletRequest httpServletRequest) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
java.util.Date date = sdf.parse(adate);
Activity activity = new Activity();
activity.setAname(aname);
activity.setAdate(date);
activity.setAxx(axx);
activity.setAdd(add);
activity.setAlx(alx);
activity.setSsuid(ssuid);
if (activityService.insertActivity(activity) != 0) {
setLog.setlod(httpServletRequest, "成功创建活动名为" + aname + "的活动", logService);
return true;
} else
return false;
}

/*教师添加学生成绩*/
@RequestMapping("Insertxscjgl")
public boolean Insertxscjgl(@RequestParam String grade,
@RequestParam int sskid,
@RequestParam int sssid,
@RequestParam int st,
@RequestParam String khfs,
@RequestParam String ksxz,
HttpServletRequest httpServletRequest) throws ParseException {
Map paramMap = new HashMap();
paramMap.put("sskid",sskid);
paramMap.put("sssid",sssid);
paramMap.put("st",st);
if (gradeService.getGradeByKandS(paramMap)!=null)
return false;
List<Kcbl> kcbls = kcblService.getkcbllist();
double dybl = 0.3;
double tybl = 0.1;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
            return true;
}
return false;
}
return false;
}

/**
* excel导入学生数据
* */
@RequestMapping("/importXS")
@ResponseBody
public JSONObject importDataXS(@RequestParam MultipartFile file, HttpServletRequest request) {
String message = "";
List beanList = null;
List spjList = null;
try {
// 解析excel
spjList = importUtilService.loadCcsbFromExcel(file.getInputStream(), 1);

} catch (Exception e) {
e.printStackTrace();
message = "解析数据出错,请检查数据。";
}

if (spjList == null || spjList.size() == 0) {
message = "没有解析到数据,导入0条数据。";
}

// 更新数据
if (spjList != null && spjList.size() > 0) {
int count = 0;
String errorXh = "";
beanList = parseListXS(spjList);
List list = new ArrayList();
for (int i = 0; i < beanList.size(); i++) {
Map beanMap = (Map) beanList.get(i);
int errCnt = (int)beanMap.get("err");
if (errCnt != 1) {
list.add(beanMap);
count++;
} else if ("".equals(errorXh)) {
errorXh = errorXh + (i + 1);
} else {
errorXh = errorXh + "," + (i + 1);
}
if (count == beanList.size()) {
message = "导入成功,导入" + count + "条数据。";
} else {
message = "导入失败,请检查第" + errorXh + "条数据。";
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
    Map<String, Object> map1 = new HashMap<>();
map1.put("code", 0);
map1.put("msg", "ok");
map1.put("count", list.size());
map1.put("data", list);
setLog.setlod(httpServletRequest, "查询了学生列表数据",logService);
JSONObject json = new JSONObject(map1);
return json;
}

/*查看教师*/
@RequestMapping("/selectjs")
public JSONObject selectjs(HttpServletRequest httpServletRequest) {
Map requestparamMap = new HashMap();
List<Teacher> teachers = teacherService.getTeacherList(requestparamMap);
List<Map<String, Object>> list = new ArrayList<>();
if (teachers != null) {
for (Teacher teacher : teachers) {
int id = teacher.getId();
String tname = teacher.getTname();
Map map = new HashMap();
map.put("id", id);
map.put("tname", tname);
list.add(map);
}
}
Map<String, Object> map1 = new HashMap<>();
map1.put("code", 0);
map1.put("msg", "ok");
map1.put("count", list.size());
map1.put("data", list);
setLog.setlod(httpServletRequest, "查询了教师列表数据",logService);
JSONObject json = new JSONObject(map1);
return json;
}

/*查询教师工号*/
@RequestMapping("/selectjslast")
public JSONObject selectjslast(HttpServletRequest httpServletRequest) {
Teacher teacher = teacherService.getteacherlast();
List<Map<String, Object>> list = new ArrayList<>();
int idcard = teacher.getTcard();
Map map = new HashMap();
map.put("idcard", idcard+1);
list.add(map);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
            return true;
}
return false;
}
return false;
}

/*修改课程比例*/
@RequestMapping("/upkcbl")
public boolean upkcbl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Kcbl kcbl = kcblService.getkcbibyid(id);
if (kcbl != null) {
kcbl.setBl(updateValue);
if (kcblService.upkcbl(kcbl) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的课程比例为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

/*修改菜单信息*/
@RequestMapping("/upcdgl")
public boolean upcdgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Menu menu = menuService.selectByPrimaryKey(id);
if (menu != null) {
if (field.equals("menuname"))
menu.setMenuname(updateValue);
if (field.equals("menulink"))
menu.setMenulink(updateValue);
if (menuService.updateByPrimaryKeySelective(menu) != 0) {
setLog.setlod(httpServletRequest, "修改了" + id + "菜单的" + field + "为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
    return false;
}

/*教师管理员删除学生*/
@RequestMapping("/delxsxxgl")
public boolean delxsxxgl(HttpServletRequest httpServletRequest, @RequestParam int id){
//删除学生活动
if (activityService.delActivitybyStudent(id)>0){
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生全部活动信息",logService);
}
//删除学生信息
Student student = studentService.getStudentById(id);
Users users = usersService.getusersByusername(String.valueOf(student.getXuehao()));
if (studentService.delStudent(id)!=0) {
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生",logService);
//删除学生账号
if (usersService.deleteByPrimaryKey(users.getId())!=0){
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生账号",logService);
}
//删除学生日志信息
if (logService.delLogbyStudent(users.getId())>0){
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生全部日志信息",logService);
}
//删除学生综合成绩
List<Zhcj> zhcjs = zhcjService.getZhcjByUid(id);
if (zhcjs!=null){
for (Zhcj zhcj : zhcjs){
zhcjService.delZhcj(zhcj.getId());
}
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生综合成绩信息",logService);
}
//删除学生全部成绩信息
if (gradeService.deleteBystudent(id)!=0){
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的学生全部成绩信息",logService);
}
return true;
}
return false;
}

/*删除菜单*/
@RequestMapping("/delcdgl")
public boolean delcdgl(HttpServletRequest httpServletRequest, @RequestParam int id){
if (menuService.deleteByPrimaryKey(id)!=0) {
setLog.setlod(httpServletRequest, "删除了主键为"+id+"的菜单",logService);
return true;
}
return false;
}

/*删除教师信息*/
@RequestMapping("/deljsxxgl")


项目链接:
https://javayms.github.io?id=551122572008200ui
https://javayms.pages.dev?id=551122572008200ui