根据界面需求优化

This commit is contained in:
wh
2026-05-08 22:38:32 +08:00
parent d679340f3c
commit 4065d993e2
13 changed files with 128 additions and 59 deletions

View File

@@ -6,7 +6,6 @@ import io.swagger.v3.oas.annotations.media.Schema;
public record SourceResourcePageQuery(
@Schema(description = "关键字", example = "运输") String keyword,
@Schema(description = "资源类型", example = "TEXT") String resourceType,
@Schema(description = "资源状态", example = "READY") String sourceStatus,
@Schema(description = "页码可选与pageSize同时提供时启用分页", example = "1") Integer pageNo,
@Schema(description = "每页数量可选与pageNo同时提供时启用分页", example = "10") Integer pageSize
) {

View File

@@ -0,0 +1,63 @@
package com.labelsys.backend.dto.response;
import com.labelsys.backend.enums.AnnotationResultStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.LocalDateTime;
import java.util.List;
@Schema(description = "标注结果详情响应(包含文件内容)")
public record AnnotationResultDetailResponse(
@Schema(description = "结果ID", example = "191000000000000401") Long id,
@Schema(description = "任务ID", example = "191000000000000301") Long taskId,
@Schema(description = "任务名称", example = "产品说明书标注") String taskName,
@Schema(description = "资源ID", example = "191000000000000101") Long resourceId,
@Schema(description = "资源名称", example = "产品A说明书.pdf") String resourceName,
@Schema(description = "标注结果状态", example = "MANUAL_REVIEW_PENDING") AnnotationResultStatus runtimeStatus,
@Schema(description = "是否需要人工审核", example = "true") Boolean requiresManualReview,
@Schema(description = "是否已删除", example = "false") Boolean isDeleted,
// 文件路径
@Schema(description = "问答内容文件路径", example = "annotation-results/2/qa/801.json") String qaContentFilePath,
@Schema(description = "差异摘要文件路径", example = "annotation-results/2/diff/801.json") String diffSummaryFilePath,
// 文件内容
@Schema(description = "问答内容") QaContentDto qaContent,
@Schema(description = "差异摘要(需要审核时有值)") DiffContentDto diffSummary,
@Schema(description = "审核备注", example = "需统一时间字段口径。") String reviewComment,
@Schema(description = "审核时间", example = "2026-04-27T11:00:00") LocalDateTime reviewedAt,
@Schema(description = "创建时间", example = "2026-04-27T10:40:00") LocalDateTime createdAt
) {
@Schema(description = "问答内容结构")
public record QaContentDto(
@Schema(description = "问答记录列表") List<QaRecordDto> records
) {
}
@Schema(description = "问答记录")
public record QaRecordDto(
@Schema(description = "记录ID", example = "q1") String id,
@Schema(description = "问题", example = "产品重量是多少?") String question,
@Schema(description = "答案", example = "5kg") String answer,
@Schema(description = "是否需要审核", example = "false") Boolean requiresReview
) {
}
@Schema(description = "差异摘要结构")
public record DiffContentDto(
@Schema(description = "差异记录列表") List<DiffRecordDto> records
) {
}
@Schema(description = "差异记录")
public record DiffRecordDto(
@Schema(description = "关联问答ID", example = "q2") String qaId,
@Schema(description = "问题", example = "保修期多久?") String question,
@Schema(description = "抽取答案", example = "2年") String extractAnswer,
@Schema(description = "验证答案", example = "3年") String verifyAnswer,
@Schema(description = "差异原因", example = "抽取与验证结果不一致") String diffReason,
@Schema(description = "合并后答案") String mergedAnswer
) {
}
}

View File

@@ -11,7 +11,6 @@ public record SourceResourceResponse(
@Schema(description = "桶名称", example = "annotation-source") String bucketName,
@Schema(description = "文件路径", example = "company/191000000000000001/text/191000000000000101.txt") String filePath,
@Schema(description = "文件大小", example = "20480") Long fileSize,
@Schema(description = "资源状态", example = "READY") String sourceStatus,
@Schema(description = "存储提供方", example = "rustfs") String storageProvider,
@Schema(description = "是否有BBOX标注,不显示", example = "false") Boolean hasBbox,
@Schema(description = "备注", example = "第一批导入样本") String remark,

View File

@@ -11,7 +11,6 @@ public record SourceUploadResponse(
@Schema(description = "桶名称", example = "annotation-source") String bucketName,
@Schema(description = "文件路径", example = "company/191000000000000001/text/191000000000000101.txt") String filePath,
@Schema(description = "文件大小", example = "20480") Long fileSize,
@Schema(description = "资源状态", example = "READY") String sourceStatus,
@Schema(description = "创建时间", example = "2026-04-27T10:00:00") LocalDateTime createdAt
) {
}
}