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:
@@ -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(
|
||||
|
||||
@@ -23,6 +23,8 @@ import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
@@ -111,10 +113,23 @@ public class LabelWorkRepositoryImpl extends QuerydslRepositorySupport
|
||||
&& !searchReq.getStrtDttm().isEmpty()
|
||||
&& searchReq.getEndDttm() != null
|
||||
&& !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(
|
||||
Expressions.stringTemplate(
|
||||
"to_char({0}, 'YYYYMMDD')", mapSheetAnalDataInferenceGeomEntity.labelStateDttm)
|
||||
.between(searchReq.getStrtDttm(), searchReq.getEndDttm()));
|
||||
mapSheetAnalDataInferenceGeomEntity
|
||||
.labelStateDttm
|
||||
.goe(start)
|
||||
.and(mapSheetAnalDataInferenceGeomEntity.labelStateDttm.lt(end)));
|
||||
}
|
||||
|
||||
List<LabelWorkMng> foundContent =
|
||||
|
||||
Reference in New Issue
Block a user