├── .gitignore
├── README.md
├── SRS.docx
├── final-report.docx
├── interface-wang.json
├── interface.json
├── lab-manager-fe
├── aboutus
│ └── index.html
├── allmanage
│ └── index.html
├── dailyjob
│ └── index.html
├── info
│ └── index.html
├── login.html
├── promanage
│ └── index.html
├── sprit.md
├── static
│ ├── css
│ │ ├── bootstrap.min.css
│ │ ├── content.css
│ │ ├── hover-min.css
│ │ ├── login.css
│ │ └── style.css
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ └── glyphicons-halflings-regular.woff2
│ ├── img
│ │ ├── about-logo.png
│ │ ├── fei.jpg
│ │ ├── header.png
│ │ ├── logo.png
│ │ ├── sid.jpeg
│ │ └── wang.png
│ └── js
│ │ ├── allmanage.js
│ │ ├── bootstrap.min.js
│ │ ├── dailyjob.js
│ │ ├── jquery.datetimepicker
│ │ ├── jquery.datetimepicker.css
│ │ └── jquery.datetimepicker.js
│ │ ├── jquery.min.js
│ │ ├── login.js
│ │ ├── promanage.js
│ │ ├── stumanage.js
│ │ ├── style.js
│ │ └── teamanage.js
├── stumanage
│ └── index.html
└── teamanage
│ └── index.html
├── lab_manager
├── .idea
│ ├── artifacts
│ │ ├── lab_manager_war.xml
│ │ └── lab_manager_war_exploded.xml
│ ├── compiler.xml
│ ├── copyright
│ │ └── profiles_settings.xml
│ ├── dataSources.ids
│ ├── dataSources.local.xml
│ ├── dataSources.xml
│ ├── deployment.xml
│ ├── libraries
│ │ ├── Maven__aopalliance_aopalliance_1_0.xml
│ │ ├── Maven__c3p0_c3p0_0_9_1_2.xml
│ │ ├── Maven__ch_qos_logback_logback_classic_1_1_7.xml
│ │ ├── Maven__ch_qos_logback_logback_core_1_1_7.xml
│ │ ├── Maven__com_alibaba_fastjson_1_1_30.xml
│ │ ├── Maven__com_google_guava_guava_19_0.xml
│ │ ├── Maven__commons_logging_commons_logging_1_1_3.xml
│ │ ├── Maven__commons_pool_commons_pool_1_6.xml
│ │ ├── Maven__joda_time_joda_time_2_9_3.xml
│ │ ├── Maven__junit_junit_4_12.xml
│ │ ├── Maven__mysql_mysql_connector_java_5_1_30.xml
│ │ ├── Maven__org_apache_commons_commons_pool2_2_4_2.xml
│ │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml
│ │ ├── Maven__org_mybatis_mybatis_3_4_0.xml
│ │ ├── Maven__org_mybatis_mybatis_spring_1_3_0.xml
│ │ ├── Maven__org_slf4j_slf4j_api_1_7_21.xml
│ │ ├── Maven__org_springframework_spring_aop_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_beans_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_context_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_core_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_expression_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_jdbc_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_test_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_tx_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_web_4_1_1_RELEASE.xml
│ │ ├── Maven__org_springframework_spring_webmvc_4_1_1_RELEASE.xml
│ │ └── Maven__redis_clients_jedis_2_8_1.xml
│ ├── misc.xml
│ ├── modules.xml
│ ├── uiDesigner.xml
│ └── workspace.xml
├── lab_manager.iml
├── pom.xml
└── src
│ ├── Test
│ └── java
│ │ └── org
│ │ └── lab_manager
│ │ ├── controller
│ │ └── LabControllerTest.java
│ │ ├── dao
│ │ ├── AttendenceDaoTest.java
│ │ ├── EquipInfoDaoTest.java
│ │ ├── EquipOrderDaoTest.java
│ │ ├── ExperimentDaoTest.java
│ │ ├── LabCommentDaoTest.java
│ │ ├── LabInfoDaoTest.java
│ │ ├── LabOrderStateDaoTest.java
│ │ ├── LabUseDaoTest.java
│ │ ├── NoticeDaoTest.java
│ │ ├── ScoreDaoTest.java
│ │ ├── StudentDaoTest.java
│ │ ├── TeacherDaoTest.java
│ │ └── UserDaoTest.java
│ │ └── service
│ │ └── serviceImp
│ │ ├── EquipServiceTest.java
│ │ ├── ExperimentServiceTest.java
│ │ ├── LabServiceTest.java
│ │ └── LoginServiceTest.java
│ └── main
│ ├── java
│ └── org
│ │ └── lab_manager
│ │ ├── controller
│ │ ├── EquipController.java
│ │ ├── ExperimentController.java
│ │ ├── HelloController.java
│ │ ├── LabController.java
│ │ ├── LoginController.java
│ │ ├── NoticeController.java
│ │ ├── StudentController.java
│ │ ├── TeacherController.java
│ │ └── TestController.java
│ │ ├── core
│ │ ├── ajaxResult
│ │ │ ├── ActionConstants.java
│ │ │ ├── AjaxResult.java
│ │ │ └── ResultCode.java
│ │ └── package-info.java
│ │ ├── dao
│ │ ├── AttendenceDao.java
│ │ ├── EquipInfoDao.java
│ │ ├── EquipOrderDao.java
│ │ ├── ExperimentDao.java
│ │ ├── LabCommentDao.java
│ │ ├── LabInfoDao.java
│ │ ├── LabOrderStateDao.java
│ │ ├── LabUseDao.java
│ │ ├── NoticeDao.java
│ │ ├── ScoreDao.java
│ │ ├── StudentDao.java
│ │ ├── TeacherDao.java
│ │ └── UserDao.java
│ │ ├── entity
│ │ ├── Attendence.java
│ │ ├── EquipInfo.java
│ │ ├── EquipOrder.java
│ │ ├── Experiment.java
│ │ ├── LabComment.java
│ │ ├── LabInfo.java
│ │ ├── LabOrderState.java
│ │ ├── LabRoom.java
│ │ ├── LabUse.java
│ │ ├── Notice.java
│ │ ├── Role.java
│ │ ├── Score.java
│ │ ├── Student.java
│ │ ├── Teacher.java
│ │ └── User.java
│ │ ├── package-info.java
│ │ ├── service
│ │ ├── IEquipService.java
│ │ ├── IExperimentService.java
│ │ ├── ILabService.java
│ │ ├── ILoginService.java
│ │ ├── INoticeService.java
│ │ ├── IStudentService.java
│ │ ├── ITeachService.java
│ │ ├── package-info.java
│ │ └── serviceImp
│ │ │ ├── EquipService.java
│ │ │ ├── ExperimentService.java
│ │ │ ├── LabService.java
│ │ │ ├── LoginService.java
│ │ │ ├── NoticeService.java
│ │ │ ├── StudentService.java
│ │ │ └── TeacherService.java
│ │ └── utils
│ │ ├── CookieUtil.java
│ │ ├── DateTimeUtil.java
│ │ ├── MD5Util.java
│ │ ├── StringUtil.java
│ │ └── TimePointUtil.java
│ ├── resources
│ ├── genaratorConfig.xml
│ ├── jdbc.properties
│ ├── log4j.xml
│ ├── mapper
│ │ ├── AttendenceDao.xml
│ │ ├── EquipInfoDao.xml
│ │ ├── EquipOrderDao.xml
│ │ ├── LabOrderStateDao.xml
│ │ ├── LabUseDao.xml
│ │ ├── NoticeDao.xml
│ │ ├── ScoreDao.xml
│ │ ├── UserDao.xml
│ │ ├── experimentDao.xml
│ │ ├── labCommentDao.xml
│ │ ├── labInfoDao.xml
│ │ ├── studentDao.xml
│ │ └── teacherDao.xml
│ ├── mybatis-config.xml
│ └── spring-config.xml
│ └── webapp
│ ├── WEB-INF
│ ├── mvc-dispatcher-servlet.xml
│ └── web.xml
│ └── pages
│ └── front
│ ├── aboutus
│ └── index.html
│ ├── allmanage
│ └── index.html
│ ├── dailyjob
│ └── index.html
│ ├── index.jsp
│ ├── info
│ └── index.html
│ ├── labmanage
│ └── index.html
│ ├── login.html
│ ├── promanage
│ └── index.html
│ ├── sprit.md
│ ├── static
│ ├── css
│ │ ├── bootstrap.min.css
│ │ ├── content.css
│ │ ├── hover-min.css
│ │ ├── login.css
│ │ └── style.css
│ ├── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.svg
│ │ ├── glyphicons-halflings-regular.ttf
│ │ ├── glyphicons-halflings-regular.woff
│ │ └── glyphicons-halflings-regular.woff2
│ ├── img
│ │ ├── about-logo.png
│ │ ├── fei.jpg
│ │ ├── header.png
│ │ ├── logo.png
│ │ ├── sid.jpeg
│ │ └── wang.png
│ └── js
│ │ ├── allmanage.js
│ │ ├── bootstrap.min.js
│ │ ├── dailyjob.js
│ │ ├── jquery.datetimepicker
│ │ ├── jquery.datetimepicker.css
│ │ └── jquery.datetimepicker.js
│ │ ├── jquery.min.js
│ │ ├── login.js
│ │ ├── promanage.js
│ │ ├── stumanage.js
│ │ ├── style.js
│ │ └── teamanage.js
│ ├── stumanage
│ └── index.html
│ └── teamanage
│ └── index.html
├── lab_manager_database_design_new.docx
├── problems------------------.md
├── sid
├── .editorconfig
├── .gitignore
├── demo.css
├── demo.js
├── fis-conf.js
├── images
│ ├── body-bg.png
│ └── logo.gif
├── index.html
├── package.json
└── style.css
└── wtf.pdf
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 | *$py.class
5 |
6 | # C extensions
7 | *.so
8 |
9 | # Distribution / packaging
10 | .Python
11 | env/
12 | build/
13 | develop-eggs/
14 | dist/
15 | downloads/
16 | eggs/
17 | .eggs/
18 | lib/
19 | lib64/
20 | parts/
21 | sdist/
22 | var/
23 | *.egg-info/
24 | .installed.cfg
25 | *.egg
26 |
27 | # PyInstaller
28 | # Usually these files are written by a python script from a template
29 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
30 | *.manifest
31 | *.spec
32 |
33 | # Installer logs
34 | pip-log.txt
35 | pip-delete-this-directory.txt
36 |
37 | # Unit test / coverage reports
38 | htmlcov/
39 | .tox/
40 | .coverage
41 | .coverage.*
42 | .cache
43 | nosetests.xml
44 | coverage.xml
45 | *,cover
46 | .hypothesis/
47 |
48 | # Translations
49 | *.mo
50 | *.pot
51 |
52 | # Django stuff:
53 | *.log
54 |
55 | # Sphinx documentation
56 | docs/_build/
57 |
58 | # PyBuilder
59 | target/
60 |
61 | #Ipython Notebook
62 | .ipynb_checkpoints
63 |
64 | .DS_Store
65 | node_modules
66 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # lab-manager
2 | 高校实验室信息管理系统
3 |
4 | ## 说明
5 | 这个系统应该可以满足一般高校作业的要求,后台用的是java,spring mvc,前端使用了bootstrap和jquery。接口文档和数据库文档甚至最终文档都写好了,随便用~
6 |
7 | 静态的网页可以完成的:
8 | 门户网站下面的:首页,中心概况,教学实践,管理体制,设备和环境
9 |
10 | 动态网页部分:
11 | 综合管理: 实验室管理,实验团队管理
12 |
13 |
14 | 实验管理:开放实验管理,设备仪器预约,数据查询统计(成绩考勤那些?)
15 |
16 | 资产管理:设备仪器管理,物资耗材管理,
17 |
18 | 日常办公:公告管理
19 |
20 |
21 | 目录说明:
22 |
23 | lab-manager-fe:前端
24 |
25 | lab-manager: IDEA 创建的工程,前端也整合在其中
26 |
27 | sid:傻吊的文件夹,没卵用
28 |
29 | SRS.docx:需求文档
30 |
31 | final-report:大实习最后实习报告
32 |
33 | interface:前后端通信约定接口
34 |
35 | lab_manager_database_design_new.docx:数据库设计说明
36 |
37 | problems-----:定期更新当前网站建设的进度和问题
38 |
39 | wtf.pdf:项目实际需求来源
40 |
--------------------------------------------------------------------------------
/SRS.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/SRS.docx
--------------------------------------------------------------------------------
/final-report.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/final-report.docx
--------------------------------------------------------------------------------
/lab-manager-fe/login.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | lab-manager 登录
6 |
7 |
8 |
9 |
10 |
20 |
21 |
22 |
23 |
24 |
71 |
72 |
73 |
--------------------------------------------------------------------------------
/lab-manager-fe/sprit.md:
--------------------------------------------------------------------------------
1 | ## 使用jade作为页面的组件化,然后通过gulp将各个页面组织起来
2 | ## 每一个组件写一个js和css
3 |
--------------------------------------------------------------------------------
/lab-manager-fe/static/css/login.css:
--------------------------------------------------------------------------------
1 |
2 | .login {
3 | width: 900px;
4 | text-align: center;
5 | margin: 13% auto;
6 | }
7 | .login-input {
8 | margin: 0px auto;
9 | width: 250px;
10 | }
11 | .login-input input {
12 | margin: 12px auto;
13 | }
14 | .input-lg,
15 | .form-control {
16 | border-radius: 0px;
17 | }
18 | #signIn {
19 | font-size: 18px;
20 | font-family: Lato,Helvetica Neue,Helvetica,Arial,sans-serif;
21 | display: inline-block;
22 | color: #0e83cd;
23 | text-decoration: none;
24 | border: 3px solid;
25 | border-color: #25a1f0;
26 | padding: 12px 94px;
27 | position: relative;
28 | -webkit-transition: .2s;
29 | transition: .2s;
30 | }
31 | #signIn:hover {
32 | background: #25a1f0;
33 | color: #fff;
34 | }
35 |
36 | canvas {
37 | position: absolute;
38 | top: 0;
39 | left: 0;
40 | z-index: 0;
41 | width: 100%;
42 | height: 100%;
43 | pointer-events: none;
44 | }
45 |
--------------------------------------------------------------------------------
/lab-manager-fe/static/css/style.css:
--------------------------------------------------------------------------------
1 | body {
2 | background: white;
3 | font-family: '微软雅黑';
4 | font-weight: lighter;
5 | }
6 |
7 | /**
8 | * 上方导航栏
9 | */
10 | .navbar-brand img{
11 | height: 60px;
12 | margin-top: -15px;
13 | margin-left: 20px;
14 | }
15 | .navbar-nav {
16 | margin-left: 48px;
17 | float: right !important;
18 | }
19 | .navbar-default {
20 | border: none;
21 | background-color: #293c55;
22 | color: white;
23 | border-radius: 0px;
24 | border-bottom-style: solid;
25 | border-bottom-color: #162436;
26 | border-bottom-width: 1px;
27 | }
28 | .navbar-default .navbar-nav>.active>a,
29 | .navbar-default .navbar-nav>.active>a:focus,
30 | .navbar-default .navbar-nav>.active>a:hover {
31 | color: #f9f9f9;
32 | background-color: #162436;
33 | }
34 | .navbar-default .navbar-nav>li>a:focus,
35 | .navbar-default .navbar-nav>li>a:hover {
36 | color: #f9f9f9;
37 | background-color: #162436;
38 | transition: 0.5s;
39 | }
40 | .navbar-default .navbar-nav>li>a {
41 | color: #f9f9f9;
42 | transition: 0.5s;
43 | }
44 |
45 | /**
46 | * 左菜单样式
47 | */
48 | #menuLeft{
49 | width: 140px;
50 | height: 100%;
51 | position: fixed;
52 | top: 50px;
53 | background-color: #293c55;
54 | border-top-style: solid;
55 | border-top-color: #162436;
56 | border-top-width: 1px;
57 | color: #ccc;
58 | }
59 | #menuLeft ul{
60 | padding-left: 0px;
61 | }
62 | #menuLeft li {
63 | list-style: none;
64 | height: 54px;
65 | padding: 17px 15px;
66 | -webkit-transition: 0.5s;
67 | transition: 0.5s;
68 | cursor: pointer;
69 | }
70 | #menuLeft li:hover {
71 | background-color: #162436;
72 | }
73 | #menuLeft li.active {
74 | background-color: #e43c59;
75 | }
76 | #menuLeft li.active span {
77 | color: #fff;
78 | }
79 | #menuLeft li a {
80 | text-decoration: none;
81 | color: #ccc;
82 | position: relative;
83 | display: block;
84 | -webkit-transition: 0.5s;
85 | transition: 0.5s;
86 | }
87 |
--------------------------------------------------------------------------------
/lab-manager-fe/static/fonts/glyphicons-halflings-regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/fonts/glyphicons-halflings-regular.eot
--------------------------------------------------------------------------------
/lab-manager-fe/static/fonts/glyphicons-halflings-regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/fonts/glyphicons-halflings-regular.ttf
--------------------------------------------------------------------------------
/lab-manager-fe/static/fonts/glyphicons-halflings-regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/fonts/glyphicons-halflings-regular.woff
--------------------------------------------------------------------------------
/lab-manager-fe/static/fonts/glyphicons-halflings-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/fonts/glyphicons-halflings-regular.woff2
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/about-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/about-logo.png
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/fei.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/fei.jpg
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/header.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/header.png
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/logo.png
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/sid.jpeg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/sid.jpeg
--------------------------------------------------------------------------------
/lab-manager-fe/static/img/wang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/SidKwok/lab-manager/ef91605f85732d18ff8e6f994e4a8161863fe60d/lab-manager-fe/static/img/wang.png
--------------------------------------------------------------------------------
/lab-manager-fe/static/js/login.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * 页面事件
4 | */
5 | function basicEvent () {
6 | $('#signIn').on('click', function(){
7 | var username = $('#username').val();
8 | var params = {
9 | username: username,
10 | password: $('#password').val()
11 | };
12 | // console.log(params);
13 | // window.location.href = './info/index.html?username=' + username + '&role=teacher?';
14 | $.ajax({
15 | type: 'POST',
16 | url: '/log/in',
17 | data: params,
18 | dataType: 'json',
19 | success: function(data){
20 | var retData = eval('(' + data + ')');
21 | if (retData.status === 'success') {
22 | window.location.href = './info/index.html?username=' + username + '&role=' + retData.role;
23 | } else {
24 | alert('登录失败,原因:' + retData.status);
25 | }
26 | },
27 | error: function() {
28 | console.log('/log/in fail');
29 | alert('后台错误');
30 |
31 | // /***************************************
32 | // * 用于前端test 测试状态:
33 | // */
34 | // /*ajax返回的数据*/
35 | // var retData = {
36 | // "status": "success",
37 | // "role": "student"
38 | // };
39 | // /**************/
40 | // if (retData.status === 'success') {
41 | // window.location.href = './info/index.html?username=' + username + '&role=' + retData.role;
42 | // } else {
43 | // alert('登录失败,原因:' + retData.status)
44 | // }
45 | // /***************************************/
46 | }
47 | });
48 | });
49 | }
50 | basicEvent();
51 |
--------------------------------------------------------------------------------
/lab-manager-fe/static/js/style.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 左菜单事件
3 | */
4 | $('#menuLeft').on('click', 'li' ,function(event) {
5 | var content = $(this).children('a').attr('href');
6 |
7 | $('#menuLeft li').removeClass('active');
8 | $(this).addClass('active');
9 |
10 | $('.content').children().css('display', 'none');
11 | $(content).css('display', 'block');
12 | });
13 |
14 | /**
15 | * 初始化弹出框
16 | */
17 | $('[data-toggle="popover"]').popover();
18 |
--------------------------------------------------------------------------------
/lab-manager-fe/stumanage/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 学生专区
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
37 |
38 |
39 |
45 |
46 |
47 |
48 |
49 |
出勤状态
50 |
51 |
52 |
机器人实验 信工805 第一周 周五 第1、2节
53 |
状态: 未到
54 |
55 |
56 |
足球实验 信工806 第二周 周四 第5、6节
57 |
状态: 已到
58 |
59 |
60 |
61 |
62 |
查看成绩
63 |
64 |
65 |
机器人实验
66 |
成绩未出
67 |
68 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
--------------------------------------------------------------------------------
/lab_manager/.idea/artifacts/lab_manager_war.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/target
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lab_manager/.idea/artifacts/lab_manager_war_exploded.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | $PROJECT_DIR$/target/lib_manager
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 |
--------------------------------------------------------------------------------
/lab_manager/.idea/compiler.xml:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/lab_manager/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/lab_manager/.idea/dataSources.ids:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/lab_manager/.idea/dataSources.local.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/lab_manager/.idea/dataSources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | mysql
6 | true
7 | com.mysql.jdbc.Driver
8 | jdbc:mysql://115.28.143.152:3306/lab_manager
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/lab_manager/.idea/deployment.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__c3p0_c3p0_0_9_1_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__ch_qos_logback_logback_classic_1_1_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__ch_qos_logback_logback_core_1_1_7.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__com_alibaba_fastjson_1_1_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__com_google_guava_guava_19_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__commons_pool_commons_pool_1_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__joda_time_joda_time_2_9_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__junit_junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_apache_commons_commons_pool2_2_4_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_mybatis_mybatis_3_4_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_mybatis_mybatis_spring_1_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_aop_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_beans_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_context_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_core_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_expression_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_jdbc_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_test_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_tx_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_web_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__org_springframework_spring_webmvc_4_1_1_RELEASE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/libraries/Maven__redis_clients_jedis_2_8_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/lab_manager/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/lab_manager/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lab_manager/lab_manager.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | file://$MODULE_DIR$/src/main/webapp/WEB-INF/mvc-dispatcher-servlet.xml
22 | file://$MODULE_DIR$/src/main/resources/spring-config.xml
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 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/controller/LabControllerTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.controller;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Created by xiaofeige on 2016/5/31.
9 | */
10 | public class LabControllerTest {
11 | @Test
12 | public void orderRoom() throws Exception {
13 | LabController c=new LabController();
14 | // c.orderRoom("132","假的实验","T001","第四周","2,3节");
15 |
16 | }
17 |
18 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/AttendenceDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import com.sun.xml.internal.messaging.saaj.packaging.mime.util.LineInputStream;
4 | import org.junit.Test;
5 | import org.junit.runner.RunWith;
6 | import org.lab_manager.entity.Attendence;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.test.context.ContextConfiguration;
9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10 |
11 | import java.util.List;
12 |
13 | import static org.junit.Assert.*;
14 |
15 | /**
16 | * Created by Silence on 2016/5/31.
17 | */
18 | @RunWith(SpringJUnit4ClassRunner.class)
19 | @ContextConfiguration("classpath:spring-config.xml")
20 | public class AttendenceDaoTest {
21 | @Autowired
22 | AttendenceDao attendenceDao;
23 | @Test
24 | public void getAllAttendence() throws Exception {
25 | List list=attendenceDao.getAllAttendence();
26 | for (Attendence attendence:list){
27 | System.out.println(attendence.getDate());
28 | }
29 | }
30 | @Test
31 | public void getAttendenceById() throws Exception{
32 | List list=attendenceDao.getAttendenceById("20131000000");
33 | for (Attendence attendence:list){
34 | System.out.println(attendence.getDate());
35 | }
36 | }
37 |
38 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/EquipInfoDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.EquipInfo;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * Created by Silence on 2016/5/26.
14 | */
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration("classpath:spring-config.xml")
17 | public class EquipInfoDaoTest {
18 | @Autowired
19 | EquipInfoDao equipInfoDao;
20 | @Test
21 | public void queryById() throws Exception {
22 |
23 | }
24 |
25 | @Test
26 | public void getAllAssects() throws Exception {
27 | List list = equipInfoDao.getAllAssets();
28 | for (EquipInfo equipInfo:list){
29 | System.out.println(equipInfo.getAsset_name());
30 | }
31 | }
32 |
33 | @Test
34 | public void getAssetInfo() throws Exception{
35 | EquipInfo equipInfo=equipInfoDao.getAssetInfo("西瓜刀");
36 | System.out.println(equipInfo.getCharge_type());
37 | }
38 |
39 | @Test
40 | public void updateAsset() throws Exception{
41 | // boolean status = equipInfoDao.updateAsset("西瓜刀",2,"刀","大资产",30);
42 | }
43 |
44 | @Test
45 | public void deleteAsset()throws Exception{
46 | boolean status= equipInfoDao.deleteAsset("101");
47 | System.out.println(status);
48 | }
49 | @Test
50 | public void addAsset() throws Exception{
51 | boolean status=equipInfoDao.addAsset("12",123,"123","12","12","12",12,1,"12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12",12,"12");
52 | System.out.println(status);
53 | }
54 | @Test
55 | public void update() throws Exception{
56 | boolean status=equipInfoDao.updateAsset("98","12",123,"123","12","12","12",12,1,"12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12","12",12,"12");
57 | System.out.println(status);
58 | }
59 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/EquipOrderDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.EquipInfo;
6 | import org.lab_manager.entity.EquipOrder;
7 | import org.lab_manager.entity.LabInfo;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.test.context.ContextConfiguration;
10 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
11 | import sun.reflect.annotation.ExceptionProxy;
12 |
13 | import java.util.List;
14 |
15 | import static org.junit.Assert.*;
16 |
17 | /**
18 | * Created by Silence on 2016/5/28.
19 | */
20 | @RunWith(SpringJUnit4ClassRunner.class)
21 | @ContextConfiguration("classpath:spring-config.xml")
22 | public class EquipOrderDaoTest {
23 | @Autowired
24 | EquipOrderDao equipOrderDao;
25 | @Test
26 | public void orderEquip() throws Exception {
27 |
28 | }
29 | @Test
30 | public void getAllEquipOrderStatus()throws Exception{
31 | List list = equipOrderDao.getAllEquipOrderStatus();
32 | for (EquipOrder equipOrder:list){
33 | System.out.println(equipOrder.getOrder_date());
34 | }
35 | }
36 | @Test
37 | public void approveOrder() throws Exception{
38 | boolean status=equipOrderDao.approveEquipOrder(1);
39 | System.out.println(status);
40 | }
41 |
42 | @Test
43 | public void refuseOrder() throws Exception{
44 | boolean status=equipOrderDao.refuseEquipOrder(1);
45 | System.out.println(status);
46 | }
47 | @Test
48 | public void getTeacherEquiptOrder() throws Exception{
49 | List list = equipOrderDao.getTeacherEquipOrder("admin");
50 | for (EquipOrder equipOrder:list){
51 | System.out.println(equipOrder.getOrder_date());
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/ExperimentDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Experiment;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by xiaofeige on 2016/5/23.
16 | */
17 |
18 | @RunWith(SpringJUnit4ClassRunner.class)
19 | @ContextConfiguration("classpath:spring-config.xml")
20 | public class ExperimentDaoTest {
21 | @Autowired
22 | private ExperimentDao ed;
23 |
24 | @Test
25 | public void addExperiment() throws Exception {
26 | ed.addExperiment("222","C++","111131",2,"805","Luo","2013","2016");
27 | }
28 |
29 | @Test
30 | public void queryById() throws Exception {
31 | // Experiment e=ed.queryById("001");
32 |
33 | // System.out.println(e.getCourse_name());
34 | }
35 | @Test
36 | public void applyExperiment() throws Exception{
37 | // boolean b = ed.applyExperiment("大实习",805,"张","第八周","第十八周","周五","三四节");
38 | // System.out.println(b);
39 | }
40 | @Test
41 | public void queryAllExperimentOrderState() throws Exception{
42 | List list = ed.queryAllExperimentOrderState();
43 | for (Experiment experiment:list){
44 | System.out.println(experiment.getCourse_name());
45 | }
46 | }
47 | @Test
48 | public void getExperimentsByRoomID() throws Exception{
49 | List list=ed.getExperimentsByRoomID("805");
50 | for (Experiment experiment:list){
51 | System.out.println(experiment.getCourse_name());
52 | }
53 | }
54 |
55 | @Test
56 | public void getExperimentsByTeacherName() throws Exception{
57 | List list=ed.getExperimentsByTeacherName("张");
58 | for (Experiment experiment:list){
59 | System.out.println(experiment.getCourse_name());
60 | }
61 | }
62 | @Test
63 | public void approveApply() throws Exception{
64 | boolean status=ed.approveApply(1);
65 | System.out.println(status);
66 | }
67 | @Test
68 | public void refuseApply() throws Exception{
69 | boolean status=ed.refuseApply(1);
70 | System.out.println(status);
71 | }
72 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/LabCommentDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.LabComment;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by Silence on 2016/5/26.
16 | */
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class LabCommentDaoTest {
20 | @Autowired
21 | LabCommentDao labCommentDao;
22 |
23 | @Test
24 | public void getLabComment() throws Exception {
25 | List List = labCommentDao.getAllComment(1);
26 | for (LabComment labComment:List) {
27 | System.out.println(labComment.getComment());
28 | }
29 | }
30 | @Test
31 | public void addLabComment() throws Exception{
32 | boolean status = labCommentDao.addComment(2,"觉得还不错吧");
33 | System.out.println(status);
34 | }
35 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/LabInfoDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.LabInfo;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by Silence on 2016/5/26.
16 | */
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class LabInfoDaoTest {
20 | @Autowired
21 | LabInfoDao labInfoDao;
22 | @Test
23 | public void getLabInfo() throws Exception {
24 | // LabInfo labInfo=labInfoDao.getLabInfo("软工实验室");
25 | // System.out.println(labInfo.getIntro());
26 | }
27 |
28 | @Test
29 | public void getAllLabInfo() throws Exception {
30 | List list = labInfoDao.getAllLabInfo();
31 | for (LabInfo labInfo:list){
32 | System.out.println(labInfo.getRoom_name());
33 | }
34 | }
35 |
36 | @Test
37 | public void updateLab() throws Exception{
38 | // boolean status=labInfoDao.updateLab("软工实验室","张","软件工程实验室还不错哦");
39 | // System.out.println(status);
40 | }
41 |
42 | @Test
43 | public void deleteLab() throws Exception{
44 | // boolean status=labInfoDao.deleteLab("软工实验室");
45 | // System.out.println(status);
46 | }
47 | @Test
48 | public void addLab() throws Exception{
49 | boolean status=labInfoDao.addLab(412,"java实验室","杨","专业java培训");
50 | System.out.println(status);
51 | }
52 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/LabOrderStateDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.LabOrderState;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by Silence on 2016/5/28.
16 | */
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class LabOrderStateDaoTest {
20 | @Autowired
21 | LabOrderStateDao labOrderStateDao;
22 | @Test
23 | public void getLabOrderState() throws Exception {
24 | List list = labOrderStateDao.getLabOrderState("admin");
25 | for (LabOrderState labOrderState:list){
26 | System.out.println(labOrderState.getOrder_date());
27 | }
28 | }
29 | @Test
30 | public void getEquipOrderState() throws Exception{
31 | List list = labOrderStateDao.getEquipOrderState("admin");
32 | for (LabOrderState labOrderState:list){
33 | System.out.println(labOrderState.getOrder_date());
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/LabUseDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.LabUse;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by Silence on 2016/5/26.
16 | */
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class LabUseDaoTest {
20 | @Autowired
21 | LabUseDao labUseDao;
22 | @Test
23 | public void getLabUseInfo() throws Exception {
24 | List list = labUseDao.getLabUseInfo(805);
25 | for(LabUse labUse:list){
26 | System.out.println(labUse.getApplicant());
27 | }
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/NoticeDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Notice;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | /**
13 | * Created by Silence on 2016/5/24.
14 | */
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration("classpath:spring-config.xml")
17 | public class NoticeDaoTest {
18 | @Autowired
19 | NoticeDao noticeDao;
20 | @Test
21 | public void queryById() throws Exception {
22 | Notice notice = noticeDao.queryById(1);
23 | System.out.println(notice.getContent());
24 | }
25 | @Test
26 | public void getAllNotice() throws Exception{
27 | List list = noticeDao.getAllNotice();
28 | for (Notice notice:list){
29 | System.out.println(notice.getDate());
30 | }
31 | }
32 | @Test
33 | public void addNotice() throws Exception{
34 | boolean status = noticeDao.addNotice("2016-5-30","最新公告:明天放假!","王");
35 | System.out.println(status);
36 | }
37 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/ScoreDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Score;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import java.util.List;
11 |
12 | import static org.junit.Assert.*;
13 |
14 | /**
15 | * Created by Silence on 2016/6/1.
16 | */
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class ScoreDaoTest {
20 | @Autowired
21 | ScoreDao scoreDao;
22 | @Test
23 | public void getScoreBySNO() throws Exception {
24 | List list=scoreDao.getScoreBySNO("20131004222");
25 | for (Score score:list){
26 | System.out.println(score.getCourse_name());
27 | }
28 | }
29 | @Test
30 | public void updateScore() throws Exception{
31 | boolean status=scoreDao.updateScore("20131004222","软件测试","89");
32 | System.out.println(status);
33 | }
34 |
35 | @Test
36 | public void insertScore()throws Exception{
37 | boolean status=scoreDao.insertScore("20131002111","软件测试","90");
38 | System.out.println(status);
39 | }
40 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/StudentDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Student;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Created by Silence on 2016/5/23.
14 | */
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration("classpath:spring-config.xml")
17 | public class StudentDaoTest {
18 | @Autowired
19 | private StudentDao studentDao;
20 |
21 | @Test
22 | public void queryById() throws Exception {
23 | Student student = studentDao.queryById("20131003261");
24 | System.out.println(student.getSName());
25 | }
26 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/TeacherDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Experiment;
6 | import org.lab_manager.entity.Student;
7 | import org.lab_manager.entity.Teacher;
8 | import org.springframework.beans.factory.annotation.Autowired;
9 | import org.springframework.test.context.ContextConfiguration;
10 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
11 |
12 | import java.util.List;
13 |
14 | import static org.junit.Assert.*;
15 |
16 | /**
17 | * Created by Silence on 2016/5/24.
18 | */
19 | @RunWith(SpringJUnit4ClassRunner.class)
20 | @ContextConfiguration("classpath:spring-config.xml")
21 | public class TeacherDaoTest {
22 | @Autowired
23 | private TeacherDao teacherDao;
24 |
25 | @Test
26 | public void queryById() throws Exception {
27 | Teacher teacher = teacherDao.queryById("001");
28 | System.out.println(teacher.getName());
29 | }
30 | @Test
31 | public void getAllStudent() throws Exception{
32 | List list=teacherDao.getAllStudent("T001");
33 | for (Student student:list){
34 | System.out.println(student.getSName());
35 | }
36 | }
37 | @Test
38 | public void getAllExpeeiment() throws Exception{
39 | List list=teacherDao.getALLExperiment("T001");
40 | for (Experiment experiment:list){
41 | System.out.println(experiment.getCourse_name());
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/dao/UserDaoTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.dao;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Role;
6 | import org.lab_manager.entity.User;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.test.context.ContextConfiguration;
9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10 |
11 | /**
12 | * Created by Silence on 2016/5/28.
13 | */
14 | @RunWith(SpringJUnit4ClassRunner.class)
15 | @ContextConfiguration("classpath:spring-config.xml")
16 | public class UserDaoTest {
17 | @Test
18 | public void getRole() throws Exception {
19 |
20 | System.out.println(userDao.getRoleId("T001","123"));
21 | }
22 |
23 | @Test
24 | public void getRoleId() throws Exception {
25 | Role r=userDao.getRole("2");
26 | System.out.println(r.getRole_name());
27 | }
28 |
29 | @Autowired
30 | UserDao userDao;
31 | @Test
32 | public void login() throws Exception {
33 |
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/service/serviceImp/EquipServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.service.serviceImp;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.service.IEquipService;
6 | import org.lab_manager.service.IExperimentService;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.test.context.ContextConfiguration;
9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Created by xiaofeige on 2016/5/27.
15 | */
16 | @RunWith(SpringJUnit4ClassRunner.class)
17 | @ContextConfiguration("classpath:spring-config.xml")
18 | public class EquipServiceTest {
19 | @Autowired
20 | IEquipService equipService;
21 |
22 | @Test
23 | public void addEquipOrder() throws Exception {
24 | equipService.addEquipOrder("狼牙棒",3,"2","3","T001");
25 | }
26 |
27 | @Test
28 | public void getAllEquipInfo() throws Exception {
29 |
30 | }
31 |
32 | @Test
33 | public void queryEquipById() throws Exception {
34 |
35 | }
36 |
37 | @Test
38 | public void updateEquipInfo() throws Exception {
39 |
40 | }
41 |
42 | @Test
43 | public void addEquip() throws Exception {
44 |
45 | }
46 |
47 | @Test
48 | public void deleteEquipById() throws Exception {
49 |
50 | }
51 |
52 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/service/serviceImp/ExperimentServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.service.serviceImp;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.service.IExperimentService;
6 | import org.springframework.beans.factory.annotation.Autowired;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Created by xiaofeige on 2016/6/1.
14 | */
15 | @RunWith(SpringJUnit4ClassRunner.class)
16 | @ContextConfiguration("classpath:spring-config.xml")
17 |
18 | public class ExperimentServiceTest {
19 | @Autowired
20 | IExperimentService experimentService;
21 |
22 | @Test
23 | public void applyExp() throws Exception {
24 | experimentService.applyExp("nihao",1,"T001","第八周","第十周","周三","2,3节");
25 | }
26 |
27 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/service/serviceImp/LabServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.service.serviceImp;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.LabInfo;
6 | import org.lab_manager.service.ILabService;
7 | import org.springframework.test.context.ContextConfiguration;
8 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
9 |
10 | import javax.annotation.Resource;
11 |
12 | import java.util.List;
13 |
14 | import static org.junit.Assert.*;
15 |
16 | /**
17 | * Created by xiaofeige on 2016/5/25.
18 | */
19 | @RunWith(SpringJUnit4ClassRunner.class)
20 | @ContextConfiguration("classpath:spring-config.xml")
21 | public class LabServiceTest {
22 |
23 |
24 |
25 | @Resource
26 | private ILabService labService;
27 | @Test
28 | public void getAllLabRoom() throws Exception {
29 | List all = labService.getAllLabRoom();
30 | System.out.println(all);
31 | }
32 |
33 | @Test
34 | public void orderRoom() throws Exception {
35 | // labService.orderRoom("805","化学实验","T001","")
36 | }
37 | }
--------------------------------------------------------------------------------
/lab_manager/src/Test/java/org/lab_manager/service/serviceImp/LoginServiceTest.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.service.serviceImp;
2 |
3 | import org.junit.Test;
4 | import org.junit.runner.RunWith;
5 | import org.lab_manager.entity.Role;
6 | import org.lab_manager.service.ILoginService;
7 | import org.springframework.beans.factory.annotation.Autowired;
8 | import org.springframework.test.context.ContextConfiguration;
9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Created by xiaofeige on 2016/5/31.
15 | */
16 |
17 | @RunWith(SpringJUnit4ClassRunner.class)
18 | @ContextConfiguration("classpath:spring-config.xml")
19 | public class LoginServiceTest {
20 | @Autowired
21 | private ILoginService loginService;
22 |
23 | @Test
24 | public void login() throws Exception {
25 | Role role=loginService.login("admin","admin");
26 | System.out.println(role.getRole_name());
27 | }
28 |
29 | }
--------------------------------------------------------------------------------
/lab_manager/src/main/java/org/lab_manager/controller/HelloController.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.controller;
2 |
3 | import org.springframework.stereotype.Controller;
4 | import org.springframework.ui.ModelMap;
5 | import org.springframework.web.bind.annotation.RequestMapping;
6 | import org.springframework.web.bind.annotation.RequestMethod;
7 |
8 |
9 | @Controller
10 | @RequestMapping("/")
11 | public class HelloController {
12 | /**
13 | * 首页导航,将用户导向index.jsp
14 | * @param model
15 | * @return
16 | */
17 | @RequestMapping(method = RequestMethod.GET)
18 | public String printWelcome(ModelMap model) {
19 | System.out.println("HelloController called !");
20 | return "front/index";
21 | }
22 | }
--------------------------------------------------------------------------------
/lab_manager/src/main/java/org/lab_manager/controller/LoginController.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.controller;
2 | /**
3 | * Created by xiaofeige on 2016/5/22.
4 | */
5 |
6 | import com.alibaba.fastjson.JSON;
7 | import org.lab_manager.entity.Role;
8 | import org.lab_manager.service.ILoginService;
9 | import org.springframework.stereotype.Controller;
10 | import org.springframework.ui.ModelMap;
11 | import org.springframework.web.bind.annotation.*;
12 |
13 | import javax.annotation.Resource;
14 | import java.util.HashMap;
15 | import java.util.Map;
16 |
17 |
18 | @Controller
19 | @RequestMapping("/log")
20 | public class LoginController {
21 | @Resource
22 | private ILoginService loginService;
23 | /**
24 | *
25 | * params: username password
26 | {
27 | "status": "密码错误",
28 | "role": "teacher"
29 | }
30 | */
31 | @ResponseBody
32 | @RequestMapping(value="/in",method = RequestMethod.POST)
33 | public String login(@RequestParam("username")String username,@RequestParam("password")String pwd) {
34 | // loginService.login()
35 | System.out.println("收到用户登录请求");
36 | Map result=new HashMap();
37 |
38 | Role role=loginService.login(username,pwd);
39 | if(role==null){
40 | result.put("status","密码错误");
41 | result.put("role","xxx");
42 | }else{
43 | result.put("status","success");
44 | result.put("role",role.getRole_name());
45 | }
46 |
47 | // if(username.equals("001")){
48 | // result.put("status","success");
49 | // result.put("role","manager");
50 | // }else if(username.equals("002")){
51 | // result.put("status","success");
52 | // result.put("role","teacher");
53 | // }else{
54 | // result.put("status","success");
55 | // result.put("role","student");
56 | // }
57 |
58 | return JSON.toJSONString(result);
59 | }
60 |
61 | @ResponseBody
62 | @RequestMapping(value="/out",method = RequestMethod.POST)
63 | public String logout() {
64 |
65 | return "hello";
66 | }
67 | }
--------------------------------------------------------------------------------
/lab_manager/src/main/java/org/lab_manager/controller/NoticeController.java:
--------------------------------------------------------------------------------
1 | package org.lab_manager.controller;
2 | /**
3 | * Created by xiaofeige on 2016/5/22.
4 | */
5 |
6 | import com.alibaba.fastjson.JSON;
7 | import org.lab_manager.entity.Notice;
8 | import org.lab_manager.service.INoticeService;
9 | import org.springframework.beans.factory.annotation.Autowired;
10 | import org.springframework.stereotype.Controller;
11 | import org.springframework.ui.ModelMap;
12 | import org.springframework.web.bind.annotation.*;
13 |
14 | import javax.annotation.Resource;
15 | import java.io.PrintWriter;
16 | import java.util.ArrayList;
17 | import java.util.HashMap;
18 | import java.util.List;
19 | import java.util.Map;
20 |
21 |
22 | @Controller
23 | @RequestMapping("/notice")
24 | public class NoticeController {
25 |
26 | @Autowired
27 | private INoticeService noticeService;
28 |
29 | /**
30 | * 增加评论
31 | * params: noticeAuthor, noticeContent
32 | {
33 | "status": "0"
34 | }
35 | * */
36 | @ResponseBody
37 | @RequestMapping(value="/addNotice",method = RequestMethod.POST)
38 | public String addNotice(@RequestParam("noticeAuthor")String author,@RequestParam("noticeContent")String content) {
39 | //首先解析接收到的notice
40 | Map result=new HashMap();
41 | String flag="0";
42 |
43 | if(noticeService.addNotice(author,content))
44 | flag="1";
45 |
46 | result.put("status",flag);
47 |
48 | //这里肯定会需要用到时间等函数,在util中使用已经完成的工具类
49 | return JSON.toJSONString(result);
50 | }
51 |
52 | /**
53 | * 删除评论--管理员特有权限
54 | * */
55 | @ResponseBody
56 | @RequestMapping(value="/deleteNotice",method = RequestMethod.POST)
57 | public String deleteNotice() {
58 | System.out.println("ajax响应");
59 | return "ajax 调用成功";
60 | }
61 |
62 | /**
63 | * 查询评论---支持分页功能
64 | * params: none
65 | [
66 | {
67 | "noticeId": "0001",
68 | "noticeDate": "2016-5-21",
69 | "noticeContent": "Sid is the best!",
70 | "noticeAuthor": "sid"
71 | },
72 | {
73 | "noticeId": "0002",
74 | "noticeDate": "2016-5-21",
75 | "noticeContent": "Mingen is the best!",
76 | "noticeAuthor": "mingen"
77 | }
78 | ]
79 | * */
80 | @ResponseBody
81 | @RequestMapping(value="/queryAllNotice",method = RequestMethod.GET)
82 | public String queryAllNotice() {
83 | System.out.println("收到公告查询请求");
84 | List