라벨링작업 관리 목록조회 수정
This commit is contained in:
@@ -8,7 +8,6 @@ import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngSearchReq;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.WorkerState;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.WorkerStateSearchReq;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
|
||||
import com.kamco.cd.kamcoback.label.service.LabelWorkService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
@@ -108,25 +107,27 @@ public class LabelWorkerApiController {
|
||||
|
||||
@Operation(summary = "작업현황 관리 > 현황 목록 조회", description = "작업현황 관리 > 현황 목록 조회")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = CommonCodeDto.Basic.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
value = {
|
||||
@ApiResponse(
|
||||
responseCode = "200",
|
||||
description = "조회 성공",
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = Page.class))),
|
||||
@ApiResponse(responseCode = "404", description = "코드를 찾을 수 없음", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@GetMapping("/work-state-list")
|
||||
public ApiResponseDto<Page<WorkerState>> findWorkStateList(
|
||||
@Parameter(description = "유형", example = "LABELER") @RequestParam(required = false) String userRole,
|
||||
@Parameter(description = "검색어", example = "20261201") @RequestParam(required = false) String searchVal,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size) {
|
||||
@Parameter(description = "유형", example = "LABELER") @RequestParam(required = false)
|
||||
String userRole,
|
||||
@Parameter(description = "검색어", example = "20261201") @RequestParam(required = false)
|
||||
String searchVal,
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size) {
|
||||
|
||||
LabelWorkDto.WorkerStateSearchReq searchReq = new WorkerStateSearchReq();
|
||||
searchReq.setUserRole(userRole);
|
||||
|
||||
@@ -4,7 +4,6 @@ import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.Enums;
|
||||
import com.kamco.cd.kamcoback.common.utils.interfaces.JsonFormatDttm;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelMngState;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.DailyHistory;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
@@ -130,7 +129,6 @@ public class LabelWorkDto {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@Builder
|
||||
@@ -167,7 +165,7 @@ public class LabelWorkDto {
|
||||
private Long day1AgoDoneCnt;
|
||||
|
||||
public Long getremindCnt() {
|
||||
return this.assignedCnt - this.doneCnt;
|
||||
return this.assignedCnt - this.doneCnt;
|
||||
}
|
||||
|
||||
public double getDoneRate() {
|
||||
@@ -183,7 +181,6 @@ public class LabelWorkDto {
|
||||
}
|
||||
return "검수자";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Schema(name = "WorkerStateSearchReq", description = "라벨작업관리 검색 요청")
|
||||
|
||||
@@ -8,7 +8,6 @@ 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.TargetUser;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.UserList;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.DailyHistory;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerListResponse;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
|
||||
import com.kamco.cd.kamcoback.postgres.core.LabelAllocateCoreService;
|
||||
@@ -122,12 +121,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);
|
||||
@@ -135,12 +129,9 @@ public class LabelAllocateService {
|
||||
// 작업 진행 현황 조회
|
||||
var progressInfo = labelAllocateCoreService.findWorkProgressInfo(analUid);
|
||||
|
||||
|
||||
|
||||
// 작업자 통계 조회
|
||||
List<WorkerStatistics> workers =
|
||||
labelAllocateCoreService.findWorkerStatistics(
|
||||
analUid, workerType, search, sortType);
|
||||
labelAllocateCoreService.findWorkerStatistics(analUid, workerType, search, sortType);
|
||||
|
||||
// 각 작업자별 3일치 처리량 조회
|
||||
LocalDate today = LocalDate.now();
|
||||
@@ -156,10 +147,6 @@ public class LabelAllocateService {
|
||||
worker.getWorkerId(), workerType, today.minusDays(3), analUid);
|
||||
|
||||
long average = (day1Count + day2Count + day3Count) / 3;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// 페이징 처리
|
||||
|
||||
@@ -3,9 +3,8 @@ package com.kamco.cd.kamcoback.label.service;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.ChangeDetectYear;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMng;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.WorkerState;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.LabelWorkMngDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelWorkDto.WorkerState;
|
||||
import com.kamco.cd.kamcoback.postgres.core.LabelWorkCoreService;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -52,7 +51,6 @@ public class LabelWorkService {
|
||||
return labelWorkCoreService.getChangeDetectYear();
|
||||
}
|
||||
|
||||
|
||||
public Page<WorkerState> findlabelWorkStateList(LabelWorkDto.WorkerStateSearchReq searchReq) {
|
||||
|
||||
return labelWorkCoreService.findlabelWorkStateList(searchReq);
|
||||
|
||||
Reference in New Issue
Block a user