新增系统管理员岗位
This commit is contained in:
@@ -6,10 +6,10 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "分页结果")
|
||||
public record PageResult<T>(
|
||||
@Schema(description = "当前页记录") List<T> records,
|
||||
@Schema(description = "总记录数") Long total,
|
||||
@Schema(description = "页码") Integer pageNo,
|
||||
@Schema(description = "每页数量") Integer pageSize
|
||||
@Schema(description = "当前页记录", example = "[]") List<T> records,
|
||||
@Schema(description = "总记录数", example = "2") Long total,
|
||||
@Schema(description = "页码", example = "1") Integer pageNo,
|
||||
@Schema(description = "每页数量", example = "10") Integer pageSize
|
||||
) {
|
||||
public static <T> PageResult<T> from(IPage<T> page) {
|
||||
return new PageResult<>(page.getRecords(), page.getTotal(), (int) page.getCurrent(), (int) page.getSize());
|
||||
|
||||
@@ -4,11 +4,11 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "标注结果分页查询请求")
|
||||
public record AnnotationResultPageQuery(
|
||||
@Schema(description = "任务ID") Long taskId,
|
||||
@Schema(description = "资源ID") Long resourceId,
|
||||
@Schema(description = "是否需要人工审核") Boolean requiresManualReview,
|
||||
@Schema(description = "运行态状态") String runtimeStatus,
|
||||
@Schema(description = "页码") Integer pageNo,
|
||||
@Schema(description = "每页数量") Integer pageSize
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long taskId,
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long resourceId,
|
||||
@Schema(description = "是否需要人工审核", example = "true") Boolean requiresManualReview,
|
||||
@Schema(description = "运行态状态", example = "MANUAL_REVIEW_PENDING") String runtimeStatus,
|
||||
@Schema(description = "页码", example = "1") Integer pageNo,
|
||||
@Schema(description = "每页数量", example = "10") Integer pageSize
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,12 +4,12 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "标注任务分页查询请求")
|
||||
public record AnnotationTaskPageQuery(
|
||||
@Schema(description = "关键字") String keyword,
|
||||
@Schema(description = "任务类型") String taskType,
|
||||
@Schema(description = "任务状态") String taskStatus,
|
||||
@Schema(description = "资源ID") Long resourceId,
|
||||
@Schema(description = "是否已删除") Boolean isDeleted,
|
||||
@Schema(description = "页码") Integer pageNo,
|
||||
@Schema(description = "每页数量") Integer pageSize
|
||||
@Schema(description = "关键字", example = "运输") String keyword,
|
||||
@Schema(description = "任务类型", example = "EXTRACT_QA") String taskType,
|
||||
@Schema(description = "任务状态", example = "PENDING") String taskStatus,
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long resourceId,
|
||||
@Schema(description = "是否已删除", example = "false") Boolean isDeleted,
|
||||
@Schema(description = "页码", example = "1") Integer pageNo,
|
||||
@Schema(description = "每页数量", example = "10") Integer pageSize
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "修改密码请求")
|
||||
public record ChangePasswordRequest(
|
||||
@Schema(description = "旧密码") @NotBlank(message = "不能为空") String oldPassword,
|
||||
@Schema(description = "新密码") @NotBlank(message = "不能为空") String newPassword,
|
||||
@Schema(description = "确认新密码") @NotBlank(message = "不能为空") String confirmPassword
|
||||
@Schema(description = "旧密码", example = "P@ssw0rd!") @NotBlank(message = "不能为空") String oldPassword,
|
||||
@Schema(description = "新密码", example = "N3wP@ssw0rd!") @NotBlank(message = "不能为空") String newPassword,
|
||||
@Schema(description = "确认新密码", example = "N3wP@ssw0rd!") @NotBlank(message = "不能为空") String confirmPassword
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -8,13 +8,13 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "创建标注任务请求")
|
||||
public record CreateAnnotationTaskRequest(
|
||||
@Schema(description = "任务名称") @NotBlank(message = "任务名称不能为空") String taskName,
|
||||
@Schema(description = "行业类型") String industryType,
|
||||
@Schema(description = "任务类型") String taskType,
|
||||
@Schema(description = "资源ID列表") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置") @Valid PromptConfigOptionRequest verifyPrompt
|
||||
@Schema(description = "任务名称", example = "运输文档问答抽取任务") @NotBlank(message = "任务名称不能为空") String taskName,
|
||||
@Schema(description = "行业类型", example = "transport") String industryType,
|
||||
@Schema(description = "任务类型", example = "EXTRACT_QA") String taskType,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"mode\":\"SELECT\",\"selectedConfigName\":\"qwen-plus-extract\"}") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"mode\":\"MANUAL\",\"manualConfig\":{\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo5678\"}}") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"selectedConfigName\":\"qa-extract-v1\"}") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") @Valid PromptConfigOptionRequest verifyPrompt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "创建公司管理员请求")
|
||||
public record CreateCompanyAdminRequest(
|
||||
@Schema(description = "公司ID") @NotNull(message = "不能为空") Long companyId,
|
||||
@Schema(description = "手机号") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "公司ID", example = "191000000000000001") @NotNull(message = "不能为空") Long companyId,
|
||||
@Schema(description = "手机号", example = "13800138001") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "用户名,前端展示用,可为空", example = "platform-ops") String username,
|
||||
@Schema(description = "真实姓名") @NotBlank(message = "不能为空") String realName
|
||||
@Schema(description = "真实姓名", example = "平台运维") @NotBlank(message = "不能为空") String realName
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "创建公司请求")
|
||||
public record CreateCompanyRequest(
|
||||
@Schema(description = "公司编码") @NotBlank(message = "不能为空") String companyCode,
|
||||
@Schema(description = "公司名称") @NotBlank(message = "不能为空") String companyName
|
||||
@Schema(description = "公司编码", example = "ALPHA") @NotBlank(message = "不能为空") String companyCode,
|
||||
@Schema(description = "公司名称", example = "阿尔法标注有限公司") @NotBlank(message = "不能为空") String companyName
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "创建系统工程师管理员请求")
|
||||
public record CreateSystemEngineerAdminRequest(
|
||||
@Schema(description = "手机号", example = "13800138002") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "用户名,前端展示用,可为空", example = "system-engineer") String username,
|
||||
@Schema(description = "真实姓名", example = "系统工程师") @NotBlank(message = "不能为空") String realName) {}
|
||||
@@ -8,10 +8,10 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "创建员工请求")
|
||||
public record CreateUserRequest(
|
||||
@Schema(description = "手机号") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "手机号", example = "13800138002") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "用户名,前端展示用,可为空", example = "alpha-admin") String username,
|
||||
@Schema(description = "真实姓名") @NotBlank(message = "不能为空") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position
|
||||
@Schema(description = "真实姓名", example = "张审核") @NotBlank(message = "不能为空") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师", example = "EMPLOYEE") @NotNull(message = "不能为空") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员", example = "ANNOTATOR") @NotNull(message = "不能为空") UserPosition position
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "登录请求")
|
||||
public record LoginRequest(
|
||||
@Schema(description = "手机号") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "公司编码") @NotBlank(message = "不能为空") String companyCode,
|
||||
@Schema(description = "登录密码") @NotBlank(message = "不能为空") String password
|
||||
@Schema(description = "手机号", example = "平台管理员:13900000000") @NotBlank(message = "不能为空") String phone,
|
||||
@Schema(description = "公司编码", example = "平台编号:PLATFORM") @NotBlank(message = "不能为空") String companyCode,
|
||||
@Schema(description = "登录密码", example = "平台密码:admin@123") @NotBlank(message = "不能为空") String password
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "手动模型配置请求")
|
||||
public record ManualModelConfigRequest(
|
||||
@Schema(description = "模型名称") @NotBlank(message = "模型名称不能为空") String modelName,
|
||||
@Schema(description = "模型地址") @NotBlank(message = "模型地址不能为空") String modelUrl,
|
||||
@Schema(description = "模型密钥") @NotBlank(message = "模型密钥不能为空") String apiKey
|
||||
@Schema(description = "模型名称", example = "qwen-plus") @NotBlank(message = "模型名称不能为空") String modelName,
|
||||
@Schema(description = "模型地址", example = "https://dashscope.aliyuncs.com/compatible-mode/v1") @NotBlank(message = "模型地址不能为空") String modelUrl,
|
||||
@Schema(description = "模型密钥", example = "sk-demo1234") @NotBlank(message = "模型密钥不能为空") String apiKey
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "合并审核结果请求")
|
||||
public record MergeReviewResultRequest(
|
||||
@Schema(description = "差异摘要 JSON") @NotBlank(message = "差异摘要不能为空") String diffSummary,
|
||||
@Schema(description = "最终问答内容 JSON") @NotBlank(message = "问答内容不能为空") String qaContentJson,
|
||||
@Schema(description = "审核备注") String reviewComment
|
||||
@Schema(description = "差异摘要 JSON", example = "{\"changed\":[{\"field\":\"answer\",\"from\":\"3天\",\"to\":\"72小时\"}],\"summary\":\"统一时间表达\"}") @NotBlank(message = "差异摘要不能为空") String diffSummary,
|
||||
@Schema(description = "最终问答内容 JSON", example = "[{\"question\":\"运输时效是多久?\",\"answer\":\"72小时\"}]") @NotBlank(message = "问答内容不能为空") String qaContentJson,
|
||||
@Schema(description = "审核备注", example = "已按审核意见合并,统一为小时口径。") String reviewComment
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务提示词配置请求")
|
||||
public record PromptConfigOptionRequest(
|
||||
@Schema(description = "已选择的提示词配置名称") String selectedConfigName,
|
||||
@Schema(description = "手动输入的提示词内容") String promptText
|
||||
@Schema(description = "已选择的提示词配置名称", example = "qa-extract-v1") String selectedConfigName,
|
||||
@Schema(description = "手动输入的提示词内容", example = "请抽取文档中的问答对,并按 JSON 数组输出。") String promptText
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "保存系统配置请求")
|
||||
public record SaveSysConfigRequest(
|
||||
@Schema(description = "配置类型") @NotBlank(message = "配置类型不能为空") String configType,
|
||||
@Schema(description = "配置名称") @NotBlank(message = "配置名称不能为空") String configName,
|
||||
@Schema(description = "配置值") @NotBlank(message = "配置值不能为空") String configValue,
|
||||
@Schema(description = "配置状态") @NotBlank(message = "配置状态不能为空") String status
|
||||
@Schema(description = "配置类型", example = "MODEL") @NotBlank(message = "配置类型不能为空") String configType,
|
||||
@Schema(description = "配置名称", example = "qwen-plus-extract") @NotBlank(message = "配置名称不能为空") String configName,
|
||||
@Schema(description = "配置值", example = "{\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo1234\"}") @NotBlank(message = "配置值不能为空") String configValue,
|
||||
@Schema(description = "配置状态", example = "ENABLED") @NotBlank(message = "配置状态不能为空") String status
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "资源分页查询请求")
|
||||
public record SourceResourcePageQuery(
|
||||
@Schema(description = "关键字") String keyword,
|
||||
@Schema(description = "资源类型") String resourceType,
|
||||
@Schema(description = "资源状态") String sourceStatus,
|
||||
@Schema(description = "页码") Integer pageNo,
|
||||
@Schema(description = "每页数量") Integer pageSize
|
||||
@Schema(description = "关键字", example = "运输") String keyword,
|
||||
@Schema(description = "资源类型", example = "TEXT") String resourceType,
|
||||
@Schema(description = "资源状态", example = "READY") String sourceStatus,
|
||||
@Schema(description = "页码", example = "1") Integer pageNo,
|
||||
@Schema(description = "每页数量", example = "10") Integer pageSize
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ import org.springframework.web.multipart.MultipartFile;
|
||||
@Schema(description = "资源上传请求")
|
||||
public class SourceUploadRequest {
|
||||
|
||||
@Schema(description = "资源名称")
|
||||
@Schema(description = "资源名称", example = "2026年4月运输巡检记录")
|
||||
private String resourceName;
|
||||
|
||||
@Schema(description = "资源类型:TEXT、IMAGE、VIDEO")
|
||||
@Schema(description = "资源类型:TEXT、IMAGE、VIDEO", example = "TEXT")
|
||||
private String resourceType;
|
||||
|
||||
@Schema(description = "备注")
|
||||
@Schema(description = "备注", example = "第一批导入样本")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "上传文件")
|
||||
@Schema(description = "上传文件", example = "inspection-record.txt")
|
||||
private MultipartFile file;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "系统配置分页查询请求")
|
||||
public record SysConfigPageQuery(
|
||||
@Schema(description = "配置类型") String configType,
|
||||
@Schema(description = "配置名称") String configName,
|
||||
@Schema(description = "配置状态") String status,
|
||||
@Schema(description = "页码") Integer pageNo,
|
||||
@Schema(description = "每页数量") Integer pageSize
|
||||
@Schema(description = "配置类型", example = "MODEL") String configType,
|
||||
@Schema(description = "配置名称", example = "qwen-plus-extract") String configName,
|
||||
@Schema(description = "配置状态", example = "ENABLED") String status,
|
||||
@Schema(description = "页码", example = "1") Integer pageNo,
|
||||
@Schema(description = "每页数量", example = "10") Integer pageSize
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "任务模型配置请求")
|
||||
public record TaskModelConfigRequest(
|
||||
@Schema(description = "配置模式:SELECT 或 MANUAL") @NotBlank(message = "配置模式不能为空") String mode,
|
||||
@Schema(description = "已选择的配置名称") String selectedConfigName,
|
||||
@Schema(description = "手动录入的模型配置") @Valid ManualModelConfigRequest manualConfig
|
||||
@Schema(description = "配置模式:SELECT 或 MANUAL", example = "SELECT") @NotBlank(message = "配置模式不能为空") String mode,
|
||||
@Schema(description = "已选择的配置名称", example = "qwen-plus-extract") String selectedConfigName,
|
||||
@Schema(description = "手动录入的模型配置", example = "{\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo1234\"}") @Valid ManualModelConfigRequest manualConfig
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "更新标注任务请求")
|
||||
public record UpdateAnnotationTaskRequest(
|
||||
@Schema(description = "行业类型") String industryType,
|
||||
@Schema(description = "任务类型") String taskType,
|
||||
@Schema(description = "资源ID列表") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置") @Valid PromptConfigOptionRequest verifyPrompt
|
||||
@Schema(description = "行业类型", example = "transport") String industryType,
|
||||
@Schema(description = "任务类型", example = "EXTRACT_QA") String taskType,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"mode\":\"SELECT\",\"selectedConfigName\":\"qwen-plus-extract\"}") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"mode\":\"MANUAL\",\"manualConfig\":{\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo5678\"}}") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"selectedConfigName\":\"qa-extract-v1\"}") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") @Valid PromptConfigOptionRequest verifyPrompt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "修改公司状态请求")
|
||||
public record UpdateCompanyStatusRequest(
|
||||
@Schema(description = "公司状态,枚举值:ENABLED启用、DISABLED禁用") @NotNull(message = "不能为空") CompanyStatus status
|
||||
@Schema(description = "公司状态,枚举值:ENABLED启用、DISABLED禁用", example = "ENABLED") @NotNull(message = "不能为空") CompanyStatus status
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "修改员工角色岗位请求")
|
||||
public record UpdateUserAssignmentRequest(
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") @NotNull(message = "不能为空") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") @NotNull(message = "不能为空") UserPosition position
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师", example = "EMPLOYEE") @NotNull(message = "不能为空") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员", example = "REVIEWER") @NotNull(message = "不能为空") UserPosition position
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "修改员工状态请求")
|
||||
public record UpdateUserStatusRequest(
|
||||
@Schema(description = "用户状态,枚举值:ENABLED启用、DISABLED禁用") @NotNull(message = "不能为空") UserStatus status
|
||||
@Schema(description = "用户状态,枚举值:ENABLED启用、DISABLED禁用", example = "DISABLED") @NotNull(message = "不能为空") UserStatus status
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,13 +4,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "标注结果比对响应")
|
||||
public record AnnotationResultCompareResponse(
|
||||
@Schema(description = "结果ID") Long id,
|
||||
@Schema(description = "任务ID") Long taskId,
|
||||
@Schema(description = "资源ID") Long resourceId,
|
||||
@Schema(description = "问答内容 JSON") String qaContentJson,
|
||||
@Schema(description = "差异摘要 JSON") String diffSummary,
|
||||
@Schema(description = "问答存储模式") String qaContentStorageMode,
|
||||
@Schema(description = "外置问答文件路径") String qaContentFilePath,
|
||||
@Schema(description = "资源预览路径") String sourcePreviewPath
|
||||
@Schema(description = "结果ID", example = "191000000000000401") Long id,
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long taskId,
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long resourceId,
|
||||
@Schema(description = "问答内容 JSON", example = "[{\"question\":\"运输时效是多久?\",\"answer\":\"3天\"}]") String qaContentJson,
|
||||
@Schema(description = "差异摘要 JSON", example = "{\"changed\":[{\"field\":\"answer\",\"from\":\"3天\",\"to\":\"72小时\"}],\"summary\":\"统一时间表达\"}") String diffSummary,
|
||||
@Schema(description = "问答存储模式", example = "EXTERNAL") String qaContentStorageMode,
|
||||
@Schema(description = "外置问答文件路径", example = "review/191000000000000401/qa-content.json") String qaContentFilePath,
|
||||
@Schema(description = "资源预览路径", example = "preview/191000000000000101/index.html") String sourcePreviewPath
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "标注结果响应")
|
||||
public record AnnotationResultResponse(
|
||||
@Schema(description = "结果ID") Long id,
|
||||
@Schema(description = "任务ID") Long taskId,
|
||||
@Schema(description = "资源ID") Long resourceId,
|
||||
@Schema(description = "运行态状态") String runtimeStatus,
|
||||
@Schema(description = "是否需要人工审核") Boolean requiresManualReview,
|
||||
@Schema(description = "是否已删除") Boolean isDeleted,
|
||||
@Schema(description = "问答存储模式") String qaContentStorageMode,
|
||||
@Schema(description = "审核备注") String reviewComment,
|
||||
@Schema(description = "审核时间") LocalDateTime reviewedAt,
|
||||
@Schema(description = "创建时间") LocalDateTime createdAt
|
||||
@Schema(description = "结果ID", example = "191000000000000401") Long id,
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long taskId,
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long resourceId,
|
||||
@Schema(description = "运行态状态", example = "MANUAL_REVIEW_PENDING") String runtimeStatus,
|
||||
@Schema(description = "是否需要人工审核", example = "true") Boolean requiresManualReview,
|
||||
@Schema(description = "是否已删除", example = "false") Boolean isDeleted,
|
||||
@Schema(description = "问答存储模式", example = "INLINE") String qaContentStorageMode,
|
||||
@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
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -6,17 +6,17 @@ import java.util.List;
|
||||
|
||||
@Schema(description = "标注任务响应")
|
||||
public record AnnotationTaskResponse(
|
||||
@Schema(description = "任务ID") Long id,
|
||||
@Schema(description = "任务名称") String taskName,
|
||||
@Schema(description = "行业类型") String industryType,
|
||||
@Schema(description = "任务类型") String taskType,
|
||||
@Schema(description = "任务状态") String taskStatus,
|
||||
@Schema(description = "资源ID列表") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置") TaskModelConfigResponse extractModel,
|
||||
@Schema(description = "校验模型配置") TaskModelConfigResponse verifyModel,
|
||||
@Schema(description = "抽取提示词配置") TaskPromptConfigResponse extractPrompt,
|
||||
@Schema(description = "校验提示词配置") TaskPromptConfigResponse verifyPrompt,
|
||||
@Schema(description = "创建时间") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间") LocalDateTime updatedAt
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long id,
|
||||
@Schema(description = "任务名称", example = "运输文档问答抽取任务") String taskName,
|
||||
@Schema(description = "行业类型:默认值transport,暂不显示", example = "transport") String industryType,
|
||||
@Schema(description = "任务类型:暂不显示", example = "EXTRACT_QA") String taskType,
|
||||
@Schema(description = "任务状态", example = "PENDING") String taskStatus,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"configId\":191000000000000511,\"configName\":\"qwen-plus-extract\",\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"maskedApiKey\":\"****1234\"}") TaskModelConfigResponse extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"configId\":191000000000000512,\"configName\":\"qwen-max-verify\",\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"maskedApiKey\":\"****5678\"}") TaskModelConfigResponse verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"configId\":191000000000000521,\"configName\":\"qa-extract-v1\",\"promptText\":\"请抽取文档中的问答对,并按 JSON 数组输出。\"}") TaskPromptConfigResponse extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"configId\":191000000000000522,\"configName\":\"qa-verify-v1\",\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") TaskPromptConfigResponse verifyPrompt,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T10:20:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:30:00") LocalDateTime updatedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,9 +5,9 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "可登录公司选项")
|
||||
public record CompanyOptionResponse(
|
||||
@Schema(description = "公司ID") Long companyId,
|
||||
@Schema(description = "公司编码") String companyCode,
|
||||
@Schema(description = "公司名称") String companyName
|
||||
@Schema(description = "公司ID", example = "191000000000000001") Long companyId,
|
||||
@Schema(description = "公司编码", example = "ALPHA") String companyCode,
|
||||
@Schema(description = "公司名称", example = "阿尔法标注有限公司") String companyName
|
||||
) {
|
||||
public static CompanyOptionResponse from(SysCompany company) {
|
||||
return new CompanyOptionResponse(company.getId(), company.getCompanyCode(), company.getCompanyName());
|
||||
|
||||
@@ -6,10 +6,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "公司响应")
|
||||
public record CompanyResponse(
|
||||
@Schema(description = "公司ID") Long companyId,
|
||||
@Schema(description = "公司编码") String companyCode,
|
||||
@Schema(description = "公司名称") String companyName,
|
||||
@Schema(description = "公司状态,枚举值:ENABLED启用、DISABLED禁用") CompanyStatus status
|
||||
@Schema(description = "公司ID", example = "191000000000000001") Long companyId,
|
||||
@Schema(description = "公司编码", example = "ALPHA") String companyCode,
|
||||
@Schema(description = "公司名称", example = "阿尔法标注有限公司") String companyName,
|
||||
@Schema(description = "公司状态,枚举值:ENABLED启用、DISABLED禁用", example = "ENABLED") CompanyStatus status
|
||||
) {
|
||||
public static CompanyResponse from(SysCompany company) {
|
||||
return new CompanyResponse(company.getId(), company.getCompanyCode(), company.getCompanyName(), company.getStatus());
|
||||
|
||||
@@ -7,16 +7,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "当前登录用户响应")
|
||||
public record CurrentUserResponse(
|
||||
@Schema(description = "用户ID") Long userId,
|
||||
@Schema(description = "公司ID") Long companyId,
|
||||
@Schema(description = "公司编码") String companyCode,
|
||||
@Schema(description = "公司名称") String companyName,
|
||||
@Schema(description = "手机号") String phone,
|
||||
@Schema(description = "用户ID", example = "191000000000000021") Long userId,
|
||||
@Schema(description = "公司ID", example = "191000000000000001") Long companyId,
|
||||
@Schema(description = "公司编码", example = "ALPHA") String companyCode,
|
||||
@Schema(description = "公司名称", example = "阿尔法标注有限公司") String companyName,
|
||||
@Schema(description = "手机号", example = "13800138002") String phone,
|
||||
@Schema(description = "用户名,可为空", example = "alpha-admin") String username,
|
||||
@Schema(description = "真实姓名") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
|
||||
@Schema(description = "是否必须修改密码") boolean mustChangePassword
|
||||
@Schema(description = "真实姓名", example = "张审核") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师", example = "EMPLOYEE") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员", example = "REVIEWER") UserPosition position,
|
||||
@Schema(description = "是否必须修改密码", example = "false") boolean mustChangePassword
|
||||
) {
|
||||
public static CurrentUserResponse from(LoginUser loginUser) {
|
||||
return new CurrentUserResponse(
|
||||
|
||||
@@ -8,14 +8,14 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "登录响应")
|
||||
public record LoginResponse(
|
||||
@Schema(description = "访问令牌") String token,
|
||||
@Schema(description = "当前公司信息") CompanyOptionResponse company,
|
||||
@Schema(description = "手机号") String phone,
|
||||
@Schema(description = "访问令牌", example = "eyJhbGciOiJIUzI1NiJ9.demo.token") String token,
|
||||
@Schema(description = "当前公司信息", example = "{\"companyId\":191000000000000001,\"companyCode\":\"ALPHA\",\"companyName\":\"阿尔法标注有限公司\"}") CompanyOptionResponse company,
|
||||
@Schema(description = "手机号", example = "13800138002") String phone,
|
||||
@Schema(description = "用户名,可为空", example = "alpha-admin") String username,
|
||||
@Schema(description = "真实姓名") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
|
||||
@Schema(description = "是否必须修改密码") boolean mustChangePassword
|
||||
@Schema(description = "真实姓名", example = "张审核") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师", example = "EMPLOYEE") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员", example = "REVIEWER") UserPosition position,
|
||||
@Schema(description = "是否必须修改密码", example = "false") boolean mustChangePassword
|
||||
) {
|
||||
public static LoginResponse from(String token, LoginUser loginUser, SysCompany company) {
|
||||
return new LoginResponse(
|
||||
|
||||
@@ -5,10 +5,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "菜单响应")
|
||||
public record MenuResponse(
|
||||
@Schema(description = "菜单编码") String menuCode,
|
||||
@Schema(description = "菜单名称") String menuName,
|
||||
@Schema(description = "菜单路径") String path,
|
||||
@Schema(description = "排序") Integer sortOrder
|
||||
@Schema(description = "菜单编码", example = "annotation.task.list") String menuCode,
|
||||
@Schema(description = "菜单名称", example = "标注任务") String menuName,
|
||||
@Schema(description = "菜单路径", example = "/annotation/tasks") String path,
|
||||
@Schema(description = "排序", example = "10") Integer sortOrder
|
||||
) {
|
||||
public static MenuResponse from(SysMenu menu) {
|
||||
return new MenuResponse(menu.getMenuCode(), menu.getMenuName(), menu.getPath(), menu.getSortOrder());
|
||||
|
||||
@@ -5,9 +5,9 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "合并审核结果响应")
|
||||
public record MergeReviewResultResponse(
|
||||
@Schema(description = "运行态结果ID") Long resultId,
|
||||
@Schema(description = "历史结果ID") Long historyId,
|
||||
@Schema(description = "归档原因") String archiveReason,
|
||||
@Schema(description = "归档时间") LocalDateTime archivedAt
|
||||
@Schema(description = "运行态结果ID", example = "191000000000000401") Long resultId,
|
||||
@Schema(description = "历史结果ID", example = "191000000000000451") Long historyId,
|
||||
@Schema(description = "归档原因", example = "MANUAL_REVIEW_MERGED") String archiveReason,
|
||||
@Schema(description = "归档时间", example = "2026-04-27T11:05:00") LocalDateTime archivedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,17 +5,17 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "资源响应")
|
||||
public record SourceResourceResponse(
|
||||
@Schema(description = "资源ID") Long id,
|
||||
@Schema(description = "资源名称") String resourceName,
|
||||
@Schema(description = "资源类型") String resourceType,
|
||||
@Schema(description = "桶名称") String bucketName,
|
||||
@Schema(description = "文件路径") String filePath,
|
||||
@Schema(description = "文件大小") Long fileSize,
|
||||
@Schema(description = "资源状态") String sourceStatus,
|
||||
@Schema(description = "存储提供方") String storageProvider,
|
||||
@Schema(description = "备注") String remark,
|
||||
@Schema(description = "创建人名称") String creatorName,
|
||||
@Schema(description = "创建时间") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间") LocalDateTime updatedAt
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long id,
|
||||
@Schema(description = "资源名称", example = "2026年4月运输巡检记录") String resourceName,
|
||||
@Schema(description = "资源类型", example = "TEXT") String resourceType,
|
||||
@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 = "备注", example = "第一批导入样本") String remark,
|
||||
@Schema(description = "创建人名称", example = "张审核") String creatorName,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T10:00:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:05:00") LocalDateTime updatedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "资源上传响应")
|
||||
public record SourceUploadResponse(
|
||||
@Schema(description = "资源ID") Long id,
|
||||
@Schema(description = "资源名称") String resourceName,
|
||||
@Schema(description = "资源类型") String resourceType,
|
||||
@Schema(description = "桶名称") String bucketName,
|
||||
@Schema(description = "文件路径") String filePath,
|
||||
@Schema(description = "文件大小") Long fileSize,
|
||||
@Schema(description = "资源状态") String sourceStatus,
|
||||
@Schema(description = "创建时间") LocalDateTime createdAt
|
||||
@Schema(description = "资源ID", example = "191000000000000101") Long id,
|
||||
@Schema(description = "资源名称", example = "2026年4月运输巡检记录") String resourceName,
|
||||
@Schema(description = "资源类型", example = "TEXT") String resourceType,
|
||||
@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
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -5,13 +5,13 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "系统配置响应")
|
||||
public record SysConfigResponse(
|
||||
@Schema(description = "配置ID") Long id,
|
||||
@Schema(description = "配置类型") String configType,
|
||||
@Schema(description = "配置名称") String configName,
|
||||
@Schema(description = "配置值") String configValue,
|
||||
@Schema(description = "配置状态") String status,
|
||||
@Schema(description = "创建人ID") Long creatorId,
|
||||
@Schema(description = "创建时间") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间") LocalDateTime updatedAt
|
||||
@Schema(description = "配置ID", example = "191000000000000501") Long id,
|
||||
@Schema(description = "配置类型", example = "MODEL") String configType,
|
||||
@Schema(description = "配置名称", example = "qwen-plus-extract") String configName,
|
||||
@Schema(description = "配置值", example = "{\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo1234\"}") String configValue,
|
||||
@Schema(description = "配置状态", example = "ENABLED") String status,
|
||||
@Schema(description = "创建人ID", example = "191000000000000021") Long creatorId,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T09:50:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:15:00") LocalDateTime updatedAt
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,10 +4,10 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务模型配置响应")
|
||||
public record TaskModelConfigResponse(
|
||||
@Schema(description = "配置ID") Long configId,
|
||||
@Schema(description = "配置名称") String configName,
|
||||
@Schema(description = "模型名称") String modelName,
|
||||
@Schema(description = "模型地址") String modelUrl,
|
||||
@Schema(description = "脱敏后的模型密钥") String maskedApiKey
|
||||
@Schema(description = "配置ID", example = "191000000000000511") Long configId,
|
||||
@Schema(description = "配置名称", example = "qwen-plus-extract") String configName,
|
||||
@Schema(description = "模型名称", example = "qwen-plus") String modelName,
|
||||
@Schema(description = "模型地址", example = "https://dashscope.aliyuncs.com/compatible-mode/v1") String modelUrl,
|
||||
@Schema(description = "脱敏后的模型密钥", example = "****1234") String maskedApiKey
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务提示词配置响应")
|
||||
public record TaskPromptConfigResponse(
|
||||
@Schema(description = "配置ID") Long configId,
|
||||
@Schema(description = "配置名称") String configName,
|
||||
@Schema(description = "提示词内容") String promptText
|
||||
@Schema(description = "配置ID", example = "191000000000000521") Long configId,
|
||||
@Schema(description = "配置名称", example = "qa-extract-v1") String configName,
|
||||
@Schema(description = "提示词内容", example = "请抽取文档中的问答对,并按 JSON 数组输出。") String promptText
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -8,15 +8,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "用户响应")
|
||||
public record UserResponse(
|
||||
@Schema(description = "用户ID") Long userId,
|
||||
@Schema(description = "公司ID") Long companyId,
|
||||
@Schema(description = "手机号") String phone,
|
||||
@Schema(description = "用户ID", example = "191000000000000021") Long userId,
|
||||
@Schema(description = "公司ID", example = "191000000000000001") Long companyId,
|
||||
@Schema(description = "手机号", example = "13800138002") String phone,
|
||||
@Schema(description = "用户名,可为空", example = "alpha-admin") String username,
|
||||
@Schema(description = "真实姓名") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员") UserPosition position,
|
||||
@Schema(description = "用户状态,枚举值:ENABLED启用、DISABLED禁用") UserStatus status,
|
||||
@Schema(description = "是否必须修改密码") boolean mustChangePassword
|
||||
@Schema(description = "真实姓名", example = "张审核") String realName,
|
||||
@Schema(description = "角色,枚举值:EMPLOYEE员工、MANAGER部门经理、ENGINEER总工程师", example = "EMPLOYEE") UserRole role,
|
||||
@Schema(description = "岗位,枚举值:ANNOTATOR标注员、DATA_TRAINER数据训练师、REVIEWER审核员、ADMIN超级管理员", example = "REVIEWER") UserPosition position,
|
||||
@Schema(description = "用户状态,枚举值:ENABLED启用、DISABLED禁用", example = "ENABLED") UserStatus status,
|
||||
@Schema(description = "是否必须修改密码", example = "false") boolean mustChangePassword
|
||||
) {
|
||||
public static UserResponse from(SysUser user) {
|
||||
return new UserResponse(
|
||||
|
||||
Reference in New Issue
Block a user