基于javaweb的SSM+Maven实验室设备管理系统(java+ssm+thymeleaf+html+layui+easyui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

350023042402

360023042402

370023042402

380023042402

390023042402

400023042402

基于javaweb的SSM+Maven实验室设备管理系统(java+ssm+thymeleaf+html+layui+easyui+mysql)

项目介绍

ssm实验室设备管理系统。前台jsp+layui+easyui等框架渲染数据、后台java语言搭配ssm(spring、springmvc、mybatis、maven) 数据库mysql5.7、8.0版本均可。该系统主要分三种角色:管理员、教师、学生。主要功能学校实验设备的借、还、修以及实验课程的发布等等;

管理员主要功能:

实验室管理:实验室基本信息管理; 系统管理:系统日志查看; 权限中心:用户组信息管理、用户组权限控制、菜单管理; 信息管理-管理员:教师信息管理、学生信息管理、用户账号管理、班级信息管理、专业信息管理、实验室类型管理、信息通告管理、实验设备管理、实验室使用审批、设备借用审批;

教师主要功能:

实验管理:实验课程管理; 信息管理-教师:个人信息维护、学生信息管理、借用设备管理、设备损坏登记、设备维修登记、信息通告浏览、借用实验室管理。

学生主要功能:

信息管理-学生:个人信息维护;

信息浏览:实验课程浏览、实验设备浏览、信息通告浏览;

环境需要

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/8.0 版本均可;

技术栈

  1. 后端:Spring SpringMVC MyBatis 2. 前端:jsp+layui+easyui

使用说明

  1. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;    若为maven项目,导入成功后请执行maven clean;maven install命令,下载所需jar包; 2. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 3. 将项目中jdbc.properties配置文件中的数据库配置改为自己的配置 4. 配置tomcat,然后运行项目,输入localhost:8080/xxx 登录

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
Integer tid = users.getId();
List<Jydj> jydjs = jydjService.getJydjByUid(tid);
List<Map<String, Object>> list = new ArrayList<>();
if (jydjs != null) {
for (Jydj jydj : jydjs) {
Integer id = jydj.getId();
Integer sbid = jydj.getSbid();
Date date = jydj.getJysj();
String info = jydj.getInfo();
Date date1 = jydj.getGhsj();
Integer ztid = jydj.getZtid();
Sysbgl sysbgl = sysbglService.getSysbglById(sbid);
String sbname = sysbgl.getSbname();
String bh = sysbgl.getBh();
String ghsj = "未归还";
String hour = date.getHours()>9?String.valueOf(date.getHours()):0+String.valueOf(date.getHours());
String minute = date.getMinutes()>9?String.valueOf(date.getMinutes()):0+String.valueOf(date.getMinutes());
String second = date.getSeconds()>9?String.valueOf(date.getSeconds()):0+String.valueOf(date.getSeconds());
String jysj = String.valueOf(date.getYear()+1900)+"年"+String.valueOf(date.getMonth()+1)+"月"+String.valueOf(date.getDate())+"日--"+hour+":"+minute+":"+second;
if (date1!=null) {
String hour2 = date1.getHours() > 9 ? String.valueOf(date1.getHours()) : 0 + String.valueOf(date1.getHours());
String minute2 = date1.getMinutes() > 9 ? String.valueOf(date1.getMinutes()) : 0 + String.valueOf(date1.getMinutes());
String second2 = date1.getSeconds() > 9 ? String.valueOf(date1.getSeconds()) : 0 + String.valueOf(date1.getSeconds());
ghsj = String.valueOf(date1.getYear() + 1900) + "年" + String.valueOf(date1.getMonth() + 1) + "月" + String.valueOf(date1.getDate()) + "日--" + hour + ":" + minute + ":" + second;
}
if(ztid==2)
ghsj="管理员审核中";
if(ztid==3)
ghsj="借用被拒绝";
Map map = new HashMap();
map.put("id", id);
map.put("sbname", sbname);
map.put("bh", bh);
map.put("jysj", jysj);
map.put("ghsj", ghsj);
map.put("info", info);
map.put("ztid", ztid);
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);
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
            teacher.setZyzc(updateValue);
if (field.equals("tel"))
teacher.setTel(updateValue);
if (field.equals("jl"))
teacher.setJl(updateValue);
if (teacherService.upTeacher(teacher) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的教师" + field + "为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

/**
* 教师 修改个人信息
* @param id
* @param field
* @param updateValue
* @param httpServletRequest
* @return
*/
@RequestMapping("/upgrxxwhjs")
public boolean upgrxxwhjs(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Teacher teacher = teacherService.getTeacherById(id);
if (teacher != null) {
if (field.equals("tel"))
teacher.setTel(updateValue);
if (field.equals("jl"))
teacher.setJl(updateValue);
if (teacherService.upTeacher(teacher) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + 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
/**
* 管理员 修改实验室类型
* @param id
* @param field
* @param updateValue
* @param httpServletRequest
* @return
*/
@RequestMapping("/upsylxgl")
public boolean upsylxgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Syslx syslx = syslxService.getSyslxById(id);
if (syslx != null) {
if (field.equals("lx"))
syslx.setLx(updateValue);
if (syslxService.upSyslx(syslx) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的实验室类型" + field + "为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

/**
* 管理员 修改实验设备信息
* @param id
* @param field
* @param updateValue
* @param httpServletRequest
* @return
*/
@RequestMapping("/upsysbgl")
public boolean upsysbgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Sysbgl sysbgl = sysbglService.getSysbglById(id);
if (sysbgl != null) {
if (field.equals("sbname"))
sysbgl.setSbname(updateValue);
if (field.equals("bh"))
sysbgl.setBh(updateValue);
if (field.equals("price"))
sysbgl.setPrice(Integer.parseInt(updateValue));
if (field.equals("info"))
sysbgl.setInfo(updateValue);
if (sysbglService.upSysbgl(sysbgl) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的实验设备" + field + "为" + updateValue,logService);
return true;
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
 * @return
*/
@RequestMapping("/upbjxxgl")
public boolean upbjxxgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Classes classes = classesService.getClassesById(id);
if (classes != null) {
if (field.equals("bname"))
classes.setBname(updateValue);
if (classesService.upClasses(classes) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的班级" + field + "为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

/**
* 管理员 修改专业信息
* @param id
* @param field
* @param updateValue
* @param httpServletRequest
* @return
*/
@RequestMapping("/upzyxxgl")
public boolean upzyxxgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Zygl zygl = zyglService.getZyglById(id);
if (zygl != null) {
if (field.equals("zname"))
zygl.setZname(updateValue);
if (zyglService.upZygl(zygl) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + 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
    return json;
}

/**
* 教师 学生 查询全部信息通告
* @param httpServletRequest
* @return
*/
@RequestMapping("/selectxxtgll")
public JSONObject selectxxtgll(@RequestParam(required = false) String info, HttpServletRequest httpServletRequest) {
Map requestparamMap = new HashMap();
if (info!=null&&!info.equals(""))
requestparamMap.put("info","%"+info+"%");
List<Xxtg> xxtgs = xxtgService.getXxtgList(requestparamMap);
List<Map<String, Object>> list = new ArrayList<>();
if (xxtgs != null) {
for (Xxtg xxtg : xxtgs) {
Integer id = xxtg.getId();
Integer fbrid = xxtg.getFbrid();
String infostr = xxtg.getInfo();
Date date = xxtg.getFbtime();
String hour = date.getHours()>9?String.valueOf(date.getHours()):0+String.valueOf(date.getHours());
String minute = date.getMinutes()>9?String.valueOf(date.getMinutes()):0+String.valueOf(date.getMinutes());
String second = date.getSeconds()>9?String.valueOf(date.getSeconds()):0+String.valueOf(date.getSeconds());
String fbsj = String.valueOf(date.getYear()+1900)+"年"+String.valueOf(date.getMonth()+1)+"月"+String.valueOf(date.getDate())+"日--"+hour+":"+minute+":"+second;
Users users = usersService.selectByPrimaryKey(fbrid);
String username = users.getUsername();
Map map = new HashMap();
map.put("id", id);
map.put("fbrid", username);
map.put("info", infostr);
map.put("fbtime", fbsj);
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;
}


/**
* 管理员 查询全部实验设备
* @param sbname
* @param bh
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
@Autowired
private SyslxService syslxService;
@Autowired
private SysbglService sysbglService;
@Autowired
private SysglService sysglService;
@Autowired
private JydjService jydjService;
@Autowired
private SyxxbService syxxbService;
@Autowired
private SbshdjService sbshdjService;
@Autowired
private SbwxdjService sbwxdjService;

/**
* 管理员 修改实验室信息
* @param id
* @param field
* @param updateValue
* @param httpServletRequest
* @return
*/
@RequestMapping("/upsysjbxxgl")
public boolean upsysjbxxgl(@RequestParam(value = "id") int id,
@RequestParam(value = "field") String field,
@RequestParam(value = "updateValue") String updateValue,
HttpServletRequest httpServletRequest) {
Sysgl sysgl = sysglService.getSysglById(id);
if (sysgl != null) {
if (field.equals("sysname"))
sysgl.setSysname(updateValue);
if (field.equals("bh"))
sysgl.setBh(updateValue);
if (field.equals("lc"))
sysgl.setLc(updateValue);
if (sysglService.UpSysgl(sysgl) != 0) {
setLog.setlod(httpServletRequest, "修改了id为" + id + "的实验室" + field + "为" + updateValue,logService);
return true;
}
return false;
}
return false;
}

/**
* 管理员 同意使用实验室


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