라벨할당 임시 커밋
This commit is contained in:
@@ -1,22 +1,80 @@
|
||||
package com.kamco.cd.kamcoback.label.dto;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.CodeExpose;
|
||||
import com.kamco.cd.kamcoback.common.utils.enums.EnumType;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
public class LabelAllocateDto {
|
||||
|
||||
@CodeExpose
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public static class Sheet {
|
||||
public enum LabelMngState implements EnumType {
|
||||
PENDING("작업대기"),
|
||||
ASSIGNED("작업할당"),
|
||||
STOP("중단"),
|
||||
LABEL_ING("라벨진행중"),
|
||||
LABEL_COMPLETE("라벨완료"),
|
||||
INSPECT_REQ("검수요청"),
|
||||
INSPECT_ING("검수진행중"),
|
||||
INSPECT_COMPLETE("검수완료");
|
||||
|
||||
private final String sheetId;
|
||||
private int count;
|
||||
private String desc;
|
||||
|
||||
public void decrease(int amount) {
|
||||
this.count -= amount;
|
||||
@Override
|
||||
public String getId() {
|
||||
return name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
@CodeExpose
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum LabelState implements EnumType {
|
||||
ASSIGNED("배정"),
|
||||
SKIP("스킵"),
|
||||
COMPLETE("완료");
|
||||
|
||||
private String desc;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
@CodeExpose
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum InspectState implements EnumType {
|
||||
UNCONFIRM("미확인"),
|
||||
EXCEPT("제외"),
|
||||
COMPLETE("완료");
|
||||
|
||||
private String desc;
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return name();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText() {
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,22 +83,36 @@ public class LabelAllocateDto {
|
||||
|
||||
private final String userId;
|
||||
private final int demand;
|
||||
private final List<Sheet> assigned = new ArrayList<>();
|
||||
private int allocated = 0;
|
||||
@Setter private int shortage = 0;
|
||||
|
||||
public TargetUser(String userId, int demand) {
|
||||
this.userId = userId;
|
||||
this.demand = demand;
|
||||
}
|
||||
}
|
||||
|
||||
public int getRemainDemand() {
|
||||
return demand - allocated;
|
||||
}
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public static class TargetInspector {
|
||||
|
||||
public void assign(String sheetId, int count) {
|
||||
assigned.add(new Sheet(sheetId, count));
|
||||
allocated += count;
|
||||
}
|
||||
private final String inspectorUid;
|
||||
private int userCount;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public static class Basic {
|
||||
|
||||
private UUID assignmentUid;
|
||||
private Long inferenceGeomUid;
|
||||
private String workerUid;
|
||||
private String inspectorUid;
|
||||
private String workState;
|
||||
private Character stagnationYn;
|
||||
private String assignGroupId;
|
||||
private Long learnGeomUid;
|
||||
private Long analUid;
|
||||
private ZonedDateTime createdDttm;
|
||||
private ZonedDateTime updatedDttm;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user