diff --git a/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java b/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java new file mode 100644 index 00000000..efca81b2 --- /dev/null +++ b/src/main/java/com/kamco/cd/kamcoback/label/dto/WorkerStatsDto.java @@ -0,0 +1,117 @@ +package com.kamco.cd.kamcoback.label.dto; + +import io.swagger.v3.oas.annotations.media.Schema; +import java.util.List; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +public class WorkerStatsDto { + + @Getter + @Setter + @Builder + @NoArgsConstructor + @AllArgsConstructor + @Schema(description = "작업자 통계 응답") + public static class WorkerStatistics { + + @Schema(description = "작업자 ID (사번)") + private String workerId; + + @Schema(description = "작업자 이름") + private String workerName; + + @Schema(description = "작업자 유형 (LABELER/INSPECTOR)") + private String workerType; + + @Schema(description = "전체 배정 건수") + private Long totalAssigned; + + @Schema(description = "완료 건수") + private Long completed; + + @Schema(description = "스킵 건수") + private Long skipped; + + @Schema(description = "남은 작업 건수") + private Long remaining; + + @Schema(description = "최근 3일간 처리 이력") + private DailyHistory history; + + @Schema(description = "작업 정체 여부 (3일간 실적이 저조하면 true)") + private Boolean isStagnated; + } + + @Getter + @Setter + @Builder + @NoArgsConstructor + @AllArgsConstructor + @Schema(description = "최근 3일간 일일 처리 이력") + public static class DailyHistory { + + @Schema(description = "1일 전 (어제) 처리량") + private Long day1Ago; + + @Schema(description = "2일 전 처리량") + private Long day2Ago; + + @Schema(description = "3일 전 처리량") + private Long day3Ago; + + @Schema(description = "3일 평균 처리량") + private Long average; + } + + @Getter + @Setter + @Builder + @NoArgsConstructor + @AllArgsConstructor + @Schema(description = "작업 진행 현황 정보") + public static class WorkProgressInfo { + + @Schema(description = "라벨링 진행률 (완료건+스킵건)/배정건") + private Double labelingProgressRate; + + @Schema(description = "작업 상태 (진행중/종료)") + private String workStatus; + + @Schema(description = "진행률 수치 (완료+스킵)") + private Long completedCount; + + @Schema(description = "전체 배정 건수") + private Long totalAssignedCount; + + @Schema(description = "투입된 라벨러 수") + private Long labelerCount; + + @Schema(description = "남은 라벨링 작업 데이터 수") + private Long remainingLabelCount; + + @Schema(description = "투입된 검수자 수") + private Long inspectorCount; + + @Schema(description = "남은 검수 작업 데이터 수") + private Long remainingInspectCount; + } + + @Getter + @Setter + @Builder + @NoArgsConstructor + @AllArgsConstructor + @Schema(description = "작업자 목록 응답 (작업 정보 포함)") + public static class WorkerListResponse { + + @Schema(description = "작업 진행 현황 정보") + private WorkProgressInfo progressInfo; + + @Schema(description = "작업자 목록") + private List workers; + } +}