spotless
This commit is contained in:
@@ -5,6 +5,7 @@ import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InferenceDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelerDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelingStatDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerListResponse;
|
||||
import com.kamco.cd.kamcoback.label.service.LabelAllocateService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -18,6 +19,7 @@ import jakarta.validation.Valid;
|
||||
import java.util.List;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -93,19 +95,16 @@ public class LabelAllocateApiController {
|
||||
defaultValue = "NAME_ASC"))
|
||||
@RequestParam(required = false)
|
||||
String sort,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0")
|
||||
@RequestParam(defaultValue = "0")
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
Integer page,
|
||||
@Parameter(description = "페이지 크기", example = "20")
|
||||
@RequestParam(defaultValue = "20")
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
Integer size) {
|
||||
|
||||
// type이 null이면 기본값으로 LABELER 설정
|
||||
String workerType = (type == null || type.isEmpty()) ? RoleType.LABELER.name() : type;
|
||||
|
||||
return ApiResponseDto.ok(
|
||||
labelAllocateService.getWorkerStatistics(
|
||||
null, workerType, search, sort, page, size));
|
||||
labelAllocateService.getWorkerStatistics(null, workerType, search, sort, page, size));
|
||||
}
|
||||
|
||||
@Operation(summary = "라벨링작업 관리 > 작업 배정", description = "라벨링작업 관리 > 작업 배정")
|
||||
@@ -154,24 +153,23 @@ public class LabelAllocateApiController {
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "작업현황 관리 > 라벨러/검수자 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일",
|
||||
description = "작업현황 관리 > 라벨러/검수자 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일")
|
||||
summary = "작업현황 관리 > 라벨러/검수자 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일",
|
||||
description = "작업현황 관리 > 라벨러/검수자 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일")
|
||||
@GetMapping("/user-detail")
|
||||
public ApiResponseDto<LabelerDetail> findUserDetail(
|
||||
@RequestParam(defaultValue = "01022223333", required = true) String userId,
|
||||
@Parameter(
|
||||
description = "회차 마스터 key",
|
||||
required = true,
|
||||
example = "8584e8d4-53b3-4582-bde2-28a81495a626")
|
||||
@RequestParam
|
||||
String uuid,
|
||||
@Schema(
|
||||
allowableValues = {"LABELER", "REVIEWER"},
|
||||
defaultValue = "LABELER")
|
||||
@Parameter(
|
||||
description = "라벨러/검수자(LABELER/REVIEWER)",
|
||||
required = true) @RequestParam String type
|
||||
) {
|
||||
@RequestParam(defaultValue = "01022223333", required = true) String userId,
|
||||
@Parameter(
|
||||
description = "회차 마스터 key",
|
||||
required = true,
|
||||
example = "8584e8d4-53b3-4582-bde2-28a81495a626")
|
||||
@RequestParam
|
||||
String uuid,
|
||||
@Schema(
|
||||
allowableValues = {"LABELER", "REVIEWER"},
|
||||
defaultValue = "LABELER")
|
||||
@Parameter(description = "라벨러/검수자(LABELER/REVIEWER)", required = true)
|
||||
@RequestParam
|
||||
String type) {
|
||||
return ApiResponseDto.ok(labelAllocateService.findUserDetail(userId, uuid, type));
|
||||
}
|
||||
|
||||
@@ -211,30 +209,26 @@ public class LabelAllocateApiController {
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "라벨링작업 관리 > 상세 > 라벨러/검수자 일별 작업량 목록",
|
||||
description = "라벨링작업 관리 > 상세 > 라벨러/검수자 일별 작업량 목록")
|
||||
summary = "라벨링작업 관리 > 상세 > 라벨러/검수자 일별 작업량 목록",
|
||||
description = "라벨링작업 관리 > 상세 > 라벨러/검수자 일별 작업량 목록")
|
||||
@GetMapping("/daily-list")
|
||||
public ApiResponseDto<Page<LabelingStatDto>> findDaliyList(
|
||||
@RequestParam(defaultValue = "0", required = true) int page,
|
||||
@RequestParam(defaultValue = "20", required = true) int size,
|
||||
@Parameter(
|
||||
description = "회차 마스터 key",
|
||||
required = true,
|
||||
example = "8584e8d4-53b3-4582-bde2-28a81495a626")
|
||||
@RequestParam
|
||||
String uuid,
|
||||
@Parameter(
|
||||
description = "사번",
|
||||
required = true,
|
||||
example = "123456")
|
||||
@RequestParam String userId,
|
||||
@Schema(
|
||||
allowableValues = {"LABELER", "REVIEWER"},
|
||||
defaultValue = "LABELER")
|
||||
@Parameter(
|
||||
description = "라벨러/검수자(LABELER/REVIEWER)",
|
||||
required = true) @RequestParam String type
|
||||
) {
|
||||
@RequestParam(defaultValue = "0", required = true) int page,
|
||||
@RequestParam(defaultValue = "20", required = true) int size,
|
||||
@Parameter(
|
||||
description = "회차 마스터 key",
|
||||
required = true,
|
||||
example = "8584e8d4-53b3-4582-bde2-28a81495a626")
|
||||
@RequestParam
|
||||
String uuid,
|
||||
@Parameter(description = "사번", required = true, example = "123456") @RequestParam
|
||||
String userId,
|
||||
@Schema(
|
||||
allowableValues = {"LABELER", "REVIEWER"},
|
||||
defaultValue = "LABELER")
|
||||
@Parameter(description = "라벨러/검수자(LABELER/REVIEWER)", required = true)
|
||||
@RequestParam
|
||||
String type) {
|
||||
LabelAllocateDto.searchReq searchReq = new LabelAllocateDto.searchReq(page, size, "");
|
||||
return ApiResponseDto.ok(labelAllocateService.findDaliyList(searchReq, uuid, userId, type));
|
||||
}
|
||||
|
||||
@@ -101,9 +101,9 @@ public class LabelAllocateDto {
|
||||
private Integer stage;
|
||||
|
||||
@Schema(
|
||||
description = "라벨러 할당 목록",
|
||||
example =
|
||||
"""
|
||||
description = "라벨러 할당 목록",
|
||||
example =
|
||||
"""
|
||||
[
|
||||
{
|
||||
"userId": "123456",
|
||||
@@ -122,9 +122,9 @@ public class LabelAllocateDto {
|
||||
private List<TargetUser> labelers;
|
||||
|
||||
@Schema(
|
||||
description = "검수자 할당 목록",
|
||||
example =
|
||||
"""
|
||||
description = "검수자 할당 목록",
|
||||
example =
|
||||
"""
|
||||
["K20251216001",
|
||||
"01022225555",
|
||||
"K20251212001"
|
||||
@@ -232,9 +232,9 @@ public class LabelAllocateDto {
|
||||
private Integer stage;
|
||||
|
||||
@Schema(
|
||||
description = "라벨러 할당 목록",
|
||||
example =
|
||||
"""
|
||||
description = "라벨러 할당 목록",
|
||||
example =
|
||||
"""
|
||||
[
|
||||
{
|
||||
"userId": "123456",
|
||||
@@ -295,11 +295,10 @@ public class LabelAllocateDto {
|
||||
String[] sortParams = sort.split(",");
|
||||
String property = sortParams[0];
|
||||
Sort.Direction direction =
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
sortParams.length > 1 ? Sort.Direction.fromString(sortParams[1]) : Sort.Direction.ASC;
|
||||
return PageRequest.of(page, size, Sort.by(direction, property));
|
||||
}
|
||||
return PageRequest.of(page, size);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -67,23 +67,17 @@ public class WorkerStatsDto {
|
||||
private Boolean isStagnated;
|
||||
|
||||
// 레거시 필드 (기존 호환성 유지)
|
||||
@Deprecated
|
||||
private Long doneCnt; // completed로 대체
|
||||
@Deprecated private Long doneCnt; // completed로 대체
|
||||
|
||||
@Deprecated
|
||||
private Long skipCnt; // skipped로 대체
|
||||
@Deprecated private Long skipCnt; // skipped로 대체
|
||||
|
||||
@Deprecated
|
||||
private Long remainingCnt; // remaining으로 대체
|
||||
@Deprecated private Long remainingCnt; // remaining으로 대체
|
||||
|
||||
@Deprecated
|
||||
private Long day3AgoDoneCnt; // history.day3Ago로 대체
|
||||
@Deprecated private Long day3AgoDoneCnt; // history.day3Ago로 대체
|
||||
|
||||
@Deprecated
|
||||
private Long day2AgoDoneCnt; // history.day2Ago로 대체
|
||||
@Deprecated private Long day2AgoDoneCnt; // history.day2Ago로 대체
|
||||
|
||||
@Deprecated
|
||||
private Long day1AgoDoneCnt; // history.day1Ago로 대체
|
||||
@Deprecated private Long day1AgoDoneCnt; // history.day1Ago로 대체
|
||||
}
|
||||
|
||||
@Getter
|
||||
@@ -107,7 +101,6 @@ public class WorkerStatsDto {
|
||||
private Long average;
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
|
||||
@@ -124,12 +124,7 @@ public class LabelAllocateService {
|
||||
* @return 작업자 목록 및 통계
|
||||
*/
|
||||
public WorkerListResponse getWorkerStatistics(
|
||||
Long analUid,
|
||||
String workerType,
|
||||
String search,
|
||||
String sortType,
|
||||
Integer page,
|
||||
Integer size) {
|
||||
Long analUid, String workerType, String search, String sortType, Integer page, Integer size) {
|
||||
|
||||
// 프로젝트 정보 조회 (analUid가 있을 때만)
|
||||
var projectInfo = labelAllocateCoreService.findProjectInfo(analUid);
|
||||
@@ -139,8 +134,7 @@ public class LabelAllocateService {
|
||||
|
||||
// 작업자 통계 조회
|
||||
List<WorkerStatistics> workers =
|
||||
labelAllocateCoreService.findWorkerStatistics(
|
||||
analUid, workerType, search, sortType);
|
||||
labelAllocateCoreService.findWorkerStatistics(analUid, workerType, search, sortType);
|
||||
|
||||
// 각 작업자별 3일치 처리량 조회
|
||||
LocalDate today = LocalDate.now();
|
||||
@@ -234,7 +228,8 @@ public class LabelAllocateService {
|
||||
}
|
||||
}
|
||||
|
||||
public Page<LabelingStatDto> findDaliyList(LabelAllocateDto.searchReq searchReq, String uuid, String userId, String type) {
|
||||
public Page<LabelingStatDto> findDaliyList(
|
||||
LabelAllocateDto.searchReq searchReq, String uuid, String userId, String type) {
|
||||
if (type.equals("LABELER")) {
|
||||
return labelAllocateCoreService.findLabelerDailyStat(searchReq, uuid, userId);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user