feat(asl): Complete Week 4 - Results display and Excel export with hybrid solution
Features: - Backend statistics API (cloud-native Prisma aggregation) - Results page with hybrid solution (AI consensus + human final decision) - Excel export (frontend generation, zero disk write, cloud-native) - PRISMA-style exclusion reason analysis with bar chart - Batch selection and export (3 export methods) - Fixed logic contradiction (inclusion does not show exclusion reason) - Optimized table width (870px, no horizontal scroll) Components: - Backend: screeningController.ts - add getProjectStatistics API - Frontend: ScreeningResults.tsx - complete results page (hybrid solution) - Frontend: excelExport.ts - Excel export utility (40 columns full info) - Frontend: ScreeningWorkbench.tsx - add navigation button - Utils: get-test-projects.mjs - quick test tool Architecture: - Cloud-native: backend aggregation reduces network transfer - Cloud-native: frontend Excel generation (zero file persistence) - Reuse platform: global prisma instance, logger - Performance: statistics API < 500ms, Excel export < 3s (1000 records) Documentation: - Update module status guide (add Week 4 features) - Update task breakdown (mark Week 4 completed) - Update API design spec (add statistics API) - Update database design (add field usage notes) - Create Week 4 development plan - Create Week 4 completion report - Create technical debt list Test: - End-to-end flow test passed - All features verified - Performance test passed - Cloud-native compliance verified Ref: Week 4 Development Plan Scope: ASL Module MVP - Title Abstract Screening Results Cloud-Native: Backend aggregation + Frontend Excel generation
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import { FastifyInstance } from 'fastify';
|
||||
import * as projectController from '../controllers/projectController.js';
|
||||
import * as literatureController from '../controllers/literatureController.js';
|
||||
import * as screeningController from '../controllers/screeningController.js';
|
||||
|
||||
export async function aslRoutes(fastify: FastifyInstance) {
|
||||
// ==================== 筛选项目路由 ====================
|
||||
@@ -38,19 +39,25 @@ export async function aslRoutes(fastify: FastifyInstance) {
|
||||
// 删除文献
|
||||
fastify.delete('/literatures/:literatureId', literatureController.deleteLiterature);
|
||||
|
||||
// ==================== 筛选任务路由(后续实现) ====================
|
||||
// ==================== 筛选任务路由 ====================
|
||||
|
||||
// TODO: 启动筛选任务
|
||||
// 获取筛选任务进度
|
||||
fastify.get('/projects/:projectId/screening-task', screeningController.getScreeningTask);
|
||||
|
||||
// 获取筛选结果列表(分页)
|
||||
fastify.get('/projects/:projectId/screening-results', screeningController.getScreeningResults);
|
||||
|
||||
// 获取单个筛选结果详情
|
||||
fastify.get('/screening-results/:resultId', screeningController.getScreeningResultDetail);
|
||||
|
||||
// 提交人工复核
|
||||
fastify.post('/screening-results/:resultId/review', screeningController.reviewScreeningResult);
|
||||
|
||||
// ⭐ 获取项目统计数据(Week 4 新增)
|
||||
fastify.get('/projects/:projectId/statistics', screeningController.getProjectStatistics);
|
||||
|
||||
// TODO: 启动筛选任务(Week 2 Day 2 已实现为同步流程,异步版本待实现)
|
||||
// fastify.post('/projects/:projectId/screening/start', screeningController.startScreening);
|
||||
|
||||
// TODO: 获取筛选进度
|
||||
// fastify.get('/tasks/:taskId/progress', screeningController.getProgress);
|
||||
|
||||
// TODO: 获取筛选结果
|
||||
// fastify.get('/projects/:projectId/results', screeningController.getResults);
|
||||
|
||||
// TODO: 审核冲突文献
|
||||
// fastify.post('/results/review', screeningController.reviewConflicts);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user