feat/infer_dev_260211 #137
@@ -6,7 +6,6 @@ import static com.kamco.cd.kamcoback.postgres.entity.QLabelingLabelerEntity.labe
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceEntity.mapSheetAnalDataInferenceEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalDataInferenceGeomEntity.mapSheetAnalDataInferenceGeomEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetAnalInferenceEntity.mapSheetAnalInferenceEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnDataGeomEntity.mapSheetLearnDataGeomEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMapSheetLearnEntity.mapSheetLearnEntity;
|
||||
import static com.kamco.cd.kamcoback.postgres.entity.QMemberEntity.memberEntity;
|
||||
|
||||
@@ -490,17 +489,21 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
inspectionStatus = inspectionRemaining > 0 ? "진행중" : "완료";
|
||||
}
|
||||
|
||||
ZoneId zoneId = ZoneId.of("Asia/Seoul");
|
||||
LocalDate targetDate = LocalDate.now(zoneId);
|
||||
|
||||
ZonedDateTime end = targetDate.plusDays(1).atStartOfDay(zoneId);
|
||||
Long downloadPolygonCnt =
|
||||
queryFactory
|
||||
.select(mapSheetLearnDataGeomEntity.geoUid.count())
|
||||
.from(mapSheetLearnDataGeomEntity)
|
||||
.innerJoin(labelingAssignmentEntity)
|
||||
.on(labelingAssignmentEntity.inferenceGeomUid.eq(mapSheetLearnDataGeomEntity.geoUid))
|
||||
.select(labelingAssignmentEntity.inferenceGeomUid.count())
|
||||
.from(labelingAssignmentEntity)
|
||||
.innerJoin(mapSheetAnalInferenceEntity)
|
||||
.on(
|
||||
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
|
||||
mapSheetAnalInferenceEntity.id.eq(analUid))
|
||||
.where(mapSheetLearnDataGeomEntity.fileCreateYn.isTrue())
|
||||
.where(
|
||||
labelingAssignmentEntity.inspectState.eq(InspectState.COMPLETE.getId()),
|
||||
labelingAssignmentEntity.inspectStatDttm.lt(end))
|
||||
.fetchOne();
|
||||
|
||||
return WorkProgressInfo.builder()
|
||||
@@ -670,17 +673,21 @@ public class LabelAllocateRepositoryImpl implements LabelAllocateRepositoryCusto
|
||||
inspectionStatus = inspectionRemaining > 0 ? "진행중" : "완료";
|
||||
}
|
||||
|
||||
ZoneId zoneId = ZoneId.of("Asia/Seoul");
|
||||
LocalDate targetDate = LocalDate.now(zoneId);
|
||||
|
||||
ZonedDateTime end = targetDate.plusDays(1).atStartOfDay(zoneId);
|
||||
Long downloadPolygonCnt =
|
||||
queryFactory
|
||||
.select(mapSheetLearnDataGeomEntity.geoUid.count())
|
||||
.from(mapSheetLearnDataGeomEntity)
|
||||
.innerJoin(labelingAssignmentEntity)
|
||||
.on(labelingAssignmentEntity.inferenceGeomUid.eq(mapSheetLearnDataGeomEntity.geoUid))
|
||||
.select(labelingAssignmentEntity.inferenceGeomUid.count())
|
||||
.from(labelingAssignmentEntity)
|
||||
.innerJoin(mapSheetAnalInferenceEntity)
|
||||
.on(
|
||||
labelingAssignmentEntity.analUid.eq(mapSheetAnalInferenceEntity.id),
|
||||
mapSheetAnalInferenceEntity.uuid.eq(targetUuid))
|
||||
.where(mapSheetLearnDataGeomEntity.fileCreateYn.isTrue())
|
||||
.where(
|
||||
labelingAssignmentEntity.inspectState.eq(InspectState.COMPLETE.getId()),
|
||||
labelingAssignmentEntity.inspectStatDttm.lt(end))
|
||||
.fetchOne();
|
||||
|
||||
return WorkProgressInfo.builder()
|
||||
|
||||
@@ -983,7 +983,8 @@ public class MapSheetMngRepositoryImpl extends QuerydslRepositorySupport
|
||||
.or(mapSheetMngHstEntity.syncCheckState.eq("DONE")));
|
||||
|
||||
// file_ext = 'tif'
|
||||
whereBuilder.and(mapSheetMngFileEntity.fileExt.eq("tif"));
|
||||
whereBuilder.and(
|
||||
mapSheetMngFileEntity.fileExt.eq("tif").and(mapSheetMngFileEntity.fileDel.isFalse()));
|
||||
|
||||
// mng_yyyy = '2023'
|
||||
if (yyyy != null && !yyyy.isEmpty()) {
|
||||
|
||||
@@ -15,7 +15,6 @@ import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -43,6 +42,11 @@ public class TrainingDataReviewJobService {
|
||||
exportGeojsonLabelingGeom(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 미사용 -> kamco-cd-cron GIT에 kamco-make-dataset-generation jar 생성 로직에 포함되어 해당 로직은 미사용
|
||||
*
|
||||
* @param baseDate
|
||||
*/
|
||||
public void exportGeojsonLabelingGeom(LocalDate baseDate) {
|
||||
|
||||
// 1) 경로/파일명 결정
|
||||
@@ -51,7 +55,7 @@ public class TrainingDataReviewJobService {
|
||||
log.info("[Step 1-1] geojson 파일 생성할 경로: {}", targetDir);
|
||||
|
||||
// 2) 진행중인 회차 중, complete_cnt 가 존재하는 회차 목록 가져오기
|
||||
log.info("[Step 1-2] 진행중인 회차 중, complete_cnt 가 존재하는 회차 목록 가져오기");
|
||||
log.info("[Step 1-2] 진행중(ING)인 회차 중, 검수완료한(complete_cnt) 갯수가 존재하는 회차 목록 가져오기");
|
||||
List<AnalCntInfo> analList = trainingDataReviewJobCoreService.findAnalCntInfoList();
|
||||
log.info("[Step 1-3] 회차 리스트 건수: {}", analList == null ? 0 : analList.size());
|
||||
|
||||
@@ -61,19 +65,14 @@ public class TrainingDataReviewJobService {
|
||||
}
|
||||
|
||||
for (AnalCntInfo info : analList) {
|
||||
log.info("[Step 2-1] 회차 폴리곤 전체 건수 == 파일 생성 건수 같은지 확인");
|
||||
log.info("=== info.getAllCnt(): {}", info.getAllCnt());
|
||||
log.info("=== info.getFileCnt(): {}", info.getFileCnt());
|
||||
|
||||
if (Objects.equals(info.getAllCnt(), info.getFileCnt())) {
|
||||
log.info("[Step 2-2] 회차 폴리곤 전체 건수 == 파일 생성 건수 같아서 파일 생성 진행하지 않음 continue");
|
||||
continue;
|
||||
}
|
||||
|
||||
String resultUid = info.getResultUid(); // 회차의 대문자 uid (폴더명으로 사용)
|
||||
|
||||
// 3) 회차 + 어제까지 검수 완료된 총 데이터의 도엽별 목록 가져오기
|
||||
log.info("[Step 3-1] 회차 + 어제까지 검수 완료된 총 데이터의 도엽별 목록 가져오기");
|
||||
log.info(" === 기준일자 baseDate : " + baseDate);
|
||||
log.info(" === 검수완료일자 < 기준일자인 폴리곤의 도엽 목록을 조회");
|
||||
|
||||
List<AnalMapSheetList> analMapList =
|
||||
trainingDataReviewJobCoreService.findCompletedAnalMapSheetList(
|
||||
info.getAnalUid(), baseDate);
|
||||
@@ -84,7 +83,7 @@ public class TrainingDataReviewJobService {
|
||||
continue;
|
||||
}
|
||||
|
||||
log.info("[Step 4-1] 도엽별 geom 데이터 가지고 와서 geojson 만들기 시작");
|
||||
log.info("[Step 4-1] 도엽별 geom 데이터 가지고 와서 geojson 만들기 시작");
|
||||
for (AnalMapSheetList mapSheet : analMapList) {
|
||||
// 4) 도엽별 geom 데이터 가지고 와서 geojson 만들기
|
||||
log.info("[Step 4-2] 도엽별 검수완료된 폴리곤 데이터 목록 조회");
|
||||
@@ -123,9 +122,7 @@ public class TrainingDataReviewJobService {
|
||||
objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
|
||||
objectMapper.writeValue(outputPath.toFile(), collection);
|
||||
|
||||
// geoUids : file_create_yn = true 로 업데이트
|
||||
log.info("[Step 6-3] learn_data_geom 에 file_create_yn = true 로 업데이트");
|
||||
trainingDataReviewJobCoreService.updateLearnDataGeomFileCreateYn(geoUids);
|
||||
log.info("[Step 6-3] geoJson 파일 생성 완료");
|
||||
|
||||
} catch (IOException e) {
|
||||
log.error(e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user