java+SpringBoot设计实现评教系统

目录
  • 主要功能
  • 运行环境
  • 效果图展示
  • 主要代码
    • 教师管理控制层
    • 登录控制层
    • 管理员控制层

主要功能

共有三个角色:管理员、教师、学生。

管理员功能有:学生管理、教师管理、评教管理、指标管理、课程管理等。

教师功能有:学生管理、指标管理、课程管理。

学生功能有:评教管理。

运行环境

jdk1.8、mysql5.X、maven3.5\3.6、idea

效果图展示

主要代码

教师管理控制层

@Authority(roles = {Role.TEACHER})
@Controller
@RequestMapping("/teacher")
public class TeacherController {

    @Autowired
    TeacherService teacherService;

    @Autowired
    SubjectService subjectService;

    @RequestMapping(value = {"", "/loginPage"})
    public String loginPage() {
        return "teacher/login";
    }

    @GetMapping("/index")
    public String homePage() {
        return "teacher/public-teacher-index";
    }

    @GetMapping("/updatePwd")
    public String updatePwd() {
        return "teacher/teacherInfo/updatePwd";
    }

    @GetMapping("/teacherInfo")
    public String teacherInfo() {
        return "teacher/teacherInfo/teacherinfo";
    }

    @GetMapping("/modifyinfo")
    public String modifyInfo() {
        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("/term_debriefing")
    public String termDebriefing() {
        return "teacher/fillouttable/termdebriefing";
    }

    @GetMapping("/year_debriefing")
    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";
    }

    @GetMapping("/show_term_debriefing")
    public String showTermDebriefing() {
        return "teacher/showtable/termdebriefing";
    }

    @GetMapping("/show_annual_assessment")
    public String showAnnualAssessment() {
        return "teacher/showtable/annualassessment";
    }

    @GetMapping("/show_technical_personnel")
    public String showTechnicalPersonnel() {
        return "teacher/showtable/technicalpersonnel";
    }

    @GetMapping("/show_workload")
    public String showWorkLoad() {
        return "teacher/showtable/workload";
    }

    @GetMapping("/exit")
    public String exit(HttpServletResponse response) {
        //将Cookie 中的token 置空
        Cookie cookie = new Cookie("token", null);
        cookie.setPath("/");
        response.addCookie(cookie);
        return "redirect:/";
    }

    //打印页面
    @GetMapping("/print_term_debriefing")
    public String printYearDebriefing(Long year, String term, Model model) {
        model.addAttribute("year", year);
        model.addAttribute("term", term);
        return "teacher/showtable/print/termdebriefing";
    }

    @GetMapping("/print_year_debriefing")
    public String printTermDebriefing(Long year, Model model) {
        model.addAttribute("year", year);
        return "teacher/showtable/print/yeardebriefing";
    }

    @GetMapping("/login")
    @ResponseBody
    public Msg login(String name, String pwd, HttpSession httpSession, HttpServletResponse response) throws ParseException {
        name = name.trim();
        int flag = teacherService.teacherDL(name, pwd);
        if (flag == 200) {
            User user = new User();
            //-1表示为超管
            user.setId(0L);
            user.setRole("teacher");
            user.setUserName(name);
            //生成Token 存到 Cookie
            Cookie cookie = new Cookie("token", TokenUtil.createToken(
                    user
            ));
            //该Cookie无法被js读取
            cookie.setHttpOnly(true);
            cookie.setPath("/");
            response.addCookie(cookie);

            Teacher teacher = teacherService.selectTeacher(name);

            httpSession.setAttribute("teacherInfo", teacher);
            httpSession.setMaxInactiveInterval(3600);
        }
        return Msg.success().add("info", flag);
    }

    //教师信息修改
    //修改教师密码
    @PostMapping("/teacherupdetpwd")
    @ResponseBody
    public Msg fun6(String oldpwd, String newpwd, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        int flag = teacherService.teacherUpdetpwd(teacher.getUsername(), oldpwd, newpwd);
        return Msg.success().add("flag", flag);
    }

    //修改教师信息
    @PostMapping("/teacherupdeteinfo")
    @ResponseBody
    public Msg updateinfo(String name, String gender, HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        teacher.setName(name);
        teacher.setGender(gender);
        teacherService.teacherupdateInfo(teacher);
        return Msg.success();
    }

    //教师出差模块
    //查询所有教师出差申请信息
    @GetMapping("/select_work_all")
    @ResponseBody
    public Msg fun1(HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<WorkapprovalWithBLOBs> list = teacherService.selectTeacherWorkAll(teacher.getId());
        return Msg.success().add("workinfo", list);
    }

    //查询申请成功教师出差申请
    @GetMapping("/select_work_success")
    @ResponseBody
    public Msg fun2(HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<WorkapprovalWithBLOBs> list = teacherService.selectWorkSuccess(teacher.getId());
        return Msg.success().add("workinfo", list);
    }

    //查询申请失败教师出差申请
    @GetMapping("/select_work_failed")
    @ResponseBody
    public Msg fun3(HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<WorkapprovalWithBLOBs> list = teacherService.selectWorkFailed(teacher.getId());
        return Msg.success().add("workinfo", list);
    }

    //查询已提交教师出差申请
    @GetMapping("/select_work_submitted")
    @ResponseBody
    public Msg fun4(HttpSession httpSession) {
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) httpSession.getAttribute("teacherInfo");
        List<WorkapprovalWithBLOBs> list = teacherService.selectWorkSubmitted(teacher.getId());
        return Msg.success().add("workinfo", list);
    }

    //删除申请失败的教师出差
    @PostMapping("/delete_work")
    @ResponseBody
    public Msg deleteWork(Long id) {
        teacherService.deleteWorkById(id);
        return Msg.success();
    }

    //加载报告填写页面
    @GetMapping("/fillworkapproval")
    public String fun5(Long id, Model model) throws ParseException {
        WorkapprovalWithBLOBs workapproval = teacherService.selectWorkById(id);
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        String start = sdf.format(workapproval.getBeginDate());
        String end = sdf.format(workapproval.getEndDate());
        String time = start + " - " + end;
        model.addAttribute("workapproval", workapproval);
        model.addAttribute("time", time);
        return "teacher/workapproval/fillwdata";
    }

    //上传出差报告
    @PostMapping("/fill_in_w")
    @ResponseBody
    public Msg fun7(@RequestParam("id_work") Long idWork, @RequestParam("news") String news, @RequestParam("flag") Integer flag,
                    @RequestParam("file") MultipartFile file) throws IOException {
        //判断file的值是否为空
        if (file.isEmpty()) {
            return Msg.error();
        }

        String fileName = file.getOriginalFilename();// 获取上传文件的原名
        int size = (int) file.getSize();
        System.out.println(fileName + "-->" + size);

        File path = new File(ResourceUtils.getURL("target").getPath());
        String savePath = path.getAbsolutePath() + "\\classes\\static\\model";
        String saveFileName = savePath + "\\" + fileName;

//        String path = "D:/test";//文件保存路径
        File targetFile = new File(savePath);
        if (!targetFile.getParentFile().exists()) { //判断文件父目录是否存在
            targetFile.getParentFile().mkdir();
        }
        file.transferTo(new File(targetFile, fileName)); // 开始接受文件

        Workapprovaldata workapprovaldata = new Workapprovaldata();
        workapprovaldata.setIdWorkapproval(idWork);
        workapprovaldata.setNews(news);
        workapprovaldata.setDatarar(saveFileName);
        //flag == 0 公有  flag == 1私有
        workapprovaldata.setFlag(flag);

        teacherService.insertWordData(workapprovaldata);

        return Msg.success();
    }

    //查看出差报告
    @GetMapping("/select_work_data")
    @ResponseBody
    public Msg fun8(Integer pn, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        PageHelper.startPage(pn, 9);
        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();

            headers.setContentType(MediaType.MULTIPART_FORM_DATA);

            String encodeFilename = URLEncoder.encode(fileName, StandardCharsets.UTF_8.toString());
            headers.setContentDispositionFormData("attachment", encodeFilename);

            return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),
                    headers, HttpStatus.CREATED);
        }
        return null;
    }

    //学期述职
    @PostMapping("/upload_term_debriefing")
    @ResponseBody
    public Msg fun9(String year, String term, String teachingTask, String scientificResearch,
                    String otherWork, String winAward, String summary, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        DebriefingWithBLOBs debriefingWithBLOBs = new DebriefingWithBLOBs();
        debriefingWithBLOBs.setIdTeacher(teacher.getId());
        debriefingWithBLOBs.setYear(Long.parseLong(year));
        debriefingWithBLOBs.setTerm(term);
        debriefingWithBLOBs.setTeachingtask(teachingTask);
        debriefingWithBLOBs.setAchievementsinscientificresearch(scientificResearch);
        debriefingWithBLOBs.setOtherwork(otherWork);
        debriefingWithBLOBs.setWinaward(winAward);
        debriefingWithBLOBs.setSummary(summary);
        int flag = teacherService.selectTermDebriefingFlag(teacher.getId(), Long.parseLong(year), term);
        if (flag == 1) {
            teacherService.updateTermDebriefing(debriefingWithBLOBs);
        } else {
            int i = teacherService.insertTermDebriefing(debriefingWithBLOBs);
        }
        return Msg.success();
    }

    // 工作量表相关

    @GetMapping("/wordload")
    public String wordloadPage() {
        return "teacher/table/workload";
    }

    @GetMapping("/wordloadData")
    @ResponseBody
    public Msg wordloadData(
            @RequestParam("year") String year,
            @RequestParam("trem") String trem
    ) {
        Teacher teacher = (Teacher) request.getSession().getAttribute("teacherInfo");

        return Msg.success()
                .add("teacher", teacher)
                .add("workloadDTO", teacherService.getWorkload(teacher.getId(), year, trem));
    }

    private static final Logger LOGGER = LoggerFactory.getLogger(TeacherController.class);

    @Autowired
    HttpServletRequest request;

    @PostMapping("/wordload")
    @ResponseBody
    public Msg wordloadSave(
            @RequestBody WorkloadDTO workloadDTO
    ) {
        Teacher teacher = (Teacher) request.getSession().getAttribute("teacherInfo");
//        LOGGER.info("{}",workloadDTO);
        teacherService.saveWorkload(workloadDTO, teacher);
        return Msg.success();
    }

    // 教师业务表
    @GetMapping("/business")
    public String businessPage() {
        return "teacher/table/business";
    }

    @GetMapping("/businessData")
    @ResponseBody
    public Msg businessData(
            @RequestParam("year") String year,
            @RequestParam("trem") String trem
    ) {
        Teacher teacher = (Teacher) request.getSession().getAttribute("teacherInfo");
        return teacherService.getBusiness(teacher.getId(), year, trem)
                .add("teacher", teacher);
    }

    @PostMapping("/business")
    @ResponseBody
    public Msg saveBusiness(
            @RequestBody BusinessDTO businessDTO
    ) {
        Teacher teacher = (Teacher) request.getSession().getAttribute("teacherInfo");
        return Msg.sqlChange((int) teacherService.saveBusiness(businessDTO, teacher));
    }

    //年度述职
    @PostMapping("/upload_year_debriefing")
    @ResponseBody
    public Msg fun10(String year, String teachingTask, String scientificResearch,
                     String otherWork, String winAward, String summary, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        DebriefingYearWithBLOBs debriefingYear = new DebriefingYearWithBLOBs();
        debriefingYear.setIdTeacher(teacher.getId());
        debriefingYear.setYear(Long.parseLong(year));
        debriefingYear.setTeachingtask(teachingTask);
        debriefingYear.setAchievementsinscientificresearch(scientificResearch);
        debriefingYear.setOtherwork(otherWork);
        debriefingYear.setWinaward(winAward);
        debriefingYear.setSummary(summary);
        Long flag = teacherService.selectYearDebriefingFlag(teacher.getId(), Long.parseLong(year));
        if (flag == 1) {
            teacherService.updateYearDebriefing(debriefingYear);
        } else {
            int i = teacherService.insertYearDebriefing(debriefingYear);
        }

        return Msg.success();
    }

    //查询年度述职中年份
    @GetMapping("/select_debriefing_year")
    @ResponseBody
    public Msg fun11() {
        List<DebriefingYear> list = teacherService.selectDebriefingByYear();

//         把年份排序
        Collections.sort(list, new Comparator<DebriefingYear>() {
            @Override
            public int compare(DebriefingYear o1, DebriefingYear o2) {
                return (int) (o2.getYear() - o1.getYear());
            }
        });
        return Msg.success().add("year", list);
    }

    //查询指定年份的年度述职信息
    @GetMapping("/select_debriefing_year_info")
    @ResponseBody
    public Msg fun12(Long year, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        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
    public Msg fun14(Long year, String term, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        DebriefingWithBLOBs debriefing = teacherService.selectTermDebriefingInfo(teacher.getId(), year, term);
        return Msg.success().add("debriefingInfo", debriefing);
    }

    //年度考核
    @PostMapping("/upload_annual_assessment")
    @ResponseBody
    public Msg fun15(String personalSummary, String year, String remark, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        AnnualAssessmentWithBLOBs assessment = new AnnualAssessmentWithBLOBs();
        assessment.setIdTeacher(teacher.getId());
        assessment.setPersonalsummary(personalSummary);
        assessment.setYear(year);
        assessment.setRemark(remark);
        Long flag = teacherService.selectAnnualAssessmentFlag(teacher.getId(), year);
        if (flag == 1) {
            int i = teacherService.updateAnnualAssessment(assessment);
        } else {
            int i = teacherService.insertAnnualAssessment(assessment);
        }
        return Msg.success();
    }

    //年度专业技术人员考核表
    @PostMapping("/upload_technical_personnel")
    @ResponseBody
    public Msg fun16(String year, String mainAchievements, String attendance, String rewardsAndPunishments, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        TechnicalPersonnelWithBLOBs technicalPersonnelWithBLOBs = new TechnicalPersonnelWithBLOBs();
        technicalPersonnelWithBLOBs.setIdTeacher(teacher.getId());
        technicalPersonnelWithBLOBs.setYear(year);
        technicalPersonnelWithBLOBs.setMainachievements(mainAchievements);
        technicalPersonnelWithBLOBs.setAttendance(attendance);
        technicalPersonnelWithBLOBs.setRewardsandpunishments(rewardsAndPunishments);
        Long flag = teacherService.selectTechnicalPersonnelFlag(teacher.getId(), Long.parseLong(year));
        if (flag == 1) {
            int i = teacherService.updateTechnicalPersonnel(technicalPersonnelWithBLOBs);
        } else {
            int i = teacherService.insertTechnicalPersonnel(technicalPersonnelWithBLOBs);
        }
        return Msg.success();
    }

    //查询年度考核年份
    @GetMapping("/select_annual_assessment")
    @ResponseBody
    public Msg fun17(HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        List<AnnualAssessment> list = teacherService.selectAnnualAssessmentByYear(teacher.getId());
        if (list.isEmpty()) {
            return Msg.fail();
        } else {
            return Msg.success().add("year", list);
        }
    }

    //查询指定年度考核信息
    @GetMapping("/select_annualassessment_year_info")
    @ResponseBody
    public Msg fun18(Long year, HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        AnnualAssessmentWithBLOBs assessment = teacherService.selectAnnualAssessmentInfo(teacher.getId(), year);
        return Msg.success().add("assessmentInfo", assessment);
    }

    //查询度专业技术人员考核表年份
    @GetMapping("/select_technical_personnel_year")
    @ResponseBody
    public Msg fun18(HttpSession httpSession) {
        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        List<TechnicalPersonnel> list = teacherService.selectTechnicalPersonnelByYear(teacher.getId());
        if (list.isEmpty()) {
            return Msg.fail();
        } else {
            return Msg.success().add("year", list);
        }
    }

    //查询度专业技术人员考核表信息
    @GetMapping("/select_technicalpersonnel_year_info")
    @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);
        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","课题名已存在");
        }

        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");

        ServletContext servletContext = request.getSession().getServletContext();

        String uploadFileName = file.getOriginalFilename(); // 获取上传文件的原名
        System.out.println(uploadFileName);

        uploadFileName = uploadFileName.substring(uploadFileName.lastIndexOf(File.separator) + 1);
        System.out.println(uploadFileName);

        File path = new File(ResourceUtils.getURL("target").getPath());
        String savePath =
                path.getAbsolutePath() + File.separator+"classes+"+File.separator+"static"
                                    +File.separator+"model"+File.separator + teacher.getId();
        String saveFileName = savePath +File.separator + uploadFileName;

        File dirs = new File(savePath);
        //判断路径是否存在,如果不存在就创建一个
        if (!dirs.exists()) {
            dirs.mkdirs();
        }
        file.transferTo(new File(dirs, uploadFileName)); // 开始接受文件
        System.out.println(teachernames);
        ProjectWithBLOBs project = new ProjectWithBLOBs();
        project.setProjectname(projectName);
        project.setIdProjecttype(idProjecttype);
        project.setIdProjectsource(idProjectsource);
        project.setIdTeacher(teacher.getId());
        project.setFilepath(saveFileName);
        project.setMarchspecialty(marchspecialty.trim());
        project.setTeachernames(teachernames);
        project.setSelectcount(0);
        project.setSelectFlag(0);
        project.setVerifyprojectFlag(0);
        project.setReleaseFlag(0);

        int i = teacherService.insert_project(project);
        return Msg.success();
    }

    //查看自己的课题发布记录
    @GetMapping("/cxmyProject")
    public String fun21(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);

        List<Project> projects = teacherService.selectTeacherProject(teacher.getName());

        for (int i = 0; i < projects.size(); i++) {
            if (projects.get(i).getVerifyprojectFlag() == 0) projects.get(i).setProjectZT("未审核");
            else if (projects.get(i).getVerifyprojectFlag() == 1) projects.get(i).setProjectZT("审核未通过");
            else projects.get(i).setProjectZT("审核通过");
        }
        modelMap.addAttribute("Myproject", projects);
        return "teacher/graduation/section_xq/index";
    }

    // 发布或取消发布已审核通过的课题
    @PostMapping("/fb_project")
    @ResponseBody
    public String fun8(Long project_id, String pd,HttpSession httpSession) {

        int s = Integer.parseInt(pd);
        teacherService.updateProjectFB(project_id, s);
        if (s == 0) {
            teacherService.deleteSelectedAll(project_id);
            teacherService.updateProjectCount(project_id);
        }
        Map<String, String> map = new HashMap<String, String>();
        map.put("pd", "" + 1);
        return JSONObject.toJSONString(map);
    }

    @PostMapping("del_project")
    @ResponseBody
    public Msg deleteProject(Long id) {
        teacherService.deleteProject(id);
        return Msg.success();
    }

    @PostMapping("/updateSubject")
    @ResponseBody
    public Msg updateProject(Long id, String projectName, Long idProjecttype, Long idProjectsource, String marchspecialty, String teachernames, @RequestParam(value = "file", required = false) MultipartFile file, HttpServletRequest request, HttpSession httpSession) throws IOException {

        //拼接 teacherNames 字段
        TeacherWithBLOBs teacher = (TeacherWithBLOBs) request.getSession().getAttribute("teacherInfo");
        String teacherName = teacher.getName();
        if (teachernames == null || teachernames.trim().length() == 0) {
            teachernames = teacherName;
        } else {
            teachernames = teacherName + "&" + teachernames;
        }

        SubjectWithBLOBs subject = null;

        //文件大小 为 0 则表示 文件没上传
        long size = file.getSize();
        //不更新课题文件情况
        if (file == null || size == 0) {
            subject = new SubjectWithBLOBs();

            subject.setId(id);
            subject.setProjectname(projectName);
            subject.setIdProjecttype(idProjecttype);
            subject.setIdProjectsource(idProjectsource);
            subject.setMarchspecialty(marchspecialty);
            subject.setTeachernames(teachernames);

            //修改后状态置 0
            subject.setSelectFlag(0);
            subject.setVerifyprojectFlag(0);
            subject.setReleaseFlag(0);

            subjectService.updateSubjectByid(subject);

            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();
                }
            }

            ServletContext servletContext = request.getSession().getServletContext();

            String uploadFileName = file.getOriginalFilename(); // 获取上传文件的原名

            uploadFileName = uploadFileName.substring(uploadFileName.lastIndexOf(File.separator) + 1);

            File path = new File(ResourceUtils.getURL("target").getPath());
//            String savePath = path.getAbsolutePath() + "\\classes\\static\\model\\" + teacher.getId();
//            String saveFileName = savePath + "\\" + uploadFileName;
            String savePath =
                    path.getAbsolutePath() + File.separator+"classes+"+File.separator+"static"
                            +File.separator+"model"+File.separator + teacher.getId();
            String saveFileName = savePath +File.separator + uploadFileName;

            File dirs = new File(savePath);
            //判断路径是否存在,如果不存在就创建一个
            if (!dirs.exists()) {
                dirs.mkdirs();
            }
            file.transferTo(new File(dirs, uploadFileName)); // 开始接受文件

            SubjectWithBLOBs project = subject1;
            project.setProjectname(projectName);
            project.setIdProjecttype(idProjecttype);
            project.setIdProjectsource(idProjectsource);
            project.setFilepath(saveFileName);
            project.setMarchspecialty(marchspecialty.trim());
            project.setTeachernames(teachernames);
            //修改后状态置 0
            project.setSelectFlag(0);
            project.setVerifyprojectFlag(0);
            project.setReleaseFlag(0);

            int i = subjectService.updateSubjectByid(project);
            return Msg.success();

        }
    }

    @GetMapping("/getSubjectById")
    @ResponseBody
    public Msg getss(Long id) {
        SubjectWithBLOBs subject = subjectService.getSubjectByID(id);
        System.out.println(subject);
        subject.setFilepath(subject.getFilepath().substring(subject.getFilepath().lastIndexOf("\\") + 1));

        String[] teachers = subject.getTeachernames().split("&");
        String teacher2 = "";
        if (teachers.length >= 2) {
            teacher2 = teachers[teachers.length - 1];
        }

        subject.setTeachernames(teacher2);

        return Msg.success()
                .add("subject", subject)
                ;
    }

    //查看自己所在教研室的课题发布记录
    @GetMapping("/cxallProject")
    public String fun7(ModelMap modelMap, HttpSession httpSession) {

        Teacher teacher = (Teacher) httpSession.getAttribute("teacherInfo");
        List<Project> projects = teacherService.selecSectionProject(teacher.getSectionName());
        for (int i = 0; i < projects.size(); i++) {
            if (projects.get(i).getVerifyprojectFlag() == 0) projects.get(i).setProjectZT("未审核");
            else if (projects.get(i).getVerifyprojectFlag() == 1) projects.get(i).setProjectZT("审核未通过");
            else projects.get(i).setProjectZT("审核通过");
        }
        modelMap.addAttribute("allproject", projects);
        return "teacher/graduation/section_xq/subjectinfoto";
    }
}

登录控制层


@Controller
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();
//        LOGGER.info("{}--{}",name,pwd);
        return adminService.login(name, pwd, httpSession);

    }
}

管理员控制层

@Authority(roles = {Role.ADMIN, Role.SADMIN})
@Controller
@RequestMapping("/admin")
public class AdminController {

    private static final Logger LOGGER = LoggerFactory.getLogger(AdminController.class);

    @Autowired
    AdminService adminService;

    @Autowired
    AdminMapper adminMapper;

    @Autowired
    CollegeService collegeService;

    @Autowired
    SectionService sectionService;

    @Autowired
    SpecialtyService specialtyService;

    @Autowired
    ClassService classService;

    @Autowired
    TeacherService teacherService;

    @Autowired
    StudentService studentService;

    @Autowired
    SubjectService subjectService;

    @Autowired
    ExcelService excelService;

    @Autowired
    SubjectRelationStudentMapper subjectRelationStudentMapper;

    @Autowired
    HttpServletRequest request;

    @Autowired
    HttpServletResponse response;

    @Autowired
    HttpSession session;

    @ModelAttribute("id_institute")
    public long getRoleInfo() {
        User user = (User) request.getAttribute("user");
//        LOGGER.info("USER:{}",user);
        if (user != null) {
            if (user.getRole().equals("admin")) {
                Institute institute = collegeService.selectCollege(adminMapper.selectByPrimaryKey(user.getId()).getIdInstitute());
                return institute.getId();
            }
            if (user.getRole().equals("sadmin")) {
                return -1;
            }
            return 0;
        } else {
            return 0;
        }
    }

//   admin index page   子管首页

    @GetMapping(value = {"", "/index"})
    public String index() {
        User user = (User) request.getAttribute("user");
//        LOGGER.info("index user:{}",user);

        //这部分还是用了session存储部分信息 后续可能修改
        //根据 user的id 判断 渲染页面
        if (user.getId() == -1) {
            LOGGER.info("超级管理员登录");
            session.setAttribute("instituteName", "超级管理员");
            session.setAttribute("ROLE", "sadmin");
            session.setAttribute("username", user.getUserName());
            return "admin/public-admin-index";
        }

        Institute institute = collegeService.selectCollege(adminMapper.selectByPrimaryKey(user.getId()).getIdInstitute());
        System.out.println(institute.getInstituteName());
        session.setAttribute("instituteName", institute.getInstituteName());
        session.setAttribute("ROLE", "admin");
        session.setAttribute("username", user.getUserName());

        return "admin/public-admin-index";
    }

//    exit      退出登录

    @GetMapping("/exit")
    public String exit(HttpSession httpSession) {
        //将Cookie 中的token 置空
        Cookie cookie = new Cookie("token", null);
        cookie.setPath("/");
        response.addCookie(cookie);
        return "login";
    }
// login 在单独Controller

//    updatePwd     更新密码

    @GetMapping("/updatePwd")
    public String updatePwd() {
        return "admin/updatePwd";
    }

    @PostMapping("/updatePwd")
    @ResponseBody
    public Msg updatePwd(
            @RequestBody Admin admin,
            HttpSession httpSession) {

        User user = (User) request.getAttribute("user");
        adminService.updatePwdByUserName(
                user.getUserName(),
                admin.getPwd()
        );

        return Msg.success();
    }

//    教研室

    @GetMapping("/SectionManagement")
    public String section() {
        return "admin/Department/SectionManagement";
    }

    @GetMapping("/sections")
    @ResponseBody
    public Msg getSections(@ModelAttribute("id_institute") long id_institute) {
        return Msg.success().add("sections", sectionService.getSections(id_institute));
    }

    @DeleteMapping("/section")
    @ResponseBody
    public Msg delSection(@RequestBody Section section) {
        return Msg.sqlChange((int) sectionService.delSection(section));
    }

    @PutMapping("/section")
    @ResponseBody
    public Msg updateSection(@RequestBody @Validated Section section, @ModelAttribute("id_institute") long id_institute) throws MyException {
        return Msg.sqlChange((int) sectionService.updateSection(section, section.getSectionName(), id_institute));
    }

    @PostMapping("/section")
    @ResponseBody
    public Msg addSection(@RequestBody @Validated Section section, @ModelAttribute("id_institute") long id_institute) {
        return Msg.sqlChange((int) sectionService.addSection(section, id_institute));
    }

//    专业方向

    @GetMapping("/SpecialtyManagement")
    public String specialty() {
        return "admin/Department/SpecialtyManagement";
    }

    @GetMapping("/specialtys")
    @ResponseBody
    public Msg getSpecialtys(
            @RequestParam Integer offset,
            @RequestParam(required = false) Long sectionId,
            @RequestParam(required = false) String keyWord,
            @ModelAttribute("id_institute") long id_institute) {
        long total = specialtyService.getSpecialtyCount(offset, keyWord, sectionId, id_institute);
        return Msg.success()
                .add("specialtys", specialtyService.getSpecialtys(offset, keyWord, sectionId, id_institute))
                .add("total", total);
    }

    @ResponseBody
    @DeleteMapping("/specialty")
    public Msg delSpecialty(
            @RequestBody Specialty specialty,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) specialtyService.delSpecialty(specialty, id_institute));
    }

    @ResponseBody
    @PutMapping("/specialty")
    public Msg putSpecialty(
            @RequestBody @Validated({Update.class}) Specialty specialty,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) specialtyService.putSpecialty(specialty, id_institute));
    }

    @ResponseBody
    @PostMapping("/specialty")
    public Msg postSpecialty(
            @RequestBody @Validated({Add.class}) Specialty specialty,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) specialtyService.postSpecialty(specialty, id_institute));
    }

//    班级

    @GetMapping("/ClassManagement")
    public String Class() {
        return "admin/Department/ClassManagement";
//    //获取管理员的 学院id
//    public static Long getIdInstitute(ModelMap modelMap) {
//        Subadmin subadmin = (Subadmin) modelMap.get("admin");
//        return subadmin.getIdInstitute();
//    }

    }

    @ResponseBody
    @GetMapping("/classes")
    public Msg getClasses(
            @RequestParam("offset") Integer offset,
            @RequestParam(required = false) Long specialtyId,
            @RequestParam(required = false) String keyWord,
            @ModelAttribute("id_institute") long id_institute) {
        long total = classService.getClassesCount(offset, keyWord, specialtyId, id_institute);
        return Msg.success()
                .add("classes", classService.getClasses(offset, keyWord, specialtyId, id_institute))
                .add("total", total);
    }

    @ResponseBody
    @DeleteMapping("/class")
    public Msg delClass(
            @RequestBody MyClass myClass,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) classService.delClass(myClass, id_institute));
    }

    @ResponseBody
    @PutMapping("/class")
    public Msg putClass(
            @RequestBody @Validated({One.class}) MyClass myClass,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) classService.putClass(myClass, id_institute));
    }

    @ResponseBody
    @PostMapping("/class")
    public Msg postClass(
            @RequestBody @Validated({One.class}) MyClass myClass,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) classService.postClass(myClass, id_institute));
    }

//    课题综合管理

    @GetMapping("/SourceManagement")
    public String source() {
        return "admin/Subject/SourceManagement";
    }

    @ResponseBody
    @GetMapping("/sources")
    public Msg getSources() {
        return Msg.success().add("sources", subjectService.selectSubjectSources());
    }

    @ResponseBody
    @PostMapping("/source")
    public Msg addSource(@RequestBody @Validated SubjectSource source) throws MyException {
        return Msg.sqlChange((int) subjectService.insertSubjectSource(source.getSourcename()));
    }

    @ResponseBody
    @DeleteMapping("/source")
    public Msg delSource(@RequestBody SubjectSource source) throws MyException {
        return Msg.sqlChange(subjectService.delSubjectSource(source.getId()));
    }

    @ResponseBody
    @PutMapping("/source")
    public Msg updateSource(@RequestBody @Validated SubjectSource source) {
        return Msg.sqlChange(subjectService.updateSubjectSource(source));
    }

    //课题类型

    @GetMapping("/TypeManagement")
    public String subjectType() {
        return "admin/Subject/TypeManagement";
    }

    @ResponseBody
    @GetMapping("/sujecttypes")
    public Msg getType() {
        return Msg.success().add("sujecttypes", subjectService.selectSubjectTypes());
    }

    @ResponseBody
    @PostMapping("/sujecttype")
    public Msg addType(@RequestBody @Validated SubjectType type) throws MyException {
        return Msg.sqlChange((int) subjectService.insertSubjectType(type.getTypename()));
    }

    @ResponseBody
    @DeleteMapping("/sujecttype")
    public Msg delType(@RequestBody SubjectType type) throws MyException {
        return Msg.sqlChange(subjectService.delSubjectType(type.getId()));
    }

    @ResponseBody
    @PutMapping("/sujecttype")
    public Msg updateType(@RequestBody @Validated SubjectType type) {
        return Msg.sqlChange(subjectService.updateSubjectType(type));
    }

    //课题管理

    @GetMapping("/SubjectManagement")
    public String Subject() {
        return "admin/Subject/SubjectManagement";
    }

    @ResponseBody
    @GetMapping("/subjects")
    public Msg getSubjects(
            @RequestParam Integer offset,
            @RequestParam(required = false) Long sectionId,
            @RequestParam(required = false) String keyWord,
            @ModelAttribute("id_institute") long id_institute) {

        long total = subjectService.selectSubjectsCount(offset, keyWord, sectionId, id_institute);
        return Msg.success()
                .add("subjects", subjectService.selectSubjects(offset, keyWord, sectionId, id_institute))
                .add("total", total);
    }

    @ResponseBody
    @PostMapping("/subject")
    public Msg addSubject(
            @RequestBody @Validated(Add.class) SubjectWithBLOBs subject,
            @ModelAttribute("id_institute") long id_institute) throws MyException {
        return Msg.sqlChange((int) subjectService.insertSubject(subject, id_institute));
    }

    @ResponseBody
    @DeleteMapping("/subject")
    public Msg delSubject(
            @RequestBody SubjectWithBLOBs subject,
            @ModelAttribute("id_institute") long id_institute) throws MyException {
        return Msg.sqlChange(subjectService.delSubject(subject, id_institute));
    }

    @ResponseBody
    @PutMapping("/subject")
    public Msg updateSubject(
            @RequestBody @Validated(Update.class) SubjectWithBLOBs subject,
            @ModelAttribute("id_institute") long id_institute) throws MyException {
        return Msg.sqlChange(subjectService.updateSuject(subject, id_institute));
    }

    //get学生选题的状态

    @GetMapping("/SRS")
    @ResponseBody
    public Msg getSelectSubjected(
            @ModelAttribute("id_institute") long id_institute
    ) {
        System.out.println(subjectService.getSelectSubjected(null, id_institute));
        return Msg.success().add("SRS", subjectService.getSelectSubjected(null, id_institute));
    }

    //get 选某个课题的所有学生
    @GetMapping("/studentsBySubject")
    @ResponseBody
    public Msg getStuentBySubject(
            @RequestParam("id") Long id,
            @ModelAttribute("id_institute") long id_institute
    ) {
        return subjectService.getStuentBySubject(id, id_institute);
    }

//    教师管理 增删改查

    @GetMapping("/TeacherManagement")
    public String teacher() {
        return "admin/BasicInfo/TeacherManagement";
    }

    @ResponseBody
    @GetMapping("/teachers")
    public Msg getTeachers(
            @RequestParam Integer offset,
            @RequestParam(required = false) Long sectionId,
            @RequestParam(required = false) String keyWord,
            @ModelAttribute("id_institute") long id_institute) {
        long total = teacherService.selectTeachersCount(offset, keyWord, sectionId, id_institute);
        return Msg.success()
                .add("teachers", teacherService.selectTeachers(offset, keyWord, sectionId, id_institute))
                .add("total", total);
    }

    @ResponseBody
    @DeleteMapping("/teacher")
    public Msg delTeacher(
            @RequestBody TeacherWithBLOBs teacher,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) teacherService.delTeacher(teacher, id_institute));
    }

    @ResponseBody
    @PostMapping("/teacher")
    public Msg addTeacher(
            @RequestBody @Validated(Add.class) TeacherWithBLOBs teacher,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) teacherService.addTeacher(teacher, id_institute));
    }

    @ResponseBody
    @PutMapping("/teacher")
    public Msg updateTeacher(
            @RequestBody @Validated({Update.class}) TeacherWithBLOBs teacher,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) teacherService.updateTeacher(teacher, id_institute));
    }

    //教师批量教师导入
    @PostMapping("/TeacherExcel")
    @ResponseBody
    public Msg addTeacherExcel(
            @RequestParam("excel") MultipartFile excelFile,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException, IOException {
        return excelService.teacherExcelImport(excelFile, id_institute);
    }

    //教师批量导入模板
    @GetMapping("/TeacherExcelDemo")
    public void getTeacherExcelDemo(HttpServletResponse response) throws IOException {
        excelService.teacherExcelDownload(response);
    }

//    学生管理

    @GetMapping("/StudentManagement")
    public String student() {
        return "admin/BasicInfo/StudentManagement";
    }

    @ResponseBody
    @GetMapping("/students")
    public Msg getStudents(
            @RequestParam Integer offset,
            @RequestParam(required = false) Long classId,
            @RequestParam(required = false) Long specialtyId,
            @RequestParam(required = false) String keyWord,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        long total = studentService.selectStudentsCount(offset, keyWord, classId, specialtyId, id_institute);
        return Msg.success()
                .add("students", studentService.selectStudents(offset, keyWord, classId, specialtyId, id_institute))
                .add("total", total);
    }

    @ResponseBody
    @DeleteMapping("/student")
    public Msg delStudent(
            @RequestBody StudentWithBLOBs student,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) studentService.delStudent(student, id_institute));
    }

    @ResponseBody
    @PostMapping("/student")
    public Msg addStudent(
            @RequestBody @Validated(Add.class) StudentWithBLOBs student,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) studentService.addStudent(student, id_institute));
    }

    @ResponseBody
    @PutMapping("/student")
    public Msg updateStudent(
            @RequestBody @Validated({Update.class}) StudentWithBLOBs student,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException {
        return Msg.sqlChange((int) studentService.updateStudent(student, id_institute));
    }

    //    批量导入模板

    @GetMapping("/StudentExcelDemo")
    public void getStudentExcelDemo(HttpServletResponse response) throws IOException {
        excelService.studentExcelDownload(response);
    }

    //批量学生导入

    @PostMapping("/StudentExcel")
    @ResponseBody
    public Msg addStudentExcel(
            @RequestParam("excel") MultipartFile excelFile,
            @ModelAttribute("id_institute") long id_institute
    ) throws MyException, IOException {
        return excelService.studentExcelImport(excelFile, id_institute);
    }

//    生成一览表

    //课题一览表
    @GetMapping("/SubjectExcel")
    public void getSubjectExcel(
            HttpServletResponse response,
            HttpServletRequest request,
            @ModelAttribute("id_institute") long id_institute) throws IOException {
        excelService.subjectExcelDownload(response, request, id_institute);
    }

}

以上就是java+SpringBoot设计实现评教系统的详细内容,更多关于java SpringBoot评教系统的资料请关注我们其它相关文章!

(0)

相关推荐

  • 选课推荐交流平台系统基于java ssm springboot实现

    目录 主要功能模块设计: 主要技术: 主要功能实现前端: 选课平台首页: 登录注册管理: 选课推荐分类: 课程详情信息: 我的个人中心: 主要功能实现后台: 系统主页设计: 选课类型管理: 选课信息详情管理: 通知公告信息: 用户信息管理: 评论交流回复管理: 部分关键代码展示: 登录模块: 配置模块: 主要表设计: 用户表: 选课类型表: 选课详情表: 评论交流表: 回复信息表: 夏天到了.小雪来给大家降降温 话不多说.直接进入主题 主要功能模块设计: 登录注册.首页信息浏览.选课分类查看.选

  • 基于java SSM springboot实现抗疫物质信息管理系统

    主要功能设计: 用户.区域.物质类型.物质详情.物质申请和审核以及我的申请和通知公告以及灵活控制菜单权限 主要技术实现:spring. springmvc. springboot.springboot security权限框架 mybatis . jquery . md5 .bootstarp.js tomcat.器.拦截器等 具体功能模块:用户模块.角色模块.菜单模块.部门模块以及灵活的权限控制,可控制到页面或按钮,满足绝大部分的权限需求 业务模块功能:区域管理.对不同区域的进行管理以及物质发

  • 基于java SSM springboot实现景区行李寄存管理系统

    主要技术实现设计:spring. springmvc. springboot. springboot security权限控制.mybatis .session. jquery . md5 .bootstarp.js tomcat.拦截器等. 主要功能实现设计:登录.用户管理.角色权限管理.菜单管理.部门管理.行李柜管理.用户寄存管理.记录查询管理.通知公告管理.入柜.出柜以及修改密码等操作. 项目介绍 随着中国人对于旅游休闲的积极认识和市场的需求不断增加,各个景区为了满足游客需求也在不断的开发

  • 基于java+springboot+mybatis+laiyu实现学科竞赛管理系统

    目录 项目背景: 主要功能模块: 主要技术: 主要功能: 功能截图: 数据图主要表设计: 用户表: 菜单表: 项目申请表: 竞赛报名表: 项目总结: 项目背景: 伴随着当今世界信息科技与联网的飞速发展,计算机也在迅速的普及,人们的生活方式已经迈入了以网络为主的时代,每行每业的信息化程度也越来越高,社会和经济发展的主要动力就是网络,随着我们国家对教育的重视程度不断提高,各个学校的学生数量不断增加,学生的校园生活也越来越精彩,学术竞赛.团队比赛也越来越丰富,在竞赛的申请及报名参加过程中,以往的纸质提

  • 基于Java SpringBoot的前后端分离信息管理系统的设计和实现

    目录 前言 视频演示 主要功能说明 功能截图 主要代码实现 主要数据表设计 前言 当今社会,随着科学技术的发展,以及市场经济的多元化,使人才的流动速度大大增加,因此也对党建工作的管理层面工作带来了空前且复杂的挑战, 从而使得如何高效的开展管理党建工作成为了亟待解决的问题.为此将高速发展的信息科学技术引入到党建工作管理的应用中,力求合理有效的提升全面各项工作的进展,实现以人为本的科学发展思想和意识,是一种高效可实现的方法. Java作为一种面向对象的.可以撰写跨平台应用软件的程序设计语言,其技术具

  • Java+Springboot搭建一个在线网盘文件分享系统

    目录 前言 效果图 主要代码 管理员控制器: 文件仓库控制器: 登录控制器: FTP工具类:  前言 springboot+freemark+jpa+MySQL实现的在线网盘文件分享系统,其功能跟百度网盘非常类似,普通用户可以注册登录,注册后默认分配1G的空间大小,登录进去后可以新建文件夹.上传各种类型的文件.文件移动.复制.下载.删除.分享,分享分为私密分享和公开分享,还可以设置分享过期时间,打开分享链接后可以对文件进行查看.下载.保存到自己网盘等.超级管理员登录后可以设置普通用户的空间大小.

  • java Springboot实现教务管理系统

    目录 1.研究背景 2.现状与反思 3.功能截图 4.代码 4.1用户登录 4.2yml配置 4.3视图跳转 4.4拦截放行 5.总结 1.研究背景              在当今信息社会发展中中,计算机科学的飞速发展,大多数学校开始注意办公效率的发展是很关键,对学校的管理起到举足轻重的作用.基于 Internet 网络的信息服务,快速成长为现代学校中一项不可或缺的内容措施.很多校园都已经不满意商务办公管理的缓慢成长方式.学院的需求是一个功能强大的,能提供完善管理,管理信息系统的速度.社会持续

  • java+SpringBoot设计实现评教系统

    目录 主要功能 运行环境 效果图展示 主要代码 教师管理控制层 登录控制层 管理员控制层 主要功能 共有三个角色:管理员.教师.学生. 管理员功能有:学生管理.教师管理.评教管理.指标管理.课程管理等. 教师功能有:学生管理.指标管理.课程管理. 学生功能有:评教管理. 运行环境 jdk1.8.mysql5.X.maven3.5\3.6.idea 效果图展示 主要代码 教师管理控制层 @Authority(roles = {Role.TEACHER}) @Controller @RequestM

  • 基于Java SSM框架实现简易的评教系统

    目录 介绍 效果图 部分核心代码 介绍 项目编号:BS-GX-014 数据库:mysql 开发工具:IDEA / ECLIPSE 开发技术:SSM 框架 本系统基于SSM框架实现.主要包含三个角色,管理员,老师,学生.管理员主要管理学生,老师,课程.学生可以进行选课,选完课后可以对任课老师评价.老师可以查看自己的评价信息. 效果图 部分展示功能如下: 管理员角色: 学生角色: 老师角色: 部分核心代码 package one.controller; import java.util.List;

  • 使用java springboot设计实现的图书管理系统(建议收藏)

    目录 前言 背景意义 数据库设计 功能截图 代码实现 前言 随着网络技术的发展.计算机应用水平广泛提高,原来系统的时效性.数据的正确性.操作的方便性上都存在不足,已影响到系统的正常使用.经过考察比较,决定自己对图书管理系统重新设计,使系统能利用软件开发技术的成果,方便图书的管理.图书管理系统是典型的信息管理系统.系统介绍了图书系统的开发过程,设计中遇到的问题及解决方法以及提高当前应用程序或系统开发进度和改善工作性能.利用其提供的各种面向对象的开发工具首先在短时间内建立系统应用原型然后对初始原型系

  • C++实现评教管理系统

    本文实例为大家分享了C++实现评教管理系统的具体代码,供大家参考,具体内容如下 #include<iostream> #include<fstream> #include<cstring> #include <stdlib.h> #include <conio.h> #include<vector> using namespace std; int n;   class Student {public:     char sname[

  • 完整音乐播放系统基于Java Springboot + Vue + MyBatis

    目录 摘要 主要设计 功能设计 主要技术 功能截图 用户端首页 登录注册 歌单信息 歌手信息 我的音乐 评论点赞 管理员端 首页 用户管理 歌手管理 歌单管理 部分代码 数据库设计 用户表 评论表 收藏表 歌手歌曲表 歌手表 项目总结 视频演示: springboot+vue音乐网站 摘要 网络技术以及计算机的发展,网友们对网络的要求也日益长高,平常在网上听话用一大堆下载软件下载下来也要管理,又占空间,比如那流行歌曲,下载了听了又要删很不方便·而网络音乐库的实现改变了这一状况.它本身就是一个数字

  • 基于Java Springboot + Vue + MyBatis实现音乐播放系统

    目录 摘要 主要设计 功能设计 主要技术 功能截图 用户端首页 登录注册 歌单信息 歌手信息 我的音乐 评论点赞 管理员端 首页 用户管理 歌手管理 歌单管理 部分代码 数据库设计 用户表 评论表 收藏表 歌手歌曲表 歌手表 项目总结 视频演示: springboot+vue音乐网站 摘要 网络技术以及计算机的发展,网友们对网络的要求也日益长高,平常在网上听话用一大堆下载软件下载下来也要管理,又占空间,比如那流行歌曲,下载了听了又要删很不方便·而网络音乐库的实现改变了这一状况.它本身就是一个数字

  • SpringBoot+MongoDB实现物流订单系统的代码

    课程导学 我们都知道MongoDB是一款非常出色的非关系型文档数据库,你肯定会想问MongoDB这么强,我们该怎么用或者有啥运用场景呢? MongoDB的应用场景非常多,无论是数据存储还是日志存储越来越多的公司在使用MongoDB,而我们今天也在SpringBoot基础上使用MongoDB实现一个简易版本的物流订单管理系统. 在使用前,你自己的电脑上要有IDEA编译器来创建项目,还要拥有MongoDB数据库和Studio 3T(MongoDB可视化数据库管理工具,下载地址https://stud

  • Java Springboot之Spring家族的技术体系

    一.Why Spring Boot 在传统 Spring 框架的基础上做了创新和优化,将开发人员从以往烦琐的配置工作中解放出来,并提供了大量即插即用的集成化组件,从而解决了各种组件之间复杂的整合过程,大大提高了开发效率,降低了维护成本. 比如, 原本使用的是 Spring MVC 框架, 在整个开发过程中,除了需要编写一大堆配置文件.针对每个层次引入专门的开发组件外,还需要独立部署和管理应用服务器.最后,为了对系统的运行状态进行有效监控,还需要引入一些并不好用的外部框架. 而使用了 Spring

随机推荐