基于javaweb+mysql的教务管理系统(java+JSP+Spring+SpringBoot+layui+maven)

一、项目简述

功能包括:
三角色教师 管理员,学生教务管理系统,包括院系管理,课题综合管理,信息管理,以及差旅管理,学生选题等等。

二、项目运行

环境配置:
Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

项目技术:

JSP +Spring + SpringBoot + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

适用

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

    public String Topicsto(Long project_id,int selectFlag,String projectName, Model model, HttpSession httpSession) {
        List<topicsto> topicstos = topicsService.topicsinfo(project_id);
        Student student = (Student) request.getSession().getAttribute("student");
        Long flag = topicsService.state(student);
        Long flagto = topicsService.flag(project_id);
        if (flagto != 0) {
            flag = 3L;
        }
        model.addAttribute("selectFlag",selectFlag);
        model.addAttribute("flag", flag);
        model.addAttribute("topicstos", topicstos);
        model.addAttribute("projectName", projectName);
        model.addAttribute("project_id", project_id);
        model.addAttribute("XZproject", httpSession.getAttribute("XZproject"));
        return "student/topicsinfoto";
    }
    /**
     * 选报课题
     */
    @Autowired
    SubjectselectedMapper subjectselectedMapper;
    @RequestMapping("/enroll")
    @ResponseBody
    public String enroll(Long project_id, HttpSession httpSession) {
        String projectName = topicsService.selectprojectname(project_id);
        Student student = (Student) request.getSession().getAttribute("student");
    @ResponseBody
    public Msg fun19(Long year, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        TechnicalPersonnelWithBLOBs technicalPersonnelWithBLOBs = teacherService.selectTechnicalPersonnelInfo(teacher.getId(), year);
        return Msg.success().add("technicalPersonnel", technicalPersonnelWithBLOBs);
    }
    // 毕业设计内容
    // 加载上传课题页面
    @GetMapping("/upload_topic_page")
    public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<Projecttype> projecttypes = teacherService.select_allProjecttype();
        List<Projectsource> projectsources = teacherService.select_allProjectsource();
        List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());
        modelMap.addAttribute("projecttypes", projecttypes);
        modelMap.addAttribute("projectsources", projectsources);
        modelMap.addAttribute("specialties", specialties);
        DebriefingYearWithBLOBs debriefingYear = teacherService.selectYearDebriefingInfo(teacher.getId(), year);
        return Msg.success().add("debriefingInfo", debriefingYear);
    }
    //查询学期述职中年份
    @GetMapping("select_debriefing_term")
    @ResponseBody
    public Msg fun13() {
        List<Debriefing> list = teacherService.selectDebriefingTermByYear();
        List<Long> temp = new ArrayList<>();
        //去除重复的年份
        for (Debriefing s : list) {
            if (!temp.contains(s.getYear())) {
                temp.add(s.getYear());
            }
        }
        return Msg.success().add("year", temp);
    }
    //查询指定年份的学期述职信息
    @GetMapping("/select_debriefing_term_info")
    @ResponseBody
    // 加载上传课题页面
    @GetMapping("/upload_topic_page")
    public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<Projecttype> projecttypes = teacherService.select_allProjecttype();
        List<Projectsource> projectsources = teacherService.select_allProjectsource();
        List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());
        modelMap.addAttribute("projecttypes", projecttypes);
        modelMap.addAttribute("projectsources", projectsources);
        modelMap.addAttribute("specialties", specialties);
        return "teacher/graduation/upload";
    }
    // 上传课题
    @PostMapping("/up_project")
    @ResponseBody
    public Msg fun20(String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam("file") MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException {
        if (file == null) {
            return Msg.fail().add("msg","文件上传失败");
        return "teacher/teacherInfo/updateinfo";
    }
    @GetMapping("/workapprovalinfo")
    public String workInfo() {
        return "teacher/workapproval/winfo";
    }
    @GetMapping("/workapprovaldata")
    public String workData() {
        return "teacher/workapproval/wdata";
    }
    @GetMapping("/seeworkdata")
    public String seeWorkData() {
        return "teacher/workapproval/seewdata";
    // 毕业设计内容
    // 加载上传课题页面
    @GetMapping("/upload_topic_page")
    public String uploadTopic(ModelMap modelMap, HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<Projecttype> projecttypes = teacherService.select_allProjecttype();
        List<Projectsource> projectsources = teacherService.select_allProjectsource();
        List<Specialty> specialties = teacherService.select_allSpecialty(teacher.getIdSection());
        modelMap.addAttribute("projecttypes", projecttypes);
        modelMap.addAttribute("projectsources", projectsources);
        modelMap.addAttribute("specialties", specialties);
        return "teacher/graduation/upload";
    }
    // 上传课题
    @PostMapping("/up_project")
    @ResponseBody
    public Msg fun20(String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam("file") MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException {
        if (file == null) {
            return Msg.fail().add("msg","文件上传失败");
        }
        if(teacherService.selectProjectByName(projectName).size()>0){
            System.out.println("上传失败");
            return Msg.fail().add("msg","课题名已存在");
        }
    public String yearDebriefing() {
        return "teacher/fillouttable/yeardebriefing";
    }
    @GetMapping("/annual_assessment")
    public String annualAssessment() {
        return "teacher/fillouttable/annualassessment";
    }
    @GetMapping("/work_load")
    public String workLoad() {
        return "teacher/fillouttable/workload";
    }
    @GetMapping("/technical_personnel")
    public String technicalPersonnel() {
        return "teacher/fillouttable/technicalpersonnel";
    }
    @GetMapping("/term_business")
    public String termBusiness() {
        return "teacher/fillouttable/termbusiness";
    }
    //查看表格页面
    @GetMapping("/show_year_debriefing")
    public String showYearDebriefing() {
        return "teacher/showtable/yeardebriefing";
public class LoginController {
    private static final Logger LOGGER = LoggerFactory.getLogger(LoginController.class);
    @Autowired
    AdminService adminService;
    @GetMapping("/cs")
    public String cs() {
        return "cs";
    }
    @GetMapping("/login")
    public String login() {
        return "login";
    }
    @PostMapping("/login")
    @ResponseBody
    public Msg login(String name, String pwd, HttpSession httpSession) {
        name = name.trim();
        List<Workapprovaldata> list = teacherService.selectWorkData(teacher.getIdSection());
        PageInfo page = new PageInfo(list, 5);
        return Msg.success().add("dataInfo", page);
    }
    //出差附件下载
    @RequestMapping(value = "/file_download")
    public ResponseEntity<byte[]> downloadFile(String dataId, HttpServletRequest req, HttpServletResponse response) throws IOException {
        Workapprovaldata workapprovaldata = null;
        if (dataId != null) {
            Long id = Long.valueOf(dataId);
            workapprovaldata = teacherService.selectWorkDataById(id);
        }
        if (workapprovaldata != null) {
            String filePath = workapprovaldata.getDatarar();
            //设置文件路径
            File file = new File(filePath);
            if (!file.exists()) {
                file.mkdirs();
            }
            String fileName = file.getName();
            HttpHeaders headers = new HttpHeaders();
            return Msg.success();
        } else {
            //获取课题
            SubjectWithBLOBs subject1 = subjectService.getSubjectByID(id);
            //获取课题路径
            String oldPath = subject1.getFilepath();
            File oldFile = new File(oldPath);
            //如果文件存在则删除
            if (oldFile.exists()) {
                //删除成功
                if (oldFile.delete()) {
                } else {
                    return Msg.fail();
        return "student/modifyinfo";
    }
    /**
     * 修改个人信息
     * 根据班级(className)修改
     *
     */
    /*@RequestMapping(value = "/modifyinfodao", method = RequestMethod.PUT)
    @ResponseBody
    public String modifyinfodao(Student student, String className, Model model) {
        Student Tstudent = (Student) request.getSession().getAttribute("student");
        MyClass Tclass = indexService.selectByclassName(className);
        int count = -1;
        student.setIdClass(Tclass.getId());

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值