DB 설정
DB_CONFIG = {"host": "100.105.75.47", "port": 5432, "dbname": "postgres", "user": "postgres", "password": "",}
기본 설정 : 주 야간 생산 분류 - 한국 시간(KST) 로컬 기준
주간 : [D-DAY] 08:30:00 ~ 20:29:59 → day 로 설정(08:30:00 & 20:29:59 포함)
야간 : [D-DAY] 20:30:00 ~ 23:59:59 + [DAY+1일] 00:00:00 ~ 08:29:59 → night 로 설정(20:30:00 & 08:29:59 포함)
→ 주 야간 별로 시간 겹치지 않을 것
→ DB 시간 형식 관련 "HH:MI:SS"형식으로 정규화
탐색할 테이블들의 컬럼 barcode_information 속성값은 가지고 있는 18번째 자리 문자는 아래의 가이드에 따라 다른 품번으로 분류할 것
스키마 : g_production_film, 테이블 : remark_info(아래)
| barcode_information | pn | remark |
|---|---|---|
| C | 35643009 | Non-PD |
| P | 35643010 | Non-PD |
| 1 | 35654264 | Non-PD |
| N | 35749091 | Non-PD |
| J | 35930927 | PD |
| S | 35930928 | PD |
→ 탐색할 테이블들의 컬럼 barcode_information의 속성값이 “BA1WJ25273503681SJ8T-14F014-AE”라면 18번째 문자가 ‘J’이고
스키마 : g_production_film, 테이블 : remark_info에 barcode_information의 속성값 ‘J’에 따라 “35930927” 품번 및 “PD”로 분류
테스트 지연 제품 리스트
| prod_day | shift_type | barcode_information | pn | remark | station | end_day | end_time | run_time | test_contents | file_path | updated_at |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026-01-08 | day | BA1WJ26008500344USJ8T-14F014-AF | 35930928 | PD | FCT1 | … | … | 46.4 | 1.24_usb_c_v | \\192.168.108.155\FCT LogFile… | … |
| 2025-12-19 | day | BA1WJ25353500062UPC3T-14F014-AC | … | Non-PD | FCT1 | … | … | 38.9 | 0.00_d_sig_val_090_set | \\192.168.108.155\FCT LogFile… | … |
| prod_day | shift_type | barcode_information | pn | remark | station | end_day | end_time | run_time | test_contents | file_path | updated_at |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 2026-01-08 | night | BA1WJ26008500344USJ8T-14F014-AF | 35930928 | PD | FCT1 | … | … | 46.4 | 1.24_usb_c_v | \\192.168.108.155\FCT LogFile… | … |
| 2025-12-19 | night | BA1WJ25353500062UPC3T-14F014-AC | … | Non-PD | FCT1 | … | … | 38.9 | 0.00_d_sig_val_090_set | \\192.168.108.155\FCT LogFile… | … |
파이썬 데몬 스크립트로 만들 때 추가 사항
seen_pk: set[(end_day, end_time_norm, barcode_information, test_contents)] 중복 방지 캐시 추가할 것