System Architeecture
Backend Technology Stack
The system utilizes Spring Boot as the core backend framework, which follows the convention-over-configuration principle to minimize XML configuration overhead. Spring Boot automatical configures components based on project dependencies, allowing developers to focus on business logic implementation. The framework integrates seamlessly with Maven for dependency management and build automation.
Frontend Technology Stack
Vue.js serves as the frontend framework, providing an intuitive API for building interactive user interfaces. The framework implements two-way data binding through directives such as v-model, enabling automatic view synchronization when underlying data changes. Vue's component lifecycle hooks offer granular control over different stages of component execution, including creation, mounting, updating, and destruction phases.
Feasibility Assessment
Technical Feasibility
Java technology demonstrates mature and stable characteristics suitable for enterprise-level application development. The extensive ecosystem of libraries and frameworks enables efficient implementation of complex business requirements. Spring Boot's automated configuration capabilities significantly reduce development time while maintaining code quality standards.
Economic Feasibility
The development cost analysis compares initial investment against projected operational benefits. The system aims to reduce manual labor requirements and streamline administrative workflows, potentially yielding cost savings over extended periods. Infrastructure expenses include server deployment and ongoing maintenance considerations.
Operational Feasibility
The system design prioritizes user accessibility and practical utility. Interface layouts follow established usability patterns familiar to administrative personnel. Feature implementations consider real-world workflow scenarios encountered in university financial aid departments.
System Testing
Testing Objectives
System testing serves as the final quality assurance checkpoint before deployment. The primary goal involves identifying functional defects and ensuring the application meets specified requirements. Testers simulate various user scenarios to uncover potential issues that could impact production usage.
Comprehensive testing validates system integrity, ensuring proper handling of edge cases and unexpected inputs. Testing documentation captures discovered defects and corresponding resolution strategies for future reference.
Functional Module Testing
Login Functionality Verification
Authentication testing validates credential verification mechanisms and access control enforcement. Test cases cover various input combinations including valid credentials, incorrect passwords, invalid verification codes, and missing required fields.
| Input Data | Expected Result | Actual Result | Analysis |
|---|---|---|---|
| Username: admin, Password: 123456, Code: valid | System access granted | Successful login | Matches expectation |
| Username: admin, Password: 999999, Code: valid | Password validation failure | Error message displayed | Matches expectation |
| Username: admin, Password: 123456, Code: invalid | Verification code error | Error message displayed | Matches expectation |
| Username: empty, Password: 123456, Code: valid | Username field required | Prompt message shown | Matches expectation |
| Username: admin, Password: empty, Code: valid | Password field required | Prompt message shown | Matches expectation |
User Administration Testing
User management testing encompasses create, read, update, and delete operations. Validation testing verifies mandatory field enforcement and duplicate detection mechanisms. Deletion operations confirm proper cascade handling and data consistency maintenance.
| Input Data | Expected Result | Actual Result | Analysis |
|---|---|---|---|
| Complete user profile data | Creation successful, user visible in list | User appears in listing | Matches expectation |
| Modified user information | Update successful, changes reflected | Data updated correctly | Matches expectation |
| Selected user for removal | Confirmation prompt, user removed | User no longer retrievable | Matches expectation |
| Missing username field | Validation error displayed | Required field message shown | Matches expectation |
| Existing username input | Duplicate prevention triggered | Error notification displayed | Matches expectation |
Database Schema Design
Core Entity Tables
| Column Name | Data Type | Length | Constraints |
|---|---|---|---|
| id | int | 11 | PRIMARY KEY |
| addtime | timestamp | - | DEFAULT CURRENT_TIMESTAMP |
| work_study_id | varchar | 64 | DEFAULT NULL |
| student_number | varchar | 64 | DEFAULT NULL |
| student_name | varchar | 64 | DEFAULT NULL |
| position_title | varchar | 64 | DEFAULT NULL |
| hourly_wage | decimal | 10,2 | DEFAULT NULL |
| working_hours | decimal | 10,2 | DEFAULT NULL |
| monthly_salary | decimal | 10,2 | DEFAULT NULL |
| payment_date | varchar | 64 | DEFAULT NULL |
| supervisor_id | varchar | 64 | DEFAULT NULL |
| department_code | varchar | 64 | DEFAULT NULL |
Implementation Examples
Common Controller Implementation
@RestController
@RequestMapping("/api/common")
public class CommonApiController {
@Autowired
private CommonService commonService;
@Autowired
private ConfigurationService configService;
private static FaceRecognitionClient faceClient = null;
private static String LOCATION_SERVICE_KEY = null;
@GetMapping("/geolocation")
public Result geolocate(@RequestParam String longitude, @RequestParam String latitude) {
if (LOCATION_SERVICE_KEY == null) {
LOCATION_SERVICE_KEY = configService.findByKey("location_service_key");
if (LOCATION_SERVICE_KEY == null) {
return Result.error("Missing location service configuration");
}
}
Map<String, String> locationData = LocationUtil.reverseGeocode(LOCATION_SERVICE_KEY, longitude, latitude);
return Result.success().put("data", locationData);
}
@PostMapping("/compare-faces")
public Result compareFaces(@RequestParam String image1, @RequestParam String image2) {
if (faceClient == null) {
String apiKey = configService.findByKey("api_key");
String secretKey = configService.findByKey("secret_key");
String accessToken = AuthService.obtainToken(apiKey, secretKey);
if (accessToken == null) {
return Result.error("Invalid API credentials");
}
faceClient = new FaceRecognitionClient(apiKey, secretKey);
faceClient.setConnectionTimeout(2000);
faceClient.setReadTimeout(60000);
}
JSONObject comparisonResult = null;
try {
Path imagePath1 = Paths.get(ResourceLoader.getFile("classpath:uploads").getAbsolutePath(), image1);
Path imagePath2 = Paths.get(ResourceLoader.getFile("classpath:uploads").getAbsolutePath(), image2);
byte[] imageData1 = Files.readAllBytes(imagePath1);
byte[] imageData2 = Files.readAllBytes(imagePath2);
String base64Image1 = Base64Encoder.encode(imageData1);
String base64Image2 = Base64Encoder.encode(imageData2);
FaceMatchRequest requestA = new FaceMatchRequest(base64Image1, "BASE64");
FaceMatchRequest requestB = new FaceMatchRequest(base64Image2, "BASE64");
List<FaceMatchRequest> matchRequests = Arrays.asList(requestA, requestB);
comparisonResult = faceClient.matchFaces(matchRequests);
} catch (FileNotFoundException e) {
return Result.error("Image file not found");
} catch (IOException e) {
e.printStackTrace();
}
return Result.success().put("data", JSON.parseObject(comparisonResult.get("result").toString()));
}
}
Database Initialization Scripts
CREATE TABLE `student` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation timestamp',
`student_id` varchar(200) NOT NULL COMMENT 'student identifier',
`password` varchar(200) NOT NULL COMMENT 'access password',
`full_name` varchar(200) DEFAULT NULL COMMENT 'personal name',
`gender` varchar(200) DEFAULT NULL COMMENT 'gender classification',
`profile_photo` varchar(200) DEFAULT NULL COMMENT 'profile image',
`contact_number` varchar(200) DEFAULT NULL COMMENT 'phone number',
`id_number` varchar(200) DEFAULT NULL COMMENT 'national ID',
`major` varchar(200) DEFAULT NULL COMMENT 'academic program',
PRIMARY KEY (`id`),
UNIQUE KEY `student_id` (`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='student information';
CREATE TABLE `work_assignment` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation timestamp',
`student_id` bigint NOT NULL COMMENT 'student foreign key',
`student_name` varchar(200) DEFAULT NULL COMMENT 'student name',
`position` varchar(200) NOT NULL COMMENT 'assigned position',
`department` varchar(200) DEFAULT NULL COMMENT 'managing department',
`hourly_rate` decimal(10,2) DEFAULT NULL COMMENT 'compensation rate',
`scheduled_hours` decimal(10,2) DEFAULT NULL COMMENT 'weekly commitment',
`supervisor` varchar(200) DEFAULT NULL COMMENT 'supervising officer',
`start_date` date DEFAULT NULL COMMENT 'assignment start',
`end_date` date DEFAULT NULL COMMENT 'assignment end',
`status` varchar(200) DEFAULT NULL COMMENT 'assignment status',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENTT='work-study assignments';
CREATE TABLE `attendance_record` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation timestamp',
`student_id` bigint NOT NULL COMMENT 'student identifier',
`assignment_id` bigint NOT NULL COMMENT 'assignment reference',
`clock_in_time` datetime DEFAULT NULL COMMENT 'check-in timestamp',
`clock_out_time` datetime DEFAULT NULL COMMENT 'check-out timestamp',
`actual_hours` decimal(10,2) DEFAULT NULL COMMENT 'hours worked',
`notes` text COMMENT 'additional remarks',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='attendance tracking';
CREATE TABLE `payment_record` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation timestamp',
`student_id` bigint NOT NULL COMMENT 'student identifier',
`assignment_id` bigint NOT NULL COMMENT 'assignment reference',
`payment_period` varchar(200) DEFAULT NULL COMMENT 'payment period',
`base_amount` decimal(10,2) DEFAULT NULL COMMENT 'base compensation',
`deductions` decimal(10,2) DEFAULT NULL COMMENT 'deductions applied',
`net_amount` decimal(10,2) DEFAULT NULL COMMENT 'final payment',
`payment_method` varchar(200) DEFAULT NULL COMMENT 'payment channel',
`payment_status` varchar(200) DEFAULT NULL COMMENT 'payment state',
`processed_date` datetime DEFAULT NULL COMMENT 'processing timestamp',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='salary disbursement records';
CREATE TABLE `system_token` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`user_id` bigint NOT NULL COMMENT 'user identifier',
`username` varchar(100) NOT NULL COMMENT 'account name',
`table_name` varchar(100) DEFAULT NULL COMMENT 'associated table',
`role_name` varchar(100) DEFAULT NULL COMMENT 'assigned role',
`token_value` varchar(200) NOT NULL COMMENT 'session token',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'token creation',
`expires_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'token expiration',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='authentication tokens';
CREATE TABLE `feedback_messages` (
`id` bigint NOT NULL AUTO_INCREMENT COMMENT 'primary key',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'creation timestamp',
`user_id` bigint NOT NULL COMMENT 'submitter identifier',
`username` varchar(200) DEFAULT NULL COMMENT 'submitter name',
`message_content` longtext NOT NULL COMMENT 'feedback text',
`admin_response` longtext COMMENT 'administrator reply',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='user feedback submissions';