운영판 wace 재확인 결과 BOM 등록은 XLSX가 아니라 CSV 가 진짜 입력 포맷이었음.
근거:
· openBomReportExcelImportPopUp.jsp : 제목 "PART 및 구조등록 CSV upload",
Drop Zone "Drag & Drop CSV 템플릿", fnc_setFileDropZone(..., "csv") 로 CSV 만 허용
· /partMng/parsingExcelFile.do 가 .csv 분기에서 별도 함수 parsingCsvFile() 호출
· CSV 11컬럼 : 수준 / 품번 / 품명 / 수량 / 항목수량 / 재료 / 열처리경도 / 열처리방법 /
표면처리 / 공급업체(MAKER) / 범주이름(PART_TYPE)
· CSV 는 PARENT_PART_NO 컬럼이 없고 "수준" 으로 부모-자식 자동 결정
· 숫자("1","2","3"): 깊이 D 의 부모 = D-1 의 최신 품번
· 점 표기법("1","1.1","1.4.1"): 마지막 점 이전 수준이 부모
backend (devBomExcelImportService.ts):
· XLSX(xlsx 라이브러리) 파싱 → CSV(iconv-lite) 파싱으로 완전 재작성
· 인코딩 자동 감지 1:1 — CP949 → UTF-8 → EUC-KR → MS949 순서, � 카운트로 베스트 선택,
UTF-8 BOM() 자동 제거
· CSV 영문 범주명 자동 변환 — Assy/ASSY→조립품, Buy/BUY→구매품, Make/MAKE→부품
· 범주별 ACCTFG/ODRFG 자동 설정 — 조립품(0001813)·부품(0001812) → ACCTFG=4·ODRFG=1,
구매품(0000063) → ACCTFG=7·ODRFG=0
· 기본값 일괄 — UNIT_DC=0001400(EA) · UNITMANG_DC=0001400 · UNITCHNG_NB=1 ·
LOT_FG=1 · USE_YN=1 · QC_FG=0 · SETITEM_FG=0 · REQ_FG=0
· 검증 1:1 — rowIndex > 2 에서만 모품번 자품번 목록 존재 검사, NOTE 누적
· 저장 로직(savePartBomMaster)은 동일 유지 — 자식 PART updatePartInfoFromCsv UPDATE /
insertpartInfo INSERT, 부모 PART 존재 시 lookup·없으면 "" (INSERT 안 함),
bom_part_qty INSERT 시 ACCTFG/ODRFG/UNIT_DC/UNITCHNG_NB 등 모든 컬럼 동기
frontend:
· BomExcelRow → BomCsvRow (LEVEL 컬럼 + ACCTFG/ODRFG/UNIT_DC/UNITCHNG_NB/LOT_FG/USE_YN/
QC_FG/SETITEM_FG/REQ_FG 자동 채움 필드 추가). BomExcelRow 는 호환 type alias 로 보존
· BomReportExcelImportDialog : 제목 "PART 및 구조등록 CSV upload", accept=".csv", Drop Zone
안내 텍스트 변경, 그리드 컬럼 — 결과/수준/모품번(자동)/품번/품명/수량/항목수량/재료/
열처리경도/열처리방법/표면처리/공급업체/범주/계정구분(자동)/조달구분(자동)
· 파싱 결과의 encoding 정보 표시 (CP949/UTF-8 등)
정적 자산:
· 운영 BOM_REPORT_EXCEL_IMPORT_TEMPLATE.xlsx 제거 (운영판도 실제 사용 안 함)
· 신규 BOM_REPORT_CSV_IMPORT_TEMPLATE.csv 추가 (11컬럼 헤더 + 4행 샘플)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
· wace fn_openSaleRegPopup(PROJECT_NO, "detail") 의도 재해석 — read-only 상세 조회 모드
· 행 전체 클릭(onRowClick) → PROJECT_NO 컬럼 셀 클릭(cellClick)으로 좁힘 (wace 1:1)
· 판매관리 페이지 라우팅 폐기 → ProjectInfoDialog 신설 (같은 탭, list row 직접 사용, 추가 API 호출 0)
· 표시 항목: 프로젝트번호/영업번호/주문유형/제품구분/국내해외/고객사/유무상/품번/품명/S/N/수주수량/접수일/요청납기/발주일/프로젝트명/작성자
· 영업관리 변경 롤백 (SaleListFilter.project_no, useSearchParams 자동 선택, 초기화 핸들러)
· 01-progress / 01-progress-verify 문서 갱신
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- getList SQL: 라인 집계에 product_summary(=PRODUCT_NAME, contract_item.product distinct join) / return_reason_summary 추가. wace는 헤더 product 폐지·라인으로 이동(운영 90건 contract_mgmt.product NULL) → 라인 집계로 그리드 표시
- GRID_COLUMNS 3개 추가: 제품구분 / 국내해외 / 반납사유
- searchForm.search_partName 필드 추가(초기화 포함). 검색 폼 UI는 PartSelect mode=partName 이미 존재
- docs/migration/sales/01-estimate-verify.md: wace ↔ RPS 항목 매핑 / 운영 데이터 코드 체계 / 갭 우선순위
- scripts/verify-estimate.sql: BEGIN/ROLLBACK 5개 시나리오 (등록·수정·G1·수주취소·그리드) 자동 검증
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
[ECR(Engineering Change Request) 관리]
- ecr_mng / product_mgmt / part_mng 테이블 + seq_ecr_no 시퀀스
- 설변요청 코드(0000090) 자식 코드 시드 (설계오류/품질개선/원가절감/고객요청/법규대응/부품단종)
- API: 목록/상세/등록·수정(merge)/조치완료/삭제 + 옵션(작성자/제품/부품/공통코드)
- 화면: 필터바, 그리드, 등록·수정 모달, 상세 모달, 조치완료 모달
[고객 CS 관리]
- customer_cs_mng 테이블 (기존 customer_mng 거래처 마스터와 충돌 회피)
- 공통코드 5종 카테고리(0000200~0000204) 자동 시드: 관리유형/제품구분/담당자/조치유형/CS상태
- API: 목록/상세/등록·수정/삭제/대시보드(요약·상태별·관리유형별·제품구분별)
- 화면: 요약 카드 4종, 10종 필터바, 14컬럼 그리드, 등록·수정·상세 모달
[결재(APPROVAL) 시스템 — wace_plm ApprovalService 포팅]
- approval / route / inboxtask / approval_target / approval_kind / amaranth_approval 6개 테이블
- 라이프사이클: 상신(startApproval) → 결재함(listInbox) → 승인/반려(approveTask/rejectTask)
→ 다음 결재자 ready 자동 전달, 마지막이면 route+approval+target 일괄 complete
- target_type 별 도메인 status 동기화 훅 (ECR_MNG/CUSTOMER_MNG)
- API: /api/wace-approval/{inbox,start,inbox/:id/approve|reject,by-target,:id,:id/amaranth-link}
[Amaranth(Wehago) 전자결재 RestAPI 연계]
- 외부 커넥션 'Amaranth - 결재' 자동 시드 (auth_config: callerName/accessToken/hashKey/groupSeq/aesKey)
- amaranthApprovalClient: 자바 AmaranthApprovalApiClient 1:1 포팅
HMAC-SHA256 wehago-sign / AES-128-CBC empSeq 암호화 / HTTPS / JSON 파싱
- 6개 endpoint: 인증토큰/결재함/문서목록/문서상세/SSO URL/문서상신
- 하드코딩 0건 — DB 외부 커넥션의 인증 정보를 매 호출 시 로드
- 통신 검증 완료 (dummy empSeq 로 응답 정상 수신)
- 프록시 라우트 /api/amaranth-approval/{box,docs,docs/:id,sso,submit,auth-token}
[wace_plm 데이터 import]
- WacePlmDataImportService: source PG 클라이언트 → 우리 DB ON CONFLICT DO NOTHING idempotent
- 환경변수 WACE_PLM_DB_* 만 읽음 (운영 비번 코드 0건, 미설정 시 명시적 에러)
- /api/wace-import/{all,ecr,cs,masters,approval} (SUPER_ADMIN 전용)
[Bugfix]
- 배치 편집 conditional 매핑 silent drop 방지 — 평가 필드/규칙 누락 시
어느 컬럼이 어떤 이유로 빠졌는지 toast 로 명시 + 저장 차단
- 시드 topup 강화 — extra_auth_config(aesKey 등) 누락된 기존 레코드 자동 보강
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- 검색 폼 정합성: wace JSP `<!-- 주석처리된 검색필터 -->` 블록까지 잘못 이식했던 부분 정정
- 견적: 11→7개 (제품구분/국내해외/유무상/요청납기 제거)
- 주문: 13→9개 (제품구분/국내해외/유무상/견적환종 제거)
- 매출: 10→11개 (출하지시상태 제거 + 제품구분·국내/해외 추가, JSP 순서로 재배치)
- 판매: 변경 없음 (원본 그대로 일치)
- 매출 백엔드: SaleListFilter에 productType/nation 추가, getRevenueList에 partObjId/serialNo/orderDate/productType/nation 5개 필터 처리
- 공통 UX
- 초기화 버튼을 4개 메뉴 동일하게 통일 (variant=ghost, 버튼 영역 끝)
- <Input type="date">는 빈 값 placeholder 숨김 + 캘린더 아이콘 숨김 + 영역 클릭으로 picker 자동(showPicker)
- 신규 공통 컴포넌트: CommCodeSelect/CustomerSelect/CustomerSearchDialog/PartSelect/ItemSearchDialog + backend salesCommonRoutes
- 문서: 01/02/04 검색 폼 표를 활성/비활성 분리 형식으로 정정, README에 8. 공통 UX 규칙 섹션 신설
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- RoleFormModal: 권한 코드 입력 필드 제거. 생성 시 ROLE_<base36 timestamp>
형태로 자동 부여 (시스템 내부 키, UI 비노출). 수정 모드에서도
authCode 는 기존 값 유지하고 입력 받지 않음.
- dashboard.ts getApiBaseUrl: NEXT_PUBLIC_API_URL 환경변수가 있으면 우선 사용.
fallback 포트를 8080 → 8090 (compose 외부 노출 포트)으로 정정해
'데이터를 불러올 수 없습니다 / Failed to fetch' 해결.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
화면 (frontend/app/(main)/admin/userMng/userAuthList/page.tsx):
- 4분할 그리드를 inline flex 레이아웃으로 강제 (Tailwind v4 arbitrary value 파싱 이슈 우회)
- 권한있는/없는 직원 리스트 height 폭주 수정 (flex-1 + height 충돌 → 명시적 flex-basis)
- 직원 항목을 가로 배치(이름·부서)로 변경해 한 화면 표시 인원 증가
- 메뉴 트리 영역 자체 스크롤 + sticky thead 적용, 페이지 전체 스크롤 제거
- 빠른 연속 클릭 시 같은 메뉴-필드 토글이 백엔드 SELECT→UPDATE race로 충돌하던 문제를 프론트 inFlight 가드로 차단
API/인프라:
- 단건 메뉴 권한 토글 엔드포인트 신설: PATCH /roles/:id/menu-permissions/:menuId
- RoleService.upsertSingleMenuPermission 추가 (변경된 yn 필드만 머지하는 멱등 UPSERT)
- frontend/lib/api/role.ts: toggleMenuPermission · getWorkspace 함수 추가 (워크스페이스 통합 로드)
보안:
- 권한 변경 시 그룹 멤버 토큰 무효화 로직에서 작업자 본인을 제외 (자기 자신 로그아웃 방지)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
부팅 시 자동 시드:
- 외부 REST API 연결 6종 (부서/사원/거래처/창고/계정과목/Wehago 사용자)
- 매칭 배치 6개 + Wehago HMAC-SHA256 서명 자동 부착 (erpApiClient/erpPresetSeedService/erpBatchSeedService)
- 동기화 대상 테이블/컬럼 보장 idempotent 마이그레이션 (erpTableMigration)
배치 기능 확장:
- 조건부 매핑 (mapping_type='conditional') — when/then/default 규칙으로 값 변환 (예: enrlFg=J01→active)
- 행 단위 제외 필터 (row_filter_config) — 특정 API 필드 값 가진 행 동기화 제외 (예: loginId=wace 통합 ERP 계정 제외)
- save_mode/conflict_key 기반 UPSERT, data_array_path 응답 배열 추출
UI 정비:
- 배치/플로우/메일/REST API 목록에 페이징 + FullHD 컴팩트 레이아웃
- 배치 편집 화면 한 화면 풀 활용 — TO 패널 가로 그리드, FROM 패널 등록 연결 한 줄 요약, 응답/JSON/파라미터 details 접힘
- ResponsiveDataView/AdminPageRenderer 쿼리 파라미터(?edit=N) 파싱
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Added a new controller for item inspection information to handle grouped data retrieval with pagination.
- Created routes for accessing item inspection data, specifically for grouped item codes.
- Updated frontend components to support server-side pagination, including total count display and page navigation.
- Enhanced the item inspection info page to utilize the new API for fetching data, ensuring a smooth user experience.
This implementation improves the management of item inspection data and enhances usability in the quality module.
- Added a new KPI controller to handle daily production data retrieval.
- Created routes for accessing KPI data, specifically for daily production.
- Developed frontend components for displaying daily production metrics, including charts and summary cards.
- Implemented data fetching logic with date range filtering for production data.
- Ensured proper loading states and error handling in the UI.
This feature is part of TASK:ERP-022.
- Added pagination parameters (page and size) to the getOrderSummary and getPlans functions in the productionController.
- Updated the getList function in shippingOrderController and shippingPlanController to support server-side pagination.
- Modified frontend components to handle pagination state and display total counts for orders and plans.
- Ensured compatibility with existing functionality by maintaining behavior when pagination is not used.
- Updated SQL queries in `popProductionController` to separate work order process and result handling, ensuring batch_id is now managed in the work_order_process_result table.
- Enhanced `workInstructionController` to include id generation for work items and details, preventing NULL values during insertion.
- Implemented case-insensitive search functionality across various services, improving data retrieval accuracy.
- Added sorting functionality in the item inspection page, allowing users to sort by different columns with visual indicators for sort direction.
This refactor aims to improve data integrity and user experience across the production and inspection workflows.
- Updated SQL queries in the packaging and work instruction controllers to include additional fields such as `inventory_unit` and `material`, improving data retrieval for packaging items.
- Implemented new columns in the `work_instruction_detail` table for better tracking of item schedules, equipment, and personnel involved in work instructions.
- Enhanced frontend components to utilize the new data structure, including category options for inventory units and materials, improving user experience in the packaging and subcontractor item pages.
- Refactored item inspection display logic to format pass criteria more clearly, enhancing readability for inspection data.
- Introduced a new controller for managing outsourcing outbound processes, including automatic candidate retrieval and outbound list management.
- Implemented API routes for fetching candidates, listing outsourcing outbounds, and creating new outbound records.
- Enhanced the SQL queries to ensure proper filtering by company code and to utilize existing outbound management tables effectively.
- Added new routes for handling outsourcing outbound operations in the Express application, improving the overall functionality of the logistics module.
- Added pagination support to the `getList` function in the work instruction controller, allowing for efficient data retrieval with `page` and `pageSize` parameters.
- Enhanced the keyword search functionality to include checks for item numbers in the work instruction details, improving search accuracy.
- Updated the frontend components to utilize the new `SmartSelect` component for supplier and partner selection, enhancing user experience.
- Adjusted the `EDataTable` component to support server-side pagination, ensuring better performance with large datasets.
- Updated the `update` function in the outbound controller to include detailed inventory adjustments when modifying outbound records, ensuring accurate stock management.
- Implemented rollback mechanisms for both outbound and receiving updates to maintain data integrity in case of errors.
- Enhanced the `deleteOutbound` function to include inventory recovery and historical logging for deleted outbound records.
- Introduced a new utility function `adjustInventory` to handle inventory changes consistently across different controllers.
- Improved error handling and logging for better traceability during outbound and receiving operations.
- Updated the `getRoutingDetails` function to enrich routing details with subcontractor codes, improving data retrieval for routing information.
- Implemented a mapping mechanism to associate subcontractor codes with routing details, ensuring accurate representation of outsourcing suppliers.
- Enhanced the `saveRoutingDetails` function to handle subcontractor mappings during the save operation, ensuring data integrity and consistency.
- Updated the BOM service to improve unit handling and added inventory unit information for better clarity in item representation.
- Refactored production plan management to streamline modal handling and improve error messaging for better user feedback.
- Added a modal for copying inspection information from a selected item to multiple target items.
- Implemented search and selection logic for target items to facilitate the copying process.
- Included validation to ensure a source item is selected and that target items are valid before proceeding with the copy operation.
- Enhanced user feedback with toast notifications for successful and error states during the copy process.
- Updated BOM management to include unit label handling for better clarity in item representation.
- Implemented CRUD operations for report presets in reportPresetController.
- Added routes for listing, creating, updating, and deleting report presets.
- Ensured authentication is required for all preset operations.
- Enhanced MaterialData interface to include optional width, height, and thickness properties.
- Added functionality to check for existing user IDs during new user registration and updates to prevent overwriting accounts from different companies.
- Enhanced error handling to return appropriate messages when a duplicate user ID is detected.
- Updated the frontend to include user ID duplication verification, ensuring a smoother user experience during user creation and editing.
- These changes aim to improve data integrity and user management across multiple company implementations.
- 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.
- 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.
- 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.