라벨러,검수자 상세 정보, 일자별 목록 쿼리 추가
This commit is contained in:
@@ -4,7 +4,9 @@ import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InferenceDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelerDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelingStatDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.UserList;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.searchReq;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkProgressInfo;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
|
||||
import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity;
|
||||
@@ -13,6 +15,7 @@ import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.data.domain.Page;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@@ -22,7 +25,7 @@ public class LabelAllocateCoreService {
|
||||
private final LabelAllocateRepository labelAllocateRepository;
|
||||
|
||||
public List<AllocateInfoDto> fetchNextIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
return labelAllocateRepository.fetchNextIds(lastId, batchSize, compareYyyy, targetYyyy, stage);
|
||||
}
|
||||
|
||||
@@ -32,8 +35,8 @@ public class LabelAllocateCoreService {
|
||||
|
||||
public List<LabelAllocateDto.Basic> findAssignedLabelerList(Long analUid) {
|
||||
return labelAllocateRepository.findAssignedLabelerList(analUid).stream()
|
||||
.map(LabelingAssignmentEntity::toDto)
|
||||
.toList();
|
||||
.map(LabelingAssignmentEntity::toDto)
|
||||
.toList();
|
||||
}
|
||||
|
||||
public Long findLabelUnAssignedCnt(Integer stage, Integer compareYyyy, Integer targetYyyy) {
|
||||
@@ -49,12 +52,12 @@ public class LabelAllocateCoreService {
|
||||
}
|
||||
|
||||
public List<WorkerStatistics> findWorkerStatistics(
|
||||
Long analUid,
|
||||
String workerType,
|
||||
String search,
|
||||
String sortType) {
|
||||
Long analUid,
|
||||
String workerType,
|
||||
String search,
|
||||
String sortType) {
|
||||
return labelAllocateRepository.findWorkerStatistics(
|
||||
analUid, workerType, search, sortType);
|
||||
analUid, workerType, search, sortType);
|
||||
}
|
||||
|
||||
public WorkProgressInfo findWorkProgressInfo(Long analUid) {
|
||||
@@ -62,7 +65,7 @@ public class LabelAllocateCoreService {
|
||||
}
|
||||
|
||||
public Long findDailyProcessedCount(
|
||||
String workerId, String workerType, LocalDate date, Long analUid) {
|
||||
String workerId, String workerType, LocalDate date, Long analUid) {
|
||||
return labelAllocateRepository.findDailyProcessedCount(workerId, workerType, date, analUid);
|
||||
}
|
||||
|
||||
@@ -75,9 +78,9 @@ public class LabelAllocateCoreService {
|
||||
}
|
||||
|
||||
public List<Long> fetchNextMoveIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage) {
|
||||
return labelAllocateRepository.fetchNextMoveIds(
|
||||
lastId, batchSize, compareYyyy, targetYyyy, stage);
|
||||
lastId, batchSize, compareYyyy, targetYyyy, stage);
|
||||
}
|
||||
|
||||
public void assignOwnerMove(List<Long> sub, String userId) {
|
||||
@@ -95,4 +98,16 @@ public class LabelAllocateCoreService {
|
||||
public void insertInspector(Long analUid, String inspector) {
|
||||
labelAllocateRepository.insertInspector(analUid, inspector);
|
||||
}
|
||||
|
||||
public Page<LabelingStatDto> findLabelerDailyStat(searchReq searchReq, String uuid, String userId) {
|
||||
return labelAllocateRepository.findLabelerDailyStat(searchReq, uuid, userId);
|
||||
}
|
||||
|
||||
public Page<LabelingStatDto> findInspectorDailyStat(searchReq searchReq, String uuid, String userId) {
|
||||
return labelAllocateRepository.findInspectorDailyStat(searchReq, uuid, userId);
|
||||
}
|
||||
|
||||
public LabelerDetail findInspectorDetail(String userId, String uuid) {
|
||||
return labelAllocateRepository.findInspectorDetail(userId, uuid);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import java.time.ZonedDateTime;
|
||||
import java.util.UUID;
|
||||
|
||||
@Entity
|
||||
@@ -40,18 +41,31 @@ public class LabelingAssignmentEntity extends CommonDateEntity {
|
||||
@Column(name = "anal_uid")
|
||||
private Long analUid;
|
||||
|
||||
@Column(name = "inspect_state")
|
||||
private String inspectState;
|
||||
|
||||
@Column(name = "work_stat_dttm")
|
||||
private ZonedDateTime workStatDttm;
|
||||
|
||||
@Column(name = "inspect_stat_dttm")
|
||||
private ZonedDateTime inspectStatDttm;
|
||||
|
||||
public LabelAllocateDto.Basic toDto() {
|
||||
return new LabelAllocateDto.Basic(
|
||||
this.assignmentUid,
|
||||
this.inferenceGeomUid,
|
||||
this.workerUid,
|
||||
this.inspectorUid,
|
||||
this.workState,
|
||||
this.stagnationYn,
|
||||
this.assignGroupId,
|
||||
this.learnGeomUid,
|
||||
this.analUid,
|
||||
super.getCreatedDate(),
|
||||
super.getModifiedDate());
|
||||
this.assignmentUid,
|
||||
this.inferenceGeomUid,
|
||||
this.workerUid,
|
||||
this.inspectorUid,
|
||||
this.workState,
|
||||
this.stagnationYn,
|
||||
this.assignGroupId,
|
||||
this.learnGeomUid,
|
||||
this.analUid,
|
||||
super.getCreatedDate(),
|
||||
super.getModifiedDate(),
|
||||
this.inspectState,
|
||||
this.workStatDttm,
|
||||
this.inspectStatDttm
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package com.kamco.cd.kamcoback.postgres.repository.label;
|
||||
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.AllocateInfoDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.InferenceDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelerDetail;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.LabelingStatDto;
|
||||
import com.kamco.cd.kamcoback.label.dto.LabelAllocateDto.UserList;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkProgressInfo;
|
||||
import com.kamco.cd.kamcoback.label.dto.WorkerStatsDto.WorkerStatistics;
|
||||
@@ -10,11 +12,12 @@ import com.kamco.cd.kamcoback.postgres.entity.LabelingAssignmentEntity;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import org.springframework.data.domain.Page;
|
||||
|
||||
public interface LabelAllocateRepositoryCustom {
|
||||
|
||||
List<AllocateInfoDto> fetchNextIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
|
||||
void assignOwner(List<AllocateInfoDto> ids, String userId, Long analUid);
|
||||
|
||||
@@ -28,7 +31,7 @@ public interface LabelAllocateRepositoryCustom {
|
||||
|
||||
// 작업자 통계 조회
|
||||
List<WorkerStatistics> findWorkerStatistics(
|
||||
Long analUid, String workerType, String search, String sortType);
|
||||
Long analUid, String workerType, String search, String sortType);
|
||||
|
||||
// 작업 진행 현황 조회
|
||||
WorkProgressInfo findWorkProgressInfo(Long analUid);
|
||||
@@ -41,7 +44,7 @@ public interface LabelAllocateRepositoryCustom {
|
||||
InferenceDetail findInferenceDetail(String uuid);
|
||||
|
||||
List<Long> fetchNextMoveIds(
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
Long lastId, Long batchSize, Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
|
||||
void assignOwnerMove(List<Long> sub, String userId);
|
||||
|
||||
@@ -50,4 +53,10 @@ public interface LabelAllocateRepositoryCustom {
|
||||
Long findMapSheetAnalInferenceUid(Integer compareYyyy, Integer targetYyyy, Integer stage);
|
||||
|
||||
void insertInspector(Long analUid, String inspector);
|
||||
|
||||
Page<LabelingStatDto> findLabelerDailyStat(LabelAllocateDto.searchReq searchReq, String uuid, String userId);
|
||||
|
||||
Page<LabelingStatDto> findInspectorDailyStat(LabelAllocateDto.searchReq searchReq, String uuid, String userId);
|
||||
|
||||
LabelerDetail findInspectorDetail(String userId, String uuid);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user