├── .gitattributes ├── src └── main │ ├── resources │ ├── static │ │ ├── h-ui │ │ │ ├── images │ │ │ │ ├── 18109.jpg │ │ │ │ ├── Thumbs.db │ │ │ │ ├── gq │ │ │ │ │ ├── cn.gif │ │ │ │ │ ├── gj.png │ │ │ │ │ ├── us.gif │ │ │ │ │ └── Thumbs.db │ │ │ │ ├── totop.png │ │ │ │ ├── user.png │ │ │ │ ├── icon-add.png │ │ │ │ ├── icon_jt2.png │ │ │ │ ├── loading.gif │ │ │ │ ├── sort_asc.png │ │ │ │ ├── acrossTab.png │ │ │ │ ├── backgroup.jpg │ │ │ │ ├── hamburger.gif │ │ │ │ ├── loading_072.gif │ │ │ │ ├── sort_both.png │ │ │ │ ├── sort_desc.png │ │ │ │ ├── acrossTab-bg.png │ │ │ │ ├── icon_error_s.png │ │ │ │ ├── icon_right_s.png │ │ │ │ ├── acrossTab-2bak.png │ │ │ │ ├── acrossTab-close.png │ │ │ │ ├── admin-login-bg.jpg │ │ │ │ ├── hamburger-retina.gif │ │ │ │ ├── icon_warning_s.png │ │ │ │ └── admin-loginform-bg.png │ │ │ ├── lib │ │ │ │ ├── icheck │ │ │ │ │ ├── aero.png │ │ │ │ │ ├── blue.png │ │ │ │ │ ├── grey.png │ │ │ │ │ ├── pink.png │ │ │ │ │ ├── red.png │ │ │ │ │ ├── Thumbs.db │ │ │ │ │ ├── aero@2x.png │ │ │ │ │ ├── blue@2x.png │ │ │ │ │ ├── green.png │ │ │ │ │ ├── grey@2x.png │ │ │ │ │ ├── minimal.png │ │ │ │ │ ├── orange.png │ │ │ │ │ ├── pink@2x.png │ │ │ │ │ ├── purple.png │ │ │ │ │ ├── red@2x.png │ │ │ │ │ ├── yellow.png │ │ │ │ │ ├── green@2x.png │ │ │ │ │ ├── orange@2x.png │ │ │ │ │ ├── purple@2x.png │ │ │ │ │ ├── yellow@2x.png │ │ │ │ │ ├── minimal@2x.png │ │ │ │ │ └── jquery.icheck.min.js │ │ │ │ └── Hui-iconfont │ │ │ │ │ └── 1.0.1 │ │ │ │ │ ├── iconfont.eot │ │ │ │ │ ├── iconfont.ttf │ │ │ │ │ └── iconfont.woff │ │ │ ├── skin │ │ │ │ └── default │ │ │ │ │ ├── Thumbs.db │ │ │ │ │ ├── acrossTab.png │ │ │ │ │ ├── icon_arrow.png │ │ │ │ │ ├── acrossTab-bg.png │ │ │ │ │ └── skin.css │ │ │ └── css │ │ │ │ └── H-ui.login.css │ │ └── easyui │ │ │ ├── themes │ │ │ ├── icons │ │ │ │ ├── cut.png │ │ │ │ ├── man.png │ │ │ │ ├── no.png │ │ │ │ ├── ok.png │ │ │ │ ├── set.png │ │ │ │ ├── sum.png │ │ │ │ ├── tip.png │ │ │ │ ├── back.png │ │ │ │ ├── blank.gif │ │ │ │ ├── clear.png │ │ │ │ ├── find.png │ │ │ │ ├── help.png │ │ │ │ ├── house.png │ │ │ │ ├── lock.png │ │ │ │ ├── more.png │ │ │ │ ├── note.png │ │ │ │ ├── print.png │ │ │ │ ├── redo.png │ │ │ │ ├── undo.png │ │ │ │ ├── world.png │ │ │ │ ├── book_add.png │ │ │ │ ├── cancel.png │ │ │ │ ├── door_out.png │ │ │ │ ├── edit_add.png │ │ │ │ ├── filesave.png │ │ │ │ ├── filter.png │ │ │ │ ├── mini_add.png │ │ │ │ ├── pencil.png │ │ │ │ ├── reload.png │ │ │ │ ├── search.png │ │ │ │ ├── user_add.png │ │ │ │ ├── user_red.png │ │ │ │ ├── zoom_in.png │ │ │ │ ├── chart_bar.png │ │ │ │ ├── folder_up.png │ │ │ │ ├── mini_edit.png │ │ │ │ ├── pencil_add.png │ │ │ │ ├── user_gray.png │ │ │ │ ├── vcard_edit.png │ │ │ │ ├── world_add.png │ │ │ │ ├── 2012080412263.png │ │ │ │ ├── basket_remove.png │ │ │ │ ├── book_previous.png │ │ │ │ ├── edit_remove.png │ │ │ │ ├── large_chart.png │ │ │ │ ├── large_clipart.png │ │ │ │ ├── large_picture.png │ │ │ │ ├── large_shapes.png │ │ │ │ ├── mini_refresh.png │ │ │ │ ├── world_night.png │ │ │ │ ├── asterisk_orange.png │ │ │ │ ├── book_open_mark.png │ │ │ │ ├── large_smartart.png │ │ │ │ ├── text_list_bullets.png │ │ │ │ └── text_list_numbers.png │ │ │ ├── default │ │ │ │ ├── validatebox.css │ │ │ │ ├── images │ │ │ │ │ ├── blank.gif │ │ │ │ │ ├── loading.gif │ │ │ │ │ ├── combo_arrow.png │ │ │ │ │ ├── menu_arrows.png │ │ │ │ │ ├── panel_tools.png │ │ │ │ │ ├── tabs_icons.png │ │ │ │ │ ├── tree_icons.png │ │ │ │ │ ├── datagrid_icons.png │ │ │ │ │ ├── datebox_arrow.png │ │ │ │ │ ├── layout_arrows.png │ │ │ │ │ ├── linkbutton_bg.png │ │ │ │ │ ├── messager_icons.png │ │ │ │ │ ├── slider_handle.png │ │ │ │ │ ├── spinner_arrows.png │ │ │ │ │ ├── accordion_arrows.png │ │ │ │ │ ├── calendar_arrows.png │ │ │ │ │ ├── pagination_icons.png │ │ │ │ │ ├── searchbox_button.png │ │ │ │ │ └── validatebox_warning.png │ │ │ │ ├── numberbox.css │ │ │ │ ├── splitbutton.css │ │ │ │ ├── filebox.css │ │ │ │ ├── combobox.css │ │ │ │ ├── dialog.css │ │ │ │ ├── datebox.css │ │ │ │ ├── progressbar.css │ │ │ │ ├── propertygrid.css │ │ │ │ ├── messager.css │ │ │ │ ├── accordion.css │ │ │ │ ├── combo.css │ │ │ │ ├── pagination.css │ │ │ │ ├── spinner.css │ │ │ │ ├── layout.css │ │ │ │ ├── slider.css │ │ │ │ ├── textbox.css │ │ │ │ ├── searchbox.css │ │ │ │ ├── datalist.css │ │ │ │ ├── menubutton.css │ │ │ │ ├── tooltip.css │ │ │ │ ├── window.css │ │ │ │ ├── menu.css │ │ │ │ ├── panel.css │ │ │ │ ├── tree.css │ │ │ │ └── calendar.css │ │ │ ├── locale │ │ │ │ └── easyui-lang-zh_CN.js │ │ │ ├── color.css │ │ │ └── icon.css │ │ │ ├── css │ │ │ ├── demo.css │ │ │ └── default.css │ │ │ └── js │ │ │ ├── outlook2.js │ │ │ └── validateExtends.js │ ├── mapper │ │ ├── AdminMapper.xml │ │ ├── ClazzMapper.xml │ │ ├── AttendanceMapper.xml │ │ ├── LeaveMapper.xml │ │ ├── TeacherMapper.xml │ │ ├── CourseMapper.xml │ │ ├── SelectedCourse.xml │ │ └── StudentMapper.xml │ ├── application.yml │ └── templates │ │ ├── system │ │ └── welcome.html │ │ └── login.html │ └── java │ └── com │ └── weizujie │ └── attendance │ ├── mapper │ ├── AdminMapper.java │ ├── ClazzMapper.java │ ├── TeacherMapper.java │ ├── AttendanceMapper.java │ ├── CourseMapper.java │ ├── LeaveMapper.java │ ├── StudentMapper.java │ └── SelectedCourseMapper.java │ ├── utils │ ├── Data.java │ ├── DateFormatUtil.java │ ├── R.java │ └── PageBean.java │ ├── dto │ └── LoginDTO.java │ ├── constants │ └── UserConstant.java │ ├── service │ ├── ClazzService.java │ ├── LeaveService.java │ ├── AdminService.java │ ├── CourseService.java │ ├── TeacherService.java │ ├── AttendanceService.java │ ├── SelectedCourseService.java │ ├── StudentService.java │ └── Impl │ │ ├── AdminServiceImpl.java │ │ ├── LeaveServiceImpl.java │ │ ├── CourseServiceImpl.java │ │ ├── ClazzServiceImpl.java │ │ ├── TeacherServiceImpl.java │ │ ├── StudentServiceImpl.java │ │ ├── AttendanceServiceImpl.java │ │ └── SelectedCourseServiceImpl.java │ ├── Application.java │ ├── entity │ ├── Clazz.java │ ├── SelectedCourse.java │ ├── Admin.java │ ├── Attendance.java │ ├── Course.java │ ├── Teacher.java │ ├── Student.java │ └── Leave.java │ ├── config │ └── MyWebMvcConfig.java │ ├── job │ └── DeleteAttendanceJob.java │ ├── interceptors │ └── LoginInterceptor.java │ └── controller │ ├── CourseController.java │ ├── ClazzController.java │ ├── LeaveController.java │ ├── SelectedCourseController.java │ ├── TeacherController.java │ └── StudentController.java ├── README.md ├── doc └── cron表达式范例.md ├── .github └── workflows │ └── maven.yml ├── .gitignore └── pom.xml /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/18109.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/18109.jpg -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/Thumbs.db -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/gq/cn.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/gq/cn.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/gq/gj.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/gq/gj.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/gq/us.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/gq/us.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/totop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/totop.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/user.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/gq/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/gq/Thumbs.db -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/icon-add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/icon-add.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/icon_jt2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/icon_jt2.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/sort_asc.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/aero.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/aero.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/blue.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/grey.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/pink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/pink.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/red.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/cut.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/cut.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/man.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/man.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/no.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/ok.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/set.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/set.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/sum.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/sum.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/tip.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/acrossTab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/acrossTab.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/backgroup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/backgroup.jpg -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/hamburger.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/hamburger.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/loading_072.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/loading_072.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/sort_both.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/sort_desc.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/Thumbs.db -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/aero@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/aero@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/blue@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/blue@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/green.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/grey@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/grey@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/minimal.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/orange.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/pink@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/pink@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/purple.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/red@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/red@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/yellow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/yellow.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/skin/default/Thumbs.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/skin/default/Thumbs.db -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/back.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/blank.gif -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/clear.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/find.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/find.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/help.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/house.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/house.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/lock.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/more.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/more.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/note.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/print.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/print.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/redo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/redo.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/undo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/undo.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/world.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/world.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/acrossTab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/acrossTab-bg.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/icon_error_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/icon_error_s.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/icon_right_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/icon_right_s.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/green@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/green@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/orange@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/orange@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/purple@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/purple@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/yellow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/yellow@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/validatebox.css: -------------------------------------------------------------------------------- 1 | .validatebox-invalid { 2 | border-color: #ffa8a8; 3 | background-color: #fff3f3; 4 | color: #000; 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/book_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/book_add.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/cancel.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/door_out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/door_out.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/edit_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/edit_add.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/filesave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/filesave.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/filter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/filter.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/mini_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/mini_add.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/pencil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/pencil.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/reload.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/search.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/user_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/user_add.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/user_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/user_red.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/zoom_in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/zoom_in.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/acrossTab-2bak.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/acrossTab-2bak.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/acrossTab-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/acrossTab-close.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/admin-login-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/admin-login-bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/hamburger-retina.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/hamburger-retina.gif -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/icon_warning_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/icon_warning_s.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/minimal@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/icheck/minimal@2x.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/skin/default/acrossTab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/skin/default/acrossTab.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/skin/default/icon_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/skin/default/icon_arrow.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/chart_bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/chart_bar.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/folder_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/folder_up.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/mini_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/mini_edit.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/pencil_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/pencil_add.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/user_gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/user_gray.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/vcard_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/vcard_edit.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/world_add.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/world_add.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/images/admin-loginform-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/images/admin-loginform-bg.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/skin/default/acrossTab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/skin/default/acrossTab-bg.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/2012080412263.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/2012080412263.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/basket_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/basket_remove.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/book_previous.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/book_previous.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/edit_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/edit_remove.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/large_chart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/large_chart.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/large_clipart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/large_clipart.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/large_picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/large_picture.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/large_shapes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/large_shapes.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/mini_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/mini_refresh.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/world_night.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/world_night.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/blank.gif -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/asterisk_orange.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/asterisk_orange.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/book_open_mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/book_open_mark.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/large_smartart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/large_smartart.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/loading.gif -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/text_list_bullets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/text_list_bullets.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icons/text_list_numbers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/icons/text_list_numbers.png -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/h-ui/lib/Hui-iconfont/1.0.1/iconfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/combo_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/combo_arrow.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/menu_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/menu_arrows.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/panel_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/panel_tools.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/tabs_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/tabs_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/tree_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/tree_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/datagrid_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/datagrid_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/datebox_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/datebox_arrow.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/layout_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/layout_arrows.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/linkbutton_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/linkbutton_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/messager_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/messager_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/slider_handle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/slider_handle.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/spinner_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/spinner_arrows.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/accordion_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/accordion_arrows.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/calendar_arrows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/calendar_arrows.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/pagination_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/pagination_icons.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/searchbox_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/searchbox_button.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/images/validatebox_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weizujie/attendance-system/HEAD/src/main/resources/static/easyui/themes/default/images/validatebox_warning.png -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/numberbox.css: -------------------------------------------------------------------------------- 1 | .numberbox { 2 | border: 1px solid #95B8E7; 3 | margin: 0; 4 | padding: 0 2px; 5 | vertical-align: middle; 6 | } 7 | .textbox { 8 | padding: 0; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AdminMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 学生考勤系统 2 | 3 | ## 简介: 4 | 5 | - 毕设:《基于Java的学生考勤系统》 6 | 7 | ## 开发环境 8 | 9 | - SpringBoot 10 | - MyBatis-Plus 11 | - MySQL 8.0 12 | - Maven 13 | - Shiro 14 | 15 | ## 说明 16 | 17 | - main 分支:包含完整功能,技术栈SpringBoot+Mybatis-Plus 18 | - develop 分支:基于 main 分支开发 19 | - shiro 分支:使用 shiro 重构 20 | -------------------------------------------------------------------------------- /doc/cron表达式范例.md: -------------------------------------------------------------------------------- 1 | # Cron表达式范例 2 | 3 | > 每隔5秒执行一次:*/5 * * * * ? 4 | > 5 | >每隔1分钟执行一次:0 */1 * * * ? 6 | > 7 | >每天23点执行一次:0 0 23 * * ? 8 | > 9 | >每天凌晨1点执行一次:0 0 1 * * ? 10 | > 11 | >每月1号凌晨1点执行一次:0 0 1 1 * ? 12 | > 13 | >每月最后一天23点执行一次:0 0 23 L * ? 14 | > 15 | >每周星期天凌晨1点实行一次:0 0 1 ? * L 16 | > 17 | >在26分、29分、33分执行一次:0 26,29,33 * * * ? 18 | > 19 | >每天的0点、13点、18点、21点都执行一次:0 0 0,13,18,21 * * ? -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Admin; 5 | import org.springframework.stereotype.Repository; 6 | 7 | /** 8 | * @author weizujie 9 | */ 10 | public interface AdminMapper extends BaseMapper { 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/splitbutton.css: -------------------------------------------------------------------------------- 1 | .s-btn:hover .m-btn-line, 2 | .s-btn-active .m-btn-line, 3 | .s-btn-plain-active .m-btn-line { 4 | display: inline-block; 5 | } 6 | .l-btn:hover .s-btn-downarrow, 7 | .s-btn-active .s-btn-downarrow, 8 | .s-btn-plain-active .s-btn-downarrow { 9 | border-style: solid; 10 | border-color: #aac5e7; 11 | border-width: 0 0 0 1px; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/utils/Data.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.utils; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author weizujie 7 | */ 8 | public class Data { 9 | private List ids ; 10 | 11 | public List getIds() { 12 | return ids; 13 | } 14 | 15 | public void setIds(List ids) { 16 | this.ids = ids; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/css/demo.css: -------------------------------------------------------------------------------- 1 | *{ 2 | font-size:12px; 3 | } 4 | body { 5 | font-family:verdana,helvetica,arial,sans-serif; 6 | padding:20px; 7 | font-size:12px; 8 | margin:0; 9 | } 10 | h2 { 11 | font-size:18px; 12 | font-weight:bold; 13 | margin:0; 14 | margin-bottom:15px; 15 | } 16 | .demo-info{ 17 | padding:0 0 12px 0; 18 | } 19 | .demo-tip{ 20 | display:none; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/filebox.css: -------------------------------------------------------------------------------- 1 | .filebox .textbox-value { 2 | vertical-align: top; 3 | position: absolute; 4 | top: 0; 5 | left: -5000px; 6 | } 7 | .filebox-label { 8 | display: inline-block; 9 | position: absolute; 10 | width: 100%; 11 | height: 100%; 12 | cursor: pointer; 13 | left: 0; 14 | top: 0; 15 | z-index: 10; 16 | } 17 | .l-btn-disabled .filebox-label { 18 | cursor: default; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/ClazzMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Clazz; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface ClazzMapper extends BaseMapper { 10 | List queryList(Map paramMap); 11 | 12 | Integer queryCount(Map paramMap); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/dto/LoginDTO.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.dto; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * 用户登录参数 7 | * @author weizujie 8 | */ 9 | @Data 10 | public class LoginDTO { 11 | 12 | /** 13 | * 用户名 14 | */ 15 | private String username; 16 | 17 | /** 18 | * 密码 19 | */ 20 | private String password; 21 | 22 | /** 23 | * 用户类型 24 | */ 25 | private String type; 26 | 27 | } 28 | 29 | -------------------------------------------------------------------------------- /src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 1000 3 | 4 | spring: 5 | datasource: 6 | driver-class-name: com.mysql.cj.jdbc.Driver 7 | url: jdbc:mysql://127.0.0.1:3306/attendance_system?setUnicode=true&characterEncoding=utf8&useAffectedRows=true&serverTimezone=Asia/Shanghai 8 | username: root 9 | password: toor 10 | 11 | mybatis-plus: 12 | mapper-locations: classpath:mapper/*.xml 13 | configuration: 14 | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl 15 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/constants/UserConstant.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.constants; 2 | 3 | /** 4 | * 用户相关常量 5 | * @author weizujie 6 | */ 7 | public interface UserConstant { 8 | 9 | String ADMIN = "admin"; 10 | 11 | String STUDENT = "student"; 12 | 13 | String TEACHER = "teacher"; 14 | 15 | String USER_TYPE = "usertype"; 16 | 17 | String ADMIN_CODE = "1"; 18 | 19 | String STUDENT_CODE = "2"; 20 | 21 | String TEACHER_CODE = "3"; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/ClazzService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.entity.Clazz; 4 | import com.weizujie.attendance.utils.PageBean; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface ClazzService { 10 | 11 | PageBean queryPage(Map paramMap); 12 | 13 | int deleteClazz(List ids); 14 | 15 | int editClazz(Clazz clazz); 16 | 17 | int add(Clazz clazz); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/LeaveService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.entity.Leave; 4 | import com.weizujie.attendance.utils.PageBean; 5 | 6 | import java.util.Map; 7 | 8 | public interface LeaveService { 9 | PageBean queryPage(Map paramMap); 10 | 11 | int addLeave(Leave leave); 12 | 13 | int editLeave(Leave leave); 14 | 15 | int checkLeave(Leave leave); 16 | 17 | int deleteLeave(Integer id); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/TeacherMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Teacher; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface TeacherMapper extends BaseMapper { 10 | List queryList(Map paramMap); 11 | 12 | Integer queryCount(Map paramMap); 13 | 14 | int editTeacher(Teacher teacher); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/Application.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance; 2 | 3 | import org.mybatis.spring.annotation.MapperScan; 4 | import org.springframework.boot.SpringApplication; 5 | import org.springframework.boot.autoconfigure.SpringBootApplication; 6 | 7 | /** 8 | * @author weizujie 9 | */ 10 | @SpringBootApplication 11 | @MapperScan("com.weizujie.attendance.mapper") 12 | public class Application { 13 | public static void main(String[] args) { 14 | SpringApplication.run(Application.class, args); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/combobox.css: -------------------------------------------------------------------------------- 1 | .combobox-item, 2 | .combobox-group { 3 | font-size: 12px; 4 | padding: 3px; 5 | padding-right: 0px; 6 | } 7 | .combobox-item-disabled { 8 | opacity: 0.5; 9 | filter: alpha(opacity=50); 10 | } 11 | .combobox-gitem { 12 | padding-left: 10px; 13 | } 14 | .combobox-group { 15 | font-weight: bold; 16 | } 17 | .combobox-item-hover { 18 | background-color: #eaf2ff; 19 | color: #000000; 20 | } 21 | .combobox-item-selected { 22 | background-color: #ffe48d; 23 | color: #000000; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.dto.LoginDTO; 4 | import com.weizujie.attendance.entity.Admin; 5 | 6 | /** 7 | * @author weizujie 8 | */ 9 | public interface AdminService { 10 | 11 | /** 12 | * 管理员登录 13 | * @param loginDTO 登录参数 14 | * @return 管理员信息 15 | */ 16 | Admin login(LoginDTO loginDTO); 17 | 18 | /** 19 | * 修改密码 20 | * @param admin 修改参数 21 | * @return 影响条数 22 | */ 23 | int editPswdByAdmin(Admin admin); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/CourseService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.entity.Course; 4 | import com.weizujie.attendance.utils.PageBean; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface CourseService { 10 | PageBean queryPage(Map paramMap); 11 | 12 | int addCourse(Course course); 13 | 14 | int editCourse(Course course); 15 | 16 | int deleteCourse(List ids); 17 | 18 | List getCourseById(List ids); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/AttendanceMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Attendance; 5 | import org.apache.ibatis.annotations.Param; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public interface AttendanceMapper extends BaseMapper { 11 | 12 | List queryList(Map paramMap); 13 | 14 | int queryCount(Map paramMap); 15 | 16 | int reissue(@Param("attendanceId") Integer id); 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/maven.yml: -------------------------------------------------------------------------------- 1 | # This workflow will build a Java project with Maven 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven 3 | 4 | name: Java CI with Maven 5 | 6 | on: 7 | push: 8 | branches: [ main ] 9 | 10 | jobs: 11 | build: 12 | 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - uses: actions/checkout@v1 17 | - name: Set up JDK 1.8 18 | uses: actions/setup-java@v1 19 | with: 20 | java-version: 1.8 21 | - name: Build with Maven 22 | run: mvn package --file pom.xml 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Example user template template 3 | ### Example user template 4 | 5 | # IntelliJ project files 6 | .idea 7 | *.iml 8 | out 9 | gen 10 | target 11 | ### Java template 12 | # Compiled class file 13 | *.class 14 | 15 | # Log file 16 | *.log 17 | 18 | # BlueJ files 19 | *.ctxt 20 | 21 | # Mobile Tools for Java (J2ME) 22 | .mtj.tmp/ 23 | 24 | # Package Files # 25 | *.jar 26 | *.war 27 | *.nar 28 | *.ear 29 | *.zip 30 | *.tar.gz 31 | *.rar 32 | 33 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 34 | hs_err_pid* 35 | 36 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/CourseMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Course; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface CourseMapper extends BaseMapper { 10 | List queryList(Map paramMap); 11 | 12 | Integer queryCount(Map paramMap); 13 | 14 | int addStudentNum(Integer courseId); 15 | 16 | void deleteStudentNum(Integer courseId); 17 | 18 | List getCourseById(List ids); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/LeaveMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Leave; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface LeaveMapper extends BaseMapper { 10 | List queryList(Map paramMap); 11 | 12 | Integer queryCount(Map paramMap); 13 | 14 | int addLeave(Leave leave); 15 | 16 | int editLeave(Leave leave); 17 | 18 | int checkLeave(Leave leave); 19 | 20 | int deleteLeave(Integer id); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/templates/system/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | Document 9 | 10 | 11 | 12 |
13 |
14 |

学生考勤系统

15 |

作者:17990425-韦祖杰-电信

16 |
17 |
18 | 19 | 20 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/TeacherService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.dto.LoginDTO; 4 | import com.weizujie.attendance.entity.Teacher; 5 | import com.weizujie.attendance.utils.PageBean; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public interface TeacherService { 11 | PageBean queryPage(Map paramMap); 12 | 13 | int deleteTeacher(List ids); 14 | 15 | int addTeacher(Teacher teacher); 16 | 17 | int editTeacher(Teacher teacher); 18 | 19 | Teacher login(LoginDTO loginDTO); 20 | 21 | int editPswdByTeacher(Teacher teacher); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Clazz.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import lombok.Data; 7 | 8 | /** 9 | * @author weizujie 10 | */ 11 | @Data 12 | @TableName("s_clazz") 13 | public class Clazz { 14 | 15 | /** 16 | * 专业 id 自增 17 | */ 18 | @TableId(value = "id", type = IdType.AUTO) 19 | private Integer id; 20 | 21 | /** 22 | * 专业名称 23 | */ 24 | private String name; 25 | 26 | /** 27 | * 专业介绍 28 | */ 29 | private String info; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/AttendanceService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.entity.Attendance; 4 | import com.weizujie.attendance.utils.PageBean; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | /** 10 | * @author weizujie 11 | */ 12 | public interface AttendanceService { 13 | PageBean queryPage(Map paramMap); 14 | 15 | boolean checkAttendance(Attendance attendance); 16 | 17 | int addAttendance(Attendance attendance); 18 | 19 | int reissue(Integer id); 20 | 21 | List selectList(); 22 | 23 | int deleteList(List attendanceList); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/SelectedCourse.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import lombok.Data; 7 | 8 | /** 9 | * @author weizujie 10 | */ 11 | @Data 12 | @TableName("s_selected_course") 13 | public class SelectedCourse { 14 | 15 | /** 16 | * 选课 id 自增 17 | */ 18 | @TableId(value = "id", type = IdType.AUTO) 19 | private Integer id; 20 | 21 | /** 22 | * 学生 id 23 | */ 24 | private Integer studentId; 25 | 26 | /** 27 | * 课程 id 28 | */ 29 | private Integer courseId; 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/dialog.css: -------------------------------------------------------------------------------- 1 | .dialog-content { 2 | overflow: auto; 3 | } 4 | .dialog-toolbar { 5 | padding: 2px 5px; 6 | } 7 | .dialog-tool-separator { 8 | float: left; 9 | height: 24px; 10 | border-left: 1px solid #ccc; 11 | border-right: 1px solid #fff; 12 | margin: 2px 1px; 13 | } 14 | .dialog-button { 15 | padding: 5px; 16 | text-align: right; 17 | } 18 | .dialog-button .l-btn { 19 | margin-left: 5px; 20 | } 21 | .dialog-toolbar, 22 | .dialog-button { 23 | background: #F4F4F4; 24 | border-width: 1px; 25 | border-style: solid; 26 | } 27 | .dialog-toolbar { 28 | border-color: #95B8E7 #95B8E7 #dddddd #95B8E7; 29 | } 30 | .dialog-button { 31 | border-color: #dddddd #95B8E7 #95B8E7 #95B8E7; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/SelectedCourseService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.entity.Course; 4 | import com.weizujie.attendance.entity.SelectedCourse; 5 | import com.weizujie.attendance.utils.PageBean; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public interface SelectedCourseService { 11 | PageBean queryPage(Map paramMap); 12 | 13 | int addSelectedCourse(SelectedCourse selectedCourse); 14 | 15 | int deleteSelectedCourse(Integer id); 16 | 17 | boolean isStudentId(Integer studentId); 18 | 19 | List getAllBySid(Integer studentId); 20 | 21 | Course getCourseDetail(Integer studentId, Integer courseId); 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/StudentService.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service; 2 | 3 | import com.weizujie.attendance.dto.LoginDTO; 4 | import com.weizujie.attendance.entity.Student; 5 | import com.weizujie.attendance.utils.PageBean; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | public interface StudentService { 11 | PageBean queryPage(Map paramMap); 12 | 13 | int deleteStudent(List ids); 14 | 15 | int addStudent(Student student); 16 | 17 | int editStudent(Student student); 18 | 19 | Student login(LoginDTO loginDTO); 20 | 21 | boolean isStudentByClazzId(Integer next); 22 | 23 | int editPswdByStudent(Student student); 24 | 25 | int updateById(Student student); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/datebox.css: -------------------------------------------------------------------------------- 1 | .datebox-calendar-inner { 2 | height: 180px; 3 | } 4 | .datebox-button { 5 | height: 18px; 6 | padding: 2px 5px; 7 | text-align: center; 8 | } 9 | .datebox-button a { 10 | font-size: 12px; 11 | font-weight: bold; 12 | text-decoration: none; 13 | opacity: 0.6; 14 | filter: alpha(opacity=60); 15 | } 16 | .datebox-button a:hover { 17 | opacity: 1.0; 18 | filter: alpha(opacity=100); 19 | } 20 | .datebox-current, 21 | .datebox-close { 22 | float: left; 23 | } 24 | .datebox-close { 25 | float: right; 26 | } 27 | .datebox .combo-arrow { 28 | background-image: url('images/datebox_arrow.png'); 29 | background-position: center center; 30 | } 31 | .datebox-button { 32 | background-color: #F4F4F4; 33 | } 34 | .datebox-button a { 35 | color: #444; 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/utils/DateFormatUtil.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.utils; 2 | 3 | import com.sun.org.apache.bcel.internal.generic.NEW; 4 | 5 | import java.text.ParsePosition; 6 | import java.text.SimpleDateFormat; 7 | import java.util.Calendar; 8 | import java.util.Date; 9 | 10 | 11 | /** 12 | * @author weizujie 13 | */ 14 | public class DateFormatUtil { 15 | 16 | public static String getFormatDate(Date date, String format) { 17 | SimpleDateFormat sdf = new SimpleDateFormat(format); 18 | return sdf.format(date); 19 | } 20 | 21 | public static Date strToDate(String strDate) { 22 | SimpleDateFormat format = new SimpleDateFormat("HH:mm"); 23 | ParsePosition parsePosition = new ParsePosition(0); 24 | return format.parse(strDate, parsePosition); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/progressbar.css: -------------------------------------------------------------------------------- 1 | .progressbar { 2 | border-width: 1px; 3 | border-style: solid; 4 | -moz-border-radius: 5px 5px 5px 5px; 5 | -webkit-border-radius: 5px 5px 5px 5px; 6 | border-radius: 5px 5px 5px 5px; 7 | overflow: hidden; 8 | position: relative; 9 | } 10 | .progressbar-text { 11 | text-align: center; 12 | position: absolute; 13 | } 14 | .progressbar-value { 15 | position: relative; 16 | overflow: hidden; 17 | width: 0; 18 | -moz-border-radius: 5px 0 0 5px; 19 | -webkit-border-radius: 5px 0 0 5px; 20 | border-radius: 5px 0 0 5px; 21 | } 22 | .progressbar { 23 | border-color: #95B8E7; 24 | } 25 | .progressbar-text { 26 | color: #000000; 27 | font-size: 12px; 28 | } 29 | .progressbar-value .progressbar-text { 30 | background-color: #ffe48d; 31 | color: #000000; 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Admin.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fasterxml.jackson.annotation.JsonFormat; 7 | import lombok.Data; 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Data 16 | @TableName("s_admin") 17 | public class Admin { 18 | 19 | /** 20 | * 管理员 id 自增 21 | */ 22 | @TableId(value = "id", type = IdType.AUTO) 23 | private Integer id; 24 | 25 | /** 26 | * 用户名 27 | */ 28 | private String username; 29 | 30 | /** 31 | * 密码 32 | */ 33 | private String password; 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/StudentMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Student; 5 | 6 | import java.util.List; 7 | import java.util.Map; 8 | 9 | public interface StudentMapper extends BaseMapper { 10 | List queryList(Map paramMap); 11 | 12 | Integer queryCount(Map paramMap); 13 | 14 | int deleteStudent(List ids); 15 | 16 | int addStudent(Student student); 17 | 18 | Student findById(Integer sid); 19 | 20 | int editStudent(Student student); 21 | 22 | Student findByStudent(Student student); 23 | 24 | List isStudentByClazzId(Integer id); 25 | 26 | int editPswdByStudent(Student student); 27 | 28 | int findByName(String name); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/propertygrid.css: -------------------------------------------------------------------------------- 1 | .propertygrid .datagrid-view1 .datagrid-body td { 2 | padding-bottom: 1px; 3 | border-width: 0 1px 0 0; 4 | } 5 | .propertygrid .datagrid-group { 6 | height: 21px; 7 | overflow: hidden; 8 | border-width: 0 0 1px 0; 9 | border-style: solid; 10 | } 11 | .propertygrid .datagrid-group span { 12 | font-weight: bold; 13 | } 14 | .propertygrid .datagrid-view1 .datagrid-body td { 15 | border-color: #dddddd; 16 | } 17 | .propertygrid .datagrid-view1 .datagrid-group { 18 | border-color: #E0ECFF; 19 | } 20 | .propertygrid .datagrid-view2 .datagrid-group { 21 | border-color: #dddddd; 22 | } 23 | .propertygrid .datagrid-group, 24 | .propertygrid .datagrid-view1 .datagrid-body, 25 | .propertygrid .datagrid-view1 .datagrid-row-over, 26 | .propertygrid .datagrid-view1 .datagrid-row-selected { 27 | background: #E0ECFF; 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/messager.css: -------------------------------------------------------------------------------- 1 | .messager-body { 2 | padding: 10px; 3 | overflow: hidden; 4 | } 5 | .messager-button { 6 | text-align: center; 7 | padding-top: 10px; 8 | } 9 | .messager-button .l-btn { 10 | width: 70px; 11 | } 12 | .messager-icon { 13 | float: left; 14 | width: 32px; 15 | height: 32px; 16 | margin: 0 10px 10px 0; 17 | } 18 | .messager-error { 19 | background: url('images/messager_icons.png') no-repeat scroll -64px 0; 20 | } 21 | .messager-info { 22 | background: url('images/messager_icons.png') no-repeat scroll 0 0; 23 | } 24 | .messager-question { 25 | background: url('images/messager_icons.png') no-repeat scroll -32px 0; 26 | } 27 | .messager-warning { 28 | background: url('images/messager_icons.png') no-repeat scroll -96px 0; 29 | } 30 | .messager-progress { 31 | padding: 10px; 32 | } 33 | .messager-p-msg { 34 | margin-bottom: 5px; 35 | } 36 | .messager-body .messager-input { 37 | width: 100%; 38 | padding: 1px 0; 39 | border: 1px solid #95B8E7; 40 | } 41 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ClazzMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 19 | 20 | 26 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/accordion.css: -------------------------------------------------------------------------------- 1 | .accordion { 2 | overflow: hidden; 3 | border-width: 1px; 4 | border-style: solid; 5 | } 6 | .accordion .accordion-header { 7 | border-width: 0 0 1px; 8 | cursor: pointer; 9 | } 10 | .accordion .accordion-body { 11 | border-width: 0 0 1px; 12 | } 13 | .accordion-noborder { 14 | border-width: 0; 15 | } 16 | .accordion-noborder .accordion-header { 17 | border-width: 0 0 1px; 18 | } 19 | .accordion-noborder .accordion-body { 20 | border-width: 0 0 1px; 21 | } 22 | .accordion-collapse { 23 | background: url('images/accordion_arrows.png') no-repeat 0 0; 24 | } 25 | .accordion-expand { 26 | background: url('images/accordion_arrows.png') no-repeat -16px 0; 27 | } 28 | .accordion { 29 | background: #ffffff; 30 | border-color: #95B8E7; 31 | } 32 | .accordion .accordion-header { 33 | background: #E0ECFF; 34 | filter: none; 35 | } 36 | .accordion .accordion-header-selected { 37 | background: #ffe48d; 38 | } 39 | .accordion .accordion-header-selected .panel-title { 40 | color: #000000; 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/mapper/SelectedCourseMapper.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.mapper; 2 | 3 | import com.baomidou.mybatisplus.core.mapper.BaseMapper; 4 | import com.weizujie.attendance.entity.Course; 5 | import com.weizujie.attendance.entity.SelectedCourse; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public interface SelectedCourseMapper extends BaseMapper { 12 | List queryList(Map paramMap); 13 | 14 | int queryCount(Map paramMap); 15 | 16 | int addSelectedCourse(SelectedCourse selectedCourse); 17 | 18 | SelectedCourse findBySelectedCourse(SelectedCourse selectedCourse); 19 | 20 | SelectedCourse findById(Integer id); 21 | 22 | int deleteSelectedCourse(Integer id); 23 | 24 | List isStudentId(Integer id); 25 | 26 | List getAllBySid(Integer studentid); 27 | 28 | Course getCourseDetail(@Param("studentId") Integer studentId, @Param("courseId") Integer courseId); 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Attendance.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.*; 4 | import com.fasterxml.jackson.annotation.JsonFormat; 5 | import lombok.Data; 6 | import org.springframework.format.annotation.DateTimeFormat; 7 | 8 | import java.util.Date; 9 | 10 | /** 11 | * @author weizujie 12 | */ 13 | @Data 14 | @TableName("s_attendance") 15 | public class Attendance { 16 | 17 | /** 18 | * 签到 id 自增 19 | */ 20 | @TableId(value = "id", type = IdType.AUTO) 21 | private Integer id; 22 | 23 | /** 24 | * 课程 id 25 | */ 26 | private Integer courseId; 27 | 28 | /** 29 | * 学生 id 30 | */ 31 | private Integer studentId; 32 | 33 | /** 34 | * 签到类型:正常/迟到/补签 35 | */ 36 | private String type = "正常"; 37 | 38 | /** 39 | * 签到时间 40 | */ 41 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 42 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 43 | private Date date; 44 | 45 | /** 46 | * 逻辑删除 47 | */ 48 | @TableLogic 49 | private Integer isDeleted; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Course.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fasterxml.jackson.annotation.JsonFormat; 7 | import lombok.Data; 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import java.sql.Time; 11 | import java.util.Date; 12 | 13 | /** 14 | * @author weizujie 15 | */ 16 | @Data 17 | @TableName("s_course") 18 | public class Course { 19 | 20 | /** 21 | * 课程 id 自增 22 | */ 23 | @TableId(value = "id", type = IdType.AUTO) 24 | private Integer id; 25 | 26 | /** 27 | * 课程名称 28 | */ 29 | private String name; 30 | 31 | /** 32 | * 教师 id 33 | */ 34 | private Integer teacherId; 35 | 36 | /** 37 | * 上课时间 38 | */ 39 | private String courseDate; 40 | 41 | /** 42 | * 已选人数 43 | */ 44 | private Integer selectedNum = 0; 45 | 46 | /** 47 | * 课程最大选课人数 48 | */ 49 | private Integer maxNum = 50; 50 | 51 | /** 52 | * 课程介绍 53 | */ 54 | private String info; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/config/MyWebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.config; 2 | 3 | import com.weizujie.attendance.interceptors.LoginInterceptor; 4 | import org.springframework.stereotype.Component; 5 | import org.springframework.web.servlet.config.annotation.InterceptorRegistry; 6 | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; 7 | import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; 8 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 9 | 10 | /** 11 | * @author weizujie 12 | */ 13 | @Component 14 | public class MyWebMvcConfig implements WebMvcConfigurer { 15 | 16 | @Override 17 | public void addResourceHandlers(ResourceHandlerRegistry registry) { 18 | registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/"); 19 | 20 | } 21 | 22 | @Override 23 | public void addInterceptors(InterceptorRegistry registry) { 24 | LoginInterceptor loginInterceptor = new LoginInterceptor(); 25 | registry.addInterceptor(loginInterceptor) 26 | .addPathPatterns("/**") 27 | .excludePathPatterns("/", "/system/login", "/easyui/**", "/h-ui/**"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Teacher.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fasterxml.jackson.annotation.JsonFormat; 7 | import lombok.Data; 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Data 16 | @TableName("s_teacher") 17 | public class Teacher { 18 | 19 | /** 20 | * 教师 id 自增 21 | */ 22 | @TableId(value = "id", type = IdType.AUTO) 23 | private Integer id; 24 | 25 | /** 26 | * 教师名称 27 | */ 28 | private String username; 29 | 30 | /** 31 | * 密码 32 | */ 33 | private String password; 34 | 35 | /** 36 | * 专业 id 37 | */ 38 | private Integer clazzId; 39 | 40 | /** 41 | * 性别 默认:男 42 | */ 43 | private String sex = "男"; 44 | 45 | /** 46 | * 联系方式 47 | */ 48 | private String mobile; 49 | 50 | /** 51 | * 创建时间 52 | */ 53 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 54 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 55 | private Date createDate; 56 | } 57 | -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/skin/default/skin.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* 默认 黑色 */ 3 | /*全站默认字体颜色*/ 4 | a{color:#333}a:hover,a:focus,.maincolor,.maincolor a{color:#06c} 5 | .Hui-header{ color:#fff}/*头部颜色*/ 6 | .Hui-logo,.Hui-logo-m,.Hui-subtitle,.Hui-userbar{color:#fff}/*logo 及 用户信息文字颜色*/ 7 | .Hui-logo:hover,.Hui-logo-m:hover{color:#fff;text-decoration: none} 8 | 9 | .Hui-header{background-color:#222}/*顶部导航*/ 10 | #Hui-nav > ul > li > a{ color:#fff}/*顶部导航文字颜色*/ 11 | #Hui-nav > ul > li > a:hover,#Hui-nav > ul > li.current > a{ color:#fff}/*导航高亮状态*/ 12 | .Hui-userbar > li > a{ color:#fff} 13 | .Hui-userbar > li > a:hover,.Hui-userbar > li.current > a{ color:#fff}/*用户信息条高亮*/ 14 | .Hui-aside{}/*侧边栏*/ 15 | .Hui-aside .menu_dropdown dt{color:#333}/*左侧二级导航菜单*/ 16 | .Hui-aside .menu_dropdown dt:hover{color:#148cf1} 17 | .Hui-aside .menu_dropdown dt:hover [class^="icon-"]{ color:#7e8795} 18 | .Hui-aside .menu_dropdown li a{color:#666;border-bottom: 1px solid #e5e5e5} 19 | .Hui-aside .menu_dropdown li a:hover{color:#148cf1;background-color:#fafafa} 20 | .Hui-aside .menu_dropdown li.current a,.menu_dropdown li.current a:hover{color:#148cf1} 21 | .Hui-aside .menu_dropdown dt .Hui-iconfont{ color:#a0a7b1} 22 | .Hui-aside .menu_dropdown dt .menu_dropdown-arrow{ color:#b6b7b8} 23 | .dislpayArrow a{background:url(icon_arrow.png) no-repeat 0 0} -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Student.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fasterxml.jackson.annotation.JsonFormat; 7 | import lombok.Data; 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Data 16 | @TableName("s_student") 17 | public class Student { 18 | 19 | /** 20 | * 学生id 21 | */ 22 | @TableId(value = "id", type = IdType.AUTO) 23 | private Integer id; 24 | 25 | /** 26 | * 学号 27 | */ 28 | private Integer username; 29 | 30 | /** 31 | * 密码 32 | */ 33 | private String password; 34 | 35 | /** 36 | * 姓名 37 | */ 38 | private String nickName; 39 | 40 | /** 41 | * 专业 id 42 | */ 43 | private Integer clazzId; 44 | 45 | /** 46 | * 性别 默认:男 47 | */ 48 | private String sex = "男"; 49 | 50 | /** 51 | * 联系方式 52 | */ 53 | private String mobile; 54 | 55 | /** 56 | * 创建时间 57 | */ 58 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 59 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 60 | private Date createDate; 61 | } 62 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/combo.css: -------------------------------------------------------------------------------- 1 | .combo { 2 | display: inline-block; 3 | white-space: nowrap; 4 | margin: 0; 5 | padding: 0; 6 | border-width: 1px; 7 | border-style: solid; 8 | overflow: hidden; 9 | vertical-align: middle; 10 | } 11 | .combo .combo-text { 12 | font-size: 12px; 13 | border: 0px; 14 | margin: 0; 15 | padding: 0px 2px; 16 | vertical-align: baseline; 17 | } 18 | .combo-arrow { 19 | width: 18px; 20 | height: 20px; 21 | overflow: hidden; 22 | display: inline-block; 23 | vertical-align: top; 24 | cursor: pointer; 25 | opacity: 0.6; 26 | filter: alpha(opacity=60); 27 | } 28 | .combo-arrow-hover { 29 | opacity: 1.0; 30 | filter: alpha(opacity=100); 31 | } 32 | .combo-panel { 33 | overflow: auto; 34 | } 35 | .combo-arrow { 36 | background: url('images/combo_arrow.png') no-repeat center center; 37 | } 38 | .combo-panel { 39 | background-color: #ffffff; 40 | } 41 | .combo { 42 | border-color: #95B8E7; 43 | background-color: #fff; 44 | } 45 | .combo-arrow { 46 | background-color: #E0ECFF; 47 | } 48 | .combo-arrow-hover { 49 | background-color: #eaf2ff; 50 | } 51 | .combo-arrow:hover { 52 | background-color: #eaf2ff; 53 | } 54 | .combo .textbox-icon-disabled:hover { 55 | cursor: default; 56 | } 57 | .textbox-invalid { 58 | border-color: #ffa8a8; 59 | background-color: #fff3f3; 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/utils/R.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.utils; 2 | 3 | import lombok.Data; 4 | 5 | import java.io.Serializable; 6 | 7 | @Data 8 | public class R implements Serializable { 9 | 10 | private static final long serialVersionUID = 1L; 11 | 12 | private int code; 13 | 14 | private boolean success; 15 | 16 | private String message; 17 | 18 | private T data; 19 | 20 | private R(int code, boolean success, T data, String message) { 21 | this.code = code; 22 | this.data = data; 23 | this.success = success; 24 | this.message = message; 25 | } 26 | 27 | public static R success(int code, boolean success, T data, String message) { 28 | return new R(code, success, data, message); 29 | } 30 | 31 | public static R success() { 32 | return new R(200, true, null, "操作成功"); 33 | } 34 | 35 | public static R success(String message) { 36 | return success(200, true, null, message); 37 | } 38 | 39 | public static R fail() { 40 | return new R(500, false, null, "操作失败"); 41 | } 42 | 43 | public static R fail(String message) { 44 | return new R(500, false, null, message); 45 | } 46 | 47 | public void setSuccess(final boolean success) { 48 | this.success = success; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/job/DeleteAttendanceJob.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.job; 2 | 3 | 4 | import com.weizujie.attendance.entity.Attendance; 5 | import com.weizujie.attendance.service.AttendanceService; 6 | import lombok.extern.slf4j.Slf4j; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.scheduling.annotation.EnableScheduling; 9 | import org.springframework.scheduling.annotation.Scheduled; 10 | import org.springframework.util.CollectionUtils; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * 清空学生考勤的定时任务 16 | * @author weizujie 17 | * EnableScheduling: 开启定时任务注解 18 | */ 19 | @Slf4j 20 | @Configuration 21 | @EnableScheduling 22 | public class DeleteAttendanceJob { 23 | 24 | private final AttendanceService attendanceService; 25 | 26 | public DeleteAttendanceJob(AttendanceService attendanceService) { 27 | this.attendanceService = attendanceService; 28 | } 29 | 30 | /** 31 | * 每周星期天凌晨一点执行一次 32 | */ 33 | @Scheduled(cron = "0 0 1 ? * MON") 34 | private void job() { 35 | log.info("开始执行【清空学生考勤】定时任务"); 36 | // 获取所有学生的考勤 37 | List attendanceList = attendanceService.selectList(); 38 | if (!CollectionUtils.isEmpty(attendanceList)) { 39 | // 删除所有考勤数据 40 | int count = attendanceService.deleteList(attendanceList); 41 | log.info(">>> 删除了 {} 条数据", count); 42 | } 43 | log.info("【清空学生考勤】定时任务结束"); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/entity/Leave.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.entity; 2 | 3 | import com.baomidou.mybatisplus.annotation.IdType; 4 | import com.baomidou.mybatisplus.annotation.TableId; 5 | import com.baomidou.mybatisplus.annotation.TableName; 6 | import com.fasterxml.jackson.annotation.JsonFormat; 7 | import lombok.Data; 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import java.util.Date; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Data 16 | @TableName("s_leave") 17 | public class Leave { 18 | 19 | /** 20 | * 等待审核 21 | */ 22 | public static int LEAVE_STATUS_WAIT = 0; 23 | 24 | /** 25 | * 同意 26 | */ 27 | public static int LEAVE_STATUS_AGREE = 1; 28 | 29 | /** 30 | * 不同意 31 | */ 32 | public static int LEAVE_STATUS_DISAGREE = -1; 33 | 34 | /** 35 | * 请假条 id 自增 36 | */ 37 | @TableId(value = "id", type = IdType.AUTO) 38 | private Integer id; 39 | 40 | /** 41 | * 学生 id 42 | */ 43 | private Integer studentId; 44 | 45 | /** 46 | * 请假理由 47 | */ 48 | private String info; 49 | 50 | /** 51 | * 请假条状态 52 | */ 53 | private Integer status = LEAVE_STATUS_WAIT; 54 | 55 | /** 56 | * 批复内容 57 | */ 58 | private String remark; 59 | 60 | /** 61 | * 请假时间 62 | */ 63 | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") 64 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") 65 | private Date createDate; 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 5 | import com.weizujie.attendance.dto.LoginDTO; 6 | import com.weizujie.attendance.entity.Admin; 7 | import com.weizujie.attendance.mapper.AdminMapper; 8 | import com.weizujie.attendance.service.AdminService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Service 16 | public class AdminServiceImpl implements AdminService { 17 | 18 | private final AdminMapper adminMapper; 19 | 20 | public AdminServiceImpl(AdminMapper adminMapper) { 21 | this.adminMapper = adminMapper; 22 | } 23 | 24 | /** 25 | * 管理员登录 26 | * @param loginDTO 登录参数 27 | * @return 管理员信息 28 | */ 29 | @Override 30 | public Admin login(LoginDTO loginDTO) { 31 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 32 | .eq(Admin::getUsername, loginDTO.getUsername()) 33 | .eq(Admin::getPassword, loginDTO.getPassword()); 34 | return adminMapper.selectOne(wrapper); 35 | } 36 | 37 | /** 38 | * 修改密码 39 | * @param admin 修改参数 40 | * @return 影响条数 41 | */ 42 | @Override 43 | public int editPswdByAdmin(Admin admin) { 44 | return adminMapper.updateById(admin); 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/interceptors/LoginInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.interceptors; 2 | 3 | import com.weizujie.attendance.entity.Admin; 4 | import com.weizujie.attendance.entity.Student; 5 | import com.weizujie.attendance.entity.Teacher; 6 | import com.weizujie.attendance.constants.UserConstant; 7 | import org.springframework.stereotype.Component; 8 | import org.springframework.util.StringUtils; 9 | import org.springframework.web.servlet.HandlerInterceptor; 10 | 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | import java.io.IOException; 14 | import java.util.Objects; 15 | 16 | /** 17 | * 拦截器 18 | * 19 | * @author weizujie 20 | */ 21 | @Component 22 | public class LoginInterceptor implements HandlerInterceptor { 23 | 24 | /** 25 | * 访问某个页面之前,从 session 对象中拿到对应的登录用户信息,若无则跳转到登录页面 26 | */ 27 | @Override 28 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws IOException { 29 | 30 | Admin user = (Admin) request.getSession().getAttribute(UserConstant.ADMIN); 31 | Teacher teacher = (Teacher) request.getSession().getAttribute(UserConstant.TEACHER); 32 | Student student = (Student) request.getSession().getAttribute(UserConstant.STUDENT); 33 | 34 | if (Objects.nonNull(user) || Objects.nonNull(teacher) || Objects.nonNull(student)) { 35 | return true; 36 | } else { 37 | response.sendRedirect(request.getContextPath() + "/system/login"); 38 | return false; 39 | } 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/LeaveServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.weizujie.attendance.entity.Leave; 4 | import com.weizujie.attendance.mapper.LeaveMapper; 5 | import com.weizujie.attendance.service.LeaveService; 6 | import com.weizujie.attendance.utils.PageBean; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | @Service 14 | public class LeaveServiceImpl implements LeaveService { 15 | 16 | @Autowired 17 | private LeaveMapper leaveMapper; 18 | 19 | @Override 20 | public PageBean queryPage(Map paramMap) { 21 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"),(Integer) paramMap.get("pagesize")); 22 | 23 | Integer startIndex = pageBean.getStartIndex(); 24 | paramMap.put("startIndex",startIndex); 25 | List datas = leaveMapper.queryList(paramMap); 26 | pageBean.setDatas(datas); 27 | 28 | Integer totalsize = leaveMapper.queryCount(paramMap); 29 | pageBean.setTotalsize(totalsize); 30 | return pageBean; 31 | } 32 | 33 | @Override 34 | public int addLeave(Leave leave) { 35 | return leaveMapper.addLeave(leave); 36 | } 37 | 38 | @Override 39 | public int editLeave(Leave leave) { 40 | return leaveMapper.editLeave(leave); 41 | } 42 | 43 | @Override 44 | public int checkLeave(Leave leave) { 45 | return leaveMapper.checkLeave(leave); 46 | } 47 | 48 | @Override 49 | public int deleteLeave(Integer id) { 50 | return leaveMapper.deleteLeave(id); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/pagination.css: -------------------------------------------------------------------------------- 1 | .pagination { 2 | zoom: 1; 3 | } 4 | .pagination table { 5 | float: left; 6 | height: 30px; 7 | } 8 | .pagination td { 9 | border: 0; 10 | } 11 | .pagination-btn-separator { 12 | float: left; 13 | height: 24px; 14 | border-left: 1px solid #ccc; 15 | border-right: 1px solid #fff; 16 | margin: 3px 1px; 17 | } 18 | .pagination .pagination-num { 19 | border-width: 1px; 20 | border-style: solid; 21 | margin: 0 2px; 22 | padding: 2px; 23 | width: 2em; 24 | height: auto; 25 | } 26 | .pagination-page-list { 27 | margin: 0px 6px; 28 | padding: 1px 2px; 29 | width: auto; 30 | height: auto; 31 | border-width: 1px; 32 | border-style: solid; 33 | } 34 | .pagination-info { 35 | float: right; 36 | margin: 0 6px 0 0; 37 | padding: 0; 38 | height: 30px; 39 | line-height: 30px; 40 | font-size: 12px; 41 | } 42 | .pagination span { 43 | font-size: 12px; 44 | } 45 | .pagination-link .l-btn-text { 46 | width: 24px; 47 | text-align: center; 48 | margin: 0; 49 | } 50 | .pagination-first { 51 | background: url('images/pagination_icons.png') no-repeat 0 center; 52 | } 53 | .pagination-prev { 54 | background: url('images/pagination_icons.png') no-repeat -16px center; 55 | } 56 | .pagination-next { 57 | background: url('images/pagination_icons.png') no-repeat -32px center; 58 | } 59 | .pagination-last { 60 | background: url('images/pagination_icons.png') no-repeat -48px center; 61 | } 62 | .pagination-load { 63 | background: url('images/pagination_icons.png') no-repeat -64px center; 64 | } 65 | .pagination-loading { 66 | background: url('images/loading.gif') no-repeat center center; 67 | } 68 | .pagination-page-list, 69 | .pagination .pagination-num { 70 | border-color: #95B8E7; 71 | } 72 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/spinner.css: -------------------------------------------------------------------------------- 1 | .spinner { 2 | display: inline-block; 3 | white-space: nowrap; 4 | margin: 0; 5 | padding: 0; 6 | border-width: 1px; 7 | border-style: solid; 8 | overflow: hidden; 9 | vertical-align: middle; 10 | } 11 | .spinner .spinner-text { 12 | font-size: 12px; 13 | border: 0px; 14 | margin: 0; 15 | padding: 0 2px; 16 | vertical-align: baseline; 17 | } 18 | .spinner-arrow { 19 | background-color: #E0ECFF; 20 | display: inline-block; 21 | overflow: hidden; 22 | vertical-align: top; 23 | margin: 0; 24 | padding: 0; 25 | opacity: 1.0; 26 | filter: alpha(opacity=100); 27 | width: 18px; 28 | } 29 | .spinner-arrow-up, 30 | .spinner-arrow-down { 31 | opacity: 0.6; 32 | filter: alpha(opacity=60); 33 | display: block; 34 | font-size: 1px; 35 | width: 18px; 36 | height: 10px; 37 | width: 100%; 38 | height: 50%; 39 | color: #444; 40 | outline-style: none; 41 | } 42 | .spinner-arrow-hover { 43 | background-color: #eaf2ff; 44 | opacity: 1.0; 45 | filter: alpha(opacity=100); 46 | } 47 | .spinner-arrow-up:hover, 48 | .spinner-arrow-down:hover { 49 | opacity: 1.0; 50 | filter: alpha(opacity=100); 51 | background-color: #eaf2ff; 52 | } 53 | .textbox-icon-disabled .spinner-arrow-up:hover, 54 | .textbox-icon-disabled .spinner-arrow-down:hover { 55 | opacity: 0.6; 56 | filter: alpha(opacity=60); 57 | background-color: #E0ECFF; 58 | cursor: default; 59 | } 60 | .spinner .textbox-icon-disabled { 61 | opacity: 0.6; 62 | filter: alpha(opacity=60); 63 | } 64 | .spinner-arrow-up { 65 | background: url('images/spinner_arrows.png') no-repeat 1px center; 66 | } 67 | .spinner-arrow-down { 68 | background: url('images/spinner_arrows.png') no-repeat -15px center; 69 | } 70 | .spinner { 71 | border-color: #95B8E7; 72 | } 73 | -------------------------------------------------------------------------------- /src/main/resources/mapper/AttendanceMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 31 | 32 | 41 | 42 | 43 | update s_attendance set type = '补签' where id = #{attendanceId} 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/CourseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.weizujie.attendance.entity.Course; 4 | import com.weizujie.attendance.mapper.CourseMapper; 5 | import com.weizujie.attendance.service.CourseService; 6 | import com.weizujie.attendance.utils.PageBean; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * @author weizujie 14 | */ 15 | @Service 16 | public class CourseServiceImpl implements CourseService { 17 | 18 | private final CourseMapper courseMapper; 19 | 20 | public CourseServiceImpl(CourseMapper courseMapper) { 21 | this.courseMapper = courseMapper; 22 | } 23 | 24 | @Override 25 | public PageBean queryPage(Map paramMap) { 26 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"), (Integer) paramMap.get("pagesize")); 27 | 28 | Integer startIndex = pageBean.getStartIndex(); 29 | paramMap.put("startIndex", startIndex); 30 | List datas = courseMapper.queryList(paramMap); 31 | pageBean.setDatas(datas); 32 | 33 | Integer totalsize = courseMapper.queryCount(paramMap); 34 | pageBean.setTotalsize(totalsize); 35 | return pageBean; 36 | } 37 | 38 | @Override 39 | public int addCourse(Course course) { 40 | return courseMapper.insert(course); 41 | } 42 | 43 | @Override 44 | public int editCourse(Course course) { 45 | return courseMapper.updateById(course); 46 | } 47 | 48 | @Override 49 | public int deleteCourse(List ids) { 50 | return courseMapper.deleteBatchIds(ids); 51 | } 52 | 53 | @Override 54 | public List getCourseById(List ids) { 55 | return courseMapper.getCourseById(ids); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/css/H-ui.login.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* -----------H-ui前端框架----------------------- 3 | H-ui.login.css v2.2.1 4 | Copyright H-ui Inc. 5 | http://www.H-ui.net 6 | date:2015.6.5 7 | Created & Modified by guojunhui. 8 | ----------------------------------------------*/ 9 | body{font-size:14px} 10 | 11 | .header,.footer{ position:absolute; left:0; right:0; width:100%; z-index:99} 12 | .header{top:0; height:60px; background:#426374; padding: 0;} 13 | 14 | .loginWraper{ position:absolute;width:100%; left:0; top:0; bottom:0; right:0; z-index:1; background:#3283AC url(../images/backgroup.jpg) no-repeat center} 15 | .loginBox{ position:absolute; width:617px; height:330px; background:url(../images/admin-loginform-bg.png) no-repeat; left:50%; top:50%; margin-left:-309px; margin-top:-184px; padding-top:38px} 16 | @media (max-width:617px) { 17 | .loginbox{ width:100%; position:static; margin-top:0; margin-left:0;} 18 | } 19 | .loginBox .row{margin-top:20px;} 20 | .loginBox .row .form-label .Hui-iconfont{ font-size:24px} 21 | .loginBox .input-text{ width:360px} 22 | @media (max-width:617px) { 23 | .loginBox .input-text{ width:80%} 24 | } 25 | .yzm a{ color:#426374; font-size:12px} 26 | 27 | #span_msg{ font-size:14px; color:Red; line-height:40px; height:40px; margin-left:10px; width:160px;; float:left} 28 | 29 | .hd_msg{font-size:12px; color:#fff; height:30px; z-index:100;position: absolute; padding-left:50px; padding-top:5px} 30 | .hd_msg a{ color:#fff} 31 | .hd_msg a:hover{ color:#fff; text-decoration:underline} 32 | 33 | .footer{ height:46px; line-height:46px; bottom:0; text-align:center; color:#fff; font-size:12px; background-color:#426374} 34 | 35 | #ie6-warning{background:#fff url(/jscss/demoimg/201006/warning.gif) no-repeat 3px center;position:absolute;top:0;left:0;font-size:12px;color:#333;width:97%;padding: 2px 15px 2px 23px;text-align:left} 36 | #ie6-warning a {text-decoration:none} -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/ClazzServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.weizujie.attendance.entity.Clazz; 4 | import com.weizujie.attendance.mapper.ClazzMapper; 5 | import com.weizujie.attendance.service.ClazzService; 6 | import com.weizujie.attendance.utils.PageBean; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import java.util.List; 12 | import java.util.Map; 13 | 14 | 15 | /** 16 | * @author weizujie 17 | */ 18 | @Service 19 | public class ClazzServiceImpl implements ClazzService { 20 | 21 | private final ClazzMapper clazzMapper; 22 | 23 | public ClazzServiceImpl(ClazzMapper clazzMapper) { 24 | this.clazzMapper = clazzMapper; 25 | } 26 | 27 | @Override 28 | public PageBean queryPage(Map paramMap) { 29 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"),(Integer) paramMap.get("pagesize")); 30 | 31 | Integer startIndex = pageBean.getStartIndex(); 32 | paramMap.put("startIndex",startIndex); 33 | List datas = clazzMapper.queryList(paramMap); 34 | pageBean.setDatas(datas); 35 | 36 | Integer totalsize = clazzMapper.queryCount(paramMap); 37 | pageBean.setTotalsize(totalsize); 38 | return pageBean; 39 | } 40 | 41 | @Override 42 | @Transactional(rollbackFor = Exception.class) 43 | public int deleteClazz(List ids) { 44 | return clazzMapper.deleteBatchIds(ids); 45 | } 46 | 47 | @Override 48 | public int editClazz(Clazz clazz) { 49 | return clazzMapper.updateById(clazz); 50 | } 51 | 52 | @Override 53 | public int add(Clazz clazz) { 54 | return clazzMapper.insert(clazz); 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /src/main/resources/mapper/LeaveMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 21 | 22 | 28 | 29 | 30 | insert into s_leave(student_id,info) 31 | values(#{studentId},#{info}) 32 | 33 | 34 | 35 | delete from s_leave where id = #{id} 36 | 37 | 38 | 39 | update s_leave set student_id = #{studentId},info = #{info} where id = #{id} 40 | 41 | 42 | 43 | update s_leave set student_id = #{studentId},info = #{info},status = #{status},remark = #{remark} where id = #{id} 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/layout.css: -------------------------------------------------------------------------------- 1 | .layout { 2 | position: relative; 3 | overflow: hidden; 4 | margin: 0; 5 | padding: 0; 6 | z-index: 0; 7 | } 8 | .layout-panel { 9 | position: absolute; 10 | overflow: hidden; 11 | } 12 | .layout-panel-east, 13 | .layout-panel-west { 14 | z-index: 2; 15 | } 16 | .layout-panel-north, 17 | .layout-panel-south { 18 | z-index: 3; 19 | } 20 | .layout-expand { 21 | position: absolute; 22 | padding: 0px; 23 | font-size: 1px; 24 | cursor: pointer; 25 | z-index: 1; 26 | } 27 | .layout-expand .panel-header, 28 | .layout-expand .panel-body { 29 | background: transparent; 30 | filter: none; 31 | overflow: hidden; 32 | } 33 | .layout-expand .panel-header { 34 | border-bottom-width: 0px; 35 | } 36 | .layout-split-proxy-h, 37 | .layout-split-proxy-v { 38 | position: absolute; 39 | font-size: 1px; 40 | display: none; 41 | z-index: 5; 42 | } 43 | .layout-split-proxy-h { 44 | width: 5px; 45 | cursor: e-resize; 46 | } 47 | .layout-split-proxy-v { 48 | height: 5px; 49 | cursor: n-resize; 50 | } 51 | .layout-mask { 52 | position: absolute; 53 | background: #fafafa; 54 | filter: alpha(opacity=10); 55 | opacity: 0.10; 56 | z-index: 4; 57 | } 58 | .layout-button-up { 59 | background: url('images/layout_arrows.png') no-repeat -16px -16px; 60 | } 61 | .layout-button-down { 62 | background: url('images/layout_arrows.png') no-repeat -16px 0; 63 | } 64 | .layout-button-left { 65 | background: url('images/layout_arrows.png') no-repeat 0 0; 66 | } 67 | .layout-button-right { 68 | background: url('images/layout_arrows.png') no-repeat 0 -16px; 69 | } 70 | .layout-split-proxy-h, 71 | .layout-split-proxy-v { 72 | background-color: #aac5e7; 73 | } 74 | .layout-split-north { 75 | border-bottom: 5px solid #E6EEF8; 76 | } 77 | .layout-split-south { 78 | border-top: 5px solid #E6EEF8; 79 | } 80 | .layout-split-east { 81 | border-left: 5px solid #E6EEF8; 82 | } 83 | .layout-split-west { 84 | border-right: 5px solid #E6EEF8; 85 | } 86 | .layout-expand { 87 | background-color: #E0ECFF; 88 | } 89 | .layout-expand-over { 90 | background-color: #E0ECFF; 91 | } 92 | -------------------------------------------------------------------------------- /src/main/resources/mapper/TeacherMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 24 | 25 | 33 | 34 | 35 | 36 | update s_teacher 37 | 38 | 39 | username = #{username}, 40 | 41 | 42 | clazz_id = #{clazzId}, 43 | 44 | 45 | sex = #{sex}, 46 | 47 | 48 | mobile = #{mobile}, 49 | 50 | 51 | where id = #{id} 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/slider.css: -------------------------------------------------------------------------------- 1 | .slider-disabled { 2 | opacity: 0.5; 3 | filter: alpha(opacity=50); 4 | } 5 | .slider-h { 6 | height: 22px; 7 | } 8 | .slider-v { 9 | width: 22px; 10 | } 11 | .slider-inner { 12 | position: relative; 13 | height: 6px; 14 | top: 7px; 15 | border-width: 1px; 16 | border-style: solid; 17 | border-radius: 5px; 18 | } 19 | .slider-handle { 20 | position: absolute; 21 | display: block; 22 | outline: none; 23 | width: 20px; 24 | height: 20px; 25 | top: 50%; 26 | margin-top: -10px; 27 | margin-left: -10px; 28 | } 29 | .slider-tip { 30 | position: absolute; 31 | display: inline-block; 32 | line-height: 12px; 33 | font-size: 12px; 34 | white-space: nowrap; 35 | top: -22px; 36 | } 37 | .slider-rule { 38 | position: relative; 39 | top: 15px; 40 | } 41 | .slider-rule span { 42 | position: absolute; 43 | display: inline-block; 44 | font-size: 0; 45 | height: 5px; 46 | border-width: 0 0 0 1px; 47 | border-style: solid; 48 | } 49 | .slider-rulelabel { 50 | position: relative; 51 | top: 20px; 52 | } 53 | .slider-rulelabel span { 54 | position: absolute; 55 | display: inline-block; 56 | font-size: 12px; 57 | } 58 | .slider-v .slider-inner { 59 | width: 6px; 60 | left: 7px; 61 | top: 0; 62 | float: left; 63 | } 64 | .slider-v .slider-handle { 65 | left: 50%; 66 | margin-top: -10px; 67 | } 68 | .slider-v .slider-tip { 69 | left: -10px; 70 | margin-top: -6px; 71 | } 72 | .slider-v .slider-rule { 73 | float: left; 74 | top: 0; 75 | left: 16px; 76 | } 77 | .slider-v .slider-rule span { 78 | width: 5px; 79 | height: 'auto'; 80 | border-left: 0; 81 | border-width: 1px 0 0 0; 82 | border-style: solid; 83 | } 84 | .slider-v .slider-rulelabel { 85 | float: left; 86 | top: 0; 87 | left: 23px; 88 | } 89 | .slider-handle { 90 | background: url('images/slider_handle.png') no-repeat; 91 | } 92 | .slider-inner { 93 | border-color: #95B8E7; 94 | background: #E0ECFF; 95 | } 96 | .slider-rule span { 97 | border-color: #95B8E7; 98 | } 99 | .slider-rulelabel span { 100 | color: #000000; 101 | } 102 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/textbox.css: -------------------------------------------------------------------------------- 1 | .textbox { 2 | position: relative; 3 | border: 1px solid #95B8E7; 4 | background-color: #fff; 5 | vertical-align: middle; 6 | display: inline-block; 7 | overflow: hidden; 8 | white-space: nowrap; 9 | margin: 0; 10 | padding: 0; 11 | -moz-border-radius: 5px 5px 5px 5px; 12 | -webkit-border-radius: 5px 5px 5px 5px; 13 | border-radius: 5px 5px 5px 5px; 14 | } 15 | .textbox .textbox-text { 16 | font-size: 12px; 17 | border: 0; 18 | margin: 0; 19 | padding: 4px; 20 | white-space: normal; 21 | vertical-align: top; 22 | outline-style: none; 23 | resize: none; 24 | -moz-border-radius: 5px 5px 5px 5px; 25 | -webkit-border-radius: 5px 5px 5px 5px; 26 | border-radius: 5px 5px 5px 5px; 27 | } 28 | .textbox .textbox-prompt { 29 | font-size: 12px; 30 | color: #aaa; 31 | } 32 | .textbox .textbox-button, 33 | .textbox .textbox-button:hover { 34 | position: absolute; 35 | top: 0; 36 | padding: 0; 37 | vertical-align: top; 38 | -moz-border-radius: 0 0 0 0; 39 | -webkit-border-radius: 0 0 0 0; 40 | border-radius: 0 0 0 0; 41 | } 42 | .textbox-button-right, 43 | .textbox-button-right:hover { 44 | border-width: 0 0 0 1px; 45 | } 46 | .textbox-button-left, 47 | .textbox-button-left:hover { 48 | border-width: 0 1px 0 0; 49 | } 50 | .textbox-addon { 51 | position: absolute; 52 | top: 0; 53 | } 54 | .textbox-icon { 55 | display: inline-block; 56 | width: 18px; 57 | height: 20px; 58 | overflow: hidden; 59 | vertical-align: top; 60 | background-position: center center; 61 | cursor: pointer; 62 | opacity: 0.6; 63 | filter: alpha(opacity=60); 64 | text-decoration: none; 65 | outline-style: none; 66 | } 67 | .textbox-icon-disabled, 68 | .textbox-icon-readonly { 69 | cursor: default; 70 | } 71 | .textbox-icon:hover { 72 | opacity: 1.0; 73 | filter: alpha(opacity=100); 74 | } 75 | .textbox-icon-disabled:hover { 76 | opacity: 0.6; 77 | filter: alpha(opacity=60); 78 | } 79 | .textbox-focused { 80 | -moz-box-shadow: 0 0 3px 0 #95B8E7; 81 | -webkit-box-shadow: 0 0 3px 0 #95B8E7; 82 | box-shadow: 0 0 3px 0 #95B8E7; 83 | } 84 | .textbox-invalid { 85 | border-color: #ffa8a8; 86 | background-color: #fff3f3; 87 | } 88 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/searchbox.css: -------------------------------------------------------------------------------- 1 | .searchbox { 2 | display: inline-block; 3 | white-space: nowrap; 4 | margin: 0; 5 | padding: 0; 6 | border-width: 1px; 7 | border-style: solid; 8 | overflow: hidden; 9 | vertical-align: middle; 10 | } 11 | .searchbox .searchbox-text { 12 | font-size: 12px; 13 | border: 0; 14 | margin: 0; 15 | padding: 0 2px; 16 | vertical-align: top; 17 | } 18 | .searchbox .searchbox-prompt { 19 | font-size: 12px; 20 | color: #ccc; 21 | } 22 | .searchbox-button { 23 | width: 18px; 24 | height: 20px; 25 | overflow: hidden; 26 | display: inline-block; 27 | vertical-align: top; 28 | cursor: pointer; 29 | opacity: 0.6; 30 | filter: alpha(opacity=60); 31 | } 32 | .searchbox-button-hover { 33 | opacity: 1.0; 34 | filter: alpha(opacity=100); 35 | } 36 | .searchbox .l-btn-plain { 37 | border: 0; 38 | padding: 0; 39 | vertical-align: top; 40 | opacity: 0.6; 41 | filter: alpha(opacity=60); 42 | -moz-border-radius: 0 0 0 0; 43 | -webkit-border-radius: 0 0 0 0; 44 | border-radius: 0 0 0 0; 45 | } 46 | .searchbox .l-btn-plain:hover { 47 | border: 0; 48 | padding: 0; 49 | opacity: 1.0; 50 | filter: alpha(opacity=100); 51 | -moz-border-radius: 0 0 0 0; 52 | -webkit-border-radius: 0 0 0 0; 53 | border-radius: 0 0 0 0; 54 | } 55 | .searchbox a.m-btn-plain-active { 56 | -moz-border-radius: 0 0 0 0; 57 | -webkit-border-radius: 0 0 0 0; 58 | border-radius: 0 0 0 0; 59 | } 60 | .searchbox .m-btn-active { 61 | border-width: 0 1px 0 0; 62 | -moz-border-radius: 0 0 0 0; 63 | -webkit-border-radius: 0 0 0 0; 64 | border-radius: 0 0 0 0; 65 | } 66 | .searchbox .textbox-button-right { 67 | border-width: 0 0 0 1px; 68 | } 69 | .searchbox .textbox-button-left { 70 | border-width: 0 1px 0 0; 71 | } 72 | .searchbox-button { 73 | background: url('images/searchbox_button.png') no-repeat center center; 74 | } 75 | .searchbox { 76 | border-color: #95B8E7; 77 | background-color: #fff; 78 | } 79 | .searchbox .l-btn-plain { 80 | background: #E0ECFF; 81 | } 82 | .searchbox .l-btn-plain-disabled, 83 | .searchbox .l-btn-plain-disabled:hover { 84 | opacity: 0.5; 85 | filter: alpha(opacity=50); 86 | } 87 | .textbox-invalid { 88 | border-color: #ffa8a8; 89 | background-color: #fff3f3; 90 | } 91 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/datalist.css: -------------------------------------------------------------------------------- 1 | .datalist .datagrid-header { 2 | border-width: 0; 3 | } 4 | .datalist .datagrid-group, 5 | .m-list .m-list-group { 6 | height: 25px; 7 | line-height: 25px; 8 | font-weight: bold; 9 | overflow: hidden; 10 | background-color: #efefef; 11 | border-style: solid; 12 | border-width: 0 0 1px 0; 13 | border-color: #ccc; 14 | } 15 | .datalist .datagrid-group-expander { 16 | display: none; 17 | } 18 | .datalist .datagrid-group-title { 19 | padding: 0 4px; 20 | } 21 | .datalist .datagrid-btable { 22 | width: 100%; 23 | table-layout: fixed; 24 | } 25 | .datalist .datagrid-row td { 26 | border-style: solid; 27 | border-left-color: transparent; 28 | border-right-color: transparent; 29 | border-bottom-width: 0; 30 | } 31 | .datalist-lines .datagrid-row td { 32 | border-bottom-width: 1px; 33 | } 34 | .datalist .datagrid-cell, 35 | .m-list li { 36 | width: auto; 37 | height: auto; 38 | padding: 2px 4px; 39 | line-height: 18px; 40 | position: relative; 41 | white-space: nowrap; 42 | text-overflow: ellipsis; 43 | overflow: hidden; 44 | } 45 | .datalist-link, 46 | .m-list li>a { 47 | display: block; 48 | position: relative; 49 | cursor: pointer; 50 | color: #000000; 51 | text-decoration: none; 52 | overflow: hidden; 53 | margin: -2px -4px; 54 | padding: 2px 4px; 55 | padding-right: 16px; 56 | line-height: 18px; 57 | white-space: nowrap; 58 | text-overflow: ellipsis; 59 | overflow: hidden; 60 | } 61 | .datalist-link::after, 62 | .m-list li>a::after { 63 | position: absolute; 64 | display: block; 65 | width: 8px; 66 | height: 8px; 67 | content: ''; 68 | right: 6px; 69 | top: 50%; 70 | margin-top: -4px; 71 | border-style: solid; 72 | border-width: 1px 1px 0 0; 73 | -ms-transform: rotate(45deg); 74 | -moz-transform: rotate(45deg); 75 | -webkit-transform: rotate(45deg); 76 | -o-transform: rotate(45deg); 77 | transform: rotate(45deg); 78 | } 79 | .m-list { 80 | margin: 0; 81 | padding: 0; 82 | list-style: none; 83 | } 84 | .m-list li { 85 | border-style: solid; 86 | border-width: 0 0 1px 0; 87 | border-color: #ccc; 88 | } 89 | .m-list li>a:hover { 90 | background: #eaf2ff; 91 | color: #000000; 92 | } 93 | .m-list .m-list-group { 94 | padding: 0 4px; 95 | } 96 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/TeacherServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.weizujie.attendance.dto.LoginDTO; 5 | import com.weizujie.attendance.entity.Teacher; 6 | import com.weizujie.attendance.mapper.TeacherMapper; 7 | import com.weizujie.attendance.service.TeacherService; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | import java.util.Map; 14 | 15 | @Service 16 | public class TeacherServiceImpl implements TeacherService { 17 | 18 | @Autowired 19 | private TeacherMapper teacherMapper; 20 | 21 | @Override 22 | public PageBean queryPage(Map paramMap) { 23 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"), (Integer) paramMap.get("pagesize")); 24 | 25 | Integer startIndex = pageBean.getStartIndex(); 26 | paramMap.put("startIndex", startIndex); 27 | List datas = teacherMapper.queryList(paramMap); 28 | pageBean.setDatas(datas); 29 | 30 | Integer totalsize = teacherMapper.queryCount(paramMap); 31 | pageBean.setTotalsize(totalsize); 32 | return pageBean; 33 | } 34 | 35 | @Override 36 | public int deleteTeacher(List ids) { 37 | return teacherMapper.deleteBatchIds(ids); 38 | } 39 | 40 | @Override 41 | public int addTeacher(Teacher teacher) { 42 | return teacherMapper.insert(teacher); 43 | } 44 | 45 | @Override 46 | public int editTeacher(Teacher teacher) { 47 | return teacherMapper.updateById(teacher); 48 | } 49 | 50 | @Override 51 | public Teacher login(LoginDTO loginDTO) { 52 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 53 | .eq(Teacher::getUsername, loginDTO.getUsername()) 54 | .eq(Teacher::getPassword, loginDTO.getPassword()); 55 | return teacherMapper.selectOne(wrapper); 56 | } 57 | 58 | @Override 59 | public int editPswdByTeacher(Teacher teacher) { 60 | return teacherMapper.updateById(teacher); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/menubutton.css: -------------------------------------------------------------------------------- 1 | .m-btn-downarrow, 2 | .s-btn-downarrow { 3 | display: inline-block; 4 | position: absolute; 5 | width: 16px; 6 | height: 16px; 7 | font-size: 1px; 8 | right: 0; 9 | top: 50%; 10 | margin-top: -8px; 11 | } 12 | .m-btn-active, 13 | .s-btn-active { 14 | background: #eaf2ff; 15 | color: #000000; 16 | border: 1px solid #b7d2ff; 17 | filter: none; 18 | } 19 | .m-btn-plain-active, 20 | .s-btn-plain-active { 21 | background: transparent; 22 | padding: 0; 23 | border-width: 1px; 24 | border-style: solid; 25 | -moz-border-radius: 5px 5px 5px 5px; 26 | -webkit-border-radius: 5px 5px 5px 5px; 27 | border-radius: 5px 5px 5px 5px; 28 | } 29 | .m-btn .l-btn-left .l-btn-text { 30 | margin-right: 20px; 31 | } 32 | .m-btn .l-btn-icon-right .l-btn-text { 33 | margin-right: 40px; 34 | } 35 | .m-btn .l-btn-icon-right .l-btn-icon { 36 | right: 20px; 37 | } 38 | .m-btn .l-btn-icon-top .l-btn-text { 39 | margin-right: 4px; 40 | margin-bottom: 14px; 41 | } 42 | .m-btn .l-btn-icon-bottom .l-btn-text { 43 | margin-right: 4px; 44 | margin-bottom: 34px; 45 | } 46 | .m-btn .l-btn-icon-bottom .l-btn-icon { 47 | top: auto; 48 | bottom: 20px; 49 | } 50 | .m-btn .l-btn-icon-top .m-btn-downarrow, 51 | .m-btn .l-btn-icon-bottom .m-btn-downarrow { 52 | top: auto; 53 | bottom: 0px; 54 | left: 50%; 55 | margin-left: -8px; 56 | } 57 | .m-btn-line { 58 | display: inline-block; 59 | position: absolute; 60 | font-size: 1px; 61 | display: none; 62 | } 63 | .m-btn .l-btn-left .m-btn-line { 64 | right: 0; 65 | width: 16px; 66 | height: 500px; 67 | border-style: solid; 68 | border-color: #aac5e7; 69 | border-width: 0 0 0 1px; 70 | } 71 | .m-btn .l-btn-icon-top .m-btn-line, 72 | .m-btn .l-btn-icon-bottom .m-btn-line { 73 | left: 0; 74 | bottom: 0; 75 | width: 500px; 76 | height: 16px; 77 | border-width: 1px 0 0 0; 78 | } 79 | .m-btn-large .l-btn-icon-right .l-btn-text { 80 | margin-right: 56px; 81 | } 82 | .m-btn-large .l-btn-icon-bottom .l-btn-text { 83 | margin-bottom: 50px; 84 | } 85 | .m-btn-downarrow, 86 | .s-btn-downarrow { 87 | background: url('images/menu_arrows.png') no-repeat 0 center; 88 | } 89 | .m-btn-plain-active, 90 | .s-btn-plain-active { 91 | border-color: #b7d2ff; 92 | background-color: #eaf2ff; 93 | color: #000000; 94 | } 95 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CourseMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 24 | 25 | 32 | 33 | 34 | update s_course 35 | set selected_num = (case 36 | when selected_num = max_num then 50 37 | when selected_num < max_num then selected_num + 1 38 | end 39 | ) 40 | where id = #{courseId} 41 | 42 | 43 | 44 | update s_course 45 | set selected_num = selected_num - 1 46 | where id = #{courseId} 47 | 48 | 49 | 59 | 60 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/css/default.css: -------------------------------------------------------------------------------- 1 | *{font-size:12px; font-family:Tahoma,Verdana,微软雅黑,新宋体} 2 | body{background:#D2E0F2; } 3 | a{ color:Black; text-decoration:none;} 4 | a:hover{ color:Red; text-decoration:underline;} 5 | .textbox03 {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px; font-weight: bold; width: 190px; } 6 | 7 | .txt01{font:Verdana, Geneva, sans-serif,宋体;padding:3px 2px 2px 2px; border-width:1px; border-color:#ddd; color:#000;} 8 | .txt {border: #878787 1px solid;padding: 4px 3px;font:Verdana, Geneva, sans-serif,宋体;line-height: 14px; background-color: #fff; height: auto; font-size: 14px;} 9 | .footer{text-align:center;color:#15428B; margin:0px; padding:0px;line-height:23px; font-weight:bold;} 10 | 11 | .head a{color:White;text-decoration:underline;} 12 | 13 | .easyui-accordion ul{list-style-type:none;margin:0px; padding:10px;} 14 | .easyui-accordion ul li{ padding:0px;} 15 | .easyui-accordion ul li a{line-height:24px;} 16 | .easyui-accordion ul li div{margin:2px 0px;padding-left:10px;padding-top:2px;} 17 | .easyui-accordion ul li div.hover{border:1px dashed #99BBE8; background:#E0ECFF;cursor:pointer;} 18 | .easyui-accordion ul li div.hover a{color:#416AA3;} 19 | .easyui-accordion ul li div.selected{border:1px solid #99BBE8; background:#E0ECFF;cursor:default;} 20 | .easyui-accordion ul li div.selected a{color:#416AA3; font-weight:bold;} 21 | 22 | 23 | 24 | .icon{ background:url(../images/tabicons.png) no-repeat;width:18px; line-height:18px; display:inline-block;} 25 | .icon-sys{ background-position:0px -200px;} 26 | .icon-set{ background-position:-380px -200px;} 27 | .icon-add{background-position: -20px 0px;} 28 | .icon-add1{background:url('icon/edit_add.png') no-repeat;} 29 | .icon-nav{background-position: -100px -20px; } 30 | .icon-users{background-position: -100px -480px;} 31 | .icon-role{background-position: -360px -200px;} 32 | .icon-set{background-position: -380px -200px;} 33 | .icon-log{background-position: -380px -80px;} 34 | .icon-delete16{background:url('icon/delete.gif') no-repeat;width:18px; line-height:18px; display:inline-block;} 35 | .icon-delete{ background-position:-140px -120px;} 36 | .icon-edit{ background-position:-380px -320px;} 37 | .icon-magic{ background-position:0px -500px;} 38 | .icon-database{ background-position:-20px -140px;} 39 | .icon-expand{ background:url('/images/coll2.gif') no-repeat;} 40 | .icon-collapse{ background:url('/images/coll3.gif') no-repeat;} 41 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/tooltip.css: -------------------------------------------------------------------------------- 1 | .tooltip { 2 | position: absolute; 3 | display: none; 4 | z-index: 9900000; 5 | outline: none; 6 | opacity: 1; 7 | filter: alpha(opacity=100); 8 | padding: 5px; 9 | border-width: 1px; 10 | border-style: solid; 11 | border-radius: 5px; 12 | -moz-border-radius: 5px 5px 5px 5px; 13 | -webkit-border-radius: 5px 5px 5px 5px; 14 | border-radius: 5px 5px 5px 5px; 15 | } 16 | .tooltip-content { 17 | font-size: 12px; 18 | } 19 | .tooltip-arrow-outer, 20 | .tooltip-arrow { 21 | position: absolute; 22 | width: 0; 23 | height: 0; 24 | line-height: 0; 25 | font-size: 0; 26 | border-style: solid; 27 | border-width: 6px; 28 | border-color: transparent; 29 | _border-color: tomato; 30 | _filter: chroma(color=tomato); 31 | } 32 | .tooltip-right .tooltip-arrow-outer { 33 | left: 0; 34 | top: 50%; 35 | margin: -6px 0 0 -13px; 36 | } 37 | .tooltip-right .tooltip-arrow { 38 | left: 0; 39 | top: 50%; 40 | margin: -6px 0 0 -12px; 41 | } 42 | .tooltip-left .tooltip-arrow-outer { 43 | right: 0; 44 | top: 50%; 45 | margin: -6px -13px 0 0; 46 | } 47 | .tooltip-left .tooltip-arrow { 48 | right: 0; 49 | top: 50%; 50 | margin: -6px -12px 0 0; 51 | } 52 | .tooltip-top .tooltip-arrow-outer { 53 | bottom: 0; 54 | left: 50%; 55 | margin: 0 0 -13px -6px; 56 | } 57 | .tooltip-top .tooltip-arrow { 58 | bottom: 0; 59 | left: 50%; 60 | margin: 0 0 -12px -6px; 61 | } 62 | .tooltip-bottom .tooltip-arrow-outer { 63 | top: 0; 64 | left: 50%; 65 | margin: -13px 0 0 -6px; 66 | } 67 | .tooltip-bottom .tooltip-arrow { 68 | top: 0; 69 | left: 50%; 70 | margin: -12px 0 0 -6px; 71 | } 72 | .tooltip { 73 | background-color: #ffffff; 74 | border-color: #95B8E7; 75 | color: #000000; 76 | } 77 | .tooltip-right .tooltip-arrow-outer { 78 | border-right-color: #95B8E7; 79 | } 80 | .tooltip-right .tooltip-arrow { 81 | border-right-color: #ffffff; 82 | } 83 | .tooltip-left .tooltip-arrow-outer { 84 | border-left-color: #95B8E7; 85 | } 86 | .tooltip-left .tooltip-arrow { 87 | border-left-color: #ffffff; 88 | } 89 | .tooltip-top .tooltip-arrow-outer { 90 | border-top-color: #95B8E7; 91 | } 92 | .tooltip-top .tooltip-arrow { 93 | border-top-color: #ffffff; 94 | } 95 | .tooltip-bottom .tooltip-arrow-outer { 96 | border-bottom-color: #95B8E7; 97 | } 98 | .tooltip-bottom .tooltip-arrow { 99 | border-bottom-color: #ffffff; 100 | } 101 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/locale/easyui-lang-zh_CN.js: -------------------------------------------------------------------------------- 1 | if ($.fn.pagination){ 2 | $.fn.pagination.defaults.beforePageText = '第'; 3 | $.fn.pagination.defaults.afterPageText = '共{pages}页'; 4 | $.fn.pagination.defaults.displayMsg = '显示{from}到{to},共{total}记录'; 5 | } 6 | if ($.fn.datagrid){ 7 | $.fn.datagrid.defaults.loadMsg = '正在处理,请稍待。。。'; 8 | } 9 | if ($.fn.treegrid && $.fn.datagrid){ 10 | $.fn.treegrid.defaults.loadMsg = $.fn.datagrid.defaults.loadMsg; 11 | } 12 | if ($.messager){ 13 | $.messager.defaults.ok = '确定'; 14 | $.messager.defaults.cancel = '取消'; 15 | } 16 | $.map(['validatebox','textbox','filebox','searchbox', 17 | 'combo','combobox','combogrid','combotree', 18 | 'datebox','datetimebox','numberbox', 19 | 'spinner','numberspinner','timespinner','datetimespinner'], function(plugin){ 20 | if ($.fn[plugin]){ 21 | $.fn[plugin].defaults.missingMessage = '该输入项为必输项'; 22 | } 23 | }); 24 | if ($.fn.validatebox){ 25 | $.fn.validatebox.defaults.rules.email.message = '请输入有效的电子邮件地址'; 26 | $.fn.validatebox.defaults.rules.url.message = '请输入有效的URL地址'; 27 | $.fn.validatebox.defaults.rules.length.message = '输入内容长度必须介于{0}和{1}之间'; 28 | $.fn.validatebox.defaults.rules.remote.message = '请修正该字段'; 29 | } 30 | if ($.fn.calendar){ 31 | $.fn.calendar.defaults.weeks = ['日','一','二','三','四','五','六']; 32 | $.fn.calendar.defaults.months = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月']; 33 | } 34 | if ($.fn.datebox){ 35 | $.fn.datebox.defaults.currentText = '今天'; 36 | $.fn.datebox.defaults.closeText = '关闭'; 37 | $.fn.datebox.defaults.okText = '确定'; 38 | $.fn.datebox.defaults.formatter = function(date){ 39 | var y = date.getFullYear(); 40 | var m = date.getMonth()+1; 41 | var d = date.getDate(); 42 | return y+'-'+(m<10?('0'+m):m)+'-'+(d<10?('0'+d):d); 43 | }; 44 | $.fn.datebox.defaults.parser = function(s){ 45 | if (!s) return new Date(); 46 | var ss = s.split('-'); 47 | var y = parseInt(ss[0],10); 48 | var m = parseInt(ss[1],10); 49 | var d = parseInt(ss[2],10); 50 | if (!isNaN(y) && !isNaN(m) && !isNaN(d)){ 51 | return new Date(y,m-1,d); 52 | } else { 53 | return new Date(); 54 | } 55 | }; 56 | } 57 | if ($.fn.datetimebox && $.fn.datebox){ 58 | $.extend($.fn.datetimebox.defaults,{ 59 | currentText: $.fn.datebox.defaults.currentText, 60 | closeText: $.fn.datebox.defaults.closeText, 61 | okText: $.fn.datebox.defaults.okText 62 | }); 63 | } 64 | if ($.fn.datetimespinner){ 65 | $.fn.datetimespinner.defaults.selections = [[0,4],[5,7],[8,10],[11,13],[14,16],[17,19]] 66 | } 67 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/window.css: -------------------------------------------------------------------------------- 1 | .window { 2 | overflow: hidden; 3 | padding: 5px; 4 | border-width: 1px; 5 | border-style: solid; 6 | } 7 | .window .window-header { 8 | background: transparent; 9 | padding: 0px 0px 6px 0px; 10 | } 11 | .window .window-body { 12 | border-width: 1px; 13 | border-style: solid; 14 | border-top-width: 0px; 15 | } 16 | .window .window-body-noheader { 17 | border-top-width: 1px; 18 | } 19 | .window .panel-body-nobottom { 20 | border-bottom-width: 0; 21 | } 22 | .window .window-header .panel-icon, 23 | .window .window-header .panel-tool { 24 | top: 50%; 25 | margin-top: -11px; 26 | } 27 | .window .window-header .panel-icon { 28 | left: 1px; 29 | } 30 | .window .window-header .panel-tool { 31 | right: 1px; 32 | } 33 | .window .window-header .panel-with-icon { 34 | padding-left: 18px; 35 | } 36 | .window-proxy { 37 | position: absolute; 38 | overflow: hidden; 39 | } 40 | .window-proxy-mask { 41 | position: absolute; 42 | filter: alpha(opacity=5); 43 | opacity: 0.05; 44 | } 45 | .window-mask { 46 | position: absolute; 47 | left: 0; 48 | top: 0; 49 | width: 100%; 50 | height: 100%; 51 | filter: alpha(opacity=40); 52 | opacity: 0.40; 53 | font-size: 1px; 54 | overflow: hidden; 55 | } 56 | .window, 57 | .window-shadow { 58 | position: absolute; 59 | -moz-border-radius: 5px 5px 5px 5px; 60 | -webkit-border-radius: 5px 5px 5px 5px; 61 | border-radius: 5px 5px 5px 5px; 62 | } 63 | .window-shadow { 64 | background: #ccc; 65 | -moz-box-shadow: 2px 2px 3px #cccccc; 66 | -webkit-box-shadow: 2px 2px 3px #cccccc; 67 | box-shadow: 2px 2px 3px #cccccc; 68 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 69 | } 70 | .window, 71 | .window .window-body { 72 | border-color: #95B8E7; 73 | } 74 | .window { 75 | background-color: #E0ECFF; 76 | background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); 77 | background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); 78 | background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 20%); 79 | background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 20%); 80 | background-repeat: repeat-x; 81 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); 82 | } 83 | .window-proxy { 84 | border: 1px dashed #95B8E7; 85 | } 86 | .window-proxy-mask, 87 | .window-mask { 88 | background: #ccc; 89 | } 90 | .window .panel-footer { 91 | border: 1px solid #95B8E7; 92 | position: relative; 93 | top: -1px; 94 | } 95 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/utils/PageBean.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.utils; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author weizujie 7 | */ 8 | public class PageBean { 9 | 10 | /** 11 | * 第几页 12 | */ 13 | private Integer pageno; 14 | 15 | /** 16 | * 每页条数 17 | */ 18 | private Integer pagesize; 19 | 20 | /** 21 | * 总共几页 22 | */ 23 | private Integer totalno; 24 | 25 | /** 26 | * 总的条数 27 | */ 28 | private Integer totalsize; 29 | 30 | private List datas; 31 | 32 | public PageBean(Integer pageno, Integer pagesize) { 33 | if (pageno <= 0) { 34 | this.pageno = 1; 35 | } else { 36 | this.pageno = pageno; 37 | } 38 | if (pagesize <= 0) { 39 | this.pagesize = 10; 40 | } else { 41 | this.pagesize = pagesize; 42 | } 43 | this.pageno = pageno; 44 | this.pagesize = pagesize; 45 | } 46 | 47 | public Integer getPageno() { 48 | return pageno; 49 | } 50 | 51 | public void setPageno(Integer pageno) { 52 | this.pageno = pageno; 53 | } 54 | 55 | public Integer getPagesize() { 56 | return pagesize; 57 | } 58 | 59 | public void setPagesize(Integer pagesize) { 60 | this.pagesize = pagesize; 61 | } 62 | 63 | public List getDatas() { 64 | return datas; 65 | } 66 | 67 | public void setDatas(List datas) { 68 | this.datas = datas; 69 | } 70 | 71 | public Integer getTotalno() { 72 | return totalno; 73 | } 74 | 75 | public void setTotalno(Integer totalno) { 76 | this.totalno = totalno; 77 | } 78 | 79 | public Integer getTotalsize() { 80 | return totalsize; 81 | } 82 | 83 | public void setTotalsize(Integer totalsize) { 84 | this.totalno = (totalsize % pagesize == 0) ? (totalsize / pagesize) : (totalsize / pagesize + 1); 85 | this.totalsize = totalsize; 86 | } 87 | 88 | /** 89 | * 开始索引 90 | */ 91 | public Integer getStartIndex() { 92 | return (this.pageno - 1) * this.pagesize; 93 | } 94 | 95 | 96 | @Override 97 | public String toString() { 98 | return "PageBean{" + 99 | "pageno=" + pageno + 100 | ", pagesize=" + pagesize + 101 | ", datas=" + datas + 102 | ", totalno=" + totalno + 103 | ", totalsize=" + totalsize + 104 | '}'; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/StudentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.weizujie.attendance.dto.LoginDTO; 5 | import com.weizujie.attendance.entity.Student; 6 | import com.weizujie.attendance.mapper.StudentMapper; 7 | import com.weizujie.attendance.service.StudentService; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import com.weizujie.attendance.utils.R; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.List; 14 | import java.util.Map; 15 | 16 | @Service 17 | public class StudentServiceImpl implements StudentService { 18 | 19 | @Autowired 20 | private StudentMapper studentMapper; 21 | 22 | @Override 23 | public PageBean queryPage(Map paramMap) { 24 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"), (Integer) paramMap.get("pagesize")); 25 | 26 | Integer startIndex = pageBean.getStartIndex(); 27 | paramMap.put("startIndex", startIndex); 28 | List datas = studentMapper.queryList(paramMap); 29 | pageBean.setDatas(datas); 30 | 31 | Integer totalsize = studentMapper.queryCount(paramMap); 32 | pageBean.setTotalsize(totalsize); 33 | return pageBean; 34 | } 35 | 36 | @Override 37 | public int deleteStudent(List ids) { 38 | return studentMapper.deleteBatchIds(ids); 39 | // return .deleteStudent(ids); 40 | } 41 | 42 | @Override 43 | public int addStudent(Student student) { 44 | return studentMapper.insert(student); 45 | } 46 | 47 | @Override 48 | public int editStudent(Student student) { 49 | return studentMapper.editStudent(student); 50 | } 51 | 52 | @Override 53 | public Student login(LoginDTO loginDTO) { 54 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 55 | .eq(Student::getUsername, loginDTO.getUsername()) 56 | .eq(Student::getPassword, loginDTO.getPassword()); 57 | return studentMapper.selectOne(wrapper); 58 | } 59 | 60 | @Override 61 | public boolean isStudentByClazzId(Integer id) { 62 | List studentList = studentMapper.isStudentByClazzId(id); 63 | return studentList.isEmpty(); 64 | } 65 | 66 | @Override 67 | public int editPswdByStudent(Student student) { 68 | return studentMapper.updateById(student); 69 | } 70 | 71 | @Override 72 | public int updateById(Student student) { 73 | return studentMapper.updateById(student); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.2.6.RELEASE 9 | 10 | 11 | com.weizujie.attendance 12 | attendance 13 | 0.0.1-SNAPSHOT 14 | attendance 15 | 基于Java的学生考勤系统 16 | 17 | 18 | 1.8 19 | 20 | 21 | 22 | 23 | 24 | org.springframework.boot 25 | spring-boot-starter-web 26 | 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-starter-test 32 | test 33 | 34 | 35 | 36 | 37 | com.baomidou 38 | mybatis-plus-boot-starter 39 | 3.4.0 40 | 41 | 42 | 43 | 44 | mysql 45 | mysql-connector-java 46 | 8.0.23 47 | 48 | 49 | 50 | 51 | org.projectlombok 52 | lombok 53 | 1.18.20 54 | 55 | 56 | 57 | 58 | org.springframework.boot 59 | spring-boot-starter-thymeleaf 60 | 2.2.6.RELEASE 61 | 62 | 63 | 64 | 65 | org.apache.poi 66 | poi-ooxml 67 | 3.9 68 | 69 | 70 | 71 | 72 | 73 | 74 | org.springframework.boot 75 | spring-boot-maven-plugin 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/menu.css: -------------------------------------------------------------------------------- 1 | .menu { 2 | position: absolute; 3 | margin: 0; 4 | padding: 2px; 5 | border-width: 1px; 6 | border-style: solid; 7 | overflow: hidden; 8 | } 9 | .menu-inline { 10 | position: relative; 11 | } 12 | .menu-item { 13 | position: relative; 14 | margin: 0; 15 | padding: 0; 16 | overflow: hidden; 17 | white-space: nowrap; 18 | cursor: pointer; 19 | border-width: 1px; 20 | border-style: solid; 21 | } 22 | .menu-text { 23 | height: 20px; 24 | line-height: 20px; 25 | float: left; 26 | padding-left: 28px; 27 | } 28 | .menu-icon { 29 | position: absolute; 30 | width: 16px; 31 | height: 16px; 32 | left: 2px; 33 | top: 50%; 34 | margin-top: -8px; 35 | } 36 | .menu-rightarrow { 37 | position: absolute; 38 | width: 16px; 39 | height: 16px; 40 | right: 0; 41 | top: 50%; 42 | margin-top: -8px; 43 | } 44 | .menu-line { 45 | position: absolute; 46 | left: 26px; 47 | top: 0; 48 | height: 2000px; 49 | font-size: 1px; 50 | } 51 | .menu-sep { 52 | margin: 3px 0px 3px 25px; 53 | font-size: 1px; 54 | } 55 | .menu-noline .menu-line { 56 | display: none; 57 | } 58 | .menu-noline .menu-sep { 59 | margin-left: 0; 60 | margin-right: 0; 61 | } 62 | .menu-active { 63 | -moz-border-radius: 5px 5px 5px 5px; 64 | -webkit-border-radius: 5px 5px 5px 5px; 65 | border-radius: 5px 5px 5px 5px; 66 | } 67 | .menu-item-disabled { 68 | opacity: 0.5; 69 | filter: alpha(opacity=50); 70 | cursor: default; 71 | } 72 | .menu-text, 73 | .menu-text span { 74 | font-size: 12px; 75 | } 76 | .menu-shadow { 77 | position: absolute; 78 | -moz-border-radius: 5px 5px 5px 5px; 79 | -webkit-border-radius: 5px 5px 5px 5px; 80 | border-radius: 5px 5px 5px 5px; 81 | background: #ccc; 82 | -moz-box-shadow: 2px 2px 3px #cccccc; 83 | -webkit-box-shadow: 2px 2px 3px #cccccc; 84 | box-shadow: 2px 2px 3px #cccccc; 85 | filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2); 86 | } 87 | .menu-rightarrow { 88 | background: url('images/menu_arrows.png') no-repeat -32px center; 89 | } 90 | .menu-line { 91 | border-left: 1px solid #ccc; 92 | border-right: 1px solid #fff; 93 | } 94 | .menu-sep { 95 | border-top: 1px solid #ccc; 96 | border-bottom: 1px solid #fff; 97 | } 98 | .menu { 99 | background-color: #fafafa; 100 | border-color: #ddd; 101 | color: #444; 102 | } 103 | .menu-content { 104 | background: #ffffff; 105 | } 106 | .menu-item { 107 | border-color: transparent; 108 | _border-color: #fafafa; 109 | } 110 | .menu-active { 111 | border-color: #b7d2ff; 112 | color: #000000; 113 | background: #eaf2ff; 114 | } 115 | .menu-active-disabled { 116 | border-color: transparent; 117 | background: transparent; 118 | color: #444; 119 | } 120 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/AttendanceServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 5 | import com.weizujie.attendance.entity.Attendance; 6 | import com.weizujie.attendance.mapper.AttendanceMapper; 7 | import com.weizujie.attendance.service.AttendanceService; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | import java.util.Map; 14 | import java.util.Objects; 15 | import java.util.stream.Collectors; 16 | 17 | /** 18 | * @author weizujie 19 | */ 20 | @Service 21 | public class AttendanceServiceImpl implements AttendanceService { 22 | 23 | private final AttendanceMapper attendanceMapper; 24 | 25 | public AttendanceServiceImpl(AttendanceMapper attendanceMapper) { 26 | this.attendanceMapper = attendanceMapper; 27 | } 28 | 29 | @Override 30 | public PageBean queryPage(Map paramMap) { 31 | PageBean pageBean = new PageBean<>( 32 | (Integer) paramMap.get("pageno"), 33 | (Integer) paramMap.get("pagesize")); 34 | 35 | Integer startIndex = pageBean.getStartIndex(); 36 | paramMap.put("startIndex", startIndex); 37 | List attendanceList = attendanceMapper.queryList(paramMap); 38 | pageBean.setDatas(attendanceList); 39 | 40 | Integer totalSize = attendanceMapper.queryCount(paramMap); 41 | pageBean.setTotalsize(totalSize); 42 | return pageBean; 43 | } 44 | 45 | @Override 46 | public boolean checkAttendance(Attendance attendance) { 47 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 48 | .eq(Attendance::getCourseId, attendance.getCourseId()) 49 | .eq(Attendance::getStudentId, attendance.getStudentId()) 50 | .last("LIMIT 1"); 51 | return Objects.nonNull(attendanceMapper.selectOne(wrapper)); 52 | } 53 | 54 | @Override 55 | public int addAttendance(Attendance attendance) { 56 | return attendanceMapper.insert(attendance); 57 | } 58 | 59 | @Override 60 | public int reissue(Integer id) { 61 | return attendanceMapper.reissue(id); 62 | } 63 | 64 | @Override 65 | public List selectList() { 66 | return attendanceMapper.selectList(null); 67 | } 68 | 69 | @Override 70 | public int deleteList(List attendanceList) { 71 | List collect = attendanceList.stream().map(Attendance::getId).collect(Collectors.toList()); 72 | return attendanceMapper.deleteBatchIds(collect); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/resources/mapper/SelectedCourse.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 21 | 22 | 30 | 31 | 32 | insert into s_selected_course(student_id,course_id) 33 | values(#{studentId},#{courseId}) 34 | 35 | 36 | 37 | delete from s_selected_course where id = #{id} 38 | 39 | 40 | 43 | 44 | 45 | 50 | 51 | 55 | 56 | 60 | 61 | 67 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/CourseController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.entity.Course; 4 | import com.weizujie.attendance.service.CourseService; 5 | import com.weizujie.attendance.utils.R; 6 | import com.weizujie.attendance.utils.Data; 7 | import com.weizujie.attendance.utils.PageBean; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.util.StringUtils; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import java.util.HashMap; 14 | import java.util.Map; 15 | 16 | @Controller 17 | @RequestMapping("/course") 18 | public class CourseController { 19 | 20 | private final CourseService courseService; 21 | 22 | public CourseController(CourseService courseService) { 23 | this.courseService = courseService; 24 | } 25 | 26 | @GetMapping("/course_list") 27 | public String courseList() { 28 | return "course/courseList"; 29 | } 30 | 31 | /** 32 | * 异步加载课程信息列表 33 | */ 34 | @PostMapping("/getCourseList") 35 | @ResponseBody 36 | public Object getClazzList(@RequestParam(value = "page", defaultValue = "1") Integer page, 37 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, 38 | String name, 39 | @RequestParam(value = "teacherid", defaultValue = "0") String teacherId, String from) { 40 | Map paramMap = new HashMap<>(); 41 | paramMap.put("pageno", page); 42 | paramMap.put("pagesize", rows); 43 | if (!StringUtils.isEmpty(name)) { 44 | paramMap.put("name", name); 45 | } 46 | if (!"0".equals(teacherId)) { 47 | paramMap.put("teacherId", teacherId); 48 | } 49 | PageBean pageBean = courseService.queryPage(paramMap); 50 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 51 | return pageBean.getDatas(); 52 | } else { 53 | Map result = new HashMap<>(); 54 | result.put("total", pageBean.getTotalsize()); 55 | result.put("rows", pageBean.getDatas()); 56 | return result; 57 | } 58 | } 59 | 60 | /** 61 | * 添加课程信息 62 | */ 63 | @PostMapping("/addCourse") 64 | @ResponseBody 65 | public R addCourse(Course course) { 66 | int count = courseService.addCourse(course); 67 | if (count > 0) { 68 | return R.success(); 69 | } else { 70 | return R.fail(); 71 | } 72 | } 73 | 74 | 75 | /** 76 | * 修改课程信息 77 | */ 78 | @PostMapping("/editCourse") 79 | @ResponseBody 80 | public R editCourse(Course course) { 81 | int count = courseService.editCourse(course); 82 | if (count > 0) { 83 | return R.success(); 84 | } else { 85 | return R.fail(); 86 | } 87 | } 88 | 89 | 90 | @PostMapping("/deleteCourse") 91 | @ResponseBody 92 | public R deleteCourse(Data data) { 93 | int count = courseService.deleteCourse(data.getIds()); 94 | if (count > 0) { 95 | return R.success(); 96 | } else { 97 | return R.fail(); 98 | } 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/panel.css: -------------------------------------------------------------------------------- 1 | .panel { 2 | overflow: hidden; 3 | text-align: left; 4 | margin: 0; 5 | border: 0; 6 | -moz-border-radius: 0 0 0 0; 7 | -webkit-border-radius: 0 0 0 0; 8 | border-radius: 0 0 0 0; 9 | } 10 | .panel-header, 11 | .panel-body { 12 | border-width: 1px; 13 | border-style: solid; 14 | } 15 | .panel-header { 16 | padding: 5px; 17 | position: relative; 18 | } 19 | .panel-title { 20 | background: url('images/blank.gif') no-repeat; 21 | } 22 | .panel-header-noborder { 23 | border-width: 0 0 1px 0; 24 | } 25 | .panel-body { 26 | overflow: auto; 27 | border-top-width: 0; 28 | padding: 0; 29 | } 30 | .panel-body-noheader { 31 | border-top-width: 1px; 32 | } 33 | .panel-body-noborder { 34 | border-width: 0px; 35 | } 36 | .panel-body-nobottom { 37 | border-bottom-width: 0; 38 | } 39 | .panel-with-icon { 40 | padding-left: 18px; 41 | } 42 | .panel-icon, 43 | .panel-tool { 44 | position: absolute; 45 | top: 50%; 46 | margin-top: -8px; 47 | height: 16px; 48 | overflow: hidden; 49 | } 50 | .panel-icon { 51 | left: 5px; 52 | width: 16px; 53 | } 54 | .panel-tool { 55 | right: 5px; 56 | width: auto; 57 | } 58 | .panel-tool a { 59 | display: inline-block; 60 | width: 16px; 61 | height: 16px; 62 | opacity: 0.6; 63 | filter: alpha(opacity=60); 64 | margin: 0 0 0 2px; 65 | vertical-align: top; 66 | } 67 | .panel-tool a:hover { 68 | opacity: 1; 69 | filter: alpha(opacity=100); 70 | background-color: #eaf2ff; 71 | -moz-border-radius: 3px 3px 3px 3px; 72 | -webkit-border-radius: 3px 3px 3px 3px; 73 | border-radius: 3px 3px 3px 3px; 74 | } 75 | .panel-loading { 76 | padding: 11px 0px 10px 30px; 77 | } 78 | .panel-noscroll { 79 | overflow: hidden; 80 | } 81 | .panel-fit, 82 | .panel-fit body { 83 | height: 100%; 84 | margin: 0; 85 | padding: 0; 86 | border: 0; 87 | overflow: hidden; 88 | } 89 | .panel-loading { 90 | background: url('images/loading.gif') no-repeat 10px 10px; 91 | } 92 | .panel-tool-close { 93 | background: url('images/panel_tools.png') no-repeat -16px 0px; 94 | } 95 | .panel-tool-min { 96 | background: url('images/panel_tools.png') no-repeat 0px 0px; 97 | } 98 | .panel-tool-max { 99 | background: url('images/panel_tools.png') no-repeat 0px -16px; 100 | } 101 | .panel-tool-restore { 102 | background: url('images/panel_tools.png') no-repeat -16px -16px; 103 | } 104 | .panel-tool-collapse { 105 | background: url('images/panel_tools.png') no-repeat -32px 0; 106 | } 107 | .panel-tool-expand { 108 | background: url('images/panel_tools.png') no-repeat -32px -16px; 109 | } 110 | .panel-header, 111 | .panel-body { 112 | border-color: #95B8E7; 113 | } 114 | .panel-header { 115 | background-color: #E0ECFF; 116 | background: -webkit-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); 117 | background: -moz-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); 118 | background: -o-linear-gradient(top,#EFF5FF 0,#E0ECFF 100%); 119 | background: linear-gradient(to bottom,#EFF5FF 0,#E0ECFF 100%); 120 | background-repeat: repeat-x; 121 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#EFF5FF,endColorstr=#E0ECFF,GradientType=0); 122 | } 123 | .panel-body { 124 | background-color: #ffffff; 125 | color: #000000; 126 | font-size: 12px; 127 | } 128 | .panel-title { 129 | font-size: 12px; 130 | font-weight: bold; 131 | color: #0E2D5F; 132 | height: 16px; 133 | line-height: 16px; 134 | } 135 | .panel-footer { 136 | border: 1px solid #95B8E7; 137 | overflow: hidden; 138 | background: #F4F4F4; 139 | } 140 | .panel-footer-noborder { 141 | border-width: 1px 0 0 0; 142 | } 143 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/ClazzController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.entity.Clazz; 4 | import com.weizujie.attendance.service.ClazzService; 5 | import com.weizujie.attendance.service.StudentService; 6 | import com.weizujie.attendance.utils.R; 7 | import com.weizujie.attendance.utils.Data; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.util.StringUtils; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.util.HashMap; 15 | import java.util.List; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author weizujie 20 | */ 21 | @Controller 22 | @RequestMapping("/clazz") 23 | public class ClazzController { 24 | 25 | private final ClazzService clazzService; 26 | private final StudentService studentService; 27 | 28 | public ClazzController(ClazzService clazzService, StudentService studentService) { 29 | this.clazzService = clazzService; 30 | this.studentService = studentService; 31 | } 32 | 33 | /** 34 | * 跳转专业页面 35 | */ 36 | @GetMapping("/clazz_list") 37 | public String clazzList() { 38 | return "/clazz/clazzList"; 39 | } 40 | 41 | /** 42 | * 异步加载专业列表 43 | */ 44 | @PostMapping("/getClazzList") 45 | @ResponseBody 46 | public Object getClazzList(@RequestParam(value = "page", defaultValue = "1") Integer page, 47 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, String clazzName, String from) { 48 | Map paramMap = new HashMap<>(); 49 | paramMap.put("pageno", page); 50 | paramMap.put("pagesize", rows); 51 | if (!StringUtils.isEmpty(clazzName)) { 52 | paramMap.put("name", clazzName); 53 | } 54 | PageBean pageBean = clazzService.queryPage(paramMap); 55 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 56 | return pageBean.getDatas(); 57 | } else { 58 | Map result = new HashMap<>(); 59 | result.put("total", pageBean.getTotalsize()); 60 | result.put("rows", pageBean.getDatas()); 61 | return result; 62 | } 63 | } 64 | 65 | /** 66 | * 添加专业 67 | */ 68 | @PostMapping("/addClazz") 69 | @ResponseBody 70 | public R addClazz(Clazz clazz) { 71 | int count = clazzService.add(clazz); 72 | if (count > 0) { 73 | return R.success(); 74 | } else { 75 | return R.fail(); 76 | } 77 | } 78 | 79 | /** 80 | * 删除专业 81 | */ 82 | @PostMapping("/deleteClazz") 83 | @ResponseBody 84 | public R deleteClazz(Data data) { 85 | List ids = data.getIds(); 86 | // 判断是否存在课程关联学生 87 | for (Integer id : ids) { 88 | if (!studentService.isStudentByClazzId(id)) { 89 | return R.fail("无法删除,专业下存在学生"); 90 | } 91 | } 92 | int count = clazzService.deleteClazz(data.getIds()); 93 | if (count > 0) { 94 | return R.success(); 95 | } else { 96 | return R.fail(); 97 | } 98 | } 99 | 100 | /** 101 | * 专业修改 102 | */ 103 | @PostMapping("/editClazz") 104 | @ResponseBody 105 | public R editClazz(Clazz clazz) { 106 | int count = clazzService.editClazz(clazz); 107 | if (count > 0) { 108 | return R.success(); 109 | } else { 110 | return R.fail(); 111 | } 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /src/main/resources/mapper/StudentMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 27 | 35 | 36 | 37 | insert into s_student(username,password,clazz_id,sex,mobile) 38 | values(#{username},#{password},#{clazzId},#{sex},#{mobile}) 39 | 40 | 41 | 42 | delete from s_student 43 | 44 | id in 45 | 46 | #{id} 47 | 48 | 49 | 50 | 51 | 52 | update s_student 53 | 54 | 55 | nick_name = #{nickName}, 56 | 57 | 58 | clazz_id = #{clazzId}, 59 | 60 | 61 | sex = #{sex}, 62 | 63 | 64 | mobile = #{mobile}, 65 | 66 | 67 | where id = #{id} 68 | 69 | 70 | 71 | 74 | 75 | 79 | 80 | 83 | 84 | 85 | update s_student set password = #{password} where id = #{id} 86 | 87 | 88 | 91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/static/h-ui/lib/icheck/jquery.icheck.min.js: -------------------------------------------------------------------------------- 1 | // iCheck v0.7, http://git.io/uhUPMA 2 | (function(b){function m(a,b,d,c){var e=a[0],l=a.parent(),j=/disable|enable/.test(d)?"disabled":"checked",f="update"==d?{checked:e.checked,disabled:e.disabled}:e[j];if(/^check|disable/.test(d)&&!f)n(a,!0,l,j);else if(/uncheck|enable/.test(d)&&f)p(a,!0,l,j);else if("update"==d)for(j in f)f[j]?n(a,!1,l,j,c):p(a,!1,l,j,c);else b||(!0==d&&!e.disabled&&a.trigger("is.Clicked"),f?n(a,!0,l,j):p(a,!0,l,j))}function n(a,k,d,c,e){k&&(a[0][c]=!0);!0!==d.data(c)&&("checked"==c&&("radio"==a[0].type&&a[0].name)&& 3 | b("input[name="+a[0].name+"]").each(function(){this!==a[0]&&b(this).data("icheck")&&p(b(this),!0,b(this).parent(),c)}),(k||e)&&a.trigger("is.Changed"),k&&a.trigger("is."+c.replace("di","Di").replace("ch","Ch")),d.data(c,!0).addClass(r(a,c)))}function p(a,b,d,c,e){var l="disabled"==c?"Enabled":"Unchecked";b&&(a[0][c]=!1);!1!==d.data(c)&&((b||e)&&a.trigger("is.Changed"),b&&a.trigger("is."+l),d.data(c,!1).removeClass(r(a,c)))}function u(a,k){if(a.data("icheck")){var d=a[0].id,c=b("label[for="+d+"]"); 4 | a.parent().html(a.attr("style",a.data("icheck").style||"").trigger(k||""));a.removeData("icheck").unbind(".df").unwrap();d&&c.length&&c.unbind(".df")}}function r(a,b){if(a.data("icheck"))return a.data("icheck").options[b+"Class"]}b.fn.iCheck=function(a){if(/^(check|uncheck|disable|enable|update|destroy)$/.test(a))return this.each(function(){/destroy/.test(a)?u(b(this),"is.Destroyed"):m(b(this),!0,a)});if("object"==typeof a||!a){var k=navigator.userAgent,d=b.extend({},{checkboxClass:"icheckbox",radioClass:"iradio", 5 | checkedClass:"checked",disabledClass:"disabled",hoverClass:"hover",focusClass:"focus",activeClass:"active",labelHover:!0,labelHoverClass:"hover"},a),c=/^(checkbox|radio)$/.test(d.handle)?":"+d.handle:":checkbox, :radio",e=(""+d.increaseArea).replace("%","")|0;-50>e&&(e=-50);return this.each(function(){(b(this).is(c)?b(this):b(this).find(c)).each(function(){u(b(this));var a=this,c=a.id,f={position:"absolute",top:-e+"%",left:-e+"%",display:"block",width:100+2*e+"%",height:100+2*e+"%",margin:0,padding:0, 6 | background:"#fff",border:0,opacity:0},r=/ipad|iphone|ipod|android|blackberry|windows phone|opera mini/i.test(k)?{position:"absolute",visibility:"hidden"}:e|0?f:{position:"absolute",opacity:0},w="checkbox"==a.type?d.checkboxClass:d.radioClass,h=b(this).data("icheck",{style:b(this).attr("style"),options:d}).css(r),q=b("label[for="+c+"]"),g=h.wrap('
').trigger("is.Created").parent().append(d.insert),f=b("").css(f).appendTo(g).click(function(){h.click();m(h,!1,!0)}),s=d.hoverClass, 7 | t=d.labelHoverClass,v;!0==d.cursor&&f.css("cursor","pointer");!0==d.inheritClass&&g.addClass(a.className);!0==d.inheritID&&c&&g.attr("id","icheck-"+c);"static"==g.css("position")&&g.css("position","relative");m(h,!0,"update");c&&q.length&&q.bind("click.df mouseenter.df mouseleave.df touchbegin.df touchend.df",function(c){var e=c.type,f=b(this);"click"==e?(c.preventDefault(),h.click(),m(h,!1,!0)):!0==d.labelHover&&!a.disabled&&(/mouseenter|touchbegin/.test(e)?(g.addClass(s),f.addClass(t)):(g.removeClass(s), 8 | f.removeClass(t)))});h.bind("focus.df blur.df keyup.df keydown.df keypress.df",function(c){var b=c.type,e=c.keyCode||c.charCode||c.which;c=/MSIE [5-8]/.test(k)?"keyup"==b&&"keypress"!==v:"keyup"==b;e="keypress"==b&&32==e;/focus|blur/.test(b)?"focus"==b?g.addClass(d.focusClass):g.removeClass(d.focusClass):"radio"==a.type?(c?m(h,!0,"update",!0):e&&!a.checked&&n(h,!1,g,"checked",!0),v=b):"checkbox"==a.type&&e&&(a.checked?p(h,!1,g,"checked",!0):n(h,!1,g,"checked",!0))});f.bind("mousedown mouseup mouseout mouseenter mouseleave touchbegin touchend", 9 | function(b){b=b.type;var e=/mousedown|mouseup|mouseout/.test(b)?d.activeClass:s;a.disabled||(/mousedown|mouseenter|touchbegin/.test(b)?g.addClass(e):g.removeClass(e),c&&(q.length&&!0==d.labelHover&&e==s)&&(/mouseleave|touchend/.test(b)?q.removeClass(t):q.addClass(t)))})})})}return this}})(jQuery); -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/LeaveController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.entity.Leave; 4 | import com.weizujie.attendance.service.LeaveService; 5 | import com.weizujie.attendance.utils.R; 6 | import com.weizujie.attendance.utils.PageBean; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.util.StringUtils; 10 | import org.springframework.web.bind.annotation.PostMapping; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestParam; 13 | import org.springframework.web.bind.annotation.ResponseBody; 14 | 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author weizujie 20 | */ 21 | @Controller 22 | @RequestMapping("/leave") 23 | public class LeaveController { 24 | 25 | private final LeaveService leaveService; 26 | 27 | public LeaveController(LeaveService leaveService) { 28 | this.leaveService = leaveService; 29 | } 30 | 31 | @RequestMapping("leave_list") 32 | public String leaveList() { 33 | return "/leave/leaveList"; 34 | } 35 | 36 | /** 37 | * 异步加载请假列表 38 | */ 39 | @PostMapping("/getLeaveList") 40 | @ResponseBody 41 | public Object getClazzList(@RequestParam(value = "page", defaultValue = "1") Integer page, 42 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, 43 | @RequestParam(value = "studentid", defaultValue = "0") String studentid, 44 | String from) { 45 | Map paramMap = new HashMap<>(); 46 | paramMap.put("pageno", page); 47 | paramMap.put("pagesize", rows); 48 | if (!"0".equals(studentid)) { 49 | paramMap.put("studentId", studentid); 50 | } 51 | PageBean pageBean = leaveService.queryPage(paramMap); 52 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 53 | return pageBean.getDatas(); 54 | } else { 55 | Map result = new HashMap<>(); 56 | result.put("total", pageBean.getTotalsize()); 57 | result.put("rows", pageBean.getDatas()); 58 | return result; 59 | } 60 | } 61 | 62 | /** 63 | * 添加学生请假条 64 | */ 65 | @PostMapping("/addLeave") 66 | @ResponseBody 67 | public R addLeave(Leave leave) { 68 | int count = leaveService.addLeave(leave); 69 | if (count > 0) { 70 | return R.success(); 71 | } else { 72 | return R.fail(); 73 | } 74 | } 75 | 76 | /** 77 | * 修改请假条 78 | */ 79 | @PostMapping("/editLeave") 80 | @ResponseBody 81 | public R editLeave(Leave leave) { 82 | int count = leaveService.editLeave(leave); 83 | if (count > 0) { 84 | return R.success(); 85 | } else { 86 | return R.fail(); 87 | } 88 | } 89 | 90 | /** 91 | * 对假条进行审核 92 | */ 93 | @PostMapping("/checkLeave") 94 | @ResponseBody 95 | public R checkLeave(Leave leave) { 96 | int count = leaveService.checkLeave(leave); 97 | if (count > 0) { 98 | return R.success(); 99 | } else { 100 | return R.fail(); 101 | } 102 | } 103 | 104 | 105 | /** 106 | * 删除假条 107 | */ 108 | @PostMapping("/deleteLeave") 109 | @ResponseBody 110 | public R deleteLeave(Integer id) { 111 | int count = leaveService.deleteLeave(id); 112 | if (count > 0) { 113 | return R.success(); 114 | } else { 115 | return R.fail(); 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/SelectedCourseController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.constants.UserConstant; 4 | import com.weizujie.attendance.entity.SelectedCourse; 5 | import com.weizujie.attendance.entity.Student; 6 | import com.weizujie.attendance.service.SelectedCourseService; 7 | import com.weizujie.attendance.utils.R; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.util.StringUtils; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import javax.servlet.http.HttpSession; 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | 18 | /** 19 | * @author weizujie 20 | */ 21 | @Controller 22 | @RequestMapping("/selectedCourse") 23 | public class SelectedCourseController { 24 | 25 | private final SelectedCourseService selectedCourseService; 26 | 27 | public SelectedCourseController(SelectedCourseService selectedCourseService) { 28 | this.selectedCourseService = selectedCourseService; 29 | } 30 | 31 | 32 | @GetMapping("/selectedCourse_list") 33 | public String selectedCourseList() { 34 | return "course/selectedCourseList"; 35 | } 36 | 37 | /** 38 | * 异步加载选课信息列表 39 | */ 40 | @PostMapping("/getSelectedCourseList") 41 | @ResponseBody 42 | public Object getClazzList(@RequestParam(value = "page", defaultValue = "1") Integer page, 43 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, 44 | @RequestParam(value = "teacherid", defaultValue = "0") String studentid, 45 | @RequestParam(value = "teacherid", defaultValue = "0") String courseid, String from, HttpSession session) { 46 | Map paramMap = new HashMap<>(); 47 | paramMap.put("pageno", page); 48 | paramMap.put("pagesize", rows); 49 | if (!"0".equals(studentid)) { 50 | paramMap.put("studentId", studentid); 51 | } 52 | if (!"0".equals(courseid)) { 53 | paramMap.put("courseId", courseid); 54 | } 55 | //判断是老师还是学生权限 56 | Student student = (Student) session.getAttribute(UserConstant.STUDENT); 57 | if (!StringUtils.isEmpty(student)) { 58 | //是学生权限,只能查询自己的信息 59 | paramMap.put("studentid", student.getId()); 60 | } 61 | PageBean pageBean = selectedCourseService.queryPage(paramMap); 62 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 63 | return pageBean.getDatas(); 64 | } else { 65 | Map result = new HashMap<>(); 66 | result.put("total", pageBean.getTotalsize()); 67 | result.put("rows", pageBean.getDatas()); 68 | return result; 69 | } 70 | } 71 | 72 | /** 73 | * 学生进行选课 74 | */ 75 | @PostMapping("/addSelectedCourse") 76 | @ResponseBody 77 | public R addSelectedCourse(SelectedCourse selectedCourse) { 78 | int count = selectedCourseService.addSelectedCourse(selectedCourse); 79 | if (count == 1) { 80 | return R.success(); 81 | } else if (count == 0) { 82 | return R.fail("选课人数已满"); 83 | } else if (count == 2) { 84 | return R.fail("已选过这门课程"); 85 | } 86 | return R.fail("系统繁忙"); 87 | } 88 | 89 | 90 | /** 91 | * 删除选课信息 92 | */ 93 | @PostMapping("/deleteSelectedCourse") 94 | @ResponseBody 95 | public R deleteSelectedCourse(Integer id) { 96 | int count = selectedCourseService.deleteSelectedCourse(id); 97 | if (count > 0) { 98 | return R.success(); 99 | } else { 100 | return R.fail(); 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/TeacherController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.constants.UserConstant; 4 | import com.weizujie.attendance.entity.Teacher; 5 | import com.weizujie.attendance.service.TeacherService; 6 | import com.weizujie.attendance.utils.R; 7 | import com.weizujie.attendance.utils.Data; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.util.StringUtils; 12 | import org.springframework.web.bind.annotation.PostMapping; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestParam; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | import javax.servlet.http.HttpSession; 18 | import java.util.HashMap; 19 | import java.util.Map; 20 | 21 | /** 22 | * @author weizujie 23 | */ 24 | @Controller 25 | @RequestMapping("/teacher") 26 | public class TeacherController { 27 | 28 | private final TeacherService teacherService; 29 | 30 | public TeacherController(TeacherService teacherService) { 31 | this.teacherService = teacherService; 32 | } 33 | 34 | 35 | @RequestMapping("/teacher_list") 36 | public String teacherList() { 37 | return "/teacher/teacherList"; 38 | } 39 | 40 | /** 41 | * 异步加载老师数据列表 42 | */ 43 | @PostMapping("/getTeacherList") 44 | @ResponseBody 45 | public Object getTeacherList(@RequestParam(value = "page", defaultValue = "1") Integer page, 46 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, 47 | String teacherName, 48 | @RequestParam(value = "clazzid", defaultValue = "0") String clazzid, String from, HttpSession session) { 49 | Map paramMap = new HashMap<>(); 50 | paramMap.put("pageno", page); 51 | paramMap.put("pagesize", rows); 52 | if (!StringUtils.isEmpty(teacherName)) { 53 | paramMap.put("username", teacherName); 54 | } 55 | if (!"0".equals(clazzid)) { 56 | paramMap.put("clazzid", clazzid); 57 | } 58 | 59 | //判断是老师还是学生权限 60 | Teacher teacher = (Teacher) session.getAttribute(UserConstant.TEACHER); 61 | if (!StringUtils.isEmpty(teacher)) { 62 | //是老师权限,只能查询自己的信息 63 | paramMap.put("teacherid", teacher.getId()); 64 | } 65 | 66 | PageBean pageBean = teacherService.queryPage(paramMap); 67 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 68 | return pageBean.getDatas(); 69 | } else { 70 | Map result = new HashMap<>(); 71 | result.put("total", pageBean.getTotalsize()); 72 | result.put("rows", pageBean.getDatas()); 73 | return result; 74 | } 75 | } 76 | 77 | /** 78 | * 删除教师 79 | */ 80 | @PostMapping("/deleteTeacher") 81 | @ResponseBody 82 | public R deleteTeacher(Data data) { 83 | int count = teacherService.deleteTeacher(data.getIds()); 84 | if (count > 0) { 85 | return R.success(); 86 | } else { 87 | return R.fail(); 88 | } 89 | } 90 | 91 | /** 92 | * 添加教师 93 | */ 94 | @RequestMapping("/addTeacher") 95 | @ResponseBody 96 | public R addTeacher(Teacher teacher) { 97 | int count = teacherService.addTeacher(teacher); 98 | if (count > 0) { 99 | return R.success(); 100 | } else { 101 | return R.fail(); 102 | } 103 | } 104 | 105 | @PostMapping("/editTeacher") 106 | @ResponseBody 107 | public R editTeacher(Teacher teacher) { 108 | int count = teacherService.editTeacher(teacher); 109 | System.out.println(count); 110 | if (count > 0) { 111 | return R.success(); 112 | } else { 113 | return R.fail(); 114 | } 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/tree.css: -------------------------------------------------------------------------------- 1 | .tree { 2 | margin: 0; 3 | padding: 0; 4 | list-style-type: none; 5 | } 6 | .tree li { 7 | white-space: nowrap; 8 | } 9 | .tree li ul { 10 | list-style-type: none; 11 | margin: 0; 12 | padding: 0; 13 | } 14 | .tree-node { 15 | height: 18px; 16 | white-space: nowrap; 17 | cursor: pointer; 18 | } 19 | .tree-hit { 20 | cursor: pointer; 21 | } 22 | .tree-expanded, 23 | .tree-collapsed, 24 | .tree-folder, 25 | .tree-file, 26 | .tree-checkbox, 27 | .tree-indent { 28 | display: inline-block; 29 | width: 16px; 30 | height: 18px; 31 | vertical-align: top; 32 | overflow: hidden; 33 | } 34 | .tree-expanded { 35 | background: url('images/tree_icons.png') no-repeat -18px 0px; 36 | } 37 | .tree-expanded-hover { 38 | background: url('images/tree_icons.png') no-repeat -50px 0px; 39 | } 40 | .tree-collapsed { 41 | background: url('images/tree_icons.png') no-repeat 0px 0px; 42 | } 43 | .tree-collapsed-hover { 44 | background: url('images/tree_icons.png') no-repeat -32px 0px; 45 | } 46 | .tree-lines .tree-expanded, 47 | .tree-lines .tree-root-first .tree-expanded { 48 | background: url('images/tree_icons.png') no-repeat -144px 0; 49 | } 50 | .tree-lines .tree-collapsed, 51 | .tree-lines .tree-root-first .tree-collapsed { 52 | background: url('images/tree_icons.png') no-repeat -128px 0; 53 | } 54 | .tree-lines .tree-node-last .tree-expanded, 55 | .tree-lines .tree-root-one .tree-expanded { 56 | background: url('images/tree_icons.png') no-repeat -80px 0; 57 | } 58 | .tree-lines .tree-node-last .tree-collapsed, 59 | .tree-lines .tree-root-one .tree-collapsed { 60 | background: url('images/tree_icons.png') no-repeat -64px 0; 61 | } 62 | .tree-line { 63 | background: url('images/tree_icons.png') no-repeat -176px 0; 64 | } 65 | .tree-join { 66 | background: url('images/tree_icons.png') no-repeat -192px 0; 67 | } 68 | .tree-joinbottom { 69 | background: url('images/tree_icons.png') no-repeat -160px 0; 70 | } 71 | .tree-folder { 72 | background: url('images/tree_icons.png') no-repeat -208px 0; 73 | } 74 | .tree-folder-open { 75 | background: url('images/tree_icons.png') no-repeat -224px 0; 76 | } 77 | .tree-file { 78 | background: url('images/tree_icons.png') no-repeat -240px 0; 79 | } 80 | .tree-loading { 81 | background: url('images/loading.gif') no-repeat center center; 82 | } 83 | .tree-checkbox0 { 84 | background: url('images/tree_icons.png') no-repeat -208px -18px; 85 | } 86 | .tree-checkbox1 { 87 | background: url('images/tree_icons.png') no-repeat -224px -18px; 88 | } 89 | .tree-checkbox2 { 90 | background: url('images/tree_icons.png') no-repeat -240px -18px; 91 | } 92 | .tree-title { 93 | font-size: 12px; 94 | display: inline-block; 95 | text-decoration: none; 96 | vertical-align: top; 97 | white-space: nowrap; 98 | padding: 0 2px; 99 | height: 18px; 100 | line-height: 18px; 101 | } 102 | .tree-node-proxy { 103 | font-size: 12px; 104 | line-height: 20px; 105 | padding: 0 2px 0 20px; 106 | border-width: 1px; 107 | border-style: solid; 108 | z-index: 9900000; 109 | } 110 | .tree-dnd-icon { 111 | display: inline-block; 112 | position: absolute; 113 | width: 16px; 114 | height: 18px; 115 | left: 2px; 116 | top: 50%; 117 | margin-top: -9px; 118 | } 119 | .tree-dnd-yes { 120 | background: url('images/tree_icons.png') no-repeat -256px 0; 121 | } 122 | .tree-dnd-no { 123 | background: url('images/tree_icons.png') no-repeat -256px -18px; 124 | } 125 | .tree-node-top { 126 | border-top: 1px dotted red; 127 | } 128 | .tree-node-bottom { 129 | border-bottom: 1px dotted red; 130 | } 131 | .tree-node-append .tree-title { 132 | border: 1px dotted red; 133 | } 134 | .tree-editor { 135 | border: 1px solid #ccc; 136 | font-size: 12px; 137 | height: 14px !important; 138 | height: 18px; 139 | line-height: 14px; 140 | padding: 1px 2px; 141 | width: 80px; 142 | position: absolute; 143 | top: 0; 144 | } 145 | .tree-node-proxy { 146 | background-color: #ffffff; 147 | color: #000000; 148 | border-color: #95B8E7; 149 | } 150 | .tree-node-hover { 151 | background: #eaf2ff; 152 | color: #000000; 153 | } 154 | .tree-node-selected { 155 | background: #ffe48d; 156 | color: #000000; 157 | } 158 | .tree-node-hidden { 159 | display: none; 160 | } 161 | -------------------------------------------------------------------------------- /src/main/resources/templates/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 52 | 登录 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 |
62 |
63 |
64 | 65 |
66 | 67 |
68 |
69 |
70 | 71 |
72 | 73 |
74 |
75 |
76 |
77 | 78 | 79 |
80 |
81 | 82 | 83 |
84 |
85 | 86 | 87 |
88 |
89 | 90 |
91 |
92 | 93 |
94 |
95 |
96 |
97 |
98 | 99 | 100 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/service/Impl/SelectedCourseServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.service.Impl; 2 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 4 | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; 5 | import com.weizujie.attendance.entity.Course; 6 | import com.weizujie.attendance.entity.SelectedCourse; 7 | import com.weizujie.attendance.mapper.CourseMapper; 8 | import com.weizujie.attendance.mapper.SelectedCourseMapper; 9 | import com.weizujie.attendance.service.SelectedCourseService; 10 | import com.weizujie.attendance.utils.PageBean; 11 | import com.weizujie.attendance.utils.R; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | import org.springframework.transaction.annotation.Transactional; 15 | import org.springframework.util.StringUtils; 16 | 17 | import java.util.List; 18 | import java.util.Map; 19 | import java.util.Objects; 20 | 21 | 22 | @Service 23 | public class SelectedCourseServiceImpl implements SelectedCourseService { 24 | 25 | @Autowired 26 | private SelectedCourseMapper selectedCourseMapper; 27 | @Autowired 28 | private CourseMapper courseMapper; 29 | 30 | @Override 31 | public PageBean queryPage(Map paramMap) { 32 | PageBean pageBean = new PageBean<>((Integer) paramMap.get("pageno"), (Integer) paramMap.get("pagesize")); 33 | 34 | Integer startIndex = pageBean.getStartIndex(); 35 | paramMap.put("startIndex", startIndex); 36 | List datas = selectedCourseMapper.queryList(paramMap); 37 | pageBean.setDatas(datas); 38 | 39 | Integer totalsize = selectedCourseMapper.queryCount(paramMap); 40 | pageBean.setTotalsize(totalsize); 41 | return pageBean; 42 | } 43 | 44 | @Override 45 | @Transactional(rollbackFor = Exception.class) 46 | public int addSelectedCourse(SelectedCourse selectedCourse) { 47 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 48 | .eq(SelectedCourse::getStudentId, selectedCourse.getStudentId()) 49 | .eq(SelectedCourse::getCourseId, selectedCourse.getCourseId()); 50 | SelectedCourse selectOne = selectedCourseMapper.selectOne(wrapper); 51 | 52 | if (Objects.isNull(selectOne)) { 53 | int count = courseMapper.addStudentNum(selectedCourse.getCourseId()); 54 | if (count == 1) { 55 | selectedCourseMapper.insert(selectedCourse); 56 | return count; 57 | } 58 | if (count == 0) { 59 | return count; 60 | } 61 | } else { 62 | return 2; 63 | } 64 | return 3; 65 | } 66 | 67 | @Override 68 | @Transactional(rollbackFor = Exception.class) 69 | public int deleteSelectedCourse(Integer selectedCourseId) { 70 | SelectedCourse selectedCourse = selectedCourseMapper.selectById(selectedCourseId); 71 | if (Objects.isNull(selectedCourse)) { 72 | return -1; 73 | } 74 | // 退课 75 | return selectedCourseMapper.deleteById(selectedCourseId); 76 | } 77 | 78 | @Override 79 | public boolean isStudentId(Integer studentId) { 80 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 81 | .eq(SelectedCourse::getStudentId, studentId); 82 | List selectedCourseList = selectedCourseMapper.selectList(wrapper); 83 | return selectedCourseList.isEmpty(); 84 | } 85 | 86 | @Override 87 | public List getAllBySid(Integer studentid) { 88 | LambdaQueryWrapper wrapper = new LambdaQueryWrapper() 89 | .eq(SelectedCourse::getStudentId, studentid); 90 | List selectedCourses = selectedCourseMapper.selectList(wrapper); 91 | System.out.println(selectedCourses.toString()); 92 | return selectedCourseMapper.getAllBySid(studentid); 93 | } 94 | 95 | @Override 96 | public Course getCourseDetail(Integer studentId, Integer courseId) { 97 | return selectedCourseMapper.getCourseDetail(studentId, courseId); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/color.css: -------------------------------------------------------------------------------- 1 | .c1,.c1:hover{ 2 | color: #fff; 3 | border-color: #3c8b3c; 4 | background: #4cae4c; 5 | background: -webkit-linear-gradient(top,#4cae4c 0,#449d44 100%); 6 | background: -moz-linear-gradient(top,#4cae4c 0,#449d44 100%); 7 | background: -o-linear-gradient(top,#4cae4c 0,#449d44 100%); 8 | background: linear-gradient(to bottom,#4cae4c 0,#449d44 100%); 9 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4cae4c,endColorstr=#449d44,GradientType=0); 10 | } 11 | a.c1:hover{ 12 | background: #449d44; 13 | filter: none; 14 | } 15 | .c2,.c2:hover{ 16 | color: #fff; 17 | border-color: #5f5f5f; 18 | background: #747474; 19 | background: -webkit-linear-gradient(top,#747474 0,#676767 100%); 20 | background: -moz-linear-gradient(top,#747474 0,#676767 100%); 21 | background: -o-linear-gradient(top,#747474 0,#676767 100%); 22 | background: linear-gradient(to bottom,#747474 0,#676767 100%); 23 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#747474,endColorstr=#676767,GradientType=0); 24 | } 25 | a.c2:hover{ 26 | background: #676767; 27 | filter: none; 28 | } 29 | .c3,.c3:hover{ 30 | color: #333; 31 | border-color: #ff8080; 32 | background: #ffb3b3; 33 | background: -webkit-linear-gradient(top,#ffb3b3 0,#ff9999 100%); 34 | background: -moz-linear-gradient(top,#ffb3b3 0,#ff9999 100%); 35 | background: -o-linear-gradient(top,#ffb3b3 0,#ff9999 100%); 36 | background: linear-gradient(to bottom,#ffb3b3 0,#ff9999 100%); 37 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffb3b3,endColorstr=#ff9999,GradientType=0); 38 | } 39 | a.c3:hover{ 40 | background: #ff9999; 41 | filter: none; 42 | } 43 | .c4,.c4:hover{ 44 | color: #333; 45 | border-color: #52d689; 46 | background: #b8eecf; 47 | background: -webkit-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); 48 | background: -moz-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); 49 | background: -o-linear-gradient(top,#b8eecf 0,#a4e9c1 100%); 50 | background: linear-gradient(to bottom,#b8eecf 0,#a4e9c1 100%); 51 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#b8eecf,endColorstr=#a4e9c1,GradientType=0); 52 | } 53 | a.c4:hover{ 54 | background: #a4e9c1; 55 | filter: none; 56 | } 57 | .c5,.c5:hover{ 58 | color: #fff; 59 | border-color: #b52b27; 60 | background: #d84f4b; 61 | background: -webkit-linear-gradient(top,#d84f4b 0,#c9302c 100%); 62 | background: -moz-linear-gradient(top,#d84f4b 0,#c9302c 100%); 63 | background: -o-linear-gradient(top,#d84f4b 0,#c9302c 100%); 64 | background: linear-gradient(to bottom,#d84f4b 0,#c9302c 100%); 65 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#d84f4b,endColorstr=#c9302c,GradientType=0); 66 | } 67 | a.c5:hover{ 68 | background: #c9302c; 69 | filter: none; 70 | } 71 | .c6,.c6:hover{ 72 | color: #fff; 73 | border-color: #1f637b; 74 | background: #2984a4; 75 | background: -webkit-linear-gradient(top,#2984a4 0,#24748f 100%); 76 | background: -moz-linear-gradient(top,#2984a4 0,#24748f 100%); 77 | background: -o-linear-gradient(top,#2984a4 0,#24748f 100%); 78 | background: linear-gradient(to bottom,#2984a4 0,#24748f 100%); 79 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#2984a4,endColorstr=#24748f,GradientType=0); 80 | } 81 | a.c6:hover{ 82 | background: #24748f; 83 | filter: none; 84 | } 85 | .c7,.c7:hover{ 86 | color: #333; 87 | border-color: #e68900; 88 | background: #ffab2e; 89 | background: -webkit-linear-gradient(top,#ffab2e 0,#ff9900 100%); 90 | background: -moz-linear-gradient(top,#ffab2e 0,#ff9900 100%); 91 | background: -o-linear-gradient(top,#ffab2e 0,#ff9900 100%); 92 | background: linear-gradient(to bottom,#ffab2e 0,#ff9900 100%); 93 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffab2e,endColorstr=#ff9900,GradientType=0); 94 | } 95 | a.c7:hover{ 96 | background: #ff9900; 97 | filter: none; 98 | } 99 | .c8,.c8:hover{ 100 | color: #fff; 101 | border-color: #4b72a4; 102 | background: #698cba; 103 | background: -webkit-linear-gradient(top,#698cba 0,#577eb2 100%); 104 | background: -moz-linear-gradient(top,#698cba 0,#577eb2 100%); 105 | background: -o-linear-gradient(top,#698cba 0,#577eb2 100%); 106 | background: linear-gradient(to bottom,#698cba 0,#577eb2 100%); 107 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#698cba,endColorstr=#577eb2,GradientType=0); 108 | } 109 | a.c8:hover{ 110 | background: #577eb2; 111 | filter: none; 112 | } 113 | -------------------------------------------------------------------------------- /src/main/java/com/weizujie/attendance/controller/StudentController.java: -------------------------------------------------------------------------------- 1 | package com.weizujie.attendance.controller; 2 | 3 | import com.weizujie.attendance.constants.UserConstant; 4 | import com.weizujie.attendance.entity.Student; 5 | import com.weizujie.attendance.service.SelectedCourseService; 6 | import com.weizujie.attendance.service.StudentService; 7 | import com.weizujie.attendance.utils.Data; 8 | import com.weizujie.attendance.utils.PageBean; 9 | import com.weizujie.attendance.utils.R; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Controller; 12 | import org.springframework.util.StringUtils; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import javax.servlet.http.HttpSession; 16 | import java.util.HashMap; 17 | import java.util.List; 18 | import java.util.Map; 19 | 20 | /** 21 | * @author weizujie 22 | */ 23 | @Controller 24 | @RequestMapping("/student") 25 | public class StudentController { 26 | 27 | private final StudentService studentService; 28 | private final SelectedCourseService selectedCourseService; 29 | 30 | public StudentController(StudentService studentService, SelectedCourseService selectedCourseService) { 31 | this.studentService = studentService; 32 | this.selectedCourseService = selectedCourseService; 33 | } 34 | 35 | /** 36 | * 跳转学生列表页面 37 | */ 38 | @GetMapping("/student_list") 39 | public String studentList() { 40 | return "/student/studentList"; 41 | } 42 | 43 | /** 44 | * 异步加载学生列表 45 | */ 46 | @RequestMapping("/getStudentList") 47 | @ResponseBody 48 | public Object getStudentList(@RequestParam(value = "page", defaultValue = "1") Integer page, 49 | @RequestParam(value = "rows", defaultValue = "100") Integer rows, 50 | String studentName, 51 | @RequestParam(value = "clazzid", defaultValue = "0") String clazzid, String from, HttpSession session) { 52 | Map paramMap = new HashMap<>(); 53 | paramMap.put("pageno", page); 54 | paramMap.put("pagesize", rows); 55 | if (!StringUtils.isEmpty(studentName)) { 56 | paramMap.put("username", studentName); 57 | } 58 | if (!"0".equals(clazzid)) { 59 | paramMap.put("clazzid", clazzid); 60 | } 61 | 62 | //判断是老师还是学生权限 63 | Student student = (Student) session.getAttribute(UserConstant.STUDENT); 64 | if (!StringUtils.isEmpty(student)) { 65 | //是学生权限,只能查询自己的信息 66 | paramMap.put("studentid", student.getId()); 67 | } 68 | 69 | PageBean pageBean = studentService.queryPage(paramMap); 70 | if (!StringUtils.isEmpty(from) && "combox".equals(from)) { 71 | return pageBean.getDatas(); 72 | } else { 73 | Map result = new HashMap<>(); 74 | result.put("total", pageBean.getTotalsize()); 75 | result.put("rows", pageBean.getDatas()); 76 | return result; 77 | } 78 | } 79 | 80 | /** 81 | * 删除学生 82 | */ 83 | @PostMapping("/deleteStudent") 84 | @ResponseBody 85 | public R deleteStudent(Data data) { 86 | List ids = data.getIds(); 87 | // 判断是否存在课程关联学生 88 | for (Integer id : ids) { 89 | if (!selectedCourseService.isStudentId(id)) { 90 | return R.fail("无法删除,存在课程关联学生"); 91 | } 92 | } 93 | int count = studentService.deleteStudent(ids); 94 | if (count > 0) { 95 | return R.success(); 96 | } else { 97 | return R.fail(); 98 | } 99 | } 100 | 101 | 102 | /** 103 | * 添加学生 104 | */ 105 | @RequestMapping("/addStudent") 106 | @ResponseBody 107 | public R addStudent(Student student) { 108 | int count = studentService.addStudent(student); 109 | if (count > 0) { 110 | return R.success(); 111 | } else { 112 | return R.fail(); 113 | } 114 | } 115 | 116 | /** 117 | * 修改学生信息 118 | */ 119 | @PutMapping("/editStudent") 120 | @ResponseBody 121 | public R editStudent(Student student) { 122 | int i = studentService.updateById(student); 123 | if (i > 0) { 124 | return R.success(); 125 | } else { 126 | return R.fail(); 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/default/calendar.css: -------------------------------------------------------------------------------- 1 | .calendar { 2 | border-width: 1px; 3 | border-style: solid; 4 | padding: 1px; 5 | overflow: hidden; 6 | } 7 | .calendar table { 8 | table-layout: fixed; 9 | border-collapse: separate; 10 | font-size: 12px; 11 | width: 100%; 12 | height: 100%; 13 | } 14 | .calendar table td, 15 | .calendar table th { 16 | font-size: 12px; 17 | } 18 | .calendar-noborder { 19 | border: 0; 20 | } 21 | .calendar-header { 22 | position: relative; 23 | height: 22px; 24 | } 25 | .calendar-title { 26 | text-align: center; 27 | height: 22px; 28 | } 29 | .calendar-title span { 30 | position: relative; 31 | display: inline-block; 32 | top: 2px; 33 | padding: 0 3px; 34 | height: 18px; 35 | line-height: 18px; 36 | font-size: 12px; 37 | cursor: pointer; 38 | -moz-border-radius: 5px 5px 5px 5px; 39 | -webkit-border-radius: 5px 5px 5px 5px; 40 | border-radius: 5px 5px 5px 5px; 41 | } 42 | .calendar-prevmonth, 43 | .calendar-nextmonth, 44 | .calendar-prevyear, 45 | .calendar-nextyear { 46 | position: absolute; 47 | top: 50%; 48 | margin-top: -7px; 49 | width: 14px; 50 | height: 14px; 51 | cursor: pointer; 52 | font-size: 1px; 53 | -moz-border-radius: 5px 5px 5px 5px; 54 | -webkit-border-radius: 5px 5px 5px 5px; 55 | border-radius: 5px 5px 5px 5px; 56 | } 57 | .calendar-prevmonth { 58 | left: 20px; 59 | background: url('images/calendar_arrows.png') no-repeat -18px -2px; 60 | } 61 | .calendar-nextmonth { 62 | right: 20px; 63 | background: url('images/calendar_arrows.png') no-repeat -34px -2px; 64 | } 65 | .calendar-prevyear { 66 | left: 3px; 67 | background: url('images/calendar_arrows.png') no-repeat -1px -2px; 68 | } 69 | .calendar-nextyear { 70 | right: 3px; 71 | background: url('images/calendar_arrows.png') no-repeat -49px -2px; 72 | } 73 | .calendar-body { 74 | position: relative; 75 | } 76 | .calendar-body th, 77 | .calendar-body td { 78 | text-align: center; 79 | } 80 | .calendar-day { 81 | border: 0; 82 | padding: 1px; 83 | cursor: pointer; 84 | -moz-border-radius: 5px 5px 5px 5px; 85 | -webkit-border-radius: 5px 5px 5px 5px; 86 | border-radius: 5px 5px 5px 5px; 87 | } 88 | .calendar-other-month { 89 | opacity: 0.3; 90 | filter: alpha(opacity=30); 91 | } 92 | .calendar-disabled { 93 | opacity: 0.6; 94 | filter: alpha(opacity=60); 95 | cursor: default; 96 | } 97 | .calendar-menu { 98 | position: absolute; 99 | top: 0; 100 | left: 0; 101 | width: 180px; 102 | height: 150px; 103 | padding: 5px; 104 | font-size: 12px; 105 | display: none; 106 | overflow: hidden; 107 | } 108 | .calendar-menu-year-inner { 109 | text-align: center; 110 | padding-bottom: 5px; 111 | } 112 | .calendar-menu-year { 113 | width: 40px; 114 | text-align: center; 115 | border-width: 1px; 116 | border-style: solid; 117 | margin: 0; 118 | padding: 2px; 119 | font-weight: bold; 120 | font-size: 12px; 121 | } 122 | .calendar-menu-prev, 123 | .calendar-menu-next { 124 | display: inline-block; 125 | width: 21px; 126 | height: 21px; 127 | vertical-align: top; 128 | cursor: pointer; 129 | -moz-border-radius: 5px 5px 5px 5px; 130 | -webkit-border-radius: 5px 5px 5px 5px; 131 | border-radius: 5px 5px 5px 5px; 132 | } 133 | .calendar-menu-prev { 134 | margin-right: 10px; 135 | background: url('images/calendar_arrows.png') no-repeat 2px 2px; 136 | } 137 | .calendar-menu-next { 138 | margin-left: 10px; 139 | background: url('images/calendar_arrows.png') no-repeat -45px 2px; 140 | } 141 | .calendar-menu-month { 142 | text-align: center; 143 | cursor: pointer; 144 | font-weight: bold; 145 | -moz-border-radius: 5px 5px 5px 5px; 146 | -webkit-border-radius: 5px 5px 5px 5px; 147 | border-radius: 5px 5px 5px 5px; 148 | } 149 | .calendar-body th, 150 | .calendar-menu-month { 151 | color: #4d4d4d; 152 | } 153 | .calendar-day { 154 | color: #000000; 155 | } 156 | .calendar-sunday { 157 | color: #CC2222; 158 | } 159 | .calendar-saturday { 160 | color: #00ee00; 161 | } 162 | .calendar-today { 163 | color: #0000ff; 164 | } 165 | .calendar-menu-year { 166 | border-color: #95B8E7; 167 | } 168 | .calendar { 169 | border-color: #95B8E7; 170 | } 171 | .calendar-header { 172 | background: #E0ECFF; 173 | } 174 | .calendar-body, 175 | .calendar-menu { 176 | background: #ffffff; 177 | } 178 | .calendar-body th { 179 | background: #F4F4F4; 180 | padding: 2px 0; 181 | } 182 | .calendar-hover, 183 | .calendar-nav-hover, 184 | .calendar-menu-hover { 185 | background-color: #eaf2ff; 186 | color: #000000; 187 | } 188 | .calendar-hover { 189 | border: 1px solid #b7d2ff; 190 | padding: 0; 191 | } 192 | .calendar-selected { 193 | background-color: #ffe48d; 194 | color: #000000; 195 | border: 1px solid #ffab3f; 196 | padding: 0; 197 | } 198 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/js/outlook2.js: -------------------------------------------------------------------------------- 1 | 2 | $(function(){ 3 | InitLeftMenu(); 4 | tabClose(); 5 | tabCloseEven(); 6 | 7 | 8 | }) 9 | 10 | //初始化左侧 11 | function InitLeftMenu() { 12 | $("#nav").accordion({animate:false}); 13 | 14 | $.each(_menus.menus, function(i, n) { 15 | var menulist =''; 16 | menulist +='
    '; 17 | $.each(n.menus, function(j, o) { 18 | menulist += '
  • '; 19 | }) 20 | menulist += '
'; 21 | 22 | $('#nav').accordion('add', { 23 | title: n.menuname, 24 | content: menulist, 25 | iconCls: 'icon ' + n.icon 26 | }); 27 | 28 | }); 29 | 30 | $('.easyui-accordion li a').click(function(){ 31 | var tabTitle = $(this).children('.nav').text(); 32 | 33 | var url = $(this).attr("rel"); 34 | var menuid = $(this).attr("ref"); 35 | var icon = getIcon(menuid,icon); 36 | 37 | addTab(tabTitle,url,icon); 38 | $('.easyui-accordion li div').removeClass("selected"); 39 | $(this).parent().addClass("selected"); 40 | }).hover(function(){ 41 | $(this).parent().addClass("hover"); 42 | },function(){ 43 | $(this).parent().removeClass("hover"); 44 | }); 45 | 46 | //选中第一个 47 | var panels = $('#nav').accordion('panels'); 48 | var t = panels[0].panel('options').title; 49 | $('#nav').accordion('select', t); 50 | } 51 | //获取左侧导航的图标 52 | function getIcon(menuid){ 53 | var icon = 'icon '; 54 | $.each(_menus.menus, function(i, n) { 55 | $.each(n.menus, function(j, o) { 56 | if(o.menuid==menuid){ 57 | icon += o.icon; 58 | } 59 | }) 60 | }) 61 | 62 | return icon; 63 | } 64 | 65 | function addTab(subtitle,url,icon){ 66 | if(!$('#tabs').tabs('exists',subtitle)){ 67 | $('#tabs').tabs('add',{ 68 | title:subtitle, 69 | content:createFrame(url), 70 | closable:true, 71 | icon:icon 72 | }); 73 | }else{ 74 | $('#tabs').tabs('select',subtitle); 75 | $('#mm-tabupdate').click(); 76 | } 77 | tabClose(); 78 | } 79 | 80 | function createFrame(url) 81 | { 82 | var s = ''; 83 | return s; 84 | } 85 | 86 | function tabClose() 87 | { 88 | /*双击关闭TAB选项卡*/ 89 | $(".tabs-inner").dblclick(function(){ 90 | var subtitle = $(this).children(".tabs-closable").text(); 91 | $('#tabs').tabs('close',subtitle); 92 | }) 93 | /*为选项卡绑定右键*/ 94 | $(".tabs-inner").bind('contextmenu',function(e){ 95 | $('#mm').menu('show', { 96 | left: e.pageX, 97 | top: e.pageY 98 | }); 99 | 100 | var subtitle =$(this).children(".tabs-closable").text(); 101 | 102 | $('#mm').data("currtab",subtitle); 103 | $('#tabs').tabs('select',subtitle); 104 | return false; 105 | }); 106 | } 107 | //绑定右键菜单事件 108 | function tabCloseEven() 109 | { 110 | //刷新 111 | $('#mm-tabupdate').click(function(){ 112 | var currTab = $('#tabs').tabs('getSelected'); 113 | var url = $(currTab.panel('options').content).attr('src'); 114 | $('#tabs').tabs('update',{ 115 | tab:currTab, 116 | options:{ 117 | content:createFrame(url) 118 | } 119 | }) 120 | }) 121 | //关闭当前 122 | $('#mm-tabclose').click(function(){ 123 | var currtab_title = $('#mm').data("currtab"); 124 | $('#tabs').tabs('close',currtab_title); 125 | }) 126 | //全部关闭 127 | $('#mm-tabcloseall').click(function(){ 128 | $('.tabs-inner span').each(function(i,n){ 129 | var t = $(n).text(); 130 | $('#tabs').tabs('close',t); 131 | }); 132 | }); 133 | //关闭除当前之外的TAB 134 | $('#mm-tabcloseother').click(function(){ 135 | $('#mm-tabcloseright').click(); 136 | $('#mm-tabcloseleft').click(); 137 | }); 138 | //关闭当前右侧的TAB 139 | $('#mm-tabcloseright').click(function(){ 140 | var nextall = $('.tabs-selected').nextAll(); 141 | if(nextall.length==0){ 142 | //msgShow('系统提示','后边没有啦~~','error'); 143 | alert('后边没有啦~~'); 144 | return false; 145 | } 146 | nextall.each(function(i,n){ 147 | var t=$('a:eq(0) span',$(n)).text(); 148 | $('#tabs').tabs('close',t); 149 | }); 150 | return false; 151 | }); 152 | //关闭当前左侧的TAB 153 | $('#mm-tabcloseleft').click(function(){ 154 | var prevall = $('.tabs-selected').prevAll(); 155 | if(prevall.length==0){ 156 | alert('到头了,前边没有啦~~'); 157 | return false; 158 | } 159 | prevall.each(function(i,n){ 160 | var t=$('a:eq(0) span',$(n)).text(); 161 | $('#tabs').tabs('close',t); 162 | }); 163 | return false; 164 | }); 165 | 166 | //退出 167 | $("#mm-exit").click(function(){ 168 | $('#mm').menu('hide'); 169 | }) 170 | } 171 | 172 | //弹出信息窗口 title:标题 msgString:提示信息 msgType:信息类型 [error,info,question,warning] 173 | function msgShow(title, msgString, msgType) { 174 | $.messager.alert(title, msgString, msgType); 175 | } 176 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/themes/icon.css: -------------------------------------------------------------------------------- 1 | .icon-blank{ 2 | background:url('icons/blank.gif') no-repeat center center; 3 | } 4 | .icon-add{ 5 | background:url('icons/edit_add.png') no-repeat center center; 6 | } 7 | .icon-edit{ 8 | background:url('icons/pencil.png') no-repeat center center; 9 | } 10 | .icon-clear{ 11 | background:url('icons/clear.png') no-repeat center center; 12 | } 13 | .icon-remove{ 14 | background:url('icons/edit_remove.png') no-repeat center center; 15 | } 16 | .icon-save{ 17 | background:url('icons/filesave.png') no-repeat center center; 18 | } 19 | .icon-cut{ 20 | background:url('icons/cut.png') no-repeat center center; 21 | } 22 | .icon-ok{ 23 | background:url('icons/ok.png') no-repeat center center; 24 | } 25 | .icon-no{ 26 | background:url('icons/no.png') no-repeat center center; 27 | } 28 | .icon-cancel{ 29 | background:url('icons/cancel.png') no-repeat center center; 30 | } 31 | .icon-reload{ 32 | background:url('icons/reload.png') no-repeat center center; 33 | } 34 | .icon-search{ 35 | background:url('icons/search.png') no-repeat center center; 36 | } 37 | .icon-print{ 38 | background:url('icons/print.png') no-repeat center center; 39 | } 40 | .icon-help{ 41 | background:url('icons/help.png') no-repeat center center; 42 | } 43 | .icon-undo{ 44 | background:url('icons/undo.png') no-repeat center center; 45 | } 46 | .icon-redo{ 47 | background:url('icons/redo.png') no-repeat center center; 48 | } 49 | .icon-back{ 50 | background:url('icons/back.png') no-repeat center center; 51 | } 52 | .icon-sum{ 53 | background:url('icons/sum.png') no-repeat center center; 54 | } 55 | .icon-tip{ 56 | background:url('icons/tip.png') no-repeat center center; 57 | } 58 | .icon-filter{ 59 | background:url('icons/filter.png') no-repeat center center; 60 | } 61 | .icon-man{ 62 | background:url('icons/man.png') no-repeat center center; 63 | } 64 | .icon-lock{ 65 | background:url('icons/lock.png') no-repeat center center; 66 | } 67 | .icon-more{ 68 | background:url('icons/more.png') no-repeat center center; 69 | } 70 | .icon-mini-add{ 71 | background:url('icons/mini_add.png') no-repeat center center; 72 | } 73 | .icon-mini-edit{ 74 | background:url('icons/mini_edit.png') no-repeat center center; 75 | } 76 | .icon-mini-refresh{ 77 | background:url('icons/mini_refresh.png') no-repeat center center; 78 | } 79 | .icon-large-picture{ 80 | background:url('icons/large_picture.png') no-repeat center center; 81 | } 82 | .icon-large-clipart{ 83 | background:url('icons/large_clipart.png') no-repeat center center; 84 | } 85 | .icon-large-shapes{ 86 | background:url('icons/large_shapes.png') no-repeat center center; 87 | } 88 | .icon-large-smartart{ 89 | background:url('icons/large_smartart.png') no-repeat center center; 90 | } 91 | .icon-large-chart{ 92 | background:url('icons/large_chart.png') no-repeat center center; 93 | } 94 | .icon-some-delete{ 95 | background:url('icons/basket_remove.png') no-repeat center center; 96 | } 97 | .icon-book-open{ 98 | background:url('icons/book_open_mark.png') no-repeat center center; 99 | } 100 | .icon-number{ 101 | background:url('icons/text_list_numbers.png') no-repeat center center; 102 | } 103 | .icon-set{ 104 | background:url('icons/set.png') no-repeat center center; 105 | } 106 | .icon-chart_bar{ 107 | background:url('icons/chart_bar.png') no-repeat center center; 108 | } 109 | .icon-user_add{ 110 | background:url('icons/user_add.png') no-repeat center center; 111 | } 112 | .icon-user-student{ 113 | background:url('icons/user_gray.png') no-repeat center center; 114 | } 115 | .icon-user-teacher{ 116 | background:url('icons/user_red.png') no-repeat center center; 117 | } 118 | .icon-house{ 119 | background:url('icons/house.png') no-repeat center center; 120 | } 121 | .icon-world{ 122 | background:url('icons/world.png') no-repeat center center; 123 | } 124 | .icon-exam{ 125 | background:url('icons/text_list_bullets.png') no-repeat center center; 126 | } 127 | .icon-password{ 128 | background:url('icons/2012080412263.png') no-repeat center center; 129 | } 130 | .icon-logout{ 131 | background:url('icons/door_out.png') no-repeat center center; 132 | } 133 | .icon-note{ 134 | background:url('icons/note.png') no-repeat center center; 135 | } 136 | .icon-pencil-add{ 137 | background:url('icons/pencil_add.png') no-repeat center center; 138 | } 139 | .icon-find{ 140 | background:url('icons/find.png') no-repeat center center; 141 | } 142 | .icon-book-add{ 143 | background:url('icons/book_add.png') no-repeat center center; 144 | } 145 | .icon-book-reset{ 146 | background:url('icons/book_previous.png') no-repeat center center; 147 | } 148 | .icon-world-add{ 149 | background:url('icons/world_add.png') no-repeat center center; 150 | } 151 | .icon-world-reset{ 152 | background:url('icons/world_night.png') no-repeat center center; 153 | } 154 | .icon-zoom-in{ 155 | background:url('icons/zoom_in.png') no-repeat center center; 156 | } 157 | .icon-vcard-edit{ 158 | background:url('icons/vcard_edit.png') no-repeat center center; 159 | } 160 | .icon-folder-up{ 161 | background:url('icons/folder_up.png') no-repeat center center; 162 | } 163 | .icon-password{ 164 | background:url('icons/asterisk_orange.png') no-repeat center center; 165 | } 166 | 167 | -------------------------------------------------------------------------------- /src/main/resources/static/easyui/js/validateExtends.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 扩展easyui表单的验证 3 | */ 4 | 5 | $.extend($.fn.validatebox.defaults.rules, { 6 | //验证汉字 7 | CHS: { 8 | validator: function (value) { 9 | return /^[\u0391-\uFFE5]+$/.test(value); 10 | }, 11 | message: '只能输入汉字' 12 | }, 13 | //移动手机号码验证 14 | mobile: {//value值为文本框中的值 15 | validator: function (value) { 16 | var reg = /^1[3|4|5|8|9]\d{9}$/; 17 | return reg.test(value); 18 | }, 19 | message: '13/14/15/18/19开头,且11位的手机号' 20 | }, 21 | //只能为数字 22 | number: {//value值为文本框中的值 23 | validator: function (value) { 24 | var reg = /^[0-9]*$/; 25 | return reg.test(value); 26 | }, 27 | message: '只能为数字格式' 28 | }, 29 | //验证账号不能重复 30 | repeat: { 31 | validator: function (value) { 32 | var flag = true; 33 | $.ajax({ 34 | type: "post", 35 | async: false, 36 | url: "SystemServlet?method=AllAccount&t="+new Date().getTime(), 37 | success: function(data){//在验证函数里加载数据,加载过来后判断输入的值 38 | var account = $.parseJSON(data); 39 | for(var i=0;i < account.length;i++){ 40 | if(value == account[i]){ 41 | flag = false; 42 | break; 43 | } 44 | } 45 | } 46 | }); 47 | return flag; 48 | }, 49 | message: '用户已存在' 50 | }, 51 | 52 | //验证课程不能重复 53 | repeat_course: { 54 | validator: function (value) { 55 | var flag = true; 56 | $.ajax({ 57 | type: "post", 58 | async: false, 59 | url: "CourseServlet?method=CourseList&t="+new Date().getTime(), 60 | success: function(data){//在验证函数里加载数据,加载过来后判断输入的值 61 | var course = $.parseJSON(data); 62 | for(var i=0;i < course.length;i++){ 63 | if(value == course[i].name){ 64 | flag = false; 65 | break; 66 | } 67 | } 68 | } 69 | }); 70 | return flag; 71 | }, 72 | message: '课程名称已存在' 73 | }, 74 | 75 | //验证年级不能重复 76 | repeat_grade: { 77 | validator: function (value) { 78 | var flag = true; 79 | $.ajax({ 80 | type: "post", 81 | async: false, 82 | url: "GradeServlet?method=GradeList&t="+new Date().getTime(), 83 | success: function(data){//在验证函数里加载数据,加载过来后判断输入的值 84 | var grade = $.parseJSON(data); 85 | for(var i=0;i < grade.length;i++){ 86 | if(value == grade[i].name){ 87 | flag = false; 88 | break; 89 | } 90 | } 91 | } 92 | }); 93 | return flag; 94 | }, 95 | message: '年级名称已存在' 96 | }, 97 | 98 | //验证专业不能重复 99 | repeat_clazz: { 100 | validator: function (value, param) { 101 | var gradeid = $(param[0]).combobox("getValue"); 102 | var flag = true; 103 | $.ajax({ 104 | type: "post", 105 | async: false, 106 | data: {gradeid: gradeid}, 107 | url: "ClazzServlet?method=ClazzList&t="+new Date().getTime(), 108 | success: function(data){//在验证函数里加载数据,加载过来后判断输入的值 109 | var clazz = $.parseJSON(data); 110 | for(var i=0;i < clazz.length;i++){ 111 | if(value == clazz[i].name){ 112 | flag = false; 113 | break; 114 | } 115 | } 116 | } 117 | }); 118 | return flag; 119 | }, 120 | message: '该年级下已存在同名专业' 121 | }, 122 | 123 | //验证两个值是否相同 124 | equals: {//param的值为[]中值 125 | validator: function (value, param) { 126 | if($(param[0]).val() != value){ 127 | return false; 128 | } else{ 129 | return true; 130 | } 131 | 132 | }, message: '两次密码不同.' 133 | }, 134 | 135 | //密码规则 136 | password: { 137 | validator: function (value) { 138 | var reg = /^[a-zA-Z0-9]{6,16}$/; 139 | return reg.test(value); 140 | 141 | }, message: '密码6-16位,且只能为英文、数字' 142 | }, 143 | 144 | //验证输入密码是否正确 145 | oldPassword: { 146 | validator: function (value, param) { 147 | if(param != value){ 148 | return false; 149 | } else{ 150 | return true; 151 | } 152 | 153 | }, message: '密码不正确' 154 | }, 155 | 156 | //国内邮编验证 157 | zipcode: { 158 | validator: function (value) { 159 | var reg = /^[1-9]\d{5}$/; 160 | return reg.test(value); 161 | }, 162 | message: '邮编必须是非0开始的6位数字.' 163 | }, 164 | //用户账号验证(只能包括 _ 数字 字母) 165 | account: {//param的值为[]中值 166 | validator: function (value, param) { 167 | if (value.length < param[0] || value.length > param[1]) { 168 | $.fn.validatebox.defaults.rules.account.message = '用户名长度必须在' + param[0] + '至' + param[1] + '范围'; 169 | return false; 170 | } else { 171 | if (!/^[\w]+$/.test(value)) { 172 | $.fn.validatebox.defaults.rules.account.message = '用户名只能数字、字母、下划线组成.'; 173 | return false; 174 | } else { 175 | return true; 176 | } 177 | } 178 | }, message: '' 179 | } 180 | }) 181 | --------------------------------------------------------------------------------