라벨링 할당,이관 파라미터 형태 변경, userDetail 리턴 항목 추가
This commit is contained in:
@@ -119,13 +119,11 @@ public class LabelAllocateApiController {
|
||||
public ApiResponseDto<ApiResponseDto.ResponseObj> labelAllocate(
|
||||
@RequestBody @Valid LabelAllocateDto.AllocateDto dto) {
|
||||
|
||||
int compareYyyy = Integer.parseInt(dto.getYyyy().split("-")[0]);
|
||||
int targetYyyy = Integer.parseInt(dto.getYyyy().split("-")[1]);
|
||||
return ApiResponseDto.okObject(
|
||||
labelAllocateService.allocateAsc(
|
||||
dto.getStage(),
|
||||
dto.getLabelers(),
|
||||
dto.getInspectors(),
|
||||
dto.getCompareYyyy(),
|
||||
dto.getTargetYyyy()));
|
||||
dto.getStage(), dto.getLabelers(), dto.getInspectors(), compareYyyy, targetYyyy));
|
||||
}
|
||||
|
||||
@Operation(summary = "작업현황 관리 > 변화탐지 회차 정보", description = "작업현황 관리 > 변화탐지 회차 정보")
|
||||
@@ -193,13 +191,12 @@ public class LabelAllocateApiController {
|
||||
@RequestBody
|
||||
LabelAllocateDto.AllocateMoveDto dto) {
|
||||
|
||||
int compareYyyy = Integer.parseInt(dto.getYyyy().split("-")[0]);
|
||||
int targetYyyy = Integer.parseInt(dto.getYyyy().split("-")[1]);
|
||||
|
||||
return ApiResponseDto.okObject(
|
||||
labelAllocateService.allocateMove(
|
||||
dto.getStage(),
|
||||
dto.getLabelers(),
|
||||
dto.getCompareYyyy(),
|
||||
dto.getTargetYyyy(),
|
||||
dto.getUserId()));
|
||||
dto.getStage(), dto.getLabelers(), compareYyyy, targetYyyy, dto.getUserId()));
|
||||
}
|
||||
|
||||
@Operation(
|
||||
|
||||
@@ -91,11 +91,14 @@ public class LabelAllocateDto {
|
||||
@AllArgsConstructor
|
||||
public static class AllocateDto {
|
||||
|
||||
@Schema(description = "비교년도", example = "2022", required = true)
|
||||
private Integer compareYyyy;
|
||||
@Schema(description = "비교년도-기준년도", example = "2022-2024", required = true)
|
||||
private String yyyy;
|
||||
|
||||
@Schema(description = "기준년도", example = "2024", required = true)
|
||||
private Integer targetYyyy;
|
||||
// @Schema(description = "비교년도", example = "2022", required = true)
|
||||
// private Integer compareYyyy;
|
||||
//
|
||||
// @Schema(description = "기준년도", example = "2024", required = true)
|
||||
// private Integer targetYyyy;
|
||||
|
||||
@Schema(description = "회차", example = "4", required = true)
|
||||
private Integer stage;
|
||||
@@ -218,6 +221,7 @@ public class LabelAllocateDto {
|
||||
private Integer ranking;
|
||||
private ZonedDateTime createdDttm;
|
||||
private String ownerName;
|
||||
private Long remainCnt;
|
||||
}
|
||||
|
||||
@Getter
|
||||
@@ -245,11 +249,14 @@ public class LabelAllocateDto {
|
||||
""")
|
||||
private List<TargetUser> labelers;
|
||||
|
||||
@Schema(description = "비교년도", example = "2022")
|
||||
private Integer compareYyyy;
|
||||
@Schema(description = "비교년도-기준년도", example = "2022-2024")
|
||||
private String yyyy;
|
||||
|
||||
@Schema(description = "기준년도", example = "2024")
|
||||
private Integer targetYyyy;
|
||||
// @Schema(description = "비교년도", example = "2022")
|
||||
// private Integer compareYyyy;
|
||||
//
|
||||
// @Schema(description = "기준년도", example = "2024")
|
||||
// private Integer targetYyyy;
|
||||
|
||||
@Schema(description = "대상 사번", example = "01022223333")
|
||||
private String userId;
|
||||
|
||||
@@ -583,6 +583,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
QMemberEntity worker = QMemberEntity.memberEntity;
|
||||
QMemberEntity inspector = new QMemberEntity("inspector");
|
||||
|
||||
// remainCnt
|
||||
Expression<Long> remainCnt =
|
||||
Expressions.numberTemplate(
|
||||
Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt);
|
||||
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
@@ -596,7 +601,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
percent,
|
||||
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
||||
labelingAssignmentEntity.workStatDttm.min(),
|
||||
inspector.name.min()))
|
||||
inspector.name.min(),
|
||||
remainCnt))
|
||||
.from(worker)
|
||||
.innerJoin(labelingAssignmentEntity)
|
||||
.on(
|
||||
@@ -945,6 +951,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
QMemberEntity inspector = QMemberEntity.memberEntity;
|
||||
QMemberEntity worker = new QMemberEntity("worker");
|
||||
|
||||
// remainCnt
|
||||
Expression<Long> remainCnt =
|
||||
Expressions.numberTemplate(
|
||||
Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt);
|
||||
|
||||
return queryFactory
|
||||
.select(
|
||||
Projections.constructor(
|
||||
@@ -958,7 +969,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
percent,
|
||||
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
||||
labelingAssignmentEntity.inspectStatDttm.min(),
|
||||
worker.name.min()))
|
||||
worker.name.min(),
|
||||
remainCnt))
|
||||
.from(inspector)
|
||||
.innerJoin(labelingAssignmentEntity)
|
||||
.on(
|
||||
|
||||
Reference in New Issue
Block a user