@TOC
Introduction
Against the backdrop of in-depth advancement in educational informatization, schools' needs for score data management have shifted from "simple storage" to "intelligent analysis". Traditional manual statistics are not only time-consuming and labor-intensive but also fail to quickly identify teaching issues hidden behind scores (such as weak subjects in a class or fluctuations in students' performance). The online student score comprehensive statistics and analysis system designed and implemented in this study is built on the Feisuan JavaAI platform. It aims to address the pain points of low efficiency in score management and limited analysis dimensions, providing differentiated data services for three user roles (administrators, teachers, and students). The system not only ensures the secure management of score data but also delivers data-driven insights for teaching decisions through visual dashboards, aligning with the practical needs of modern teaching.
Technology Stack
- Backend: Adopts the Spring Boot 3.x framework to simplify project configuration and dependency management, enabling rapid implementation of RESTful APIs. It is combined with the MyBatis-Plus enhancement tool to reduce redundant database operation code and support complex queries and batch processing.
- Database: Uses MySQL 8.0 to store core data such as student information, score data, and course details. Its support for composite indexes and transaction features ensures efficient storage and secure reading/writing of over 100,000 score records.
- Frontend Visualization: Integrates the ECharts charting library and Vue.js framework to implement visual dashboards (e.g., class score distribution histograms, individual student performance trend line charts), enhancing data readability. The Element UI component library is used to build interfaces, ensuring consistent interactive experiences.
- Development Tools: Relies on IntelliJ IDEA 2024.3.2 as the development environment, paired with the Feisuan JavaAI plugin to enable "natural language-to-code" conversion, significantly shortening the development cycle.
1. Requirements Analysis and Planning
Functional Requirements
The system must cover core business scenarios for three user roles, with specific functions as follows:
- Administrators: Batch import of scores via Excel (supporting up to 5,000 records at a time), CRUD operations for course information, user role permission configuration, and export of school-wide score statistics reports (in PDF/Excel formats).
- Teachers: Individual score entry and modification, score distribution analysis for their classes (grouped by score ranges), early warning for significant score drops (automatic alerts when a student’s score falls by over 20 points), and query of subject average score rankings.
- Students: Query of personal score details, check of individual subject rankings at the grade level, display of semester performance trend charts, and identification of weak subjects (subjects where scores are over 10 points below the class average).
Core Modules
Following the principle of "high cohesion and low coupling", the system is divided into three core modules, which interact via APIs to facilitate future expansion:
- User Permission Module: Manages user registration, login, and role assignment, controlling data access permissions based on the RBAC (Role-Based Access Control) model.
- Score Management Module: Responsible for score entry, import, modification, and storage, with a core focus on ensuring the accuracy and security of score data.
- Statistical Analysis Module: Implements multi-dimensional score analysis (by class, individual, and score range) and outputs visualized results and statistical reports.
Technology Selection
Considering development efficiency, system performance, and adaptability to educational scenarios, the technology stack is selected based on the following logic:
- Backend Framework: Spring Boot 3.x (lightweight with robust community support) + MyBatis-Plus (simplifies SQL operations and supports batch insertion).
- Database: MySQL 8.0 (open-source, free, and supports large-scale data storage, compatible with the budget constraints of the education sector).
- Visualization: ECharts (an open-source charting library that supports multiple chart types, suitable for score analysis scenarios).
- Development Tools: Feisuan JavaAI (converts natural language to code, reducing redundant coding work).
The diagram clearly illustrates the functional breakdown of the system’s four modules and their technical support relationships, providing a clear roadmap for subsequent development.
2. Environment Preparation
1. Download IntelliJ IDEA
IntelliJ IDEA is selected as the development environment due to its compatibility with Java projects and plugin ecosystem, which is well-suited for the Feisuan JavaAI tool:
- Visit the IntelliJ IDEA official website and select the "Windows 64-bit" version (this study uses Windows as an example).
- Click "Download" to obtain the installation package, and wait for 5–10 minutes (depending on network speed).
2. Install IntelliJ IDEA
Follow the installation wizard, with key configurations as follows:
- Choose an installation path (preferably not on the C drive, e.g., D:\Program Files\JetBrains\IntelliJ IDEA 2024.3.2).
- Check "Create Desktop Shortcut" and "Add launchers dir to PATH".
- Click "Install" to start the installation. After completion, check "Run IntelliJ IDEA" to launch the software.
The startup interface is shown below; select "New Project" to begin the project creation process:
3. Install the Feisuan JavaAI Plugin
The Feisuan JavaAI plugin is essential for "natural language-to-code" conversion. The installation steps are as follows:
- Open IntelliJ IDEA, click "File → Settings → Plugins" from the top menu bar to access the Plugin Marketplace.
- Enter "Feisuan" in the search box, locate the "Feisuan JavaAI" plugin, and click "Install" to download (wait for 1–2 minutes).
- After the download is complete, click "Restart IDE" to activate the plugin. Once restarted, the "Feisuan JavaAI" icon will appear in the left toolbar, indicating successful installation:
4. Log In to Feisuan JavaAI
A Feisuan account and project binding are required to use the code generation function:
- Click the "Feisuan JavaAI" icon on the left to open the plugin panel, then click the "Log In" button.
- In the pop-up login window, enter your Feisuan Developer Center account (register first on the Feisuan official website if you do not have an account), and click "Log In".
- After successful login, the plugin panel will display "Bound Project". Select the project for this development (Project ID: EDU-2025-09) to complete environment integration:
3. Module Design and Coding
1. Generate Basic Modules with Feisuan JavaAI
Input natural language requirements into the Feisuan plugin to automatically generate the project skeleton and core code. The steps are as follows:
- In the "Requirement Editor" of the Feisuan plugin panel, enter the following instruction:
"Generate basic modules for an online student score comprehensive statistics and analysis system, including: a Student entity (student ID, name, class, enrollment year), a Score entity (score ID, associated student ID, course code, score, exam date, exam type), and a Course entity (course code, course name, credits); implement user login/registration, score entry/import, class average score calculation, and individual ranking query functions; technology stack: Spring Boot 3.x + MyBatis-Plus + MySQL 8.0." - Click "Submit Requirement" and follow the prompts step-by-step;
- The final generated project structure is shown below, with core packages and classes automatically created:
2. Core Code Demonstration
Entity Class Examples Under the entity Package
Student.java (Student Entity)
package com.feisuan.edu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDate;
/**
* <p>
* Student entity class: maps to the student table
* </p>
* @author feisuan-javaai
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("student") // Associates with the database table name
public class Student {
/**
* Student ID: primary key, auto-increment
*/
@TableId(type = IdType.AUTO)
private Long studentNo;
/**
* Student name: non-null
*/
private String studentName;
/**
* Class ID: format example 2024-01 (Class 1, 2024 Enrollment)
*/
private String classId;
/**
* Enrollment year: e.g., 2024
*/
private Integer enrollmentYear;
/**
* Creation time: auto-filled
*/
private LocalDate createTime;
}
Score.java (Score Entity)
package com.feisuan.edu.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* <p>
* Score entity class: maps to the score table
* </p>
* @author feisuan-javaai
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("score")
public class Score {
/**
* Score ID: primary key, auto-increment
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* Associated student ID: foreign key, links to studentNo in the student table
*/
private Long studentNo;
/**
* Course code: links to courseCode in the course table
*/
private String courseCode;
/**
* Score: retains 2 decimal places, range 0–100
*/
private BigDecimal score;
/**
* Exam date: e.g., 2024-06-20
*/
private LocalDate examDate;
/**
* Exam type: Mid-term/Final/Monthly
*/
private String examType;
}
DTO (Data Transfer Object) Examples Under the dto Package
ScoreAddDTO.java (Score Entry Request DTO)
package com.feisuan.edu.dto;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
/**
* <p>
* Score entry request DTO: receives score data from the frontend, including parameter validation
* </p>
* @author feisuan-javaai
*/
@Data
public class ScoreAddDTO {
/**
* Associated student ID: required
*/
@NotNull(message = "Student ID cannot be empty")
private Long studentNo;
/**
* Course code: required
*/
@NotBlank(message = "Course code cannot be empty")
private String courseCode;
/**
* Score: required, range 0–100
*/
@NotNull(message = "Score cannot be empty")
@DecimalMin(value = "0.00", message = "Score cannot be less than 0")
@DecimalMax(value = "100.00", message = "Score cannot be more than 100")
private BigDecimal score;
/**
* Exam date: required
*/
@NotNull(message = "Exam date cannot be empty")
private LocalDate examDate;
/**
* Exam type: required, must be Mid-term/Final/Monthly
*/
@NotBlank(message = "Exam type cannot be empty")
private String examType;
}
StudentRankQueryDTO.java (Individual Ranking Query DTO)
package com.feisuan.edu.dto;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
/**
* <p>
* Individual ranking query DTO: receives query parameters from the frontend
* </p>
* @author feisuan-javaai
*/
@Data
public class StudentRankQueryDTO {
/**
* Student ID: required
*/
@NotNull(message = "Student ID cannot be empty")
private Long studentNo;
/**
* Course code: required
*/
@NotBlank(message = "Course code cannot be empty")
private String courseCode;
/**
* Semester: required, format example 2024-2025-1
*/
@NotBlank(message = "Semester cannot be empty")
private String term;
}
VO (View Object) Example Under the vo Package
StudentRankVO.java (Individual Ranking Response VO)
package com.feisuan.edu.vo;
import lombok.Data;
import java.math.BigDecimal;
/**
* <p>
* Individual ranking response VO: packages ranking data required by the frontend, hiding database field details
* </p>
* @author feisuan-javaai
*/
@Data
public class StudentRankVO {
/**
* Student ID
*/
private Long studentNo;
/**
* Student name
*/
private String studentName;
/**
* Course name
*/
private String courseName;
/**
* Score
*/
private BigDecimal score;
/**
* Grade-level ranking
*/
private Integer rank;
/**
* Total number of students in the grade
*/
private Integer gradeTotal;
/**
* Ranking percentage: e.g., 30.50%
*/
private String rankPercentage;
}
Mapper Interface Example Under the mapper Package
ScoreMapper.java
package com.feisuan.edu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.feisuan.edu.entity.Score;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* <p>
* Score Mapper interface: inherits MyBatis-Plus BaseMapper, with built-in CRUD methods
* </p>
* @author feisuan-javaai
*/
@Mapper
public interface ScoreMapper extends BaseMapper<Score> {
/**
* Custom query: retrieves score list by class, course, and semester
*/
@Select("SELECT * FROM score s JOIN student st ON s.student_no = st.student_no " +
"WHERE st.class_id = #{classId} AND s.course_code = #{courseCode} AND s.term = #{term}")
List<Score> selectByClassAndCourse(String classId, String courseCode, String term);
/**
* Custom query: counts the number of students with scores higher than the target score in a course at the grade level
*/
@Select("SELECT COUNT(*) FROM score WHERE course_code = #{courseCode} AND term = #{term} AND score > #{targetScore}")
Long countHigherScore(String courseCode, String term, BigDecimal targetScore);
}
Service Interface and Implementation Class Examples Under the service Package
ScoreService.java (Score Service Interface)
package com.feisuan.edu.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feisuan.edu.dto.ScoreAddDTO;
import com.feisuan.edu.dto.StudentRankQueryDTO;
import com.feisuan.edu.entity.Score;
import com.feisuan.edu.vo.ScoreDistributionVO;
import com.feisuan.edu.vo.StudentRankVO;
/**
* <p>
* Score service interface: defines score-related business logic
* </p>
* @author feisuan-javaai
*/
public interface ScoreService extends IService<Score> {
/**
* Enters a score
* @param scoreAddDTO Score entry parameters
* @return The successfully entered score entity
*/
Score addScore(ScoreAddDTO scoreAddDTO);
/**
* Queries an individual's grade-level ranking
* @param queryDTO Ranking query parameters
* @return Individual ranking information VO
*/
StudentRankVO getStudentGradeRank(StudentRankQueryDTO queryDTO);
/**
* Statistically analyses class score distribution (by score range)
* @param classId Class ID
* @param courseCode Course code
* @param term Semester
* @return Score distribution VO
*/
ScoreDistributionVO getClassScoreDistribution(String classId, String courseCode, String term);
}
ScoreServiceImpl.java (Score Service Implementation Class)
package com.feisuan.edu.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.feisuan.edu.dto.ScoreAddDTO;
import com.feisuan.edu.dto.StudentRankQueryDTO;
import com.feisuan.edu.entity.Course;
import com.feisuan.edu.entity.Score;
import com.feisuan.edu.entity.Student;
import com.feisuan.edu.mapper.CourseMapper;
import com.feisuan.edu.mapper.ScoreMapper;
import com.feisuan.edu.mapper.StudentMapper;
import com.feisuan.edu.service.ScoreService;
import com.feisuan.edu.vo.ScoreDistributionVO;
import com.feisuan.edu.vo.StudentRankVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* <p>
* Score service implementation class: implements score-related business logic
* </p>
* @author feisuan-javaai
*/
@Slf4j
@Service
@RequiredArgsConstructor // Constructor injection, replaces @Autowired
public class ScoreServiceImpl extends ServiceImpl<ScoreMapper, Score> implements ScoreService {
private final ScoreMapper scoreMapper;
private final StudentMapper studentMapper;
private final CourseMapper courseMapper;
@Override
@Transactional // Transaction control: ensures rollback if score entry fails
public Score addScore(ScoreAddDTO scoreAddDTO) {
log.info("Starting score entry: Student ID={}, Course Code={}", scoreAddDTO.getStudentNo(), scoreAddDTO.getCourseCode());
// 1. Verify if the student and course exist
Student student = studentMapper.selectById(scoreAddDTO.getStudentNo());
Course course = courseMapper.selectById(scoreAddDTO.getCourseCode());
if (student == null) {
throw new RuntimeException("Student ID does not exist: " + scoreAddDTO.getStudentNo());
}
if (course == null) {
throw new RuntimeException("Course code does not exist: " + scoreAddDTO.getCourseCode());
}
// 2. Convert DTO to entity
Score score = new Score();
BeanUtils.copyProperties(scoreAddDTO, score);
// Supplement semester (derived from exam date, e.g., June 2024 belongs to Semester 2 of 2023–2024)
String term = getTermByExamDate(scoreAddDTO.getExamDate());
score.setTerm(term);
// 3. Save the score
save(score);
log.info("Score entry successful: Score ID={}", score.getId());
return score;
}
@Override
public StudentRankVO getStudentGradeRank(StudentRankQueryDTO queryDTO) {
log.info("Querying individual ranking: Student ID={}, Course Code={}, Semester={}",
queryDTO.getStudentNo(), queryDTO.getCourseCode(), queryDTO.getTerm());
// 1. Retrieve student, course, and score information
Student student = studentMapper.selectById(queryDTO.getStudentNo());
Course course = courseMapper.selectById(queryDTO.getCourseCode());
Score score = lambdaQuery()
.eq(Score::getStudentNo, queryDTO.getStudentNo())
.eq(Score::getCourseCode, queryDTO.getCourseCode())
.eq(Score::getTerm, queryDTO.getTerm())
.one();
if (score == null) {
throw new RuntimeException("No score record found for this student");
}
// 2. Calculate ranking (number of students with higher scores + 1)
Long higherCount = scoreMapper.countHigherScore(
queryDTO.getCourseCode(), queryDTO.getTerm(), score.getScore()
);
Integer rank = higherCount.intValue() + 1;
// 3. Count the total number of students in the grade
Integer gradeTotal = lambdaQuery()
.eq(Score::getCourseCode, queryDTO.getCourseCode())
.eq(Score::getTerm, queryDTO.getTerm())
.list()
.size();
// 4. Package and return the VO
StudentRankVO rankVO = new StudentRankVO();
rankVO.setStudentNo(student.getStudentNo());
rankVO.setStudentName(student.getStudentName());
rankVO.setCourseName(course.getCourseName());
rankVO.setScore(score.getScore());
rankVO.setRank(rank);
rankVO.setGradeTotal(gradeTotal);
// Calculate ranking percentage (retains 2 decimal places)
String rankPercentage = String.format("%.2f%%", (double) rank / gradeTotal * 100);
rankVO.setRankPercentage(rankPercentage);
return rankVO;
}
@Override
public ScoreDistributionVO getClassScoreDistribution(String classId, String courseCode, String term) {
// 1. Retrieve the class score list
List<Score> scoreList = scoreMapper.selectByClassAndCourse(classId, courseCode, term);
// 2. Group and count by score range
Map<String, Long> distributionMap = scoreList.stream()
.collect(Collectors.groupingBy(
s -> {
double scoreValue = s.getScore().doubleValue();
if (scoreValue < 60) return "0-59";
else if (scoreValue < 70) return "60-69";
else if (scoreValue < 80) return "70-79";
else if (scoreValue < 90) return "80-89";
else return "90-100";
},
Collectors.counting()
));
// 3. Package the VO
ScoreDistributionVO distributionVO = new ScoreDistributionVO();
distributionVO.setClassId(classId);
distributionVO.setCourseCode(courseCode);
distributionVO.setTerm(term);
distributionVO.setSegment0_59(distributionMap.getOrDefault("0-59", 0L));
distributionVO.setSegment60_69(distributionMap.getOrDefault("60-69", 0L));
distributionVO.setSegment70_79(distributionMap.getOrDefault("70-79", 0L));
distributionVO.setSegment80_89(distributionMap.getOrDefault("80-89", 0L));
distributionVO.setSegment90_100(distributionMap.getOrDefault("90-100", 0L));
return distributionVO;
}
/**
* Helper method: Derives semester from exam date
*/
private String getTermByExamDate(java.time.LocalDate examDate) {
int year = examDate.getYear();
int month = examDate.getMonthValue();
if (month >= 9 && month <= 12) {
return year + "-" + (year + 1) + "-1"; // September–December belong to Semester 1 of the next academic year
} else {
return (year - 1) + "-" + year + "-2"; // January–August belong to Semester 2 of the current academic year
}
}
}
3. Web Interface Demonstration
After logging in, a detailed interface is displayed:
4. Personal Reflections
During the development of the online student score comprehensive statistics and analysis system, my understanding of "educational informatization" shifted from "technology implementation" to "business adaptation". Initially, I only focused on basic CRUD operations for scores, but later realized that teachers need "score fluctuation warnings" to identify students requiring additional support, and students need "weak subject identification" to clarify their learning priorities. This made me aware that technical development must be centered on users’ actual needs.
From a technical perspective, the "natural language-to-code" function of the Feisuan JavaAI platform significantly reduced redundant coding work. Code for the Entity and Mapper layers that previously took 2 days to write can now be generated in 20 minutes, allowing me to focus more on optimizing business logic (e.g., ranking algorithms and caching strategies). Additionally, resolving issues such as "duplicate data during Excel imports" and "slow loading of visual dashboards" deepened my understanding of database index optimization and Redis caching—moving beyond mere "usage" to "effective application".
This development experience also taught me that a qualified system must not only be "functional" but also "user-friendly". For example, adding parameter validation for score entry to prevent teachers from inputting incorrect scores, and supporting multiple formats for statistical report exports to facilitate administrators’ reporting tasks. These small details directly influence users’ acceptance of the system.
5. Conclusion
The design and implementation of this online student score comprehensive statistics and analysis system fully covers the entire process from "requirements analysis → environment setup → module development → issue optimization", successfully building a score management system that supports multi-role access and multi-dimensional analysis. The core value of the system lies in: improving development efficiency through Feisuan JavaAI, unlocking the value of score data through visual analysis, and ensuring data security through permission control—effectively addressing the pain points of traditional score management.
In the future, I plan to further expand the system’s functions: first, adding an AI score prediction module to forecast students’ final exam scores based on historical data; second, integrating with regional educational big data platforms to enable cross-school score comparison and analysis.