[KC-148] 학습데이터 목록 API 항목 수정, 현황관리 상세 사용자 목록 API 수정
This commit is contained in:
@@ -136,11 +136,13 @@ public class LabelWorkerApiController {
|
||||
@Parameter(description = "페이지 번호 (0부터 시작)", example = "0") @RequestParam(defaultValue = "0")
|
||||
int page,
|
||||
@Parameter(description = "페이지 크기", example = "20") @RequestParam(defaultValue = "20")
|
||||
int size) {
|
||||
int size,
|
||||
@Parameter(description = "회차 UUID key", example = "f97dc186-e6d3-4645-9737-3173dde8dc64")
|
||||
String uuid) {
|
||||
|
||||
// 대상추출(최근)
|
||||
UUID lstUuid = labelWorkService.findLastLabelWorkState();
|
||||
String uuid = lstUuid.toString();
|
||||
// UUID lstUuid = labelWorkService.findLastLabelWorkState();
|
||||
// String uuid = lstUuid.toString();
|
||||
|
||||
LabelWorkDto.WorkerStateSearchReq searchReq = new WorkerStateSearchReq();
|
||||
searchReq.setUserRole(userRole);
|
||||
|
||||
@@ -38,17 +38,16 @@ public class LabelWorkDto {
|
||||
private Integer compareYyyy;
|
||||
private Integer targetYyyy;
|
||||
private Integer stage;
|
||||
@JsonFormatDttm private ZonedDateTime createdDttm;
|
||||
@JsonFormatDttm private ZonedDateTime gukyuinApplyDttm;
|
||||
private Long detectionTotCnt;
|
||||
private Long labelTotCnt;
|
||||
private Long labelAssignCnt;
|
||||
private Long labelStopTotCnt;
|
||||
private Long labelIngTotCnt;
|
||||
private Long labelSkipTotCnt;
|
||||
private Long labelCompleteTotCnt;
|
||||
@JsonFormatDttm private ZonedDateTime labelStartDttm;
|
||||
|
||||
// tb_map_sheet_anal_inference.anal_state 컬럼 값
|
||||
private String analState;
|
||||
// tb_map_sheet_anal_inference.anal_state 컬럼 값 -> 미사용
|
||||
// private String analState;
|
||||
|
||||
// tb_labeling_assignment 테이블에서 stagnation_yn = 'N'인 정상 진행 건수
|
||||
private Long normalProgressCnt;
|
||||
@@ -56,6 +55,9 @@ public class LabelWorkDto {
|
||||
// tb_labeling_assignment 테이블에서 총 배정 건수
|
||||
private Long totalAssignmentCnt;
|
||||
|
||||
private String labelingClosedYn;
|
||||
private String inspectionClosedYn;
|
||||
|
||||
@JsonProperty("detectYear")
|
||||
public String getDetectYear() {
|
||||
if (compareYyyy == null || targetYyyy == null) {
|
||||
@@ -66,22 +68,24 @@ public class LabelWorkDto {
|
||||
|
||||
/** 라벨링 상태 반환 (tb_map_sheet_anal_inference.anal_state 기준) */
|
||||
public String getLabelState() {
|
||||
// anal_state 값이 있으면 해당 값 사용
|
||||
if (this.analState != null && !this.analState.isEmpty()) {
|
||||
return this.analState;
|
||||
}
|
||||
// anal_state 값이 있으면 해당 값 사용 -> 우선은 미사용
|
||||
// if (this.analState != null && !this.analState.isEmpty()) {
|
||||
// return this.analState;
|
||||
// }
|
||||
|
||||
// anal_state 값이 없으면 기존 로직으로 폴백
|
||||
String mngState = "PENDING";
|
||||
String mngState = LabelMngState.PENDING.getId();
|
||||
|
||||
if (this.labelTotCnt == 0) {
|
||||
mngState = "PENDING";
|
||||
} else if (this.labelTotCnt > 0 && this.labelAssignCnt > 0 && this.labelIngTotCnt == 0) {
|
||||
mngState = "ASSIGNED";
|
||||
} else if (this.labelIngTotCnt > 0) {
|
||||
mngState = "LABEL_ING";
|
||||
mngState = LabelMngState.PENDING.getId();
|
||||
} else if (this.labelTotCnt > 0 && this.labelAssignCnt > 0 && this.labelCompleteTotCnt == 0) {
|
||||
mngState = LabelMngState.ASSIGNED.getId();
|
||||
} else if (this.labelCompleteTotCnt > 0) {
|
||||
mngState = LabelMngState.LABEL_ING.getId();
|
||||
} else if (this.labelTotCnt <= labelCompleteTotCnt) {
|
||||
mngState = "LABEL_COMPLETE";
|
||||
mngState = LabelMngState.LABEL_COMPLETE.getId();
|
||||
} else if (this.labelingClosedYn.equals("Y") && this.inspectionClosedYn.equals("Y")) {
|
||||
mngState = LabelMngState.FINISH.getId();
|
||||
}
|
||||
|
||||
return mngState;
|
||||
@@ -109,10 +113,10 @@ public class LabelWorkDto {
|
||||
if (this.totalAssignmentCnt == null || this.totalAssignmentCnt == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
if (this.normalProgressCnt == null) {
|
||||
if (this.labelCompleteTotCnt == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return (double) this.normalProgressCnt / this.totalAssignmentCnt * 100.0;
|
||||
return (double) this.labelCompleteTotCnt / this.totalAssignmentCnt * 100.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user