标注结果和标注结果归档优化

This commit is contained in:
wh
2026-05-06 19:07:45 +08:00
parent 99ffa9d490
commit 9d8d06427c
20 changed files with 736 additions and 306 deletions

View File

@@ -0,0 +1,43 @@
package com.labelsys.backend.controller;
import com.labelsys.backend.context.LoginUser;
import com.labelsys.backend.dto.common.PageResult;
import com.labelsys.backend.dto.request.AnnotationResultHistoryPageQuery;
import com.labelsys.backend.dto.response.AnnotationResultHistoryResponse;
import com.labelsys.backend.service.AnnotationResultArchiveService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/api/annotation-result-history")
@RequiredArgsConstructor
@Tag(name = "标注结果归档管理", description = "标注结果归档历史查询接口")
public class AnnotationResultArchiveController {
private final AnnotationResultArchiveService annotationResultArchiveService;
@Operation(summary = "分页查询归档历史")
@GetMapping
public ResponseEntity<PageResult<AnnotationResultHistoryResponse>> pageHistory(
@Valid AnnotationResultHistoryPageQuery query,
@Parameter(hidden = true) LoginUser currentUser) {
return ResponseEntity.ok(annotationResultArchiveService.pageHistory(currentUser, query));
}
@Operation(summary = "查询归档历史详情")
@GetMapping("/{id}")
public ResponseEntity<AnnotationResultHistoryResponse> getHistory(
@Parameter(description = "历史记录ID", example = "901")
@PathVariable Long id,
@Parameter(hidden = true) LoginUser currentUser) {
return ResponseEntity.ok(annotationResultArchiveService.getHistory(currentUser, id));
}
}