system design
Key Function Points
The practice management system in Colleges and universities mainly solves the difficult problems of process management such as summer/winter vacation internship among college students, enhances the relationship between schools, teachers, students and enterprises, avoids the students feeling difficult due to the practice tasks, solves the problems that schools and teachers cannot perceive the students'practice situation in real time, can not understand the students' practice process, can not rate the practice results, and improves the communication between enterprises and schools. Identify the problems of students in time, optimize the internship arrangements, and better help students integrate into the society as soon as possible.
The main requirement of practice management system in Colleges and universities is to provide students and teachers with a system to manage the process of students'practice, so that teachers and students can easily manage their own practice programs. Currently, the system is divided into three roles: teachers, enterprises and students, as well as fixed administrator roles. Teachers are responsible for formulating and publishing learning plans, publishing learning tasks or managing students'diaries, evaluating students' internships, and viewing statistical analysis. Enterprises are responsible for providing corresponding internships for students to choose according to the learning plan issued by teachers, and can also evaluate the situation of students'internships. Students are responsible for choosing a suitable learning plan and position and filling in the completion and weekly report on time. The administrator role is responsible for managing user information, role information, role permissions, student management, teacher information management, enterprise information management and so on.
The main functions are as follows:
-
Enterprise Role Module
- Registration: Register an enterprise account
- Log on: Log on to an enterprise account
- View internship plans: View internship plans published by teachers
- Internship post management: add, modify, delete and query the practice positions.
- Internship Task Management: Add, modify, delete and query the practice tasks.
- Task completion management: Task completion can be viewed and evaluated.
-
Teacher Role Module
- Registration: Register Teacher Account
- Login: Login to the teacher's account
- Internship plan management: add, modify, delete and query the practice plan.
- View internship posts: View the internship Posts published by the enterprise.
- View task completion: View student task completion.
- Internship evaluation: evaluate each student's practice situation.
-
Student Role Module
-
Registration: Register Teacher Account
-
Login: Login to the teacher's account
-
View the internship plan: View the internship plan published by the teacher and choose to join.
-
View internship posts: View the internship Posts published by the enterprise and choose to join.
-
The internship program I attended: View the internship program I chose to join.
-
My internship: Look at the internship I chose to join.
-
Task management: View the practice tasks issued by the enterprise for the job and fill in the completion of the tasks.
-
-
Administrator Role Module
- College Management: Maintaining College Information
- Professional management: maintain professional information
- Student Management: Maintaining Student Information
- statistical analysis
- Distribution of students
- Student Professional Distribution
- Distribution of student practice programs
- Distribution of Student Practice Jobs
Main issues to be resolved
- The front-end display has reasonable classification, practical content and prominent theme. Background service design is clear and versatile.
- Classification rule standard, data interface design is universal.
- Background data can be retrieved quickly. Make queries, additions, deletions, modifications, statistics and other operations.
- System security includes user security, data security, reliable and reasonable validation technology, role-based and privileged specific operations to ensure data security and reliability.
Technical implementation
Main technical points involved
- The SpringBoot framework, implemented based on the SSM concept, is used to provide web services. SpringBoot is based on SpringMvc and puts forward the idea that conventions are larger than configurations. Many configuration items of SpringMvc are omitted in the form of conventions, which can be accessed into the system under the agreed name and in a plug-in-like manner.
- MyBatis framework, MyBatis is an excellent persistence layer framework that supports customization of SQL, stored procedures, and advanced mapping. MyBatis avoids almost all JDBC code and setting parameters manually and getting result sets. MyBatis can use simple XML or annotations to configure and map native information, mapping interfaces and Java POJOs (Plain Ordinary Java Objects) to records in a database.
- Mysql database, MySQL is the most popular relational database management system, MySQL is one of the best RDBMS(Relational Database Management System) application software in WEB application
- Shiro framework, Apache Shiro is a powerful and easy-to-use Java security framework for authentication, authorization, password, and session management. With Shiro's easy-to-understand API, you can quickly and easily access any application, from the smallest mobile applications to the largest network and enterprise applications.
- Redis Cached Database, Redis is an open source database written in ANSI C, complies with BSD protocol, supports networks, stores databases based on memory, distributed, optional persistence key-value pairs, and provides API s in multiple languages. Redis is often referred to as a data structure server because values can be of types String, Hash, list, sets, and sorted sets.
- Layui framework, an excellent front-end UI framework, can help you quickly set up the basic front-end architecture such as add, delete, and check. https://layuion.com/
- Jquery, Jquery is fast and concise JavaScript Framework, another excellent JavaScript code base (framework) following Prototype, was created by [John Resig] in January 2006. https://baike.baidu.com/item/John Resig/6336344) released. jQuery was designed to be "write Less, Do More", which advocates writing less code and doing more. It encapsulates common JavaScript function code and provides a simple JavaScript Design Mode , Optimize HTML Document manipulation, event handling, animation design, and Ajax Interaction.
- ECharts, ECharts is based on JavaScript Of Data Visualization Chart library, which provides intuitive, vivid, interactive and customizable data visualization charts. ECharts were originally created by Baidu Team Open Source and Donated to early 2018 Apache Foundation, Become an ASF Incubation Project
Design Ideas
This system is divided into administrators, students, teachers and enterprises according to their roles. Teachers are responsible for managing practice plans. Enterprises are responsible for managing practice posts. Students can choose to join in practice plans, practice posts, and fill in relevant task feedback. Administrators are responsible for viewing the overall statistical analysis and managing the overall students'practice process.
code implementation
This system is written in Java language, mainly based on Mvc architecture mode. According to the module, it can be divided into three parts: control layer, service layer and persistence layer.
-
Control Layer
Control layer mainly provides Web interface based on Springboot. All data interfaces in this system use JSON to interact with data. Page mapping uses ModelAndView to process. Only mapped pages do not transfer data. Naming method is also divided according to business, such as internship plan management corresponding control layer code file named PlanController
The control layer code is shown below. The control layer will return information according to the uniform status code, follow the rules of Http status code, default 200 is normal request, exception request will return msg as prompt information. Some code implementations are as follows
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 { @Autowired PlanService planService; /** * List Page * @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; } /** * Detail Page * @return */ @GetMapping("detail") public ModelAndView detail(){ ModelAndView modelAndView = new ModelAndView("/workspace/plan/planAdd.html"); return modelAndView; } /** * Detail Page * @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; } /** * Detail Page * @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; } /** * Paging Query * @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); } /** * Query all * @return */ @RequestMapping("queryAll") public ResponseResult queryAll(){ return planService.queryAll(); } /** * Query Single * @param id * @return */ @RequestMapping("getOneShow") public ResponseResult getOneShow(@RequestParam("id") Integer id){ return planService.getOneShow(id); } /** * Query Single * @param id * @return */ @RequestMapping("getOne") public ResponseResult getOne(@RequestParam("id") Integer id){ return planService.getOne(id); } /** * Query Single * @return */ @RequestMapping("getMyPlan") public ResponseResult getMyPlan(){ return planService.getMyPlan(); } /** * Join the program * @param id * @return */ @RequestMapping("joinPlan") public ResponseResult joinPlan(@RequestParam("id") Integer id){ return planService.joinPlan(id); } /** * Save data * @param job * @return */ @RequestMapping("save") public ResponseResult save(Plan job){ return planService.save(job); } /** * Delete data * @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(); } }
-
Service Layer
When the service layer provides the implementation of specific business functions, such as college management, querying college information for paging, it may first query the total number, then query the data required by paging according to the total number and the number of pages per page. In the service layer, the requests from the control layer and the multiple actions of operating the database are packaged, such as querying a piece of data. However, when the information in the data needs to be coded to display the name transformation (e.g., when the database stores gender data 0 and 1, and when the page displays male and female), the naming method is also business-specific, and the service layer part code is as follows
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 { @Autowired PlanDao planDao; @Autowired StudentDao studentDao; @Autowired PlanStudentDao planStudentDao; @Autowired UserDao userDao; @Autowired ProfessionalDao professionalDao; @Autowired TaskCompleteDao taskCompleteDao; @Autowired JobStudentDao jobStudentDao; // private final static SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); /** * Paging Query * * @param page * @return */ @Override public 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); } /** * Paging Query * * @param page * @return */ @Override public 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); } @Override public ResponseResult queryStudentComplete(Integer studentId) { TaskCompleteVo taskCompleteVo = taskCompleteDao.queryStudentComplete(studentId); return ResponseResult.success(taskCompleteVo); } /** * Query all * * @return */ @Override public ResponseResult queryAll() { List<Plan> planList = planDao.selectAll(); return getPlanVo(planList); } /** * Query Single * * @param id * @return */ @Override public ResponseResult getOne(Integer id) { Plan plan = planDao.selectByPrimaryKey(id); return ResponseResult.success(plan); } @Override public 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); } @Override public 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("Expired"); }else{ planVo.setStatusStr("Have in hand"); } String joinPeople = plan.getJoinPeople(); if (joinPeople.equals("-1")){ planVo.setJoinPeopleStr("All professions"); }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); } /** * Join the program * * @param id * @return */ @Override public 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(); } } /** * Query Single * * @param id * @return */ @Override public 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("Expired"); }else{ planVo.setStatusStr("Have in hand"); } String joinPeople = plan.getJoinPeople(); if (joinPeople.equals("-1")){ planVo.setJoinPeopleStr("All professions"); }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); } /** * Save data * * @param plan * @return */ @Override public 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(); } } /** * delete * * @param id * @return */ @Override public ResponseResult delete(Integer id) { int i = planDao.deleteByPrimaryKey(id); if (i<=0){ return ResponseResult.fail(); } return ResponseResult.success(); } /** * Query Plan List - Student Page * * @return */ @Override public 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("Expired"); }else{ planVo.setStatusStr("Have in hand"); } String joinPeople = plan.getJoinPeople(); if (joinPeople.equals("-1")){ planVo.setJoinPeopleStr("All professions"); }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); } @Override public ResponseResult evaluate(int id, String evaluate, String score) { planStudentDao.evaluate(id,evaluate,score); return ResponseResult.success(); } /** * Statistics Quantity * * @return */ @Override public ResponseResult getCount() { // Number of students enrolled in the system int studentCount = studentDao.getCount(); // Number of registered students int studentUserCount = userDao.getCount("student"); // Number of registered teachers int teacherUserCount = userDao.getCount("teacher"); // Number of companies registered int companyUserCount = userDao.getCount("company"); // Number of students who have participated in the internship program int planStudentCount = planStudentDao.getCount(); // Number of students who have taken part in an internship 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); } @Override public 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); } @Override public 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); } @Override public 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); } }
-
Persistence Layer
The persistence layer is responsible for interacting with the database, and it is in this layer that mybatis functions by connecting java code and database SQL execution through the capabilities of its ORM framework, as shown below
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); /** * According to professional inquiry plan * @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.generated This 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.generated This element is automatically generated by MyBatis Generator, do not modify. --> delete from plan where id = #{id,jdbcType=INTEGER} </delete> <insert id="insert" parameterType="com.crk.shixiguanli.entity.Plan"> <!-- WARNING - @mbg.generated This 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.generated This element is automatically generated by MyBatis Generator, do not modify. --> update plan set 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.generated This 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_time from plan where id = #{id,jdbcType=INTEGER} </select> <select id="selectAll" resultMap="BaseResultMap"> <!-- WARNING - @mbg.generated This 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 > now() then 2 else status end as status , creator, create_time, updater, update_time from plan order 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 plan where 1=1 <if test="creator != null and creator != ''"> and creator = #{creator} </if> order by update_time desc limit #{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_id where 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 > now() then 2 else status end as status from plan p where (p.join_people = -1 or p.join_people like concat('%',#{professional},'%')) order by p.update_time desc limit #{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 'Internship Participated' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_card left join plan_student p on p.student_id = su.id where p.id is not null union select 'Not participating in an internship' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_card left join plan_student p on p.student_id = su.id where p.id is null </select> <select id="getStudentJobMap" resultType="java.util.HashMap"> select 'Joined the post' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_card left join job_student p on p.student_id = su.id where p.id is not null union select 'Not Joined Job' as name,count(s.id) as value from student s left join sys_user su on s.id_card = su.id_card left join job_student p on p.student_id = su.id where p.id is null </select> </mapper>
Operational Guidelines
-
Administrator Action
- Administrators log on to the system using the default administrator account password (admin/12345)
- Enrollment Information
- Enter professional information
-
Enrollment Information
-
statistical analysis
-
Student Operations
- Student registration
- Student Login
- View the internship program list and choose to join
- My Internship Program
- View the list of internships and choose to join
- The internship I attended
- Other Functions
-
Teacher Operations
-
Teacher registration
-
Teacher landing
-
View the list of internships
-
Publish internship plan
- Practice Evaluation
-
-
Enterprise Operations
- Enterprise registration
- Enterprise landing
- View a list of internship plans
- Publish internships
- Publish job assignments
- Evaluate job completion