diff --git a/Recognition/.obsidian/plugins/recent-files-obsidian/data.json b/Recognition/.obsidian/plugins/recent-files-obsidian/data.json index 2476f50..c7f6b39 100644 --- a/Recognition/.obsidian/plugins/recent-files-obsidian/data.json +++ b/Recognition/.obsidian/plugins/recent-files-obsidian/data.json @@ -1,32 +1,184 @@ { "recentFiles": [ { - "basename": "프로세스 확인 및 강제 종료", - "path": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md" + "basename": "PassWD", + "path": "Zettelkasten/PassWD.md" + }, + { + "basename": "계류장 혼잡도 통계", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/계류장 혼잡도 통계.md" }, { "basename": "Jenkins 설치", "path": "Programing/Jenkins/Jenkins 설치.md" }, + { + "basename": "Gate 사용량 통계", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/Gate 사용량 통계.md" + }, + { + "basename": "HotSpot 교통량 통계", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/HotSpot 교통량 통계.md" + }, + { + "basename": "주기장 기준 항공기 유무 확인 쿼리(GAM)", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/주기장 기준 항공기 유무 확인 쿼리(GAM).md" + }, + { + "basename": "통계 일시 일괄생성", + "path": "Programing/Tibero/통계 일시 일괄생성.md" + }, + { + "basename": "Java 날짜 관련", + "path": "Programing/Java/Java 날짜 관련.md" + }, + { + "basename": "Tibero 세션 관련", + "path": "Programing/Tibero/Tibero 세션 관련.md" + }, + { + "basename": "Lock 조회", + "path": "Programing/Tibero/Lock 조회.md" + }, + { + "basename": "명령어-TOP", + "path": "Programing/Linux/명령어-TOP.md" + }, + { + "basename": "Termux Linux 설치", + "path": "Programing/Linux/Termux/Termux Linux 설치.md" + }, + { + "basename": "테이블 Archive 로그 설정 변경", + "path": "Programing/Tibero/테이블 Archive 로그 설정 변경.md" + }, + { + "basename": "권한(Grant)", + "path": "Programing/Tibero/권한(Grant).md" + }, + { + "basename": "TODO-0", + "path": "Work Related/프로젝트/스마트계류장/TODO-0.md" + }, { "basename": "Jenkins script 모음", "path": "Programing/Jenkins/Jenkins script 모음.md" }, { - "basename": "캐릭터셋 확인", - "path": "Programing/Tibero/캐릭터셋 확인.md" + "basename": "통계-과거데이터 기종 업데이트", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/작업SQL 백업/통계-과거데이터 기종 업데이트.md" + }, + { + "basename": "DB 컬럼 이름 변경", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/DB 컬럼 이름 변경.md" + }, + { + "basename": "Tibero 스크립트 추출", + "path": "Programing/Tibero/Tibero 스크립트 추출.md" + }, + { + "basename": "테이블 컬럼 코멘트 조회", + "path": "Programing/Tibero/테이블 컬럼 코멘트 조회.md" + }, + { + "basename": "DDL 스크립트 추출", + "path": "Programing/Tibero/DDL 스크립트 추출.md" + }, + { + "basename": "관리페이지 수정", + "path": "Work Related/프로젝트/스마트계류장/9.기타/관리페이지 수정.md" + }, + { + "basename": "방문증 신청 문구", + "path": "Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md" + }, + { + "basename": "Logger Appender Costom", + "path": "Programing/Java/Logger Appender Costom.md" + }, + { + "basename": "리눅스 명령어", + "path": "Programing/Linux/Linux 명령어/리눅스 명령어.md" + }, + { + "basename": "EAI 데이터 백업 테이블 생성", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 백업 테이블 생성.md" + }, + { + "basename": "Tibero Export & Import", + "path": "Programing/Tibero/Tibero Export & Import.md" + }, + { + "basename": "테이블 스페이스 관련", + "path": "Programing/Tibero/테이블 스페이스 관련.md" + }, + { + "basename": "공유문서", + "path": "Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md" + }, + { + "basename": "EAI Server 셋팅", + "path": "Work Related/프로젝트/스마트계류장/외부연계 관련/EAI/EAI Server 셋팅.md" + }, + { + "basename": "Tibero 이중화 구성시 서비스 실행", + "path": "Programing/Tibero/Tibero 이중화 구성시 서비스 실행.md" + }, + { + "basename": "Tibero 공유메모리 확인", + "path": "Programing/Tibero/Tibero 공유메모리 확인.md" + }, + { + "basename": "테이블 정의서 DB테이블 생성", + "path": "Programing/MariaDB/테이블 정의서 DB테이블 생성.md" + }, + { + "basename": "스키마 생성", + "path": "Programing/Tibero/스키마 생성.md" + }, + { + "basename": "항공기 등급 기준", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md" + }, + { + "basename": "Todo", + "path": "Programing/Java/Todo.md" }, { "basename": "GIT Repository 이관", "path": "Tools/GitHub/GIT Repository 이관.md" }, { - "basename": "EAI 연계 데이터 복구", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 연계 데이터 복구.md" + "basename": "Tibero 정기정검 목록", + "path": "Programing/Tibero/Tibero 정기정검 목록.md" }, { - "basename": "Lock 조회", - "path": "Programing/Tibero/Lock 조회.md" + "basename": "기동 및 종료", + "path": "Programing/Tibero/기동 및 종료.md" + }, + { + "basename": "스케줄려 생성", + "path": "Programing/Linux/Unix/스케줄려 생성.md" + }, + { + "basename": "특정 포트 임시 오픈", + "path": "Programing/Linux/Ubuntu/특정 포트 임시 오픈.md" + }, + { + "basename": "용어정리", + "path": "Work Related/프로젝트/스마트계류장/항공용어/용어정리.md" + }, + { + "basename": "프로세스 확인 및 강제 종료", + "path": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md" + }, + { + "basename": "캐릭터셋 확인", + "path": "Programing/Tibero/캐릭터셋 확인.md" + }, + { + "basename": "EAI 연계 데이터 복구", + "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 연계 데이터 복구.md" }, { "basename": "EAI 데이터 초기화", @@ -47,158 +199,6 @@ { "basename": "TableRow특정조건에 따라 보이기 - 숨기기", "path": "Programing/Flutter/TableRow특정조건에 따라 보이기 - 숨기기.md" - }, - { - "basename": "2022-05-10", - "path": "Work Related/1.업무메모/2022.05/2022-05-10.md" - }, - { - "basename": "리눅스 특정 폴더, 파일 용량 확인", - "path": "Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md" - }, - { - "basename": "공유문서", - "path": "Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md" - }, - { - "basename": "Docker 폐쇄망 설치", - "path": "Programing/Docker/Docker 폐쇄망 설치.md" - }, - { - "basename": "ElasticSearch 쿼리", - "path": "Programing/ELK/ElasticSearch 쿼리.md" - }, - { - "basename": "ElasticSearch 인덱스 통계", - "path": "Programing/ELK/ElasticSearch 인덱스 통계.md" - }, - { - "basename": "ElasticSearch 검색 관련", - "path": "Programing/ELK/ElasticSearch 검색 관련.md" - }, - { - "basename": "timestamp to char", - "path": "Programing/Tibero/timestamp to char.md" - }, - { - "basename": "Timestamp 시간 차이", - "path": "Programing/Tibero/Timestamp 시간 차이.md" - }, - { - "basename": "항차별 수신 통계 회의 안건", - "path": "Work Related/프로젝트/D-MHFH/유지보수/항차별 수신 통계 회의 안건.md" - }, - { - "basename": "query DSL", - "path": "Programing/ELK/query DSL.md" - }, - { - "basename": "ELK 오류", - "path": "Programing/ELK/ELK 오류.md" - }, - { - "basename": "TODO-0", - "path": "Work Related/프로젝트/스마트계류장/TODO-0.md" - }, - { - "basename": "Kafka 명령어", - "path": "Programing/Kafka(AMQP)/Kafka 명령어.md" - }, - { - "basename": "특정 포트 임시 오픈", - "path": "Programing/Linux/Ubuntu/특정 포트 임시 오픈.md" - }, - { - "basename": "2024-04-22", - "path": "Work Related/1.업무메모/2024-04-22.md" - }, - { - "basename": "GAM_LIST 데이터 일괄 insert", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/GAM_LIST 데이터 일괄 insert.md" - }, - { - "basename": "주기장 기준 항공기 유무 확인 쿼리(GAM)", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/주기장 기준 항공기 유무 확인 쿼리(GAM).md" - }, - { - "basename": "관리페이지 테스트 쿼리", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/관리페이지 테스트 쿼리.md" - }, - { - "basename": "EAI-Data Item 추출작업", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI-Data Item 추출작업.md" - }, - { - "basename": "스케줄려 생성", - "path": "Programing/Linux/Unix/스케줄려 생성.md" - }, - { - "basename": "Tibero 세션 관련", - "path": "Programing/Tibero/Tibero 세션 관련.md" - }, - { - "basename": "Tibero 스크립트 추출", - "path": "Programing/Tibero/Tibero 스크립트 추출.md" - }, - { - "basename": "EAI Server 셋팅", - "path": "Work Related/프로젝트/스마트계류장/외부연계 관련/EAI/EAI Server 셋팅.md" - }, - { - "basename": "테이블 스페이스 관련", - "path": "Programing/Tibero/테이블 스페이스 관련.md" - }, - { - "basename": "Filebeat 재배포", - "path": "Work Related/프로젝트/스마트계류장/9.기타/Filebeat 재배포.md" - }, - { - "basename": "SACP_AC_MASTER 갱신", - "path": "Work Related/프로젝트/스마트계류장/1.데이터베이스/SACP_AC_MASTER 갱신.md" - }, - { - "basename": "Java 날짜 관련", - "path": "Programing/Java/Java 날짜 관련.md" - }, - { - "basename": "ELK 백업 및 복구", - "path": "Programing/ELK/ELK 백업 및 복구.md" - }, - { - "basename": "ELK 폐쇄망 설치(New)", - "path": "Programing/ELK/ELK 폐쇄망 설치(New).md" - }, - { - "basename": "무제 파일", - "path": "Programing/Tibero/무제 파일.md" - }, - { - "basename": "2024-04-26", - "path": "Work Related/1.업무메모/2024-04-26.md" - }, - { - "basename": "2024-04-25", - "path": "Work Related/1.업무메모/2024-04-25.md" - }, - { - "basename": "2024-03-25", - "path": "Work Related/1.업무메모/2024-03-25.md" - }, - { - "basename": "ELK ILM 설정", - "path": "Programing/ELK/ELK ILM 설정.md" - }, - { - "basename": "Cluster", - "path": "Programing/ELK/Cluster.md" - }, - { - "basename": "사용Port", - "path": "Programing/ELK/사용Port.md" - }, - { - "basename": "무제 파일", - "path": "Programing/Docker/무제 파일.md" } ], "omittedPaths": [], diff --git a/Recognition/.obsidian/workspace.json b/Recognition/.obsidian/workspace.json index 2e3bdd1..ab6cc7d 100644 --- a/Recognition/.obsidian/workspace.json +++ b/Recognition/.obsidian/workspace.json @@ -4,37 +4,23 @@ "type": "split", "children": [ { - "id": "2a836c6382b3c130", + "id": "ca749d85d6422e7f", "type": "tabs", "children": [ { - "id": "f333482c2e1fc2e1", + "id": "0067fdddee9cdaf6", "type": "leaf", "state": { "type": "markdown", "state": { - "file": "Tools/GitHub/GIT Repository 이관.md", - "mode": "source", - "backlinks": true, - "source": false - } - } - }, - { - "id": "726820c168a29980", - "type": "leaf", - "state": { - "type": "markdown", - "state": { - "file": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md", + "file": "Zettelkasten/PassWD.md", "mode": "source", "backlinks": true, "source": false } } } - ], - "currentTab": 1 + ] } ], "direction": "vertical" @@ -63,7 +49,7 @@ "state": { "type": "search", "state": { - "query": "캐릭", + "query": "maven_repository", "matchingCase": false, "explainSearch": false, "collapseAll": true, @@ -100,7 +86,7 @@ } ], "direction": "horizontal", - "width": 296.5 + "width": 260.5110321044922 }, "right": { "id": "4797c4301ffee1db", @@ -116,7 +102,7 @@ "state": { "type": "backlink", "state": { - "file": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md", + "file": "Zettelkasten/PassWD.md", "collapseAll": false, "extraContext": false, "sortOrder": "alphabetical", @@ -133,7 +119,7 @@ "state": { "type": "outgoing-link", "state": { - "file": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md", + "file": "Zettelkasten/PassWD.md", "linksCollapsed": false, "unlinkedCollapsed": true } @@ -156,7 +142,7 @@ "state": { "type": "outline", "state": { - "file": "Programing/Linux/Ubuntu/프로세스 확인 및 강제 종료.md" + "file": "Zettelkasten/PassWD.md" } } }, @@ -198,34 +184,37 @@ "command-palette:명령어 팔레트 열기": false } }, - "active": "726820c168a29980", + "active": "0067fdddee9cdaf6", "lastOpenFiles": [ + "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/계류장 혼잡도 통계.md", "Programing/Jenkins/Jenkins 설치.md", - "Programing/Jenkins/Jenkins script 모음.md", - "Programing/Tibero/캐릭터셋 확인.md", - "Tools/GitHub/GIT Repository 이관.md", - "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 연계 데이터 복구.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/Gate 사용량 통계.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/HotSpot 교통량 통계.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/주기장 기준 항공기 유무 확인 쿼리(GAM).md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증", + "Programing/Tibero/통계 일시 일괄생성.md", + "Programing/Java/Java 날짜 관련.md", + "Programing/Tibero/Tibero 세션 관련.md", "Programing/Tibero/Lock 조회.md", - "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 초기화.md", - "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 프로시져 테스트.md", - "Programing/Oracle/Loop문.md", - "Programing/Tibero/테이블 생성 프로시저.md", - "Programing/Flutter/TableRow특정조건에 따라 보이기 - 숨기기.md", - "Work Related/1.업무메모/2022.05/2022-05-10.md", - "Programing/Linux/Linux 명령어/리눅스 특정 폴더, 파일 용량 확인.md", - "Work Related/프로젝트/스마트계류장/0.관련정보/공유문서.md", - "Programing/Docker/Docker 폐쇄망 설치.md", - "Programing/ELK/ElasticSearch 인덱스 통계.md", - "Programing/ELK/ElasticSearch 검색 관련.md", - "Programing/ELK/ElasticSearch 쿼리.md", - "Programing/Tibero/timestamp to char.md", - "Programing/Tibero/Timestamp 시간 차이.md", - "Work Related/프로젝트/D-MHFH/유지보수/항차별 수신 통계 회의 안건.md", - "Programing/ELK/ELK 오류.md", + "Programing/Linux/명령어-TOP.md", + "Programing/Linux/Termux/Termux Linux 설치.md", + "Programing/Tibero/테이블 Archive 로그 설정 변경.md", + "Programing/Tibero/권한(Grant).md", "Work Related/프로젝트/스마트계류장/TODO-0.md", - "Programing/Kafka(AMQP)/Kafka 명령어.md", - "Programing/Linux/Ubuntu/특정 포트 임시 오픈.md", - "Work Related/1.업무메모/2024-04-22.md", + "Programing/Jenkins/Jenkins script 모음.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/작업SQL 백업/통계-과거데이터 기종 업데이트.md", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/DB 컬럼 이름 변경.md", + "Programing/Tibero/Tibero 스크립트 추출.md", + "Programing/Tibero/테이블 컬럼 코멘트 조회.md", + "Programing/Tibero/DDL 스크립트 추출.md", + "Work Related/프로젝트/스마트계류장/9.기타/관리페이지 수정.md", + "Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md", + "Programing/Java/Logger Appender Costom.md", + "Programing/Linux/Linux 명령어/리눅스 명령어.md", + "zzz.resources/Pasted image 20240806134852.png", + "Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 백업 테이블 생성.md", + "Programing/Tibero/Tibero Export & Import.md", + "zzz.resources/Pasted image 20240723100317.png", "zzz.resources/Pasted image 20240514161803.png", "zzz.resources/Pasted image 20240514161647.png", "무제 파일 1.canvas", @@ -235,8 +224,6 @@ "zzz.resources/Pasted image 20240404094102.png", "zzz.resources/Pasted image 20240404094035.png", "zzz.resources/Pasted image 20240404093714.png", - "zzz.resources/Pasted image 20240404093006.png", - "zzz.resources/Pasted image 20240404092924.png", "Programing/Jenkins", "무제 파일.canvas", "Work Related/1.업무메모/2023", @@ -247,7 +234,6 @@ "새 텍스트 문서.txt", "Programing/Linux/Unix", "Work Related/프로젝트/스마트계류장/Java PGM/Radar/desktop.ini", - "Work Related/프로젝트/스마트계류장/Java PGM/desktop.ini", "무제 파일 2.canvas" ] } \ No newline at end of file diff --git a/Recognition/Programing/Java/Java 날짜 관련.md b/Recognition/Programing/Java/Java 날짜 관련.md index 99e98d0..ba53518 100644 --- a/Recognition/Programing/Java/Java 날짜 관련.md +++ b/Recognition/Programing/Java/Java 날짜 관련.md @@ -1,5 +1,144 @@ #Java +#### LocaDateTime +```java + +/*********************************** +LocalDate : 년월일 +LocaTime : 시분초 + 나노초 +LocalDateTime : 년월일시분초 + 나노초 +************************************/ + + +DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS"); +LocalDateTime now = LocalDateTime.now(); // 현재시간 + + +// 현재 일자 + 시각 가져오기 +LocalDateTime now = LocalDateTime.now(); + +// String To LocalDateTime +LocalDateTime ldtStart = LocalDateTime.parse("2021-11-05 13:47:13.248", formatter); + +// Number To LocalDateTime +LocalDateTime ldtEnd = LocalDateTime.of(2022, 11, 11, 0, 0, 0); + +// LocalDateTime To String +String strEndDt = ldtEnd.format(formatter); + + +//두 시간 차이를 분으로 환산 +Duration diff = Duration.between(ldtStart, ldtEnd); +long diffMin = diff.toMinutes(); + +// 두 날짜 차이(갯수) +long iDiff = ldtStart.until(ldfEnd, ChronoUnit.YEARL); +long iDiff = ldtStart.until(ldfEnd, ChronoUnit.MONTHS); +long iDiff = ldtStart.until(ldfEnd, ChronoUnit.DAYS); + +// 일자, 시간 더하기 +LocalDateTime threeYearsAfter = now.plusYears(3); // 3년 뒤 - now는 계속 현재시간 +LocalDateTime twoDaysAgo = now.minusDays(2); // 2일 전 +LocalDateTime twoDaysAndThreeHoursAgo = now.minusDays(2).minusHours(3); // 2일 3시간 전 + + +/* 일자 변경 */ +// now : 2024-08-13 16:58:16.198 + +// 년도 변경 +LocalDate withYearResult = now.withYear(2000); // 2000-08-13 + +// 월 변경 +LocalDate withMonthResult = now.withMonth(12); // 2024-12-13 + +// 일자 변경 +LocalDate withDayOfMonthResult = now.withDayOfMonth(2); // 2024-08-02 + +//해당년도의 몇번째 일(day)로 설정 (범위: 1 ~ 366) +LocalDate withDayOfYearResult = now.withDayOfYear(2); // 2024-01-02 + +// 시간 변경(범위: 0 ~ 23) +LocalTime withHourResult = todayLocalTime.withHour(10); // 2024-08-13 10:58:16.198 + +// 분 변경(범위: 0 ~ 59) +LocalTime withMinuteResult = todayLocalTime.withMinute(45); //2024-08-13 16:45:16.198 + +// 초 변경(범위: 0 ~ 59) +LocalTime withSecondResult = todayLocalTime.withSecond(25); //2024-08-13 16:58:25.198 + +// 나노초 변경(범위: 0 ~ 999,999,999) +LocalTime withNanoResult = todayLocalTime.withNano(450000); //2024-08-13 16:58:16.000450 + + +/* 형 변환 */ +LocalDate date = LocalDate.of(2021, 1, 24); +LocalTime time = LocalTime.of(19, 30, 20); + +// date, time으로 LocalDateTime 만들기 +LocalDateTime datetime = LocalDateTime.of(date, time); + +// LocalDateTime에 LocalTime 셋팅하기 +LocalDateTime datetime = date.atTime(time); +LocalDateTime datetime = date.atTime(19, 30, 20); + +// LocalDateTime에 LocalDate 셋팅하기 +LocalDateTime datetime = time.atTime(date); + +// LocalDateTime -> LocalDate로 변환 +LocalDate localDate = now.toLocalDate(); + +// FileTime -> LocalDateTime 변환 +// ※ Instant : 기계시간표현 +LocalDateTime ldt = LocalDateTime.ofInstant( fileTime.toInstant(), ZoneId.systemDefault()); + + +/* 일자 비교 */ +LocalDate date1 = LocalDate.of(2021, 6, 19); +LocalDate date2 = LocalDate.of(2021, 6, 20); + +// date1이 date2보다 이후인지 확인 +date1.isAfter(date2) // false + +// date1이 date2보다 이전인지 확인 +date1.isBefore(date2) // true + +// date1과 date2가 같은지 확인 +date1.isEqual(date2) // false + +// 두개 일자 차이 일수 +int compare = date1.compareTo(date2); // -1 + +/* 일/시/분/초 단위별 갯수 연산 */ +LocalDateTime date1 = LocalDateTime.of(2021, 6, 19, 1, 15, 0); +LocalDateTime date2 = LocalDateTime.of(2021, 6, 19, 4, 15, 30); + +// 일자 단위 까지만 비교 +LocalDateTime dayDate1 = date1.truncatedTo(ChronoUnit.DAYS); +LocalDateTime dayDate2 = date1.truncatedTo(ChronoUnit.DAYS); + +// 시간 단위 까지만 비교 +LocalDateTime dayDate1 = date1.truncatedTo(ChronoUnit.HOURS); +LocalDateTime dayDate2 = date1.truncatedTo(ChronoUnit.HOURS); + +// 분 단위 까지만 비교 +LocalDateTime dayDate1 = date1.truncatedTo(ChronoUnit.MINUTES); +LocalDateTime dayDate2 = date1.truncatedTo(ChronoUnit.MINUTES); + +int compareResult = dayDate1.compareTo(dayDate2); + +/* +※ truncatedTo() 메소드는  +파라미터로 지정된 단위 이후의 값들을 버린 후, 복사한 LocalDateTime 객체를 리턴 +*/ + +``` + +![[Pasted image 20240806134852.png]] + + + +--- +#### Calendar & Date - 형변환 ```java diff --git a/Recognition/Programing/Java/Logger Appender Costom.md b/Recognition/Programing/Java/Logger Appender Costom.md new file mode 100644 index 0000000..1c20038 --- /dev/null +++ b/Recognition/Programing/Java/Logger Appender Costom.md @@ -0,0 +1,95 @@ +#Java #logback +#### CaptureAppender.java +```java + +package kr.gmtc.gw.standstatus.logger; + +import ch.qos.logback.classic.spi.ILoggingEvent; +import ch.qos.logback.core.AppenderBase; +import ch.qos.logback.core.spi.FilterReply; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +public class CaptureAppender extends AppenderBase { + + /** + * Guard flag to prevent recursive calling of the appender. + */ + boolean guard; + + + /** + * Flag indicates that the appender is collecting the contents and storing them away + */ + + private boolean collect; + + /** + * STorage location for captured HTTP output. + */ + + private List capturedOutput = new ArrayList<>(); + + private SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + @Override + protected synchronized void append(ILoggingEvent evt) + { + + if (guard) { + return; + } + + try { + guard = true; + + if (!this.started) { + return; + } + + if (getFilterChainDecision(evt) == FilterReply.DENY) { + return; + } + + capturedOutput.add(evt.getMessage()); + + } finally { + guard = false; + } + } + + public void startCollecting() { + this.collect = true; + this.capturedOutput.clear(); + } + + public List stopCollecting() { + this.collect = false; + + List immutaList = new ArrayList<>(); + immutaList.addAll(this.capturedOutput); + immutaList = Collections.unmodifiableList(immutaList); + + return immutaList; + } +} + +``` + + +#### logback-spring.xml +```xml + +https://backtony.tistory.com/33 + + + +... + + + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Java/Todo.md b/Recognition/Programing/Java/Todo.md new file mode 100644 index 0000000..fd1674a --- /dev/null +++ b/Recognition/Programing/Java/Todo.md @@ -0,0 +1,5 @@ +#Java + +- @Service, @Component + - 생성자 파라메터 전달 + - \ No newline at end of file diff --git a/Recognition/Programing/Jenkins/Jenkins 설치.md b/Recognition/Programing/Jenkins/Jenkins 설치.md index f9c3821..9a28999 100644 --- a/Recognition/Programing/Jenkins/Jenkins 설치.md +++ b/Recognition/Programing/Jenkins/Jenkins 설치.md @@ -116,16 +116,17 @@ tar -cvf tools.tar tools ```c # Offline에서 참조할 dependency 목록과 함께 다운로드 -mvn dependency:go-offline -gs D:\Workspace\Jenkins\tet_git\settings.xml +mvn dependency:go-offline -gs D:\Workspace\Jenkins\maven_repositorys\settings.xml # 기본옵션으로 빌드 -mvn clean install -gs D:\Workspace\Jenkins\tet_git\settings.xml +mvn clean install -gs D:\Workspace\Jenkins\maven_repositorys\settings.xml # Offline옵션으로 빌드(테스트) -mvn -o clean install -gs D:\Workspace\Jenkins\tet_git\settings.xml +mvn -o clean install -gs D:\Workspace\Jenkins\maven_repositorys\settings.xml # repository 압축 -tar -cvf maven_repository.tar .\maven_repository +cd D:\Workspace\Jenkins +tar -cvf maven_repository.tar .\maven_repositorys # Jenkins서버로 압축파일 전송 scp -P 11443 maven_repository.tar root@10.200.31.42:/home/gmt/jenkins_home/ diff --git a/Recognition/Programing/Linux/Linux 명령어/리눅스 명령어.md b/Recognition/Programing/Linux/Linux 명령어/리눅스 명령어.md index 67930e4..ea338df 100644 --- a/Recognition/Programing/Linux/Linux 명령어/리눅스 명령어.md +++ b/Recognition/Programing/Linux/Linux 명령어/리눅스 명령어.md @@ -48,3 +48,5 @@ vi /etc/sudoers - 숨김파일 검색 > find . -type f -name '*.php' +- 파일 최초 생성 시각 확인 +> ls --time-style full-iso -al * diff --git a/Recognition/Programing/Tibero/Tibero 공유메모리 확인.md b/Recognition/Programing/Tibero/Tibero 공유메모리 확인.md new file mode 100644 index 0000000..35109e6 --- /dev/null +++ b/Recognition/Programing/Tibero/Tibero 공유메모리 확인.md @@ -0,0 +1,8 @@ +#tibero + +```sql + +select name, total, used, round((used/total) * 100, 2) as rate from v$sga; + + +``` \ No newline at end of file diff --git a/Recognition/Programing/Tibero/Tibero 정기정검 목록.md b/Recognition/Programing/Tibero/Tibero 정기정검 목록.md new file mode 100644 index 0000000..d443a97 --- /dev/null +++ b/Recognition/Programing/Tibero/Tibero 정기정검 목록.md @@ -0,0 +1,2 @@ + +https://bingo6681.tistory.com/134 diff --git a/Recognition/Programing/Tibero/DB 통계 관련.md b/Recognition/Programing/Tibero/통계 일시 일괄생성.md similarity index 59% rename from Recognition/Programing/Tibero/DB 통계 관련.md rename to Recognition/Programing/Tibero/통계 일시 일괄생성.md index 32dd6b3..7218e35 100644 --- a/Recognition/Programing/Tibero/DB 통계 관련.md +++ b/Recognition/Programing/Tibero/통계 일시 일괄생성.md @@ -21,4 +21,27 @@ from ( order by dt_se, hh, mi,ss -``` \ No newline at end of file +``` + +- 집계 기준 일시 일괄 생성 +```sql + +CREATE TABLE UCM.SACP_STATS_TIMES ( + DT VARCHAR(32) not null, + YMD VARCHAR(8), + HH VARCHAR(8), + MI VARCHAR(8), + SS VARCHAR(8), + CONSTRAINT PK_SACP_STATS_TIMES PRIMARY KEY (DT) +); + +-- 월별 생성(년월일시분초-yyyyMNddhh24miss) +insert into ucm.sacp_stats_times +select ymd||hh||mi||ss as dt, ymd, hh, mi, ss + from (SELECT TO_CHAR(TO_DATE('202409'||'01','YYYYMMDD') -1 + LEVEL, 'YYYYMMDD') AS ymd FROM DUAL CONNECT BY LEVEL <= 31 ) d + , (select * from ucm.sacp_report_times where dt_se = 'S') + + +``` + + diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 백업 테이블 생성.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 백업 테이블 생성.md new file mode 100644 index 0000000..e58e643 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/EAI 데이터 백업 테이블 생성.md @@ -0,0 +1,115 @@ +```sql + + +create table UEAI.EAI_AFTNFLTINFO_RCV_OLD as +select * +from UEAI.EAI_AFTNFLTINFO_RCV +where recv_time = 'a'; + +-- v_proc_item := 'AMOS'; +create table UEAI.EAI_AWOS_RCV_OLD as +select * +from UEAI.EAI_AWOS_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'NOTAM'; +create table UEAI.EAI_ELECSTRIPARRARTS_RCV_OLD as +select * +from UEAI.EAI_ELECSTRIPARRARTS_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'ARTS_DEP'; +create table UEAI.EAI_ELECSTRIPDEPARTS_RCV_OLD as +select * +from UEAI.EAI_ELECSTRIPDEPARTS_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'ACDM_ARR'; +create table UEAI.EAI_FLTACDMMLSTNARR_RCV_OLD as +select * +from UEAI.EAI_FLTACDMMLSTNARR_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'ACDM_DEP'; +create table UEAI.EAI_FLTACDMMLSTNDEP_RCV_OLD as +select * +from UEAI.EAI_FLTACDMMLSTNDEP_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'GAM'; +create table UEAI.EAI_GRDACMVT_RCV_OLD as +select * +from UEAI.EAI_GRDACMVT_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'LLWAS_ALRT'; +create table UEAI.EAI_LLWASALRT_RCV_OLD as +select * +from UEAI.EAI_LLWASALRT_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'LLWAS_DATA'; +create table UEAI.EAI_LLWASDATA_RCV_OLD as +select * +from UEAI.EAI_LLWASDATA_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'METAR'; +create table UEAI.EAI_METAR_RCV_OLD as +select * +from UEAI.EAI_METAR_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'NOTAM'; +create table UEAI.EAI_SIGMET_RCV_OLD as +select * +from UEAI.EAI_SIGMET_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'SPECIAL'; +create table UEAI.EAI_SPECIAL_RCV_OLD as +select * +from UEAI.EAI_SPECIAL_RCV +where recv_time = 'a' ; + +-- v_proc_item := 'NOTAM'; +create table UEAI.EAI_TDWRDATA_RCV_OLD as +select * +from UEAI.EAI_TDWRDATA_RCV +where recv_time = 'a' ; + + + +-- v_proc_item := 'PROC_LOG'; +create table UEAI.SACP_EAI_INTRFC_PROC_LOG_OLD as +select * +from UEAI.SACP_EAI_INTRFC_PROC_LOG +where log_dt = 'a' ; + +-- v_proc_item := 'LTEA'; +create table UEAI.SACP_INTRFC_LTEA_OLD as +select * +from UEAI.SACP_INTRFC_LTEA +where REGISTER_DT = 'a' ; + + +ALTER TABLE UEAI.EAI_AFTNFLTINFO_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_AWOS_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_ELECSTRIPARRARTS_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_ELECSTRIPDEPARTS_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_FLTACDMMLSTNARR_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_FLTACDMMLSTNDEP_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_GRDACMVT_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_LLWASALRT_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_LLWASDATA_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_METAR_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_SIGMET_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_SPECIAL_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.EAI_TDWRDATA_RCV_OLD NOLOGGING ; +ALTER TABLE UEAI.SACP_EAI_INTRFC_PROC_LOG_OLD NOLOGGING ; +ALTER TABLE UEAI.SACP_INTRFC_LTEA_OLD NOLOGGING ; + + + + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/작업SQL 백업/통계-과거데이터 기종 업데이트.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/작업SQL 백업/통계-과거데이터 기종 업데이트.md new file mode 100644 index 0000000..e4142c3 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/작업SQL 백업/통계-과거데이터 기종 업데이트.md @@ -0,0 +1,116 @@ + +- 유도로 +```sql + + +create table ucm.SACP_STATS_TWY_POSSESN_TIME_tmp as +select * +from ucm.SACP_STATS_TWY_POSSESN_TIME + + +update ucm.SACP_STATS_TWY_POSSESN_TIME_tmp a +set ac_ty = nvl((select cd_ref1 + from ucm.SACP_CMMN_CD + where cd_ty_id ='CT063' + and cd_id = a.ac_ty ), a.ac_ty||'QQQ') + + +delete +from ucm.SACP_STATS_TWY_POSSESN_TIME +where stats_date < '20240807' + + +insert into ucm.SACP_STATS_TWY_POSSESN_TIME(stats_date, stats_hour, area_id, ac_ty, use_time, use_co, REGISTER_ID) +select stats_date, stats_hour, area_id, ac_ty + , sum(use_time) + , sum(use_co) + , 'System' +from ucm.SACP_STATS_TWY_POSSESN_TIME_tmp +group by stats_date, stats_hour, area_id, ac_ty + + + +``` + +- 주기장 +```sql + +create table ucm.SACP_STATS_STAND_POSSESN_TIME_tmp as +select * +from ucm.SACP_STATS_STAND_POSSESN_TIME +where stats_date||stats_hour < '2024080813' + + +update ucm.SACP_STATS_STAND_POSSESN_TIME_tmp a +set ac_ty = nvl((select cd_ref1 + from ucm.SACP_CMMN_CD + where cd_ty_id ='CT063' + and cd_id = a.ac_ty ), a.ac_ty||'QQQ') + +delete +from ucm.SACP_STATS_STAND_POSSESN_TIME +where stats_date||stats_hour < '2024080814' + + +insert into ucm.SACP_STATS_STAND_POSSESN_TIME(stats_date, stats_hour, stand_no, ac_ty, ac_grad, dstrct_ty, use_time, use_co, REGISTER_ID) +select stats_date, stats_hour, stand_no, ac_ty, max(ac_grad), min(dstrct_ty) + , sum(use_time) + , sum(use_co) + , 'System' +from ucm.SACP_STATS_STAND_POSSESN_TIME_tmp +group by stats_date, stats_hour, stand_no, ac_ty +order by stats_date, stats_hour, stand_no, ac_ty + + +select * +from ucm.SACP_STATS_STAND_POSSESN_TIME +where stats_date||stats_hour = '2024080813' + + + +merge into UCM.SACP_STATS_STAND_POSSESN_TIME tgt + using ( + with tbl as ( + select * + from (SELECT TO_CHAR(TO_DATE(:V_ToMonth||'01','YYYYMMDD') -1 + LEVEL, 'YYYYMMDD') AS ymd FROM DUAL CONNECT BY LEVEL <= 31 ) d + , (select * from ucm.sacp_report_times where dt_se = 'M') hm + ) + select m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh, count(*) as use_min, count(distinct m.gam_id||m.gam_se) as use_co + from ( + select a.stand_no + , ucm.fun_kst_tm(ACTL_STAND_ON_de||actl_stand_on_tm) as on_dt + , ucm.fun_kst_tm(ACTL_STAND_OFF_de||actl_stand_OFF_tm) as off_dt + , ac_grad + -- , ac_ty_iata as ac_ty + , ucm.fun_get_acty_ICAO(ac_ty_iata) as ac_ty + , b.DSTRCT_TY + , a.gam_id, a.gam_se + from uic.SACP_GAM_LAST a, + (select ucm.FUN_PRE_ZERO_REMOVE(replace(a.stand_no, '00', '')) as stand_no + , decode(b.STAND_NO, null, 'N', 'Y') as cctv_yn + , a.DSTRCT_TY + from ucm.SACP_STAND a, ucm.SACP_CCTVID_MAPPING b + where a.STAND_NO = b.STAND_NO (+) + and a.DSTRCT_TY in ( 'AF02003', 'AF02004', 'AF02007') -- Aprong3, Apron4, Maintain + )b + where a.STAND_NO = b.STAND_NO + ) m, tbl t + where t.ymd||t.hh||t.mi between m.on_dt and m.off_dt + and t.ymd = :V_TODAY + and t.hh between :V_PreHour and :V_ToHour + group by m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh + ) src + on ( tgt.stats_date = src.ymd + and tgt.stats_hour = src.hh + and tgt.stand_no = src.stand_no + and tgt.ac_ty = src.ac_ty ) + when Matched then + update set tgt.use_time = tgt.use_time + (src.use_min - tgt.use_time) + , tgt.use_co = tgt.use_co + (src.use_co - tgt.use_co) + , updusr_id = 'System' + , updt_dt = systimestamp + when not matched then + insert (stats_date, stats_hour, stand_no, ac_ty, DSTRCT_TY, ac_grad, use_time, use_CO, REGISTER_ID, REGIST_DT) + values( src.ymd, src.hh, src.stand_no, nvl(src.ac_ty, '.'), src.DSTRCT_TY, src.ac_grad, src.use_min, src.use_co, 'System', systimestamp ) ; + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/Gate 사용량 통계.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/Gate 사용량 통계.md new file mode 100644 index 0000000..e04a4f1 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/Gate 사용량 통계.md @@ -0,0 +1,132 @@ +```sql + + + +with tbl as ( + select * + from (SELECT TO_CHAR(TO_DATE(:V_ToMonth||'01','YYYYMMDD') -1 + LEVEL, 'YYYYMMDD') AS ymd FROM DUAL CONNECT BY LEVEL <= 31 ) d + , (select * from ucm.sacp_report_times where dt_se = 'M') hm +) +select m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh, count(*) as use_min, count(distinct m.gam_id||m.gam_se) as use_co +from ( + select a.stand_no + , ucm.fun_kst_tm(ACTL_STAND_ON_de||actl_stand_on_tm) as on_dt + , ucm.fun_kst_tm(ACTL_STAND_OFF_de||actl_stand_OFF_tm) as off_dt + , ac_grad + , ac_ty_iata as ac_ty + , b.DSTRCT_TY + , a.gam_id, a.gam_se + from uic.SACP_GAM_LAST a, + (select ucm.FUN_PRE_ZERO_REMOVE(replace(a.stand_no, '00', '')) as stand_no + , decode(b.STAND_NO, null, 'N', 'Y') as cctv_yn + , a.DSTRCT_TY + from ucm.SACP_STAND a, ucm.SACP_CCTVID_MAPPING b + where a.STAND_NO = b.STAND_NO (+) + and a.DSTRCT_TY in ( 'AF02003', 'AF02004', 'AF02007') -- Aprong3, Apron4, Maintain + )b + where a.STAND_NO = b.STAND_NO + ) m, tbl t +where t.ymd||t.hh||t.mi between m.on_dt and m.off_dt +and t.ymd = V_TODAY +and t.hh between V_PreHour and V_ToHour +group by m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh + + + +-- 특정 주기장 특정 시간대 사용량/시간(분) 확인 +with tbl as ( + select * + from (SELECT TO_CHAR(TO_DATE(:V_ToMonth||'01','YYYYMMDD') -1 + LEVEL, 'YYYYMMDD') AS ymd FROM DUAL CONNECT BY LEVEL <= 31 ) d + , (select * from ucm.sacp_report_times where dt_se = 'M') hm +) +select m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh, count(*) as use_min, count(distinct m.gam_id||m.gam_se) as use_co + from ( +select a.stand_no + , ucm.fun_kst_tm(ACTL_STAND_ON_de||actl_stand_on_tm) as on_dt + , ucm.fun_kst_tm(ACTL_STAND_OFF_de||actl_stand_OFF_tm) as off_dt + , ac_grad + , ac_ty_iata as ac_ty + , b.DSTRCT_TY + , a.gam_id, a.gam_se +from uic.SACP_GAM_LAST a, + (select ucm.FUN_PRE_ZERO_REMOVE(replace(a.stand_no, '00', '')) as stand_no + , decode(b.STAND_NO, null, 'N', 'Y') as cctv_yn + , a.DSTRCT_TY + from ucm.SACP_STAND a, ucm.SACP_CCTVID_MAPPING b + where a.STAND_NO = b.STAND_NO (+) + and a.DSTRCT_TY in ( 'AF02003', 'AF02004', 'AF02007') -- Aprong3, Apron4, Maintain + )b + where a.STAND_NO = b.STAND_NO + ) m, tbl t +where t.ymd||t.hh||t.mi between m.on_dt and m.off_dt +and t.ymd = '20240820' +and t.hh between '09' and '10' +and stand_no = '233' +group by m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh + + +-- 특정 주기장 raw데이터 확인 +select * +from uic.SACP_GAM_LAST +where stand_no = '233' +and ucm.fun_kst_tm(ACTL_STAND_ON_de||actl_stand_on_tm) >= '20240820'||'0600' +order by ACTL_STAND_ON_de, actl_stand_on_tm + + +-- 특정 주기장 집계 결과 확인 +select * +from ucm.SACP_STATS_STAND_POSSESN_TIME +where stats_date = '20240820' +and stats_hour = '11' +and stand_no = '233' + + + +-- 주기장 사용량 재 집계 +merge into UCM.SACP_STATS_STAND_POSSESN_TIME tgt + using ( + with tbl as ( + select * + from (SELECT TO_CHAR(TO_DATE(:V_ToMonth||'01','YYYYMMDD') -1 + LEVEL, 'YYYYMMDD') AS ymd FROM DUAL CONNECT BY LEVEL <= 31 ) d + , (select * from ucm.sacp_report_times where dt_se = 'M') hm + ) + select m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh, count(*) as use_min, count(distinct m.gam_id||m.gam_se) as use_co + from ( + select a.stand_no + , ucm.fun_kst_tm(ACTL_STAND_ON_de||actl_stand_on_tm) as on_dt + , ucm.fun_kst_tm(ACTL_STAND_OFF_de||actl_stand_OFF_tm) as off_dt + , ac_grad + , ac_ty_iata as ac_ty + , b.DSTRCT_TY + , a.gam_id, a.gam_se + from uic.SACP_GAM_LAST a, + (select ucm.FUN_PRE_ZERO_REMOVE(replace(a.stand_no, '00', '')) as stand_no + , decode(b.STAND_NO, null, 'N', 'Y') as cctv_yn + , a.DSTRCT_TY + from ucm.SACP_STAND a, ucm.SACP_CCTVID_MAPPING b + where a.STAND_NO = b.STAND_NO (+) + and a.DSTRCT_TY in ( 'AF02003', 'AF02004', 'AF02007') -- Aprong3, Apron4, Maintain + )b + where a.STAND_NO = b.STAND_NO + ) m, tbl t + where t.ymd||t.hh||t.mi between m.on_dt and m.off_dt + and t.ymd = '20240820' + and t.hh between '08' and '10' + group by m.DSTRCT_TY, m.stand_no, ac_grad, ac_ty, t.ymd, t.hh + ) src + on ( tgt.stats_date = src.ymd + and tgt.stats_hour = src.hh + and tgt.stand_no = src.stand_no + and tgt.ac_ty = src.ac_ty ) + when Matched then + update set tgt.use_time = tgt.use_time + (src.use_min - tgt.use_time) + , tgt.use_co = tgt.use_co + (src.use_co - tgt.use_co) + , updusr_id = 'System' + , updt_dt = systimestamp + when not matched then + insert (stats_date, stats_hour, stand_no, ac_ty, DSTRCT_TY, ac_grad, use_time, use_CO, REGISTER_ID, REGIST_DT) + values( src.ymd, src.hh, src.stand_no, nvl(src.ac_ty, '.'), src.DSTRCT_TY, src.ac_grad, src.use_min, src.use_co, 'System', systimestamp ) ; + + + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/HotSpot 교통량 통계.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/HotSpot 교통량 통계.md new file mode 100644 index 0000000..6d7888a --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/HotSpot 교통량 통계.md @@ -0,0 +1,52 @@ +```sql + + +-- 출/도착 스케쥴 +select ucm.fun_TmFormat(actl_apn_out_dt, 9) as dt, clsgn, ac_reg_no, schdul_id, flt_sttus + , nvl((select ucm.fun_get_reg_acty(ac_reg_no) from dual ), '.') as ac_ty +from uic.V_FLT_DEP a +where 1=1 +and schdul_id in (select distinct schdul_id + from UCM.SACP_AREA_USE_HIST_PRCSNG + where AREA_TY = 'AF05003' + and in_ymd = '20240820' + and in_hh = :ar_hh + and schdul_id is not null) +union all +select ucm.fun_TmFormat(actl_apn_in_dt, 9) as dt, clsgn, ac_reg_no, schdul_id, flt_sttus + , nvl((select ucm.fun_get_reg_acty(ac_reg_no) from dual ), '.') as ac_ty +from uic.V_FLT_arr a +where 1=1 +and schdul_id in (select distinct schdul_id + from UCM.SACP_AREA_USE_HIST_PRCSNG + where AREA_TY = 'AF05003' + and in_ymd = '20240820' + and in_hh = :ar_hh + and schdul_id is not null) +order by schdul_id + + +-- 시간 지연, 로미오7 관통 +select m.ymd, m.hh, max(m.mi), max(m.ss), m.area_id, m.ac_ty, count(*) as use_sec, m.SCHDUL_ID +from ( + select b.ymd, b.hh, b.mi, b.ss, a.area_id, a.SCHDUL_ID + , nvl((select ucm.fun_get_reg_acty(a.trgt_id) from dual ), '.') as ac_ty + from UCM.SACP_AREA_USE_HIST_PRCSNG a + , ucm.sacp_stats_times b + where dt >= in_ymd||in_hh||in_mi||in_ss + and dt <= out_ymd||out_hh||out_mi||out_ss + and a.area_ty = 'AF05003' + and a.insert_dt in ( + select insert_dt + from ucm.SACP_AREA_USE_HIST_PRCSNG + where area_ty = 'AF05003' + and proc_se = 'S' + and in_ymd = '20240820' + and (in_hh = :ar_hh or out_hh = :ar_hh) + and schdul_id is not null ) +) m +group by m.area_id, ac_ty, m.ymd, m.hh, m.SCHDUL_ID +order by SCHDUL_ID + + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/계류장 혼잡도 통계.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/계류장 혼잡도 통계.md new file mode 100644 index 0000000..90c2ed1 --- /dev/null +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/통계관련/데이터 검증/계류장 혼잡도 통계.md @@ -0,0 +1,53 @@ +```sql + + +with tbl as ( + select 'A' as flt_se, b.DSTRCT_TY, a.rwy_id + , a.EXP_APN_IN_DT as exp_apn_inout_dt + , a.ACTL_APN_IN_DT as actl_apn_inout_dt + , a.EXP_STAND_ON_DT as exp_stand_onoff_dt + , a.ACTL_STAND_ON_DT as actl_stand_onoff_dt + from uic.V_FLT_ARR a, UCM.SACP_STAND b + where a.STAND_NO = b.stand_no + and a.flt_de = to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmdd') + and b.dstrct_ty not in ('AF02005', 'AF02006') + and nvl(ac_ty_iata,'.') like :ar_acTy + and (:ar_grad = '%' or instr(:ar_grad||',', nvl(ac_grad,'.')||',') > 0 ) +union all + select 'D' as flt_se, b.DSTRCT_TY, a.rwy_id + , a.EXP_APN_OUT_DT as exp_apn_inout_dt + , a.ACTL_APN_OUT_DT as actl_apn_inout_dt + , a.EXP_STAND_OFF_DT as exp_stand_on_dt + , a.ACTL_STAND_OFF_DT as actl_stand_on_dt + from uic.V_FLT_DEP a, UCM.SACP_STAND b + where a.STAND_NO = b.stand_no + and a.flt_de = to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmdd') + and b.dstrct_ty not in ('AF02005', 'AF02006') + and nvl(ac_ty_iata,'.') like :ar_acTy + and (:ar_grad = '%' or instr(:ar_grad||',', nvl(ac_grad,'.')||',') > 0 ) +) -- with tbl as END +select EXP_STAND_ONOFF_DT + , case when flt_se = 'A' and actl_stand_onoff_dt <= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmddhh24mi') then 1 else 0 end as arr_sum + , case when flt_se = 'D' and actl_stand_onoff_dt <= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmddhh24mi') then 1 else 0 end as dep_sum + , case when flt_se = 'A' and EXP_APN_INOUT_DT > to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmddhh24mi') + and EXP_APN_INOUT_DT <= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (60/24/60) , 'yyyymmddhh24mi') + then 1 else 0 end as arr_sum60 + , case when flt_se = 'D' and EXP_STAND_ONOFF_DT >= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (30/24/60), 'yyyymmddhh24mi') + and EXP_STAND_ONOFF_DT < to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (60/24/60), 'yyyymmddhh24mi') + then 1 else 0 end as dep_sum60 + , case when flt_se = 'A' and EXP_APN_INOUT_DT >= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (15/24/60) , 'yyyymmddhh24mi') + and EXP_APN_INOUT_DT < to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (30/24/60) , 'yyyymmddhh24mi') + then 1 else 0 end as arr_sum30 + , case when flt_se = 'D' and EXP_STAND_ONOFF_DT >= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (15/24/60), 'yyyymmddhh24mi') + and EXP_STAND_ONOFF_DT < to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (30/24/60) , 'yyyymmddhh24mi') + then 1 else 0 end as dep_sum30 + , case when flt_se = 'A' and EXP_APN_INOUT_DT >= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmddhh24mi') + and EXP_APN_INOUT_DT < to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (15/24/60) , 'yyyymmddhh24mi') + then 1 else 0 end as arr_sum15 + , case when flt_se = 'D' and EXP_STAND_ONOFF_DT >= to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) , 'yyyymmddhh24mi') + and EXP_STAND_ONOFF_DT < to_char(to_date(:ar_stdDt, 'yyyymmddhh24mi') -(9/24) + (15/24/60) , 'yyyymmddhh24mi') + then 1 else 0 end as dep_sum15 +from tbl where flt_se = 'D' +order by EXP_STAND_ONOFF_DT + +``` \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md index e918602..f40aa6a 100644 --- a/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md +++ b/Recognition/Work Related/프로젝트/스마트계류장/1.데이터베이스/항공기 등급 기준.md @@ -1,3 +1,7 @@ https://airtravelinfo.kr/wiki/index.php?title=%ED%95%AD%EA%B3%B5%EA%B8%B0_%EB%93%B1%EA%B8%89#google_vignette -![[Pasted image 20240320095219.png]] \ No newline at end of file +![[Pasted image 20240320095219.png]] + +![[Pasted image 20240723100317.png]] + +https://blog.naver.com/robinson/220049815726 diff --git a/Recognition/Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md index 41be9b8..5020cac 100644 --- a/Recognition/Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md +++ b/Recognition/Work Related/프로젝트/스마트계류장/9.기타/방문증 신청 문구.md @@ -51,6 +51,7 @@ E - 최환민 01050530799 930130 1261312 - 박재열 01057675809 880723 1187916 - 김명국 01039382570 940313 1012822 + - 김형준 01090777503 710119 1047121 - EC-Miner 업무별 담당자 - 영상수치분석 담당 @@ -65,10 +66,12 @@ E "김명국 주임" mkkim@ecminer.com, 010-3938-2570 + 인솔자 - 박수영 2402777446 / 861020 1121323 / 01041730001 - 박준호 2304745460 - 김동균 2208738411 - 서원택 2211740743 - 권현재 2305760656 -- 권준영 2209739401 \ No newline at end of file +- 권준영 2209739401 +- 이예은 2308722135 \ No newline at end of file diff --git a/Recognition/Work Related/프로젝트/스마트계류장/TODO-0.md b/Recognition/Work Related/프로젝트/스마트계류장/TODO-0.md index a1634b1..afa5a6e 100644 --- a/Recognition/Work Related/프로젝트/스마트계류장/TODO-0.md +++ b/Recognition/Work Related/프로젝트/스마트계류장/TODO-0.md @@ -1,10 +1,10 @@ - Spring Boot -- [ ] TSS 통합 - - [ ] asde, radar, Kafka로 변경, null인경우 저장 X +- [x] TSS 통합 + - [x] asde, radar, Kafka로 변경, null인경우 저장 X - [ ] ASDE comp socket 수신/송신 메시지 로그(and 설정) -- [ ] 주기장상황분석 vccs반영 -- [ ] Vccs, LTE-A, "ic.notice.trace" -> TSS 추가 +- [x] 주기장상황분석 vccs반영 +- [x] Vccs, LTE-A, "ic.notice.trace" -> TSS 추가 --- - Kafka @@ -14,7 +14,7 @@ - ELK - [ ] 백업 복구 테스트 및 프로세스 정립 - [ ] 안정화 및 성능테스트 -- [ ] 인덱스 유지 기간 및 용량 설정 +- [x] 인덱스 유지 기간 및 용량 설정 --- - DB @@ -24,17 +24,17 @@ - [ ] 인콘 cctv DB 연동 - [ ] 기초데이터 보완 및 정리 (주기장정보 (RUNC), 항공사, 기종) -- [ ] EAI 프로시져 acdm, arts 일괄 시각순으로 수행 해야 함. -- [ ] GAM Procedure 수정 +- [x] EAI 프로시져 acdm, arts 일괄 시각순으로 수행 해야 함. +- [x] GAM Procedure 수정 (주기장번호 없는 취소데이터처리, 0000000002024041873834) -- [ ] 통계 - - [ ] 관제사별 관제량 통계 - - [ ] 사용자 작업 통계 - - [ ] 입출력자료별 통계 - - [ ] 연계시스템별 - - [ ] CCTV제어내용 - - [ ] 계류장 혼잡도 - - [ ] 주기장 조업 시작/종료 +- [x] 통계 + - [x] 관제사별 관제량 통계 + - [x] 사용자 작업 통계 + - [x] 입출력자료별 통계 + - [x] 연계시스템별 + - [x] CCTV제어내용 + - [x] 계류장 혼잡도 + - [x] 주기장 조업 시작/종료 --- @@ -56,5 +56,5 @@ - [ ] STATS 모듈 1초주기 상태전송 -- [ ] EAI- ALL 프로시져 적용 +- [x] EAI- ALL 프로시져 적용 - [ ] USTATS 생성, 오브젝트 이동 \ No newline at end of file diff --git a/Recognition/Zettelkasten/PassWD.md b/Recognition/Zettelkasten/PassWD.md index ce87cd8..1b0dbc4 100644 --- a/Recognition/Zettelkasten/PassWD.md +++ b/Recognition/Zettelkasten/PassWD.md @@ -25,3 +25,5 @@ - 패스트캠퍼스 > mandall +- RadHat +> gmtwork gmail \ No newline at end of file diff --git a/Recognition/zzz.resources/Pasted image 20240723100317.png b/Recognition/zzz.resources/Pasted image 20240723100317.png new file mode 100644 index 0000000..0382a6c Binary files /dev/null and b/Recognition/zzz.resources/Pasted image 20240723100317.png differ diff --git a/Recognition/zzz.resources/Pasted image 20240806134852.png b/Recognition/zzz.resources/Pasted image 20240806134852.png new file mode 100644 index 0000000..b6766e7 Binary files /dev/null and b/Recognition/zzz.resources/Pasted image 20240806134852.png differ