MSSQL 수집기 (새 파일 mssqlClient.ts)
- Python sql_collector.py 의 MSSQL 모드 포팅
- watermark 기반 증분 SELECT, batch_mode (row 당 장비), fetch_size 지원
- timestamp_expression 으로 CONVERT/LEFT/RIGHT 등 복합 타임스탬프 표현 가능
- Protocol: MSSQL_DB
MQTT 구독 수집기 (새 파일 mqttCollectorClient.ts)
- tag.address = 토픽, 메시지 캐시 후 readTags() 호출 시 최신값 반환
- payload JSON 파싱 시 json_path 로 특정 필드 추출 가능
- Protocol: MQTT_SUB
Target DB retry queue (pipeline_target_retry_queue)
- 기존 in-memory Array → PG 영속화
- 실패 → enqueue(exp.backoff), 30s 워커가 재시도, 10회 초과 시 폐기
- IDC TimescaleDB 일시 다운 시 데이터 유실 방지 (기존 단순 warn → 적재)
Watermark 영속화 (pipeline_collector_watermark)
- connection_id 당 마지막으로 읽은 타임스탬프 기록
- MSSQL 증분 수집의 핵심, 재기동에도 중복 없음
deviceCollectorService.ts
- case "MSSQL_DB", "MQTT_SUB" 분기 추가
- clientCache 타입에 MssqlClient, MqttCollectorClient 추가
- publishData 5단계 실패 시 enqueueTargetRetry 호출
- startRetryWorker()/stopRetryWorker() 수명 주기 관리
app.ts
- 기동 시 startRetryWorker() 호출
pipelineDeviceTypes.ts
- DeviceProtocol union 에 MSSQL_DB, MQTT_SUB 추가
- PROTOCOL_OPTIONS / PROTOCOL_DEFAULTS 에 등록
- UI 드롭다운 및 기본값 지원
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
XGT FEnet 클라이언트
- 응답 data_length offset [12] → [16] (요청 시에만 [12,16] 둘 다 씀; 응답은 PLC가 [12:14]를 CPU 정보로 덮음)
- socket.setTimeout idle 타임아웃 제거 → connect 전용 수동 타이머 + setKeepAlive(10s). 폴링 간격(5s)마다 재연결되던 문제 해결
Edge 이벤트 리포터
- edgeStatusReporter.ts 추가: 60초 간격 edge_status_1 하트비트 + edge_events_1 이벤트 기록
- 기동/종료 이벤트 + PLC 상태 전이(connected/disconnected/error) 자동 기록
- PIPELINE_EDGE_* env 로 edge_id/company_id/UUID/table/interval 주입
edge_telemetry metadata 포맷 교정
- migrated_at → forwarded_at, _pipeline 추가 블록 제거
- 프로덕션 원본 스키마와 완전 호환: {priority, device_id(UUID), forwarded_at}
라우트 순서 버그 수정
- pipelineDeviceConnectionRoutes.ts: /target-databases* 가 /:id 뒤에 있어 /:id 가 먼저 매칭됨 → UI 저장 DB 드롭다운 비어있던 문제
- 정적 경로를 /:id 위로 이동
프론트 API URL 해석 일반화
- NEXT_PUBLIC_API_URL 가 localhost인데 브라우저는 원격이면 env 무시하고 현재 origin의 :8080 사용 → 엣지 원격 접속 시 API 연결 보장
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Docker/K8s 배포 설정을 pipeline-backend/pipeline-front로 통일
- 네임스페이스, 서비스, PVC 등 k8s 리소스명 pipeline-* 로 변경
- AI 에이전트 관리 기능 추가 (에이전트, 그룹, 프로바이더, 대화, API 키, 지식베이스)
- 장비 연결 관리 기능 추가 (PLC/Modbus/OPC-UA/MQTT)
- 배치 스케줄러에 AI agent/device collection/crawling 타입 추가
- 배치 편집 UI 개선 (6가지 실행 방식 지원)
- 회사별 페이지(COMPANY_*) 제거 및 AdminPageRenderer 최적화
- 메뉴 재구성: 장비 연결 관리 시스템관리로 이동, 에이전트 오케스트레이션으로 개명
- ai-assistant 디렉토리 제거 (backend-node로 통합)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Updated fileController to include Cross-Origin-Resource-Policy headers for improved security and file handling.
- Added error handling for file streams to ensure robust responses in case of read errors.
- Modified materialStatusController to correctly map material IDs to their respective codes for inventory stock queries.
- Enhanced moldController to include warranty shot count in mold creation and update processes.
- Improved item inspection page by adding inspection method category loading and mapping, ensuring accurate display of method labels in the UI.
These changes aim to enhance the overall functionality and user experience across multiple companies by ensuring proper file handling, data mapping, and error management.
- Modified the addCategoryValue function to allow menuObjid to be optional, accommodating scenarios where it may not be provided, such as in global management screens.
- Adjusted related service and controller logic to handle the absence of menuObjid gracefully, ensuring that the application remains robust and user-friendly.
- Enhanced the frontend components to reflect these changes, improving the overall user experience when adding category values across multiple companies.
- sync: header에 routing 없으면 detail에서 자동 가져오기 (PC→POP 연동 수정)
- sync: header routing/qty/item_id 자동 보정 (detail → header 동기화)
- 사이드바: 체크리스트/자재투입 카드 형태 UI로 변경
- Added temporary debug response in `numberingRuleController` for better troubleshooting.
- Refactored SQL queries in `NumberingRuleService` to enhance parameter handling and improve clarity.
- Updated `ItemInfoPage` to correctly handle manual input values for user-generated codes.
- Implemented sorting logic in `ItemRoutingTab` to prioritize default routing versions and added functionality to set a version as default.
These changes aim to enhance the reliability and user experience in managing numbering rules and item routing processes.
- Updated the `NumberingRuleService` to support manual values in the computation of non-sequence values.
- Improved the `ItemInfoPage` to parse preview codes into parts, allowing for better handling of manual inputs and dynamic code generation.
- Refactored BOM management to streamline the retrieval of category options for both division and unit, enhancing data consistency.
- Added utility functions to resolve unit labels from category options, improving the clarity of displayed data.
These changes aim to improve the functionality and user experience in managing item information and BOM processes.
- Updated SQL query in `productionPlanService.ts` to fix parameter indexing for company code.
- Refactored date handling in `department/page.tsx`, `customer/page.tsx`, and `sales-item/page.tsx` to ensure consistent date formatting.
- Enhanced equipment list state management in `production/plan-management/page.tsx` to use more descriptive property names.
These changes aim to improve the reliability of SQL operations and ensure consistent date handling across the application.
- Added `end_date` field to user management for better tracking of user status.
- Updated SQL queries in `adminController` to include `end_date` during user save operations.
- Improved purchase report data handling by refining the logic for received quantities.
- Enhanced file preview functionality to streamline file path handling.
- Updated outbound and receiving controllers to ensure accurate updates to shipment and purchase order details.
These changes aim to improve the overall functionality and user experience in managing user data and reporting processes.
- Modified the upsertSchedule function to regenerate today's plan immediately after schedule changes, ensuring that already sent users are automatically excluded.
- Increased the data size limit for item info page requests from 500 to 99999 for better data handling across multiple companies.
- Added new pages for design request management, task management, and equipment info, providing comprehensive tools for managing design and equipment processes.
These updates aim to improve the efficiency and usability of the smart factory log and item management systems, enhancing user experience and operational effectiveness.
- Removed immediate plan generation on server start to prevent sending logs for past timestamps.
- Updated the upsertSchedule response message to clarify that the schedule will take effect from the next day at 00:05.
These changes aim to enhance the reliability of the smart factory log scheduling system by ensuring that logs are sent at the correct times and reducing the risk of sending outdated logs.
- Added dailyCount parameter to the upsertSchedule function, allowing for the configuration of daily access limits for users.
- Updated the smartFactoryLog interface to include daily_count, ensuring proper data handling for schedule management.
- Removed the runScheduleNowHandler function from the smartFactoryLogController and adminRoutes, streamlining the API for schedule management.
- Modified the frontend SmartFactoryLogPage to support dailyCount selection, improving user experience in managing schedules.
These changes aim to enhance the flexibility and usability of the smart factory schedule management system, allowing for better control over user access and scheduling operations.
백엔드:
- receiving/generate-number: ?ruleId 쿼리 받아 numberingRuleService.allocateCode 사용
- outbound/generate-number: 동일
- ruleId 없거나 실패 시 기존 하드코딩 채번으로 폴백
프론트:
- InboundCartPage: 확정 시 화면설정의 popConfig.inbound.numberingRuleId 읽어 ruleId 전달
- OutboundCartPage: 확정 시 화면설정의 popConfig.outbound.numberingRuleId 읽어 ruleId 전달
POP 화면설정에서 채번규칙 선택 → 입고/출고 확정 시 자동 적용
- Added new API endpoints for retrieving company-specific user lists and sending immediate logs for selected users.
- Enhanced the smartFactoryLogController with functions to handle user retrieval and immediate log sending, improving operational efficiency.
- Updated adminRoutes to include routes for the new functionalities, ensuring proper access control for super admins.
- Refactored the sendSmartFactoryLog function to improve logging and error handling, providing better insights into the log transmission process.
These changes aim to enhance the smart factory log management capabilities, facilitating better user interaction and operational tracking.
- Enhanced the deleteReceiving function in the receivingController to retrieve the userId from the request object.
- This addition will facilitate better tracking and auditing of delete operations by associating them with the user performing the action.
- Added new API endpoints for managing smart factory schedules, including retrieval, creation, updating, and deletion of schedules.
- Integrated schedule management into the smart factory log controller, enhancing the overall functionality.
- Implemented a scheduler initialization process to automate daily plan generation and scheduled sends.
- Developed a frontend page for monitoring equipment, production, and quality, with real-time data fetching and auto-refresh capabilities.
These changes aim to provide comprehensive scheduling capabilities for smart factory operations, improving efficiency and operational visibility for users.
process_work_result.detail_content에는 item_code(R_PLAST_024)가 저장되는데
기존 코드는 child_item_id(UUID)로 매칭하려 해서 항상 0 반환되던 버그.
매칭 키를 child_item_code로 변경 → 정상 합산 확인 (5+30=35)
- 백엔드: /api/pop/production/checklist-items/:processId 신규 추가
process_work_result ⟕ inspection_standard(judgment_criteria) LEFT JOIN으로
한 번에 반환 (inspection_code 미설정 시 null로 안전)
- 프론트: resolveInputType + normalizeByJudgmentCriteria + normalizeByDetailType
1순위: judgment_criteria (CAT_JC_01~04) → inspect/numeric_range/ox/select/text
2순위: detail_type 폴백
- checklist/equip_inspection → check(토글)
- inspection/equip_condition/production_result → inspect(숫자 키패드)
- lookup → input(텍스트)
- material_input → material(BOM 자재)
기존 canonical 값은 건드리지 않아 회귀 없음
- fetchData는 전용 API 사용 + 실패 시 기존 dataApi.getTableData로 폴백
- 로그인 시 POP 메뉴 발견 → 해당 회사용 POP 레이아웃 8개 자동 복제
- 템플릿: 공통(*) 우선, COMPANY_7 폴백
- 회사명 자동 치환 (탑씰 → 해당 회사명)
- screen_definitions 공통(*) 화면은 모든 회사 접근 허용
- 프로필 POP 모드 메뉴: POP 메뉴 있는 회사만 표시
- getLayoutPop 개별 자동 복제 (2중 안전망)
- Added a new controller for managing smart factory logs, including retrieval and statistics endpoints.
- Integrated smart factory log migration to set up the necessary database structure.
- Enhanced the authentication controller to include user name in log submissions.
- Developed a frontend page for displaying and filtering smart factory logs, accessible only to super admins.
- Implemented API calls for fetching logs and statistics, improving data visibility and management.
These changes aim to provide comprehensive logging capabilities for smart factory activities, enhancing monitoring and analysis for administrators.
리워크 추적:
- 다음 공정 접수 시 리워크 자동 감지 (rework_source_id별 개별 추적)
- 합류 판정: 일반 물량 있으면 마크 해제(합류), 없으면 마크 유지
- 창고 입고 시 마크 자동 해제 (is_rework=NULL, 이력 보존)
- 접수가능 카드: 합류 불가 시 리워크 배지 표시
버그 수정:
- 접수가능 이중 집계 (master+SPLIT 합산 → SPLIT만)
- completed master 재활성화
- 리워크 접수 불가 (자체 input 기반으로 변경)
- master input_qty 덮어쓰기 방지
- 리워크 카드A 접수 시 카드B 사라짐 (개별 전량 판정)
- 진행중/완료 탭 마스터 행 제외
- 리워크 진행중 카드 중복 (마스터 숨김, SPLIT만 표시)
- 리워크 SPLIT에 is_rework 전달
- 재작업 회차 이중 카운트 (마스터만 카운트)
- reworkAvailable이 available 초과 (clamp 처리)
- 불량 수량 키패드 기본값 빈값
- 불량 처리 공정선택 UI 연결
테스트 검증: 전체 시나리오 PASS (집계 ✅ 흐름 ✅ 재고 ✅ 마크 ✅)
- accept-process: rework_source_id 전달 시 원본 seq_no와 비교
- 현재 seq < 원본 seq → is_rework='Y' 유지 (마크 표시)
- 현재 seq >= 원본 seq → is_rework 해제 (합류, 마크 없음)
- save-result 응답에 rework_source_id 포함 (프론트 추적용)
- accept-process 응답에 rework_source_id 포함
- Updated the processInfoController to allow for flexible use_yn filtering, supporting both "Y" and "N" values along with their corresponding "USE_Y" and "USE_N" mappings.
- Modified the processWorkStandardController to include selected_bom_items in work item details, enabling better management of BOM data.
- Improved the productionPlanService to handle order summaries more effectively, incorporating legacy and detail data through a unified query structure.
- Enhanced the receiving and outbound pages with new filtering and grouping functionalities, improving user experience and data handling.
These changes aim to streamline process management and improve overall functionality across various modules.