Merge pull request 'feat/dev_251201' (#148) from feat/dev_251201 into develop
Reviewed-on: https://kamco.gitea.gs.dabeeo.com/dabeeo/kamco-dabeeo-backoffice/pulls/148
This commit is contained in:
@@ -119,13 +119,11 @@ public class LabelAllocateApiController {
|
|||||||
public ApiResponseDto<ApiResponseDto.ResponseObj> labelAllocate(
|
public ApiResponseDto<ApiResponseDto.ResponseObj> labelAllocate(
|
||||||
@RequestBody @Valid LabelAllocateDto.AllocateDto dto) {
|
@RequestBody @Valid LabelAllocateDto.AllocateDto dto) {
|
||||||
|
|
||||||
|
int compareYyyy = Integer.parseInt(dto.getYyyy().split("-")[0]);
|
||||||
|
int targetYyyy = Integer.parseInt(dto.getYyyy().split("-")[1]);
|
||||||
return ApiResponseDto.okObject(
|
return ApiResponseDto.okObject(
|
||||||
labelAllocateService.allocateAsc(
|
labelAllocateService.allocateAsc(
|
||||||
dto.getStage(),
|
dto.getStage(), dto.getLabelers(), dto.getInspectors(), compareYyyy, targetYyyy));
|
||||||
dto.getLabelers(),
|
|
||||||
dto.getInspectors(),
|
|
||||||
dto.getCompareYyyy(),
|
|
||||||
dto.getTargetYyyy()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "작업현황 관리 > 변화탐지 회차 정보", description = "작업현황 관리 > 변화탐지 회차 정보")
|
@Operation(summary = "작업현황 관리 > 변화탐지 회차 정보", description = "작업현황 관리 > 변화탐지 회차 정보")
|
||||||
@@ -193,13 +191,12 @@ public class LabelAllocateApiController {
|
|||||||
@RequestBody
|
@RequestBody
|
||||||
LabelAllocateDto.AllocateMoveDto dto) {
|
LabelAllocateDto.AllocateMoveDto dto) {
|
||||||
|
|
||||||
|
int compareYyyy = Integer.parseInt(dto.getYyyy().split("-")[0]);
|
||||||
|
int targetYyyy = Integer.parseInt(dto.getYyyy().split("-")[1]);
|
||||||
|
|
||||||
return ApiResponseDto.okObject(
|
return ApiResponseDto.okObject(
|
||||||
labelAllocateService.allocateMove(
|
labelAllocateService.allocateMove(
|
||||||
dto.getStage(),
|
dto.getStage(), dto.getLabelers(), compareYyyy, targetYyyy, dto.getUserId()));
|
||||||
dto.getLabelers(),
|
|
||||||
dto.getCompareYyyy(),
|
|
||||||
dto.getTargetYyyy(),
|
|
||||||
dto.getUserId()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(
|
@Operation(
|
||||||
|
|||||||
@@ -91,11 +91,14 @@ public class LabelAllocateDto {
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public static class AllocateDto {
|
public static class AllocateDto {
|
||||||
|
|
||||||
@Schema(description = "비교년도", example = "2022", required = true)
|
@Schema(description = "비교년도-기준년도", example = "2022-2024", required = true)
|
||||||
private Integer compareYyyy;
|
private String yyyy;
|
||||||
|
|
||||||
@Schema(description = "기준년도", example = "2024", required = true)
|
// @Schema(description = "비교년도", example = "2022", required = true)
|
||||||
private Integer targetYyyy;
|
// private Integer compareYyyy;
|
||||||
|
//
|
||||||
|
// @Schema(description = "기준년도", example = "2024", required = true)
|
||||||
|
// private Integer targetYyyy;
|
||||||
|
|
||||||
@Schema(description = "회차", example = "4", required = true)
|
@Schema(description = "회차", example = "4", required = true)
|
||||||
private Integer stage;
|
private Integer stage;
|
||||||
@@ -218,6 +221,7 @@ public class LabelAllocateDto {
|
|||||||
private Integer ranking;
|
private Integer ranking;
|
||||||
private ZonedDateTime createdDttm;
|
private ZonedDateTime createdDttm;
|
||||||
private String ownerName;
|
private String ownerName;
|
||||||
|
private Long remainCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@@ -245,11 +249,14 @@ public class LabelAllocateDto {
|
|||||||
""")
|
""")
|
||||||
private List<TargetUser> labelers;
|
private List<TargetUser> labelers;
|
||||||
|
|
||||||
@Schema(description = "비교년도", example = "2022")
|
@Schema(description = "비교년도-기준년도", example = "2022-2024")
|
||||||
private Integer compareYyyy;
|
private String yyyy;
|
||||||
|
|
||||||
@Schema(description = "기준년도", example = "2024")
|
// @Schema(description = "비교년도", example = "2022")
|
||||||
private Integer targetYyyy;
|
// private Integer compareYyyy;
|
||||||
|
//
|
||||||
|
// @Schema(description = "기준년도", example = "2024")
|
||||||
|
// private Integer targetYyyy;
|
||||||
|
|
||||||
@Schema(description = "대상 사번", example = "01022223333")
|
@Schema(description = "대상 사번", example = "01022223333")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|||||||
@@ -583,6 +583,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
QMemberEntity worker = QMemberEntity.memberEntity;
|
QMemberEntity worker = QMemberEntity.memberEntity;
|
||||||
QMemberEntity inspector = new QMemberEntity("inspector");
|
QMemberEntity inspector = new QMemberEntity("inspector");
|
||||||
|
|
||||||
|
// remainCnt
|
||||||
|
Expression<Long> remainCnt =
|
||||||
|
Expressions.numberTemplate(
|
||||||
|
Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt);
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
@@ -596,7 +601,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
percent,
|
percent,
|
||||||
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
||||||
labelingAssignmentEntity.workStatDttm.min(),
|
labelingAssignmentEntity.workStatDttm.min(),
|
||||||
inspector.name.min()))
|
inspector.name.min(),
|
||||||
|
remainCnt))
|
||||||
.from(worker)
|
.from(worker)
|
||||||
.innerJoin(labelingAssignmentEntity)
|
.innerJoin(labelingAssignmentEntity)
|
||||||
.on(
|
.on(
|
||||||
@@ -945,6 +951,11 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
QMemberEntity inspector = QMemberEntity.memberEntity;
|
QMemberEntity inspector = QMemberEntity.memberEntity;
|
||||||
QMemberEntity worker = new QMemberEntity("worker");
|
QMemberEntity worker = new QMemberEntity("worker");
|
||||||
|
|
||||||
|
// remainCnt
|
||||||
|
Expression<Long> remainCnt =
|
||||||
|
Expressions.numberTemplate(
|
||||||
|
Long.class, "({0} - {1} - {2})", assignedCnt, skipCnt, completeCnt);
|
||||||
|
|
||||||
return queryFactory
|
return queryFactory
|
||||||
.select(
|
.select(
|
||||||
Projections.constructor(
|
Projections.constructor(
|
||||||
@@ -958,7 +969,8 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
|||||||
percent,
|
percent,
|
||||||
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
Expressions.constant(0), // TODO: 순위, 꼭 해야할지?
|
||||||
labelingAssignmentEntity.inspectStatDttm.min(),
|
labelingAssignmentEntity.inspectStatDttm.min(),
|
||||||
worker.name.min()))
|
worker.name.min(),
|
||||||
|
remainCnt))
|
||||||
.from(inspector)
|
.from(inspector)
|
||||||
.innerJoin(labelingAssignmentEntity)
|
.innerJoin(labelingAssignmentEntity)
|
||||||
.on(
|
.on(
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ import com.querydsl.jpa.impl.JPAQueryFactory;
|
|||||||
import jakarta.persistence.EntityManager;
|
import jakarta.persistence.EntityManager;
|
||||||
import jakarta.persistence.PersistenceContext;
|
import jakarta.persistence.PersistenceContext;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.ZoneId;
|
||||||
|
import java.time.ZonedDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
@@ -111,10 +113,23 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
|||||||
&& !searchReq.getStrtDttm().isEmpty()
|
&& !searchReq.getStrtDttm().isEmpty()
|
||||||
&& searchReq.getEndDttm() != null
|
&& searchReq.getEndDttm() != null
|
||||||
&& !searchReq.getEndDttm().isEmpty()) {
|
&& !searchReq.getEndDttm().isEmpty()) {
|
||||||
|
|
||||||
|
ZoneId zoneId = ZoneId.of("Asia/Seoul");
|
||||||
|
|
||||||
|
ZonedDateTime start =
|
||||||
|
LocalDate.parse(searchReq.getStrtDttm(), DateTimeFormatter.BASIC_ISO_DATE)
|
||||||
|
.atStartOfDay(zoneId);
|
||||||
|
|
||||||
|
ZonedDateTime end =
|
||||||
|
LocalDate.parse(searchReq.getEndDttm(), DateTimeFormatter.BASIC_ISO_DATE)
|
||||||
|
.plusDays(1)
|
||||||
|
.atStartOfDay(zoneId);
|
||||||
|
|
||||||
whereSubBuilder.and(
|
whereSubBuilder.and(
|
||||||
Expressions.stringTemplate(
|
mapSheetAnalDataInferenceGeomEntity
|
||||||
"to_char({0}, 'YYYYMMDD')", mapSheetAnalDataInferenceGeomEntity.labelStateDttm)
|
.labelStateDttm
|
||||||
.between(searchReq.getStrtDttm(), searchReq.getEndDttm()));
|
.goe(start)
|
||||||
|
.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.lt(end)));
|
||||||
}
|
}
|
||||||
|
|
||||||
List<LabelWorkMng> foundContent =
|
List<LabelWorkMng> foundContent =
|
||||||
|
|||||||
Reference in New Issue
Block a user