국유인 수정, 라벨대상 건수 수정

This commit is contained in:
2026-02-06 09:49:30 +09:00
parent 533d97a573
commit e88ffd1260
13 changed files with 132 additions and 52 deletions

View File

@@ -8,6 +8,7 @@ import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Log4j2
@@ -31,11 +32,11 @@ public class GukYuinApiLabelJobService {
}
/** 어제 라벨링 검수 완료된 것 -> 국유인에 전송 */
// @Scheduled(cron = "0 0 2 * * *")
@Scheduled(cron = "0 0 2 * * *")
public void findLabelingCompleteSend() {
// if (isLocalProfile()) {
// return;
// }
if (isLocalProfile()) {
return;
}
List<GeomUidDto> list = gukYuinLabelJobCoreService.findYesterdayLabelingCompleteList();
if (list.isEmpty()) {

View File

@@ -12,6 +12,7 @@ import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Log4j2
@@ -35,11 +36,11 @@ public class GukYuinApiPnuJobService {
}
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
// @Scheduled(cron = "0 0/10 * * * *") // 0 0 1 * * *
@Scheduled(cron = "0 0 1 * * *")
public void findGukYuinContListPnuUpdate() {
// if (isLocalProfile()) {
// return;
// }
if (isLocalProfile()) {
return;
}
List<LearnKeyDto> list =
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(

View File

@@ -9,6 +9,7 @@ import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Log4j2
@@ -32,11 +33,11 @@ public class GukYuinApiStatusJobService {
}
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
// @Scheduled(cron = "0 0/10 * * * *") // 0 0/10 * * * *
@Scheduled(cron = "0 0/10 * * * *")
public void findGukYuinMastCompleteYn() {
// if (isLocalProfile()) {
// return;
// }
if (isLocalProfile()) {
return;
}
List<LearnKeyDto> list =
gukYuinJobCoreService.findGukyuinApplyStatusUidList(

View File

@@ -13,6 +13,7 @@ import java.util.List;
import lombok.RequiredArgsConstructor;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
@Log4j2
@@ -36,11 +37,11 @@ public class GukYuinApiStbltJobService {
}
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
// @Scheduled(cron = "0 * * * * *") // 0 0 3 * * *
@Scheduled(cron = "0 0 3 * * *") // 0 0 3 * * *
public void findGukYuinEligibleForSurvey() {
// if (isLocalProfile()) {
// return;
// }
if (isLocalProfile()) {
return;
}
List<LearnKeyDto> list =
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
@@ -51,12 +52,11 @@ public class GukYuinApiStbltJobService {
for (LearnKeyDto dto : list) {
try {
String today =
LocalDate.now(ZoneId.of("Asia/Seoul")).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
// String yesterday =
// LocalDate.now(ZoneId.of("Asia/Seoul")).minusDays(1).format(DateTimeFormatter.ofPattern("yyyyMMdd"));
RlbDtctDto result =
gukYuinApiService.findRlbDtctList(dto.getUid(), today); // todo : test 다 끝내고 어제로 바꿔야 함
String yesterday =
LocalDate.now(ZoneId.of("Asia/Seoul"))
.minusDays(1)
.format(DateTimeFormatter.ofPattern("yyyyMMdd"));
RlbDtctDto result = gukYuinApiService.findRlbDtctList(dto.getUid(), yesterday);
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
@@ -67,6 +67,7 @@ public class GukYuinApiStbltJobService {
String resultUid = stbltDto.getChnDtctObjtId();
gukYuinStbltJobCoreService.updateGukYuinEligibleForSurvey(resultUid, stbltDto);
}
} catch (Exception e) {
log.error("[GUKYUIN] failed uid={}", dto.getChnDtctMstId(), e);
}