라벨할당 로직에 도엽 추가, 라벨러 상세 정보 수정

This commit is contained in:
2026-01-05 09:55:02 +09:00
parent 1cab1a34ab
commit 40daa738f6
6 changed files with 107 additions and 63 deletions

View File

@@ -150,8 +150,8 @@ public class LabelAllocateApiController {
}
@Operation(
summary = "작업현황 관리 > 상세 > 작업 이관 > 팝업 내 라벨러 상세 정보",
description = "작업현황 관리 > 상세 > 작업 이관 > 팝업 내 라벨러 상세 정보")
summary = "작업현황 관리 > 라벨러 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일",
description = "작업현황 관리 > 라벨러 상세 정보, 작업이관 팝업 내 라벨러 상세 정보 동일")
@GetMapping("/labeler-detail")
public ApiResponseDto<LabelerDetail> findLabelerDetail(
@RequestParam(defaultValue = "01022223333") String userId,

View File

@@ -109,42 +109,42 @@ public class LabelAllocateDto {
description = "라벨러 할당 목록",
example =
"""
[
{
"userId": "123456",
"demand": 1000
},
{
"userId": "010222297501",
"demand": 400
},
{
"userId": "01022223333",
"demand": 440
}
]
""")
[
{
"userId": "123456",
"demand": 1000
},
{
"userId": "010222297501",
"demand": 400
},
{
"userId": "01022223333",
"demand": 440
}
]
""")
private List<TargetUser> labelers;
@Schema(
description = "검수자 할당 목록",
example =
"""
[
{
"inspectorUid": "K20251216001",
"userCount": 1000
},
{
"inspectorUid": "01022225555",
"userCount": 340
[
{
"inspectorUid": "K20251216001",
"userCount": 1000
},
{
"inspectorUid": "K20251212001",
"userCount": 500
}
]
""")
{
"inspectorUid": "01022225555",
"userCount": 340
},
{
"inspectorUid": "K20251212001",
"userCount": 500
}
]
""")
private List<TargetInspector> inspectors;
}
@@ -227,6 +227,9 @@ public class LabelAllocateDto {
private Long completeCnt;
private Long skipCnt;
private Double percent;
private Integer ranking;
private ZonedDateTime createdDttm;
private String inspectorName;
}
@Getter
@@ -244,17 +247,17 @@ public class LabelAllocateDto {
description = "라벨러 할당 목록",
example =
"""
[
{
"userId": "123456",
"demand": 10
},
{
"userId": "010222297501",
"demand": 5
}
]
""")
[
{
"userId": "123456",
"demand": 10
},
{
"userId": "010222297501",
"demand": 5
}
]
""")
private List<TargetUser> labelers;
@Schema(description = "비교년도", example = "2022")
@@ -263,4 +266,13 @@ public class LabelAllocateDto {
@Schema(description = "기준년도", example = "2024")
private Integer targetYyyy;
}
@Getter
@Setter
@AllArgsConstructor
public static class AllocateInfoDto {
private Long geoUid;
private String mapSheetNum;
}
}

View File

@@ -3,6 +3,7 @@ package com.kamco.cd.kamcoback.label.service;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto.ApiResponseCode;
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
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.TargetInspector;
@@ -67,12 +68,12 @@ public class LabelAllocateService {
ApiResponseCode.BAD_REQUEST, "총 잔여건수와 요청 값의 합계가 맞지 않습니다.");
}
List<Long> allIds =
List<AllocateInfoDto> allIds =
labelAllocateCoreService.fetchNextIds(lastId, chargeCnt, compareYyyy, targetYyyy, stage);
int index = 0;
for (TargetUser target : targetUsers) {
int end = index + target.getDemand();
List<Long> sub = allIds.subList(index, end);
List<AllocateInfoDto> sub = allIds.subList(index, end);
labelAllocateCoreService.assignOwner(sub, target.getUserId(), compareYyyy, targetYyyy, stage);
index = end;