라벨링 종료여부 추가
This commit is contained in:
@@ -6,6 +6,7 @@ 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.UpdateClosedRequest;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerListResponse;
|
||||
import com.kamco.cd.kamcoback.label.service.LabelAllocateService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -236,4 +237,66 @@ public class LabelAllocateApiController {
|
||||
String uuid) {
|
||||
return ApiResponseDto.ok(labelAllocateService.moveAvailUserList(userId, uuid));
|
||||
}
|
||||
|
||||
@Operation(
|
||||
summary = "작업현황 관리 > 라벨링/검수 종료 여부 업데이트",
|
||||
description = "라벨링/검수 종료 여부를 업데이트합니다. uuid 생략 시 최신 프로젝트 대상")
|
||||
@ApiResponses(
|
||||
value = {
|
||||
@ApiResponse(responseCode = "200", description = "업데이트 성공"),
|
||||
@ApiResponse(responseCode = "400", description = "잘못된 요청 데이터", content = @Content),
|
||||
@ApiResponse(responseCode = "500", description = "서버 오류", content = @Content)
|
||||
})
|
||||
@PostMapping("/projectinfo/closed")
|
||||
public ApiResponseDto<ApiResponseDto.ResponseObj> updateClosedYn(
|
||||
@io.swagger.v3.oas.annotations.parameters.RequestBody(
|
||||
description = "종료 여부 업데이트 요청",
|
||||
required = true,
|
||||
content =
|
||||
@Content(
|
||||
mediaType = "application/json",
|
||||
schema = @Schema(implementation = UpdateClosedRequest.class),
|
||||
examples = {
|
||||
@io.swagger.v3.oas.annotations.media.ExampleObject(
|
||||
name = "라벨링 종료",
|
||||
value = """
|
||||
{"closedType": "LABELING", "closedYn": "Y"}
|
||||
"""),
|
||||
@io.swagger.v3.oas.annotations.media.ExampleObject(
|
||||
name = "검수 종료",
|
||||
value = """
|
||||
{"closedType": "INSPECTION", "closedYn": "Y"}
|
||||
"""),
|
||||
@io.swagger.v3.oas.annotations.media.ExampleObject(
|
||||
name = "라벨링 재개",
|
||||
value = """
|
||||
{"closedType": "LABELING", "closedYn": "N"}
|
||||
"""),
|
||||
@io.swagger.v3.oas.annotations.media.ExampleObject(
|
||||
name = "검수 재개",
|
||||
value = """
|
||||
{"closedType": "INSPECTION", "closedYn": "N"}
|
||||
"""),
|
||||
@io.swagger.v3.oas.annotations.media.ExampleObject(
|
||||
name = "특정 프로젝트 라벨링 종료",
|
||||
value = """
|
||||
{"uuid": "f97dc186-e6d3-4645-9737-3173dde8dc64", "closedType": "LABELING", "closedYn": "Y"}
|
||||
""")
|
||||
}))
|
||||
@RequestBody
|
||||
@Valid
|
||||
UpdateClosedRequest request) {
|
||||
|
||||
labelAllocateService.updateClosedYn(
|
||||
request.getUuid(), request.getClosedType(), request.getClosedYn());
|
||||
|
||||
String typeLabel = "LABELING".equals(request.getClosedType()) ? "라벨링" : "검수";
|
||||
String statusMessage =
|
||||
"Y".equals(request.getClosedYn())
|
||||
? typeLabel + "이(가) 종료되었습니다."
|
||||
: typeLabel + "이(가) 재개되었습니다.";
|
||||
|
||||
return ApiResponseDto.okObject(
|
||||
new ApiResponseDto.ResponseObj(ApiResponseDto.ApiResponseCode.OK, statusMessage));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user