DB has no sales_order_id/shipment_plan_id/item_info_id columns
(mhkim original work shipped without migration DDL), so the re-applied
INSERT would error at runtime. Roll back to jskim-side column list
to keep outbound registration working; getProductionResults endpoint
restoration is unaffected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolved 11 conflicts by taking the jskim side. mhkim-side changes lost
in conflict zones (to be re-applied separately):
backend-node/
- outboundController.ts: source_table/sales_order_id/shipment_plan_id/item_info_id columns in outbound_mng INSERT
- popProductionController.ts: ensureLoadingInstance/insertPackagingRows imports and material auto-input + inventory_stock deduction block
- workInstructionController.ts: getProcessResults function for production-result right panel
- routes/workInstructionRoutes.ts: GET /:wiId/process-results route
frontend/
- COMPANY_7/production/work-instruction/page.tsx: Lock icon, detailId/locked fields on WorkRow, locked column and lock icon in items table
- COMPANY_8/10/16/28/29/production/work-instruction/page.tsx: expandedItems._qty payload (batch-split) replaced by jskim confirmItems.qty + infos
- COMPANY_8/logistics/inbound-outbound/page.tsx: autoFilter true replaced by autoFilter:{enabled:false}
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Updated the outbound and outsourcing outbound controllers to replace `source_type` with `source_table` for improved clarity and consistency in data handling.
- Enhanced the work instruction controller to include automatic migration for the `work_instruction_info` table, allowing for better management of work instruction notes.
- Implemented new logic to handle material input types in the work instruction detail modal, supporting both automatic and manual input methods.
- Added new routes for retrieving work instruction information, facilitating better data retrieval for editing purposes.
(TASK: ERP-node-095, ERP-node-096)
- Added validation for `materialOverrides` in the `save` function of the work instruction controller, ensuring proper structure and required fields.
- Implemented logic to handle the insertion and deletion of material input details based on the provided `materialOverrides`, maintaining data integrity during edits.
- Introduced new routes for retrieving BOM tree and material overrides, enhancing the work instruction management process.
- Updated the frontend to support new material mapping features, including a structured approach for handling BOM substitutes and material inputs.
(TASK: ERP-node-090)
- Added `inventory_unit` to the item selection query in the outbound controller to improve data retrieval.
- Updated the multi-table Excel service to exclude overlapping headers between parent and child levels, ensuring accurate data insertion.
- Introduced new category combobox components for better user interaction in the supplied item page.
- Enhanced the inbound-outbound page to correctly map user IDs, including super admin handling for user information retrieval.
(TASK: ERP-XXX)
- Implemented a new endpoint for batch registration of process equipment, allowing users to add multiple equipment codes at once while skipping duplicates.
- Enhanced error handling to provide detailed feedback on the registration process, including the number of successfully inserted and skipped items.
- Updated the process info routes to include the new batch registration functionality.
(TASK: ERP-node-087)
- Added automatic migration to include a new column `batch_use` in the `item_info` table, allowing for batch usage management.
- Implemented logic to prevent deletion of work instructions that are in progress or completed, ensuring data integrity.
- Enhanced the `getBomBaseQtyMap` function to return batch usage status for items, defaulting to 'Y' if not specified.
- Introduced warnings for overdue items and insufficient production time in the production plan management, allowing users to proceed with caution.
(TASK: ERP-node-074, ERP-node-075, ERP-node-076)
- Introduced new routes for customer contact management, allowing for the retrieval of customer contact information.
- Updated the user management functionality to include validation for the hire date, ensuring proper date format and handling of null values.
- Enhanced the save user functionality to accommodate the new hire date field, maintaining existing values when not provided.
(TASK: ERP-XXX)
- Added checks to ensure that only orders with a positive quantity are included in the order summary by using COALESCE to handle null values.
- Updated the query logic to improve data integrity and accuracy in the order summary results.
(TASK: ERP-XXX)
- Added new fields for delivery details in the shipping order controller, including delivery date, delivery destination ID, and delivery address.
- Implemented validation logic to ensure that only confirmed sales orders can be processed, preventing the registration of shipments for orders that are waiting, canceled, or completed.
- Updated the save functionality to handle new delivery-related fields and improved error handling for blocked orders.
- Enhanced the shipping plan controller to include status checks and automatic updates based on changes in order quantities.
(TASK: ERP-047)
- Introduced helper functions to calculate working days while skipping weekends, improving the accuracy of date calculations in production planning.
- Updated the logic for determining start and end dates based on lead time and production capacity, ensuring that weekend days are excluded from the calculations.
- Refactored existing date calculation code in the `previewSchedule` and `generateSchedule` functions to utilize the new helper methods for better maintainability and clarity.
(TASK: ERP-XXX)
- Updated the shipping order controller to improve customer name retrieval by removing unnecessary partner_id fallback.
- Implemented shipment plan number allocation logic in the shipping plan controller, ensuring unique numbering based on defined rules or fallback mechanisms.
- Enhanced the batch save functionality to include the new shipment plan number in the database insertions.
- Added new state management for production and shipment plans in the Cutting Plan page, allowing for better organization and retrieval of related data.
- Introduced delivery location field in the sales order page, improving data entry for shipping details.
(TASK: ERP-XXX)
- Added new API endpoints to retrieve the work standard tree by item and to copy work standards from a source item to target items, supporting conflict strategies.
- Enhanced the backend logic to handle the retrieval and copying of work standards, including validation for required parameters and error handling.
- Introduced a new modal component in the frontend for managing the copy operation, allowing users to select target items and define conflict resolution strategies.
(TASK: ERP-029)
- Introduced a new API endpoint to retrieve all substitutes for a given BOM ID, allowing for bulk retrieval of substitute items.
- Enhanced the BOM service to support the new functionality, including company code filtering and versioning options.
- Updated the BOM management page to integrate the new substitute retrieval feature, enabling users to manage substitutes more effectively during the copy process.
- Added necessary state management and UI elements for handling substitutes in the copy modal.
(TASK: ERP-028)
- Introduced a new API endpoint to copy a BOM tree to multiple target items, allowing for efficient duplication of BOM structures.
- Implemented payload validation to ensure correct data format and integrity during the copy process.
- Added a modal in the frontend for managing the BOM copy operation, including options for conflict resolution and progress tracking.
- Enhanced the BOM service with necessary logic for handling BOM copies, including versioning and error handling.
(TASK: ERP-028)
- New POP inventory move page and API (popInventoryMoveController, popInventoryMove client) deployed across COMPANY_7/8/9/10/16/29/30
- Updates to shared POP components (PopShell, AcceptProcessModal, ProcessWork) and inout-manage/inventory pages
- COMPANY_7 POP.md updated with new scope notes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Added new routes and controller for subcontractor stock management, including endpoints for vendor summaries, stock details, history, adjustments, and scrap management.
- Integrated the subcontractor stock service to handle business logic related to inventory adjustments and history tracking.
- Developed frontend components for managing subcontractor stock, including modals for adjustments and history viewing, enhancing user interaction and data management.
(TASK: ERP-026)
- Modified the receiving controller to include the `inventory_unit` field in the item selection query.
- Updated the frontend components across multiple company pages to reference the new `inventory_unit` field instead of the previous `unit` field, ensuring consistency in data handling.
- Removed hardcoded company code from API calls to allow for dynamic fetching of item information.
(TASK: ERP-030)
- Added a new endpoint `listOrderStatus` in the `outsourcePurchaseController` to retrieve integrated order status information, including filtering options for source type, order status, and date range.
- Updated the `outsourcePurchaseService` to handle the new order status retrieval logic, ensuring proper filtering and data aggregation.
- Introduced a new route for accessing the order status information in `outsourcePurchaseRoutes`.
- Created a detailed modal for viewing outsourcing purchase order details, enhancing the user interface for better data presentation.
- Developed a registration modal for creating and editing outsourcing purchase orders, featuring a tabbed interface for improved user experience.
(TASK: ERP-025, ERP-019)
- Added new fields for inspection count application and material equipment details in the process work item detail controller and related functions.
- Updated the frontend components to include inspection count and material equipment options, improving the management of inspection processes and material inputs.
- Implemented logic to handle inspection count and material PLC data collection.
(TASK: ERP-021, ERP-022)
- Added new fields for loss quantity auto-collection and PLC data in the process work item detail controller and related functions.
- Updated the frontend components to include loss quantity options in the production result section, allowing for better tracking and management of production losses.
- Implemented multi-upload functionality for images in the inspection management page.
(TASK: ERP-023)
- Added a new endpoint `/work-instruction/bom-base-qty` to retrieve base quantities for items based on their codes.
- Introduced the `getBomBaseQtyMap` function in the `workInstructionController` to handle the logic for fetching base quantities.
- Updated the frontend to call the new API and integrate base quantity mapping into the work instruction registration process.
- Enhanced the work instruction page to calculate batch counts and split quantities based on the retrieved base quantities.
(TASK:ERP-020)
- Introduced a new endpoint `/preview-order-no` to generate order numbers based on registered numbering rules without incrementing the sequence.
- Implemented the `previewOrderNo` function in the `outsourcePurchaseController` to handle the logic for generating the preview order number.
- Updated the `outsourcePurchaseRoutes` to include the new route for previewing order numbers.
- Enhanced the `RegistrationModal` component to automatically fill the order number input with the preview value when the modal opens.
- Added a new API function `previewOrderNo` in the frontend to call the backend endpoint.
(TASK:ERP-019)
- Added a new endpoint to retrieve process materials based on routing details and work order ID.
- Introduced the `getProcessMaterials` function in the `outsourcePurchaseController` to handle the logic for fetching materials.
- Updated the `outsourcePurchaseRoutes` to include the new route for process materials.
- Enhanced the `RegistrationModal` component to toggle material needs and automatically fill materials when required.
(TASK:ERP-019)
- bom_detail_substitute 테이블 신규 (varchar PK, FK 미설정 / 코드 조인)
- 백엔드: 단일 행 substitute CRUD + BOM 단위 갯수 맵 API 5종 추가
- 프론트(COMPANY_7): 트리 행에 '대체 N' 뱃지 + 대체 품목 모달
· 드래그앤드롭으로 우선순위 변경 + 자동 채번/재할당
· 250ms debounce 실시간 검색, 결과 클릭 시 자동 행 추가
· inline blur 저장, zebra 행 구분, sticky 헤더 단색 처리
- 트리뷰 액션 버튼 통합: 가상 루트 선택 시 1레벨, 일반 행 선택 시 하위로 추가
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Added routes for outsource purchase management, including CRUD operations and additional features such as auto-processes and release requests.
- Created the `outsourcePurchaseController` to handle business logic for managing outsource purchase orders.
- Introduced the `outsourcePurchaseService` for service layer operations related to outsource purchases.
- Updated `app.ts` to include the new routes for outsource purchase management.
(TASK:ERP-019)
- Drop item_inspection_info branch in getDefectTypes
- Always source from defect_standard_mng with inspection_type containing 공정검사 (CAT_MMEBA4LJ_UFJ9)
- Fix is_active filter to category code CAT_DA_01 ('사용') — old 'Y' literal returned zero rows
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- outbound: wire 판매출고 to shipment_instruction with customer_mng JOIN, add customer filter, auto-transition shipment_instruction.status to COMPLETED/IN_PROGRESS based on remaining qty
- inspection: fix is_active filter ('Y' -> '사용') and JOIN inspection_standard to expose judgment_criteria
- POP InspectionModal (7 companies): hide measured-value input when judgment_criteria == CAT_JC_03 (O/X)
- POP SalesOutbound (7 companies): connect to /outbound/source/shipment-instructions, fix stale-closure bug in saveToDb via ref
- COMPANY_16/30 main: temporarily comment out 품질/안전관리 menu entries
- Updated the `getQualityReportData` function to utilize `inspection_result_mng` for quality report generation, enhancing data accuracy by aggregating inspection results.
- Refined date handling in the `getOrderSummary` function to improve filtering logic and ensure accurate stock calculations.
- Implemented virtual scrolling in the `TimelineScheduler` component to optimize performance when rendering large datasets.
These changes enhance data retrieval efficiency and user experience across analytics and production planning modules.
진행 중이던 POP 관련 변경사항을 한 번에 묶어 커밋.
- backend
- popProductionController: 생산공정 처리/접수 로직 대폭 갱신 (+663)
- receivingController, popInventoryRoutes, adminService 보강
- popInOutDetailController / popInOutHistoryController 신규
- frontend (POP)
- 생산 화면 (DefectTypeModal / ProcessWork / WorkOrderList / main page)
COMPANY_7/8/9/10/16/29/30 동기화
- 입출고 이력·디테일 화면 신규 (inventory/page, inventory/inout-manage,
InOutDetailModal) 7개사
- COMPANY_7 입고 화면 (InboundCartPage / ProductionInbound /
inbound/production/page) 보강
- COMPANY_7 재고조정 화면 (inventory/adjust) UI 골격 신규
- frontend lib
- popInOutDetail / popInOutHistory API 클라이언트 신규
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Refactored date handling in the InventoryStatusPage to use `toLocaleString` for transaction dates and last in dates, ensuring correct timezone formatting.
- Introduced FormDatePicker in SalesOrderPage for date inputs, enhancing user experience with automatic formatting and improved date handling.
- Added a checkbox for filtering items by customer in SalesOrderPage, allowing users to view only items registered for the selected customer.
This update improves date accuracy and user interaction in the inventory and sales order modules.
- Updated the `getOrderSummary` function to use `NULLIF` for `due_date` to ensure proper handling of empty values.
- Added pagination state management in the Equipment Inspection Record page across multiple company components, including `page`, `pageSize`, and `total` state variables.
This refactor improves data accuracy and user experience in the production planning and equipment inspection modules.
- Updated the `getQualityReportData` function to improve item name retrieval logic by using `NULLIF` for better handling of empty values.
- Refactored the `getEquipmentReportData` function to include company and date filters for equipment statistics, ensuring accurate data aggregation.
- Enhanced the SQL queries for both quality and equipment reports to utilize lateral joins and improve performance.
- Improved loading states in frontend components for inspection records and inspection results across multiple companies.
This refactor enhances data accuracy and user experience in the analytics module.
- 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.
- Updated the analytics report controller to correctly join work_order_process and work_order_process_result for accurate production data retrieval.
- Enhanced the logistics info page to load all tabs on mount for immediate count accuracy, while ensuring only the active tab is reloaded on subsequent changes to prevent race conditions.
This refactor improves data accuracy and user experience in the logistics 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.
gbpark-node(ee8f274f) 머지 시 popProductionController.ts 충돌. 작업 중이던
mhkim 워킹트리 변경분(앞공정 양품 헬퍼/work_instruction 헤더 헬퍼/wi_*
커스텀 템플릿 우선 처리/CTE 기반 getProcessList 등)을 통째로 채택.