stblt-check 로그작성,prod수정,spotless

This commit is contained in:
2026-03-02 21:13:07 +09:00
parent b6fe47196e
commit 57c3b1b7b5
13 changed files with 45 additions and 28 deletions

View File

@@ -84,28 +84,28 @@ mapsheet:
baseurl: /app/detect/result #현재사용안함
file:
sync-root-dir: /data/images/
sync-tmp-dir: /data/repo/tmp # image upload temp dir
sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: /kamco-nfs/repo/tmp # image upload temp dir
sync-file-extention: tfw,tif
#dataset-dir: D:/data/model_output/ #변경 model_output
dataset-dir: /data/model_output/export/ # 마운트경로 AI 추론결과
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/data/ckpt/model/
model-dir: /data/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
#model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: /data/ckpt/v6-cls-checkpoints/
pt-path: /kamco-nfs/ckpt/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt
dataset-response: /data/dataset/response/
dataset-response: /kamco-nfs/dataset/response/
inference:
url: http://127.0.0.1:8000/jobs
batch-url: http://127.0.0.1:8000/batches
geojson-dir: /data/requests/ # 학습서버에서 트레이닝한 모델업로드경로
jar-path: /data/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
inference-server-name: server1,server2,server3,server4
gukyuin:
@@ -113,7 +113,7 @@ gukyuin:
cdi: ${gukyuin.url}/api/kcd/cdi
training-data:
geojson-dir: /data/dataset/request/
geojson-dir: /kamco-nfs/dataset/request/
layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com

View File

@@ -37,24 +37,26 @@ public class GukYuinApiStbltJobService {
return "local".equalsIgnoreCase(profile);
}
// @Scheduled(cron = "0 * * * * *")
public void runTask() {
findGukYuinEligibleForSurvey(null);
}
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
public void findGukYuinEligibleForSurvey(LocalDate baseDate) {
// if (isLocalProfile()) {
// return;
// }
log.info("[Step 1-1] 국유인 연동 PNU 완료된 추론 회차 정보 가져오기 ");
log.info(" learn 테이블의 apply_status : {}", GukYuinStatus.PNU_COMPLETED.getId());
List<LearnKeyDto> list =
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
GukYuinStatus.PNU_COMPLETED.getId());
log.info("[Step 1-2] 국유인 연동 PNU 완료된 추론 회차 갯수 : {}", list == null ? 0 : list.size());
if (list.isEmpty()) {
log.info("[Step 1-3] 국유인 연동 PNU 완료된 추론 회차 갯수 없어서 return");
return;
}
log.info("[Step 2-1] 추론 회차 list 로 for문 실행하기 ");
for (LearnKeyDto dto : list) {
try {
String targetDate =
@@ -62,19 +64,30 @@ public class GukYuinApiStbltJobService {
.minusDays(1)
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
log.info("[Step 2-2] 실태조사 적합여부 조회 날짜 확인 : {}", targetDate);
if (baseDate != null) { // 파라미터가 있으면
targetDate = baseDate.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
log.info("[Step 2-3] 수동호출 baseDate 가 있을 경우, 실태조사 적합여부 조회 날짜 확인 : {}", targetDate);
}
log.info("[Step 3-1] 국유인 실태조사 적합여부 API 호출 시작 ");
log.info(" === 값 확인 - uid : {}", dto.getUid());
log.info(" === 값 확인 - targetDate : {}", targetDate);
RlbDtctDto result = gukYuinApiService.findRlbDtctList(dto.getUid(), targetDate, "Y");
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
log.info("[GUKYUIN] empty result chnDtctId={}", dto.getUid());
log.info("=== 국유인 API 조회 결과 없어서 continue");
continue;
}
log.info("[Step 4-1] 국유인 실태조사 적합여부 result 값으로 데이터 업데이트");
log.info(" === 데이터 갯수 : {}", result.getResult() == null ? 0 : result.getResult().size());
for (RlbDtctMastDto stbltDto : result.getResult()) {
log.info("[Step 4-2] 국유인 실태조사 적합여부 결과 가져오기");
String resultUid = stbltDto.getChnDtctObjtId();
log.info(" == 테이블 tb_pnu 에 적합여부 리턴 결과를 upsert 진행, 객체 uid : {}", resultUid);
gukYuinStbltJobCoreService.updateGukYuinEligibleForSurvey(resultUid, stbltDto);
}
@@ -89,6 +102,7 @@ public class GukYuinApiStbltJobService {
e -> {
List<RlbDtctMastDto> pnuList = e.getValue();
log.info("[Step 4-3] 국유인 실태조사 적합여부 업데이트 값을 객체 uid 기준으로 DTO 생성");
boolean hasY = pnuList.stream().anyMatch(v -> "Y".equals(v.getStbltYn()));
String fitYn = hasY ? "Y" : "N";
@@ -104,7 +118,9 @@ public class GukYuinApiStbltJobService {
.findFirst()
.orElse(null);
log.info(" === selected DTO : {}", selected);
if (selected == null) {
log.info(" === selected NULL");
return null; // 방어 코드
}
@@ -112,10 +128,11 @@ public class GukYuinApiStbltJobService {
fitYn, selected.getIncyCd(), selected.getIncyRsnCont());
}));
log.info("[Step 4-4] 국유인 실태조사 적합여부, 사유, 내용을 inference_geom 테이블에 update");
resultMap.forEach(gukYuinStbltJobCoreService::updateGukYuinObjectStbltYn);
} catch (Exception e) {
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
log.error("[GUKYUIN] failed uid={}", dto.getUid(), e);
}
}
}

View File

@@ -84,28 +84,28 @@ mapsheet:
baseurl: /app/detect/result #현재사용안함
file:
sync-root-dir: /data/images/
sync-tmp-dir: /data/repo/tmp # image upload temp dir
sync-root-dir: /kamco-nfs/images/
sync-tmp-dir: /kamco-nfs/repo/tmp # image upload temp dir
sync-file-extention: tfw,tif
#dataset-dir: D:/data/model_output/ #변경 model_output
dataset-dir: /data/model_output/export/ # 마운트경로 AI 추론결과
#dataset-dir: D:/kamco-nfs/model_output/ #변경 model_output
dataset-dir: /kamco-nfs/model_output/export/ # 마운트경로 AI 추론결과
dataset-tmp-dir: ${file.dataset-dir}tmp/
#model-dir: D:/data/ckpt/model/
model-dir: /data/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
#model-dir: D:/kamco-nfs/ckpt/model/
model-dir: /kamco-nfs/ckpt/model/ # 학습서버에서 트레이닝한 모델업로드경로
model-tmp-dir: ${file.model-dir}tmp/
model-file-extention: pth,json,py
pt-path: /data/ckpt/v6-cls-checkpoints/
pt-path: /kamco-nfs/ckpt/v6-cls-checkpoints/
pt-FileName: yolov8_6th-6m.pt
dataset-response: /data/dataset/response/
dataset-response: /kamco-nfs/dataset/response/
inference:
url: http://127.0.0.1:8000/jobs
batch-url: http://127.0.0.1:8000/batches
geojson-dir: /data/requests/ # 학습서버에서 트레이닝한 모델업로드경로
jar-path: /data/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
geojson-dir: /kamco-nfs/requests/ # 학습서버에서 트레이닝한 모델업로드경로
jar-path: /kamco-nfs/repo/jar/shp-exporter.jar # 추론실행을 위한 파일생성경로
inference-server-name: server1,server2,server3,server4
gukyuin:
@@ -113,7 +113,7 @@ gukyuin:
cdi: ${gukyuin.url}/api/kcd/cdi
training-data:
geojson-dir: /data/dataset/request/
geojson-dir: /kamco-nfs/dataset/request/
layer:
geoserver-url: https://kamco.geo-dev.gs.dabeeo.com