라벨링 작업할당 stage 조회 제거하기
This commit is contained in:
@@ -123,7 +123,7 @@ public class LabelAllocateApiController {
|
||||
int targetYyyy = Integer.parseInt(dto.getYyyy().split("-")[1]);
|
||||
return ApiResponseDto.okObject(
|
||||
labelAllocateService.allocateAsc(
|
||||
dto.getStage(), dto.getLabelers(), dto.getInspectors(), compareYyyy, targetYyyy));
|
||||
dto.getUuid(), dto.getLabelers(), dto.getInspectors(), compareYyyy, targetYyyy));
|
||||
}
|
||||
|
||||
@Operation(summary = "작업현황 관리 > 변화탐지 회차 정보", description = "작업현황 관리 > 변화탐지 회차 정보")
|
||||
|
||||
@@ -86,6 +86,12 @@ public class LabelAllocateDto {
|
||||
@AllArgsConstructor
|
||||
public static class AllocateDto {
|
||||
|
||||
@Schema(
|
||||
description = "회차 마스터 key",
|
||||
example = "f97dc186-e6d3-4645-9737-3173dde8dc64",
|
||||
required = true)
|
||||
private UUID uuid;
|
||||
|
||||
@Schema(description = "비교년도-기준년도", example = "2022-2024", required = true)
|
||||
private String yyyy;
|
||||
|
||||
@@ -95,7 +101,7 @@ public class LabelAllocateDto {
|
||||
// @Schema(description = "기준년도", example = "2024", required = true)
|
||||
// private Integer targetYyyy;
|
||||
|
||||
@Schema(description = "회차", example = "4", required = true)
|
||||
@Schema(description = "회차", example = "4")
|
||||
private Integer stage;
|
||||
|
||||
@Schema(
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerListResponse;
|
||||
import com.kamco.cd.kamcoback.postgres.core.LabelAllocateCoreService;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.UUID;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -37,13 +38,13 @@ public class LabelAllocateService {
|
||||
/**
|
||||
* 도엽 기준 asc sorting 해서 할당 수만큼 배정하는 로직
|
||||
*
|
||||
* @param stage 회차
|
||||
* @param uuid 회차 key
|
||||
* @param targetUsers 라벨러 목록
|
||||
* @param targetInspectors 검수자 목록
|
||||
*/
|
||||
@Transactional
|
||||
public ApiResponseDto.ResponseObj allocateAsc(
|
||||
Integer stage,
|
||||
UUID uuid,
|
||||
List<TargetUser> targetUsers,
|
||||
List<String> targetInspectors,
|
||||
Integer compareYyyy,
|
||||
@@ -51,8 +52,7 @@ public class LabelAllocateService {
|
||||
Long lastId = null;
|
||||
|
||||
// geom 잔여건수 조회
|
||||
Long chargeCnt =
|
||||
labelAllocateCoreService.findLabelUnAssignedCnt(stage, compareYyyy, targetYyyy);
|
||||
Long chargeCnt = labelAllocateCoreService.findLabelUnAssignedCnt(uuid);
|
||||
if (chargeCnt <= 0) {
|
||||
return new ApiResponseDto.ResponseObj(ApiResponseCode.DUPLICATE_DATA, "이미 배정완료된 회차 입니다.");
|
||||
}
|
||||
@@ -63,12 +63,10 @@ public class LabelAllocateService {
|
||||
ApiResponseCode.BAD_REQUEST, "총 잔여건수와 요청 값의 합계가 맞지 않습니다.");
|
||||
}
|
||||
|
||||
List<AllocateInfoDto> allIds =
|
||||
labelAllocateCoreService.fetchNextIds(lastId, chargeCnt, compareYyyy, targetYyyy, stage);
|
||||
List<AllocateInfoDto> allIds = labelAllocateCoreService.fetchNextIds(lastId, chargeCnt, uuid);
|
||||
|
||||
// MapSheetAnalInferenceEntity analUid 가져오기
|
||||
Long analUid =
|
||||
labelAllocateCoreService.findMapSheetAnalInferenceUid(compareYyyy, targetYyyy, stage);
|
||||
Long analUid = labelAllocateCoreService.findMapSheetAnalInferenceUid(uuid);
|
||||
|
||||
int index = 0;
|
||||
for (TargetUser target : targetUsers) {
|
||||
|
||||
Reference in New Issue
Block a user