feat(asl): Complete Day 5 - Fulltext Screening Backend API Development
- Implement 5 core API endpoints (create task, get progress, get results, update decision, export Excel) - Add FulltextScreeningController with Zod validation (652 lines) - Implement ExcelExporter service with 4-sheet report generation (352 lines) - Register routes under /api/v1/asl/fulltext-screening - Create 31 REST Client test cases - Add automated integration test script - Fix PDF extraction fallback mechanism in LLM12FieldsService - Update API design documentation to v3.0 - Update development plan to v1.2 - Create Day 5 development record - Clean up temporary test files
This commit is contained in:
@@ -6,6 +6,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';
|
||||
import * as fulltextScreeningController from '../fulltext-screening/controllers/FulltextScreeningController.js';
|
||||
|
||||
export async function aslRoutes(fastify: FastifyInstance) {
|
||||
// ==================== 筛选项目路由 ====================
|
||||
@@ -58,6 +59,23 @@ export async function aslRoutes(fastify: FastifyInstance) {
|
||||
|
||||
// TODO: 启动筛选任务(Week 2 Day 2 已实现为同步流程,异步版本待实现)
|
||||
// fastify.post('/projects/:projectId/screening/start', screeningController.startScreening);
|
||||
|
||||
// ==================== 全文复筛路由 (Day 5 新增) ====================
|
||||
|
||||
// 创建全文复筛任务
|
||||
fastify.post('/fulltext-screening/tasks', fulltextScreeningController.createTask);
|
||||
|
||||
// 获取任务进度
|
||||
fastify.get('/fulltext-screening/tasks/:taskId', fulltextScreeningController.getTaskProgress);
|
||||
|
||||
// 获取任务结果(支持筛选和分页)
|
||||
fastify.get('/fulltext-screening/tasks/:taskId/results', fulltextScreeningController.getTaskResults);
|
||||
|
||||
// 人工审核决策
|
||||
fastify.put('/fulltext-screening/results/:resultId/decision', fulltextScreeningController.updateDecision);
|
||||
|
||||
// 导出Excel
|
||||
fastify.get('/fulltext-screening/tasks/:taskId/export', fulltextScreeningController.exportExcel);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user