국유인 API 수정 추가
This commit is contained in:
@@ -8,7 +8,6 @@ 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 +31,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()) {
|
||||
@@ -44,7 +43,7 @@ public class GukYuinApiLabelJobService {
|
||||
}
|
||||
|
||||
for (GeomUidDto gto : list) {
|
||||
ChngDetectContDto.ResultPnuDto dto =
|
||||
ChngDetectContDto.ResultLabelDto dto =
|
||||
gukYuinApiService.updateChnDtctObjtLabelingYn(gto.getResultUid(), "Y");
|
||||
if (dto.getSuccess()) {
|
||||
// inference_geom 에 label_send_dttm 업데이트 하기
|
||||
|
||||
@@ -12,7 +12,6 @@ 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 +35,11 @@ public class GukYuinApiPnuJobService {
|
||||
}
|
||||
|
||||
/** 국유인 등록 완료 후, 탐지객체 조회해서 PNU 업데이트 하는 스케줄링 하루 1번 새벽 1시에 실행 */
|
||||
@Scheduled(cron = "0 * * * * *") // 0 0 1 * * *
|
||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0 1 * * *
|
||||
public void findGukYuinContListPnuUpdate() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinPnuJobCoreService.findGukyuinApplyStatusUidList(
|
||||
|
||||
@@ -9,7 +9,6 @@ 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
|
||||
@@ -33,11 +32,11 @@ public class GukYuinApiStatusJobService {
|
||||
}
|
||||
|
||||
/** 국유인 연동 후, 100% 되었는지 확인하는 스케줄링 매 10분마다 호출 */
|
||||
@Scheduled(cron = "0 0/10 * * * *") // 0 0/10 * * * *
|
||||
// @Scheduled(cron = "0 0/10 * * * *") // 0 0/10 * * * *
|
||||
public void findGukYuinMastCompleteYn() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinJobCoreService.findGukyuinApplyStatusUidList(
|
||||
|
||||
@@ -6,11 +6,13 @@ import com.kamco.cd.kamcoback.gukyuin.dto.ChngDetectMastDto.RlbDtctMastDto;
|
||||
import com.kamco.cd.kamcoback.gukyuin.dto.GukYuinStatus;
|
||||
import com.kamco.cd.kamcoback.gukyuin.service.GukYuinApiService;
|
||||
import com.kamco.cd.kamcoback.postgres.core.GukYuinStbltJobCoreService;
|
||||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
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
|
||||
@@ -34,11 +36,11 @@ public class GukYuinApiStbltJobService {
|
||||
}
|
||||
|
||||
/** 국유인 연동 후, 실태조사 적합여부 확인하여 update */
|
||||
@Scheduled(cron = "0 * * * * *") // 0 0 3 * * *
|
||||
// @Scheduled(cron = "0 * * * * *") // 0 0 3 * * *
|
||||
public void findGukYuinEligibleForSurvey() {
|
||||
if (isLocalProfile()) {
|
||||
return;
|
||||
}
|
||||
// if (isLocalProfile()) {
|
||||
// return;
|
||||
// }
|
||||
|
||||
List<LearnKeyDto> list =
|
||||
gukYuinStbltJobCoreService.findGukYuinEligibleForSurveyList(
|
||||
@@ -49,7 +51,12 @@ public class GukYuinApiStbltJobService {
|
||||
|
||||
for (LearnKeyDto dto : list) {
|
||||
try {
|
||||
RlbDtctDto result = gukYuinApiService.findRlbDtctList(dto.getUid());
|
||||
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 다 끝내고 어제로 바꿔야 함
|
||||
|
||||
if (result == null || result.getResult() == null || result.getResult().isEmpty()) {
|
||||
log.warn("[GUKYUIN] empty result chnDtctMstId={}", dto.getChnDtctMstId());
|
||||
|
||||
Reference in New Issue
Block a user