日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > windows >内容正文

windows

毕业设计:基于SSM框架的学生实习管理系统

發(fā)布時間:2023/12/14 windows 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 毕业设计:基于SSM框架的学生实习管理系统 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

系統(tǒng)設(shè)計

主要功能點(diǎn)

? 高校實(shí)習(xí)管理系統(tǒng)主要解決各大高校學(xué)生暑假實(shí)習(xí)/寒假實(shí)習(xí)等過程管理難的問題,提升學(xué)校、老師和學(xué)生、企業(yè)之間的聯(lián)系,避免學(xué)生因?qū)嵙?xí)任務(wù)而感到為難,解決學(xué)校和老師無法實(shí)時感知到學(xué)生的實(shí)習(xí)情況,無法了解到學(xué)生的實(shí)習(xí)過程,無法對實(shí)習(xí)結(jié)果進(jìn)行評分等問題,提升企業(yè)和學(xué)校的溝通,及時發(fā)現(xiàn)學(xué)生存在的問題,優(yōu)化實(shí)習(xí)安排,更好的幫助學(xué)生盡快的融入社會。

? 高校實(shí)習(xí)管理系統(tǒng)的主要需求是提供給學(xué)生以及老師管理學(xué)生實(shí)習(xí)過程的系統(tǒng),方便師生管理自己的實(shí)習(xí)計劃,目前系統(tǒng)分為 教師、企業(yè)以及學(xué)生三種角色,以及固定的管理員角色。 其中教師負(fù)責(zé)制定和發(fā)布學(xué)習(xí)計劃,發(fā)布學(xué)習(xí)任務(wù)或者管理學(xué)生的日記等,評價學(xué)生的實(shí)習(xí)情況以及查看統(tǒng)計分析。 企業(yè)負(fù)責(zé)根據(jù)教師發(fā)布的學(xué)習(xí)計劃,提供相應(yīng)的實(shí)習(xí)崗位供學(xué)生選擇,也可以對學(xué)生的崗位實(shí)習(xí)情況進(jìn)行評價。 學(xué)生負(fù)責(zé)選擇適合自己的學(xué)習(xí)計劃以及學(xué)習(xí)崗位,并按時填寫完成情況和周報等。 管理員角色負(fù)責(zé)管理用戶信息、角色信息、角色權(quán)限、學(xué)生管理,教師信息管理、企業(yè)信息管理等等。

主要功能如下:

  • 企業(yè)角色功能模塊

    • 注冊:注冊企業(yè)賬戶
    • 登錄:登錄企業(yè)賬戶
      • 查看實(shí)習(xí)計劃:查看教師發(fā)布的實(shí)習(xí)計劃
    • 實(shí)習(xí)崗位管理:對實(shí)習(xí)崗位進(jìn)行新增,修改,刪除,查詢操作。
      • 實(shí)習(xí)任務(wù)管理:對實(shí)習(xí)任務(wù)進(jìn)行新增,修改,刪除,查詢操作。
    • 任務(wù)完成情況管理:可以查看任務(wù)完成情況,并予以評價。
  • 教師角色功能模塊

    • 注冊:注冊教師賬戶
    • 登錄:登錄教師賬戶
    • 實(shí)習(xí)計劃管理:對實(shí)習(xí)計劃進(jìn)行新增,修改,刪除,查詢操作。
    • 查看實(shí)習(xí)崗位:查看企業(yè)發(fā)布的實(shí)習(xí)崗位。
    • 查看任務(wù)完成情況:查看學(xué)生的任務(wù)完成情況。
    • 實(shí)習(xí)評價:對各個學(xué)生的實(shí)習(xí)情況予以評價。
  • 學(xué)生角色功能模塊

    • 注冊:注冊教師賬戶

    • 登錄:登錄教師賬戶

    • 查看實(shí)習(xí)計劃:查看教師發(fā)布的實(shí)習(xí)計劃并選擇加入。

    • 查看實(shí)習(xí)崗位:查看企業(yè)發(fā)布的實(shí)習(xí)崗位并選擇加入。

    • 我參加的實(shí)習(xí)計劃:查看我選擇加入的實(shí)習(xí)計劃。

    • 我的實(shí)習(xí)崗位:查看我選擇加入的實(shí)習(xí)崗位。

    • 任務(wù)管理:查看企業(yè)針對崗位發(fā)布的實(shí)習(xí)任務(wù)并填寫任務(wù)完成情況。

  • 管理員角色功能模塊

    • 學(xué)院管理:維護(hù)學(xué)院的信息
    • 專業(yè)管理:維護(hù)專業(yè)的信息
    • 學(xué)生管理:維護(hù)學(xué)生的信息
    • 統(tǒng)計分析
      • 學(xué)生人數(shù)分布
      • 學(xué)生專業(yè)分布
      • 學(xué)生實(shí)習(xí)計劃分布
      • 學(xué)生實(shí)習(xí)崗位分布
  • 擬解決的主要問題

  • 前端展示分類合理,內(nèi)容實(shí)用,主題突出;后臺服務(wù)設(shè)計思路清晰,通用性強(qiáng)。
  • 分類規(guī)則標(biāo)準(zhǔn),數(shù)據(jù)接口設(shè)計通用。
  • 后臺數(shù)據(jù)可以快速檢索。進(jìn)行查詢、增加、刪除、修改、統(tǒng)計等操作。
  • 系統(tǒng)安全包含用戶安全,數(shù)據(jù)安全,驗(yàn)證技術(shù)可靠合理通用,對具體操作分角色分權(quán)限,保證數(shù)據(jù)的安全可靠。
  • 技術(shù)實(shí)現(xiàn)

    涉及的主要技術(shù)點(diǎn)

  • 基于SSM思想實(shí)現(xiàn)的SpringBoot框架,用于提供web服務(wù),SpringBoot是在SpringMvc的基礎(chǔ)上提出了約定大于配置的思想,以約定的形式省去了SpringMvc的許多配置項(xiàng),這些配置項(xiàng)可以以約定好的名稱以類似插件的方式接入到系統(tǒng)中。
  • MyBatis框架,MyBatis 是一款優(yōu)秀的持久層框架,它支持定制化 SQL、存儲過程以及高級映射。MyBatis 避免了幾乎所有的 JDBC 代碼和手動設(shè)置參數(shù)以及獲取結(jié)果集。MyBatis 可以使用簡單的 XML 或注解來配置和映射原生信息,將接口和 Java 的 POJOs(Plain Ordinary Java Object,普通的 Java對象)映射成數(shù)據(jù)庫中的記錄。
  • Mysql數(shù)據(jù)庫,MySQL 是最流行的關(guān)系型數(shù)據(jù)庫管理系統(tǒng),在 WEB 應(yīng)用方面 MySQL 是最好的 RDBMS(Relational Database Management System:關(guān)系數(shù)據(jù)庫管理系統(tǒng))應(yīng)用軟件之一
  • Shiro框架,Apache Shiro是一個強(qiáng)大且易用的Java安全框架,執(zhí)行身份驗(yàn)證、授權(quán)、密碼和會話管理。使用Shiro的易于理解的API,您可以快速、輕松地獲得任何應(yīng)用程序,從最小的移動應(yīng)用程序到最大的網(wǎng)絡(luò)和企業(yè)應(yīng)用程序。
  • Redis緩存數(shù)據(jù)庫,Redis 是一個開源的使用 ANSI C 語言編寫、遵守 BSD 協(xié)議、支持網(wǎng)絡(luò)、可基于內(nèi)存、分布式、可選持久性的鍵值對(Key-Value)存儲數(shù)據(jù)庫,并提供多種語言的 API。Redis 通常被稱為數(shù)據(jù)結(jié)構(gòu)服務(wù)器,因?yàn)橹?#xff08;value)可以是字符串(String)、哈希(Hash)、列表(list)、集合(sets)和有序集合(sorted sets)等類型。
  • Layui框架,一個優(yōu)秀的前端UI框架,可以幫你快速建立增刪改查等基礎(chǔ)前端架構(gòu),https://layuion.com/
  • Jquery,Jquery是一個快速、簡潔的JavaScript框架,是繼Prototype之后又一個優(yōu)秀的JavaScript代碼庫(框架)于2006年1月由[John Resig](https://baike.baidu.com/item/John Resig/6336344)發(fā)布。jQuery設(shè)計的宗旨是“write Less,Do More”,即倡導(dǎo)寫更少的代碼,做更多的事情。它封裝JavaScript常用的功能代碼,提供一種簡便的JavaScript設(shè)計模式,優(yōu)化HTML文檔操作、事件處理、動畫設(shè)計和Ajax交互。
  • ECharts,ECharts是一款基于JavaScript的數(shù)據(jù)可視化圖表庫,提供直觀,生動,可交互,可個性化定制的數(shù)據(jù)可視化圖表。ECharts最初由百度團(tuán)隊開源,并于2018年初捐贈給Apache基金會,成為ASF孵化級項(xiàng)目
  • 設(shè)計思路

    本系統(tǒng)按照角色劃分為管理員、學(xué)生、教師、企業(yè),教師角色負(fù)責(zé)管理實(shí)習(xí)計劃,企業(yè)負(fù)責(zé)管理實(shí)習(xí)崗位,學(xué)生角色可以選擇實(shí)習(xí)計劃、實(shí)習(xí)崗位等加入,并且填寫相關(guān)的任務(wù)反饋,管理員角色負(fù)責(zé)查看整體的統(tǒng)計分析,對整體學(xué)生的實(shí)習(xí)過程進(jìn)行管理。

    代碼實(shí)現(xiàn)

    本系統(tǒng)采用Java語言編寫,主要是基于Mvc的架構(gòu)模式實(shí)現(xiàn),按照模塊可以劃分為控制層、服務(wù)層、持久層三大塊

  • 控制層

    控制層主要是基于Springboot提供Web接口,本系統(tǒng)所有數(shù)據(jù)接口均采用JSON的方式進(jìn)行數(shù)據(jù)交互,頁面映射采用ModelAndView的方式處理,只映射頁面不傳遞數(shù)據(jù),命名方式也是按照業(yè)務(wù)劃分的,比如實(shí)習(xí)計劃管理對應(yīng)的控制層代碼文件命名為PlanController

    控制層代碼如下所示,控制層會按照統(tǒng)一的狀態(tài)碼返回信息,遵循Http狀態(tài)碼的規(guī)則,默認(rèn)200為正常請求,異常請求會返回msg作為提示信息。部分代碼實(shí)現(xiàn)如下所示

    package com.crk.shixiguanli.controller;import com.crk.shixiguanli.entity.Plan; import com.crk.shixiguanli.entity.User; import com.crk.shixiguanli.service.PlanService; import com.crk.shixiguanli.util.LayUiTableJson; import com.crk.shixiguanli.util.Page; import com.crk.shixiguanli.util.ResponseResult; import org.apache.shiro.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView;import java.util.List;/*** Description:** @author:* Date: 2020-04-26* Time: 16:32*/ @RestController @RequestMapping("plan") public class PlanController {@AutowiredPlanService planService;/*** 列表頁* @return*/@RequestMapping("manage")public ModelAndView manage(){ModelAndView modelAndView = new ModelAndView("/workspace/plan/planList.html");return modelAndView;}@RequestMapping("show")public ModelAndView show(){User userinfo = (User) SecurityUtils.getSubject().getPrincipal();ModelAndView modelAndView = new ModelAndView("/workspace/plan/planShow.html");modelAndView.addObject("userType",userinfo.getUserType());return modelAndView;}/*** 詳情頁* @return*/@GetMapping("detail")public ModelAndView detail(){ModelAndView modelAndView = new ModelAndView("/workspace/plan/planAdd.html");return modelAndView;}/*** 詳情頁* @return*/@GetMapping("detailShow")public ModelAndView detailShow(){User userinfo = (User) SecurityUtils.getSubject().getPrincipal();ModelAndView modelAndView = new ModelAndView("/workspace/plan/planAddShow.html");modelAndView.addObject("userType",userinfo.getUserType());return modelAndView;}@GetMapping("detailStudent")public ModelAndView detailStudent(){ModelAndView modelAndView = new ModelAndView("/workspace/plan/planDetailStudent.html");return modelAndView;}/*** 詳情頁* @return*/@GetMapping("myPlan")public ModelAndView myPlan(){ModelAndView modelAndView = new ModelAndView("/workspace/plan/myPlan.html");return modelAndView;}@GetMapping("studentComplete")public ModelAndView stduentComplete(){ModelAndView modelAndView = new ModelAndView("/workspace/plan/studentComplete.html");return modelAndView;}@GetMapping("statics")public ModelAndView statics(){ModelAndView modelAndView = new ModelAndView("/workspace/statics.html");return modelAndView;}/*** 分頁查詢* @param page* @param limit* @return*/@GetMapping("queryPage")public LayUiTableJson queryPage(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit){Page pageInfo = new Page();pageInfo.setCurrentPage(page);pageInfo.setSize(limit);ResponseResult ResponseResult = planService.queryPage(pageInfo);LayUiTableJson layUiTableJson = new LayUiTableJson(0,null,pageInfo.getAllRow(),(List)ResponseResult.getData());return layUiTableJson;}@GetMapping("queryStudentDetail")public LayUiTableJson queryStudentDetail(String planName,String studentName,@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit){Page pageInfo = new Page();pageInfo.setCurrentPage(page);pageInfo.setSize(limit);ResponseResult ResponseResult = planService.queryStudentDetail(planName,studentName,pageInfo);LayUiTableJson layUiTableJson = new LayUiTableJson(0,null,pageInfo.getAllRow(),(List)ResponseResult.getData());return layUiTableJson;}@GetMapping("queryStudentComplete")public ResponseResult queryStudentComplete(@RequestParam("studentId") int studentId){return planService.queryStudentComplete(studentId);}@GetMapping("getStudentComplete")public ResponseResult getStudentComplete(@RequestParam("id") int id){return planService.getStudentComplete(id);}/*** 查詢所有* @return*/@RequestMapping("queryAll")public ResponseResult queryAll(){return planService.queryAll();}/*** 查詢單個* @param id* @return*/@RequestMapping("getOneShow")public ResponseResult getOneShow(@RequestParam("id") Integer id){return planService.getOneShow(id);}/*** 查詢單個* @param id* @return*/@RequestMapping("getOne")public ResponseResult getOne(@RequestParam("id") Integer id){return planService.getOne(id);}/*** 查詢單個* @return*/@RequestMapping("getMyPlan")public ResponseResult getMyPlan(){return planService.getMyPlan();}/*** 加入計劃* @param id* @return*/@RequestMapping("joinPlan")public ResponseResult joinPlan(@RequestParam("id") Integer id){return planService.joinPlan(id);}/*** 保存數(shù)據(jù)* @param job* @return*/@RequestMapping("save")public ResponseResult save(Plan job){return planService.save(job);}/*** 刪除數(shù)據(jù)* @param id* @return*/@RequestMapping("delete")public ResponseResult delete(@RequestParam("id") Integer id){return planService.delete(id);}@RequestMapping("queryPlanList")public ResponseResult queryPlanList(){return planService.queryPlanList();}@RequestMapping("evaluate")public ResponseResult evaluate(@RequestParam("id") int id,@RequestParam("evaluate") String evaluate,@RequestParam("score") String score){return planService.evaluate(id,evaluate,score);}@RequestMapping("getCount")public ResponseResult getCount(){return planService.getCount();}@RequestMapping("getStudentProfessionalMap")public ResponseResult getStudentProfessionalMap(){return planService.getStudentProfessionalMap();}@RequestMapping("getStudentPlanMap")public ResponseResult getStudentPlanMap(){return planService.getStudentPlanMap();}@RequestMapping("getStudentJobMap")public ResponseResult getStudentJobMap(){return planService.getStudentJobMap();}}
  • 服務(wù)層

    服務(wù)層提供具體業(yè)務(wù)功能的實(shí)現(xiàn),比如學(xué)院管理,查詢學(xué)院信息進(jìn)行分頁處理時,可能要先查詢總數(shù),然后按照總數(shù)和每頁數(shù)量進(jìn)行分頁查詢所需的數(shù)據(jù),在服務(wù)層會對控制層的請求和操作數(shù)據(jù)庫的多次動作進(jìn)行包裝,例如查詢出某條數(shù)據(jù),但該數(shù)據(jù)中信息需要進(jìn)行編碼-顯示名稱的轉(zhuǎn)化時(如數(shù)據(jù)庫存儲的性別數(shù)據(jù)是0和1,頁面上顯示需要展示成男和女),命名方式也是按照業(yè)務(wù)劃分的,服務(wù)層部分代碼如下所示

    package com.crk.shixiguanli.service.impl;import com.crk.shixiguanli.dao.*; import com.crk.shixiguanli.entity.*; import com.crk.shixiguanli.service.PlanService; import com.crk.shixiguanli.util.Page; import com.crk.shixiguanli.util.ResponseResult; import org.apache.shiro.SecurityUtils; import org.omg.CORBA.OBJ_ADAPTER; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service;import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List;/*** Description:** @author:* Date: 2020-04-26* Time: 17:42*/ @Service public class PlanServiceImpl implements PlanService {@AutowiredPlanDao planDao;@AutowiredStudentDao studentDao;@AutowiredPlanStudentDao planStudentDao;@AutowiredUserDao userDao;@AutowiredProfessionalDao professionalDao;@AutowiredTaskCompleteDao taskCompleteDao;@AutowiredJobStudentDao jobStudentDao;// private final static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");/*** 分頁查詢** @param page* @return*/@Overridepublic ResponseResult queryPage(Page page) {User userinfo = (User) SecurityUtils.getSubject().getPrincipal();Integer count = planDao.countByCondition(userinfo.getId());page.setAllRow(count);List<Plan> planList = planDao.selectByCondition(userinfo.getId(),page.getStart(), page.getSize());return getPlanVo(planList);}/*** 分頁查詢** @param page* @return*/@Overridepublic ResponseResult queryStudentDetail(String planName,String studentName,Page page) {User userinfo = (User) SecurityUtils.getSubject().getPrincipal();Integer count = planStudentDao.countByCondition(userinfo.getId(),planName,studentName);page.setAllRow(count);List<PlanStudentVo> planStudentVoList = planStudentDao.selectByCondition(userinfo.getId(),planName,studentName,page.getStart(), page.getSize());return ResponseResult.success(planStudentVoList);}@Overridepublic ResponseResult queryStudentComplete(Integer studentId) {TaskCompleteVo taskCompleteVo = taskCompleteDao.queryStudentComplete(studentId);return ResponseResult.success(taskCompleteVo);}/*** 查詢所有** @return*/@Overridepublic ResponseResult queryAll() {List<Plan> planList = planDao.selectAll();return getPlanVo(planList);}/*** 查詢單個** @param id* @return*/@Overridepublic ResponseResult getOne(Integer id) {Plan plan = planDao.selectByPrimaryKey(id);return ResponseResult.success(plan);}@Overridepublic ResponseResult getStudentComplete(Integer id) {PlanStudent planStudent = planStudentDao.selectByPrimaryKey(id);PlanStudentVo planStudentVo = new PlanStudentVo();planStudentVo.setId(planStudent.getId());planStudentVo.setEvaluate(planStudent.getEvaluate());planStudentVo.setScore(planStudent.getScore());Plan plan = planDao.selectByPrimaryKey(planStudent.getPlanId());planStudentVo.setPlanName(plan.getPlanName());User userinfo = (User) SecurityUtils.getSubject().getPrincipal();planStudentVo.setUserType(userinfo.getUserType());return ResponseResult.success(planStudentVo);}@Overridepublic ResponseResult getMyPlan() {User userinfo = (User) SecurityUtils.getSubject().getPrincipal();PlanStudent planStudent = planStudentDao.selectByStudent(userinfo.getId());if (null == planStudent){return ResponseResult.success(null);}Plan plan = planDao.selectByPrimaryKey(planStudent.getPlanId());PlanVo planVo = new PlanVo();planVo.setId(plan.getId());planVo.setPlanName(plan.getPlanName());planVo.setStartTime(plan.getStartTime());planVo.setEndTime(plan.getEndTime());planVo.setUserName(userDao.selectByPrimaryKey(plan.getUpdater()).getUserName());planVo.setUpdateTime(plan.getUpdateTime());planVo.setPlanDesc(plan.getPlanDesc());planVo.setEvaluationCriterion(plan.getEvaluationCriterion());int compareTo = new Date().compareTo(plan.getEndTime());if(compareTo == 1){planVo.setStatusStr("已過期");}else{planVo.setStatusStr("進(jìn)行中");}String joinPeople = plan.getJoinPeople();if (joinPeople.equals("-1")){planVo.setJoinPeopleStr("所有專業(yè)");}else{String[] split = joinPeople.split(",");List<String> stringBuffer = new ArrayList<>();for (String s : split) {String name = professionalDao.selectByCode(s);stringBuffer.add(name);}planVo.setJoinPeopleStr(String.join(",", stringBuffer));}planVo.setUserType(userinfo.getUserType());planVo.setHasJoin(true);planVo.setEvaluate(planStudent.getEvaluate());planVo.setScore(planStudent.getScore());return ResponseResult.success(planVo);}/*** 加入計劃** @param id* @return*/@Overridepublic ResponseResult joinPlan(Integer id) {User userinfo = (User) SecurityUtils.getSubject().getPrincipal();PlanStudent planStudent = new PlanStudent();planStudent.setStudentId(userinfo.getId());planStudent.setPlanId(id);planStudent.setStatus(1);int insert = planStudentDao.insert(planStudent);if (insert >0){return ResponseResult.success();}else{return ResponseResult.fail();}}/*** 查詢單個** @param id* @return*/@Overridepublic ResponseResult getOneShow(Integer id) {Plan plan = planDao.selectByPrimaryKey(id);PlanVo planVo = new PlanVo();planVo.setId(plan.getId());planVo.setPlanName(plan.getPlanName());planVo.setStartTime(plan.getStartTime());planVo.setEndTime(plan.getEndTime());planVo.setUserName(userDao.selectByPrimaryKey(plan.getUpdater()).getUserName());planVo.setUpdateTime(plan.getUpdateTime());planVo.setPlanDesc(plan.getPlanDesc());planVo.setEvaluationCriterion(plan.getEvaluationCriterion());int compareTo = new Date().compareTo(plan.getEndTime());if(compareTo == 1){planVo.setStatusStr("已過期");}else{planVo.setStatusStr("進(jìn)行中");}String joinPeople = plan.getJoinPeople();if (joinPeople.equals("-1")){planVo.setJoinPeopleStr("所有專業(yè)");}else{String[] split = joinPeople.split(",");List<String> stringBuffer = new ArrayList<>();for (String s : split) {String name = professionalDao.selectByCode(s);stringBuffer.add(name);}planVo.setJoinPeopleStr(String.join(",", stringBuffer));}User userinfo = (User) SecurityUtils.getSubject().getPrincipal();planVo.setUserType(userinfo.getUserType());PlanStudent planStudent = planStudentDao.selectByStudent(userinfo.getId());if (planStudent !=null){planVo.setHasJoin(true);}else{planVo.setHasJoin(false);}return ResponseResult.success(planVo);}/*** 保存數(shù)據(jù)** @param plan* @return*/@Overridepublic ResponseResult save(Plan plan) {if (plan.getId() == null){User userinfo = (User) SecurityUtils.getSubject().getPrincipal();plan.setCreateTime(new Date());plan.setCreator(userinfo.getId());plan.setUpdateTime(new Date());plan.setUpdater(userinfo.getId());plan.setStatus(1);int insert = planDao.insert(plan);if (insert<=0){return ResponseResult.fail();}return ResponseResult.success();}else{User userinfo = (User) SecurityUtils.getSubject().getPrincipal();plan.setUpdateTime(new Date());plan.setUpdater(userinfo.getId());int updateByPrimaryKey = planDao.updateByPrimaryKey(plan);if (updateByPrimaryKey<=0){return ResponseResult.fail();}return ResponseResult.success();}}/*** 刪除** @param id* @return*/@Overridepublic ResponseResult delete(Integer id) {int i = planDao.deleteByPrimaryKey(id);if (i<=0){return ResponseResult.fail();}return ResponseResult.success();}/*** 查詢計劃列表-學(xué)生頁面** @return*/@Overridepublic ResponseResult queryPlanList() {User userinfo = (User) SecurityUtils.getSubject().getPrincipal();Student studentByIdCard = studentDao.getStudentByIdCard(userinfo.getIdCard());List<Plan> planList = planDao.selectByProfession(studentByIdCard.getProfessional());return getPlanVo(planList);}private ResponseResult getPlanVo(List<Plan> planList){List<PlanVo> result = new ArrayList<>();for (Plan plan : planList) {PlanVo planVo = new PlanVo();planVo.setId(plan.getId());planVo.setPlanName(plan.getPlanName());planVo.setStartTime(plan.getStartTime());planVo.setEndTime(plan.getEndTime());planVo.setUserName(userDao.selectByPrimaryKey(plan.getUpdater()).getUserName());planVo.setUpdateTime(plan.getUpdateTime());planVo.setPlanDesc(plan.getPlanDesc());planVo.setEvaluationCriterion(plan.getEvaluationCriterion());int compareTo = new Date().compareTo(plan.getEndTime());if(compareTo == 1){planVo.setStatusStr("已過期");}else{planVo.setStatusStr("進(jìn)行中");}String joinPeople = plan.getJoinPeople();if (joinPeople.equals("-1")){planVo.setJoinPeopleStr("所有專業(yè)");}else{String[] split = joinPeople.split(",");List<String> stringBuffer = new ArrayList<>();for (String s : split) {String name = professionalDao.selectByCode(s);stringBuffer.add(name);}planVo.setJoinPeopleStr(String.join(",", stringBuffer));}result.add(planVo);}return ResponseResult.success(result);}@Overridepublic ResponseResult evaluate(int id, String evaluate, String score) {planStudentDao.evaluate(id,evaluate,score);return ResponseResult.success();}/*** 統(tǒng)計數(shù)量** @return*/@Overridepublic ResponseResult getCount() { // 系統(tǒng)已錄入的學(xué)生數(shù)量int studentCount = studentDao.getCount(); // 已注冊的學(xué)生數(shù)量int studentUserCount = userDao.getCount("student"); // 已注冊的教師數(shù)int teacherUserCount = userDao.getCount("teacher"); // 已注冊的公司數(shù)int companyUserCount = userDao.getCount("company"); // 已參加實(shí)習(xí)計劃的學(xué)生數(shù)int planStudentCount = planStudentDao.getCount(); // 已參加實(shí)習(xí)崗位的學(xué)生數(shù)int jobStudentCount = jobStudentDao.getCount();HashMap<String,Object> count = new HashMap<>();count.put("studentUserCount",studentUserCount);count.put("teacherUserCount",teacherUserCount);count.put("companyUserCount",companyUserCount);count.put("studentCount",studentCount);count.put("planStudentCount",planStudentCount);count.put("jobStudentCount",jobStudentCount);return ResponseResult.success(count);}@Overridepublic ResponseResult getStudentProfessionalMap() {HashMap<String,Object> data = new HashMap<>();List<HashMap<String,Object>> map = planDao.getStudentProfessionalMap();List<String> legend = new ArrayList<>();for (HashMap<String, Object> stringObjectHashMap : map) {legend.add(stringObjectHashMap.get("name").toString());}data.put("legend",legend);data.put("result",map);return ResponseResult.success(data);}@Overridepublic ResponseResult getStudentPlanMap() {HashMap<String,Object> data = new HashMap<>();List<HashMap<String,Object>> map = planDao.getStudentPlanMap();List<String> legend = new ArrayList<>();for (HashMap<String, Object> stringObjectHashMap : map) {legend.add(stringObjectHashMap.get("name").toString());}data.put("legend",legend);data.put("result",map);return ResponseResult.success(data);}@Overridepublic ResponseResult getStudentJobMap() {HashMap<String,Object> data = new HashMap<>();List<HashMap<String,Object>> map = planDao.getStudentJobMap();List<String> legend = new ArrayList<>();for (HashMap<String, Object> stringObjectHashMap : map) {legend.add(stringObjectHashMap.get("name").toString());}data.put("legend",legend);data.put("result",map);return ResponseResult.success(data);} }
  • 持久層

    持久層負(fù)責(zé)與數(shù)據(jù)庫交互,mybatis正是在這一層發(fā)揮其作用,通過其ORM框架的能力連接起java代碼和數(shù)據(jù)庫SQL執(zhí)行,示例代碼如下

    package com.crk.shixiguanli.dao;import com.crk.shixiguanli.entity.Plan; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository;import java.util.HashMap; import java.util.List;@Repository public interface PlanDao {/*** This method was generated by MyBatis Generator.* This method corresponds to the database table plan** @mbg.generated*/int deleteByPrimaryKey(Integer id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table plan** @mbg.generated*/int insert(Plan record);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table plan** @mbg.generated*/Plan selectByPrimaryKey(Integer id);/*** This method was generated by MyBatis Generator.* This method corresponds to the database table plan** @mbg.generated*/List<Plan> selectAll();/*** This method was generated by MyBatis Generator.* This method corresponds to the database table plan** @mbg.generated*/int updateByPrimaryKey(Plan record);int countByCondition(@Param("creator") int creator);List<Plan> selectByCondition(@Param("creator") int creator, @Param("start") int start, @Param("end") int end);/*** 根據(jù)專業(yè)查詢計劃* @param professional* @return*/List<Plan> selectByProfession(@Param("professional") String professional);List<HashMap<String,Object>> getStudentProfessionalMap();List<HashMap<String,Object>> getStudentPlanMap();List<HashMap<String,Object>> getStudentJobMap(); } <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.crk.shixiguanli.dao.PlanDao"><resultMap id="BaseResultMap" type="com.crk.shixiguanli.entity.Plan"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.--><id column="id" jdbcType="INTEGER" property="id" /><result column="plan_name" jdbcType="VARCHAR" property="planName" /><result column="plan_desc" jdbcType="VARCHAR" property="planDesc" /><result column="join_people" jdbcType="VARCHAR" property="joinPeople" /><result column="evaluation_criterion" jdbcType="VARCHAR" property="evaluationCriterion" /><result column="start_time" jdbcType="TIMESTAMP" property="startTime" /><result column="end_time" jdbcType="TIMESTAMP" property="endTime" /><result column="status" jdbcType="INTEGER" property="status" /><result column="creator" jdbcType="INTEGER" property="creator" /><result column="create_time" jdbcType="TIMESTAMP" property="createTime" /><result column="updater" jdbcType="INTEGER" property="updater" /><result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /></resultMap><delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.-->delete from planwhere id = #{id,jdbcType=INTEGER}</delete><insert id="insert" parameterType="com.crk.shixiguanli.entity.Plan"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.--><selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">SELECT LAST_INSERT_ID()</selectKey>insert into plan (plan_name, plan_desc,join_people, evaluation_criterion, start_time, end_time, `status`, creator, create_time, updater, update_time)values (#{planName,jdbcType=VARCHAR}, #{planDesc,jdbcType=VARCHAR},#{joinPeople,jdbcType=VARCHAR}, #{evaluationCriterion,jdbcType=VARCHAR}, #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, #{creator,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updater,jdbcType=INTEGER}, #{updateTime,jdbcType=TIMESTAMP})</insert><update id="updateByPrimaryKey" parameterType="com.crk.shixiguanli.entity.Plan"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.-->update planset plan_name = #{planName,jdbcType=VARCHAR},plan_desc = #{planDesc,jdbcType=VARCHAR},join_people = #{joinPeople,jdbcType=VARCHAR},evaluation_criterion = #{evaluationCriterion,jdbcType=VARCHAR},start_time = #{startTime,jdbcType=TIMESTAMP},end_time = #{endTime,jdbcType=TIMESTAMP},updater = #{updater,jdbcType=INTEGER},update_time = #{updateTime,jdbcType=TIMESTAMP}where id = #{id,jdbcType=INTEGER}</update><select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.-->select id, plan_name, plan_desc, join_people, evaluation_criterion, start_time,end_time, `status`, creator, create_time, updater, update_timefrom planwhere id = #{id,jdbcType=INTEGER}</select><select id="selectAll" resultMap="BaseResultMap"><!--WARNING - @mbg.generatedThis element is automatically generated by MyBatis Generator, do not modify.-->select id, plan_name, plan_desc, join_people, evaluation_criterion, start_time,end_time,case when end_time &gt; now() then 2else status end as status, creator, create_time, updater, update_timefrom planorder by update_time desc</select><select id="countByCondition" resultType="java.lang.Integer">select count(*) from plan where 1=1<if test="creator != null and creator != ''">and creator = #{creator}</if></select><select id="selectByCondition" resultMap="BaseResultMap">select * from planwhere 1=1<if test="creator != null and creator != ''">and creator = #{creator}</if>order by update_time desclimit #{start},#{end}</select><select id="countByStudent" resultType="java.lang.Integer">select count(p.*) from plan p left join plan_student s on p.id = s.plan_idwhere s.student_id = #{studentId}</select><select id="selectByProfession" resultMap="BaseResultMap">select p.id, p.plan_name, p.plan_desc, p.join_people, p.evaluation_criterion, p.start_time,p.end_time,case when end_time &gt; now() then 2else status end as status from plan pwhere (p.join_people = -1 or p.join_people like concat('%',#{professional},'%'))order by p.update_time desclimit #{start},#{end}</select><select id="getStudentProfessionalMap" resultType="java.util.HashMap">select any_value(professional) as name, count(id) as value from student group by professional</select><select id="getStudentPlanMap" resultType="java.util.HashMap">select '已參與實(shí)習(xí)' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_cardleft join plan_student p on p.student_id = su.id where p.id is not nullunionselect '未參與實(shí)習(xí)' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_cardleft join plan_student p on p.student_id = su.id where p.id is null</select><select id="getStudentJobMap" resultType="java.util.HashMap">select '已加入崗位' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_cardleft join job_student p on p.student_id = su.idwhere p.id is not nullunionselect '未加入崗位' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_cardleft join job_student p on p.student_id = su.idwhere p.id is null</select></mapper>
  • 操作指引

  • 管理員操作

    • 管理員使用默認(rèn)的管理員賬號密碼登錄系統(tǒng)(admin/12345)

    • 錄入學(xué)院信息

    • 錄入專業(yè)信息

    • 錄入學(xué)生信息

    • 統(tǒng)計分析

  • 學(xué)生操作

    • 學(xué)生注冊

    • 學(xué)生登錄

    • 查看實(shí)習(xí)計劃列表并選擇加入

    • 我的實(shí)習(xí)計劃

    • 查看實(shí)習(xí)崗位列表并選擇加入

    • 我參加的實(shí)習(xí)崗位

    • 其他功能

  • 教師操作

    • 教師注冊

    • 教師登陸

    • 查看實(shí)習(xí)崗位列表

    • 發(fā)布實(shí)習(xí)計劃

    • 實(shí)習(xí)評價

  • 企業(yè)操作

    • 企業(yè)注冊

    • 企業(yè)登陸

    • 查看實(shí)習(xí)計劃列表

    • 發(fā)布實(shí)習(xí)崗位

    • 發(fā)布崗位任務(wù)
    • 評價崗位任務(wù)完成情況

  • 演示視頻

    演示視頻下載地址

    作者唯一聯(lián)系方式

    總結(jié)

    以上是生活随笔為你收集整理的毕业设计:基于SSM框架的学生实习管理系统的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。