라벨링 종료여부 추가
This commit is contained in:
@@ -195,4 +195,27 @@ public class LabelAllocateService {
|
||||
public MoveInfo moveAvailUserList(String userId, String uuid) {
|
||||
return labelAllocateCoreService.moveAvailUserList(userId, uuid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 프로젝트 종료 여부 업데이트
|
||||
*
|
||||
* @param uuid 프로젝트 UUID (선택, 미입력 시 최신 프로젝트 대상)
|
||||
* @param closedType 종료 유형 (LABELING/INSPECTION)
|
||||
* @param closedYn 종료 여부 (Y/N)
|
||||
*/
|
||||
@Transactional
|
||||
public void updateClosedYn(String uuid, String closedType, String closedYn) {
|
||||
String targetUuid = uuid;
|
||||
|
||||
// uuid가 없으면 최신 프로젝트 uuid 조회
|
||||
if (targetUuid == null || targetUuid.isBlank()) {
|
||||
var latestProjectInfo = labelAllocateCoreService.findLatestProjectInfo();
|
||||
if (latestProjectInfo == null || latestProjectInfo.getUuid() == null) {
|
||||
throw new IllegalArgumentException("진행중인 프로젝트가 없습니다.");
|
||||
}
|
||||
targetUuid = latestProjectInfo.getUuid();
|
||||
}
|
||||
|
||||
labelAllocateCoreService.updateClosedYnByUuid(targetUuid, closedType, closedYn);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user