forked from wangziqi/gongxue-base
feat: complete student archive subsystem — 7 entities, PDF report, frontend profile page
This commit is contained in:
@@ -8,11 +8,13 @@ import {
|
||||
Param,
|
||||
UseGuards,
|
||||
Request,
|
||||
Res,
|
||||
UseInterceptors,
|
||||
UploadedFile,
|
||||
} from '@nestjs/common';
|
||||
import { FileInterceptor } from '@nestjs/platform-express';
|
||||
import type { Request as ExpressRequest } from 'express';
|
||||
import type { Request as ExpressRequest, Response } from 'express';
|
||||
import { ArchiveReportService } from './archive-report.service';
|
||||
import { ArchiveService } from './archive.service';
|
||||
import {
|
||||
UpsertProfileDto,
|
||||
@@ -36,6 +38,7 @@ export class ArchiveController {
|
||||
constructor(
|
||||
private readonly archiveService: ArchiveService,
|
||||
private readonly logService: OperationLogsService,
|
||||
private readonly reportService: ArchiveReportService,
|
||||
) {}
|
||||
|
||||
@Get(':studentId')
|
||||
@@ -339,11 +342,10 @@ export class ArchiveController {
|
||||
|
||||
@Get(':studentId/report')
|
||||
@RequirePermission('student:view')
|
||||
async generateReport(@Param('studentId') studentId: string) {
|
||||
return {
|
||||
studentId: +studentId,
|
||||
message: '学生档案报告功能开发中',
|
||||
generatedAt: new Date().toISOString(),
|
||||
};
|
||||
async generateReport(
|
||||
@Param('studentId') studentId: string,
|
||||
@Res() res: Response,
|
||||
) {
|
||||
return this.reportService.generateReport(+studentId, res);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user