• Java项目:高校教学评价管理系统(java+JSP+JavaScript+servlet+Mysql)


    源码获取:俺的博客首页 "资源" 里下载!

    项目介绍

    本项目为后台管理系统,分为管理员与学生两种角色;

    管理员角色包含以下功能:

    管理员登录,管理员管理,修改密码,教师管理,学生管理,评价指标管理,评价结果查看等功能。

    学生角色包含以下功能:
    学生角色登录,个人信息修改,评价某一个老师等功能。

    环境需要

    1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
    2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
    3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
    4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 
    5.数据库:MySql 5.7版本;
    6.是否Maven项目:否;


    技术栈

    JSP+CSS+JavaScript+servlet+mysql

    使用说明

    1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
    2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
    若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
    3. 将项目中dao/DB.java配置文件中的数据库配置改为自己的配置;
    4. 运行项目,输入http://localhost:8080/pingjia 登录
    管理员账号/密码:admin/admin
    用户账号/密码: liuguangliang/000000

     

     

     

     

     

     

     

    学生管理控制层:

    1. @Controller
    2. @RequestMapping("th")
    3. public class StudentController {
    4. @Autowired
    5. private Sysservice sysservice;
    6. @Autowired
    7. private Courseresoureservice recoureservice;
    8. @Autowired
    9. private Studyrecordservice recordservice;
    10. @Autowired
    11. private Batchservice batchservice;
    12. @Autowired
    13. private Examscoreservice examxcore;
    14. //基本信息查询
    15. @RequestMapping("/studentmessage")
    16. public String studentmessage(ModelMap map,Sysuser user) {
    17. Sysuser user1=sysservice.selectone(user);
    18. map.addAttribute("sysuser", user1);
    19. return "thymeleaf/student/studentmessage";
    20. }
    21. //课件列表
    22. @RequestMapping("/studentresoure")
    23. public String studentresoure(ModelMap map,Courseresoure resoure) {
    24. List<Courseresoure> resoure1=recoureservice.selectresoure(resoure);
    25. map.addAttribute("courseresoure", resoure1);
    26. return "thymeleaf/student/studentresoure";
    27. }
    28. //学习课件
    29. @RequestMapping("/study")
    30. public String study(ModelMap map,Courseresoure resoure) {
    31. Courseresoure resoure1=recoureservice.resoure(resoure);
    32. resoure1.setFileName("http://localhost:8081/upload/"+resoure1.getFileName());
    33. resoure1.setCoverPath("http://localhost:8081/upload/"+resoure1.getCoverPath());
    34. map.addAttribute("resoure", resoure1);
    35. return "thymeleaf/student/study";
    36. }
    37. //批次信息记录
    38. @RequestMapping("/batchmessage")
    39. public String batchmessage(ModelMap map,Studybatch studybatch,Sysuser user,Userbatch userbatch,Coureseresourebatch resoure) {
    40. Sysuser user1=sysservice.selectone(user);
    41. map.addAttribute("sysuser", user1);
    42. List<Studybatch> selectbatch=batchservice.selectbatch(studybatch);
    43. map.addAttribute("batch", selectbatch);
    44. Userbatch userbatch1=batchservice.userone(userbatch);
    45. map.addAttribute("userbatch", userbatch1);
    46. Coureseresourebatch resoure1=batchservice.resoureone(resoure);
    47. map.addAttribute("resoure", resoure1);
    48. return "thymeleaf/student/studybatch";
    49. }
    50. //进入学习
    51. @RequestMapping("/studyview")
    52. public String studyview(ModelMap map,Studybatch studybatch,Coureseresourebatch resoure1,Courseresoure resoure,Userbatch userbatch) {
    53. Coureseresourebatch resoure2=batchservice.resoureone(resoure1);
    54. map.addAttribute("batchresoure", resoure2);
    55. if(studybatch.getId()==resoure2.getBatchId())
    56. {
    57. Courseresoure resoure3=recoureservice.studyresoure(resoure);
    58. map.addAttribute("recourseview", resoure3);
    59. Userbatch user1=batchservice.userone(userbatch);
    60. map.addAttribute("user", user1);
    61. if(resoure2.getCourseResoureId()==resoure3.getId()) {
    62. resoure3.setFileName("http://localhost:8081/upload/"+resoure3.getFileName());
    63. resoure3.setCoverPath("http://localhost:8081/upload/"+resoure3.getCoverPath());
    64. map.addAttribute("studview", resoure3);
    65. }
    66. }
    67. return "thymeleaf/student/studyview";
    68. }
    69. //记录提交
    70. @RequestMapping("/studyrecord")
    71. public String studyrecord(ModelMap map,Studyrecord record) {
    72. recordservice.insertrecord(record);
    73. return "thymeleaf/error/success";
    74. }
    75. //成绩查询
    76. @RequestMapping("/examscore")
    77. public String examscore(ModelMap map,Sysuser user,Studybatch studybatch,Examscore score) {
    78. Sysuser user1=sysservice.selectone(user);
    79. map.addAttribute("sysuser", user1);
    80. Studybatch exambatch=batchservice.exambatch(studybatch);
    81. map.addAttribute("exambatch", exambatch);
    82. Examscore score1=examxcore.studyscore(score);
    83. if(user.getId()==score1.getSysUserId()&& exambatch.getId()==score1.getStudyBatchId()) {
    84. map.addAttribute("scoreexam", score1);
    85. }
    86. return "thymeleaf/student/studyrecord";
    87. }
    88. }

    角色管理控制层:

    1. @Controller
    2. @RequestMapping("th")
    3. public class RoleController {
    4. @Autowired
    5. private Sysroleservice roleservice;
    6. //角色列表
    7. @RequestMapping("/listrole")
    8. public String selectRole(ModelMap map,Sysrole role) {
    9. List<Sysrole> role1=roleservice.selectRole(role);
    10. System.out.println(role1);
    11. map.addAttribute("sysrole", role1);
    12. return "thymeleaf/role/listrole";
    13. }
    14. //修改状态
    15. @RequestMapping("/updaterolez")
    16. public String updatez(ModelMap map,Sysrole role) {
    17. Sysrole role1=roleservice.selectone(role);
    18. int Status=role1.getStatus();
    19. int Id=role1.getId();
    20. System.out.println(role1.getStatus());
    21. if(Status==0)
    22. {
    23. Status=Status+1;
    24. }
    25. else {
    26. Status=Status-1;
    27. }
    28. roleservice.updatez(Status, Id);
    29. map.addAttribute("sysrole", role1);
    30. return "thymeleaf/error/success";
    31. }
    32. //修改角色界面
    33. @RequestMapping("/updatej")
    34. public String updatej(Sysrole role,ModelMap map) {
    35. Sysrole role1=roleservice.selectone(role);
    36. map.addAttribute("sysrole", role1);
    37. return "thymeleaf/role/updaterole";
    38. }
    39. //修改提交页面
    40. @RequestMapping(value="/updatemj")
    41. public String updatemj(Sysrole role,ModelMap map) {
    42. Sysrole role1=roleservice.selectone(role);
    43. roleservice.update(role);
    44. map.addAttribute("sysrole", role1);
    45. return "thymeleaf/error/success";
    46. }
    47. //删除角色
    48. @RequestMapping("/deleterole")
    49. public String deleterole(Sysrole role,ModelMap map) {
    50. Sysrole role1=roleservice.selectone(role);
    51. roleservice.deleterole(role);
    52. map.addAttribute("sysrole", role1);
    53. return "thymeleaf/error/success";
    54. }
    55. //添加角色界面
    56. @RequestMapping("/addrole")
    57. public String addrole(Sysrole role,ModelMap map) {
    58. return "thymeleaf/role/addrole";
    59. }
    60. //提交增加页面
    61. @RequestMapping("/addrolet")
    62. public String addrolet(Sysrole role,ModelMap map) {
    63. roleservice.addrole(role);
    64. return "thymeleaf/error/success";
    65. }
    66. }

     登录管理控制层:

    1. @Controller
    2. @RequestMapping("th")
    3. public class LoginController {
    4. @Autowired
    5. private Sysservice sysservice;
    6. //登录页面
    7. @RequestMapping("/login")
    8. public String index(ModelMap map) {
    9. return "thymeleaf/login/login";
    10. }
    11. @RequestMapping("/error")
    12. public String error(ModelMap map) {
    13. return "thymeleaf/error/error";
    14. }
    15. //注册页面
    16. @RequestMapping("/regiest")
    17. public String regiest(ModelMap map) {
    18. return "thymeleaf/login/regiest";
    19. }
    20. //提交注册页面
    21. @RequestMapping(value ="/regiest1")
    22. public String regiest1(ModelMap map,Sysuser user) {
    23. int user1=sysservice.addUser(user);
    24. map.addAttribute("sysuser", user1);
    25. return "thymeleaf/error/success";
    26. }
    27. //传值进入修改密码界面
    28. @RequestMapping("/updateps")
    29. public String selectone(Sysuser user,ModelMap map) {
    30. Sysuser user1=sysservice.selectone(user);
    31. map.addAttribute("sysuser", user1);
    32. return "thymeleaf/user/updateps";
    33. }
    34. //提交修改密码界面
    35. @RequestMapping(value ="/updateps1")
    36. public String updateps(Sysuser user,ModelMap map) {
    37. Sysuser user1=sysservice.selectone(user);
    38. sysservice.updateps(user);
    39. map.addAttribute("sysuser", user1);
    40. return "thymeleaf/error/success";
    41. }
    42. //用户列表
    43. @RequestMapping("/listuser")
    44. public String listuser(ModelMap map,Sysuser user) {
    45. List<Sysuser> user1=sysservice.selectUser(user);
    46. map.addAttribute("sysuser", user1);
    47. return "thymeleaf/user/listuser";
    48. }
    49. //提交登录界面
    50. @RequestMapping(value = "/login1")
    51. public String login(Sysuser user,ModelMap map,Studybatch studybatch){
    52. Sysuser user1 = sysservice.login(user);
    53. System.out.println(user1);
    54. System.out.println(user1.getName());
    55. System.out.println(user1.getId());
    56. System.out.println(user1.getStatus());
    57. if(user1.getStatus()==0 ) {
    58. if(user1.getPermission()==1)
    59. {
    60. map.addAttribute("sysuser", user1);
    61. return "thymeleaf/user/userindex";
    62. }
    63. else {
    64. map.addAttribute("sysuser", user1);
    65. return "thymeleaf/student/studentindex";
    66. }
    67. }
    68. else if(user1.getStatus()==1) {
    69. return "thymeleaf/error/error";
    70. }
    71. return null;
    72. }
    73. //删除用户
    74. @RequestMapping("/delete")
    75. public String delete(Sysuser user,ModelMap map) {
    76. Sysuser user1=sysservice.selectone(user);
    77. sysservice.deleteUser(user);
    78. map.addAttribute("sysuser", user1);
    79. return "thymeleaf/error/success";
    80. }
    81. //修改用户界面
    82. @RequestMapping("/updatem")
    83. public String updatem(Sysuser user,ModelMap map) {
    84. Sysuser user1=sysservice.selectone(user);
    85. map.addAttribute("sysuser", user1);
    86. return "thymeleaf/user/updatemessage";
    87. }
    88. //修改提交页面
    89. @RequestMapping(value="/updatems")
    90. public String updatems(Sysuser user,ModelMap map) {
    91. Sysuser user1=sysservice.selectone(user);
    92. sysservice.updatems(user);
    93. map.addAttribute("sysuser", user1);
    94. return "thymeleaf/error/success";
    95. }
    96. //修改状态
    97. @RequestMapping("/updatez")
    98. public String updatez(ModelMap map,Sysuser user) {
    99. Sysuser user1=sysservice.selectone(user);
    100. int Status=user1.getStatus();
    101. int Id=user1.getId();
    102. System.out.println(user1.getStatus());
    103. if(Status==0)
    104. {
    105. Status=Status+1;
    106. }
    107. else {
    108. Status=Status-1;
    109. }
    110. sysservice.updatez(Status, Id);
    111. map.addAttribute("sysuser", user1);
    112. return "thymeleaf/error/success";
    113. }
    114. //添加用户页面
    115. @RequestMapping("/adduser")
    116. public String adduser(Sysuser user,ModelMap map) {
    117. return "thymeleaf/user/adduser";
    118. }
    119. //提交用户页面
    120. @RequestMapping("/addsysuser")
    121. public String addsysuser(Sysuser user,ModelMap map) {
    122. sysservice.addsysuser(user);
    123. return "thymeleaf/error/success";
    124. }
    125. }

    课程管理控制层: 

    1. @Controller
    2. @RequestMapping("th")
    3. public class CourseController {
    4. @Autowired
    5. private Courseinfoservice courseservice;
    6. //课程列表
    7. @RequestMapping("/listcourse")
    8. public String selectRole(ModelMap map,Courseinfo course) {
    9. List<Courseinfo> course1=courseservice.selectcourse(course);
    10. System.out.println(course1);
    11. map.addAttribute("courseinfo", course1);
    12. return "thymeleaf/course/listcourse";
    13. }
    14. //添加课程页面
    15. @RequestMapping("/addcourse")
    16. public String addcourse(Courseinfo course,ModelMap map) {
    17. return "thymeleaf/course/addcourse";
    18. }
    19. //提交添加课程页面
    20. @RequestMapping("/addcourse1")
    21. public String addcourse1(Courseinfo course,ModelMap map) {
    22. System.out.println(course);
    23. courseservice.addcourse(course);
    24. return "thymeleaf/error/success";
    25. }
    26. //删除
    27. @RequestMapping("/deletecourse")
    28. public String deletecourse(Courseinfo course,ModelMap map) {
    29. Courseinfo course1=courseservice.selecto(course);
    30. courseservice.deletecourse(course);
    31. map.addAttribute("courseinfo", course1);
    32. return "thymeleaf/error/success";
    33. }
    34. //修改界面
    35. @RequestMapping("/updatecourse")
    36. public String updatecourse(Courseinfo course,ModelMap map) {
    37. Courseinfo course1=courseservice.selecto(course);
    38. map.addAttribute("courseinfo",course1);
    39. return "thymeleaf/course/updatecourse";
    40. }
    41. //提交修改界面
    42. @RequestMapping("/updatecourse1")
    43. public String updatecourse1(Courseinfo course,ModelMap map) {
    44. Courseinfo course1=courseservice.selecto(course);
    45. courseservice.updatecourse(course);
    46. map.addAttribute("courseinfo",course1);
    47. return "thymeleaf/error/success";
    48. }
    49. }

    源码获取:俺的博客首页 "资源" 里下载!

  • 相关阅读:
    人工智能AI知多少?
    Java面试题(每天10题)-------连载(34)
    使用宝塔面板部署商城项目到云服务器的案例
    Vue 绑定style和class
    Windows 0x80190001错误登录失败
    Util应用框架Web Api开发快速入门
    每天一个面试题:四种引用,弱引用防止内存泄漏
    【错误记录】PySpark 运行报错 ( Did not find winutils.exe | HADOOP_HOME and hadoop.home.dir are unset )
    Android13 串口控制是能wifi adb实现
    解析xml文件
  • 原文地址:https://blog.csdn.net/m0_66863468/article/details/125310714