1311 Commits

Author SHA1 Message Date
kjs
629bc25cd5 Implement BOM base quantity retrieval functionality
- 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)
2026-05-07 12:01:03 +09:00
kjs
91dc6a6d90 Merge branch 'gbpark-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-05-06 18:33:54 +09:00
kjs
fa0a28df42 Add preview functionality for outsource purchase order numbers
- 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)
2026-05-06 18:33:23 +09:00
kjs
970a8f708a Implement process materials auto-fill functionality for outsource purchase orders
- 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)
2026-05-06 18:09:23 +09:00
DDD1542
17173be350 feat(bom): COMPANY_7 BOM에 대체 품목 관리 기능 추가
- 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>
2026-05-06 17:32:10 +09:00
kjs
4ad669361d Implement outsource purchase management functionality
- 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)
2026-05-06 16:16:13 +09:00
kjs
92f73af633 Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-30 10:55:12 +09:00
kmh
ce9516802a Bundle POP sales outbound + inspection wiring
- 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
2026-04-30 10:54:21 +09:00
kjs
8daf26af2a Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node
receivingController: production-receiving query 충돌 해소 — mhkim-node 채택 (raw row 기반 + is_rework/prev_skipped 노출). wopr_agg JOIN은 미사용 상태로 유지.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 21:13:01 +09:00
kjs
d549947fac Refactor analytics report and production plan services for improved data handling
- 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.
2026-04-29 21:05:38 +09:00
kmh
854366453c Bundle pending POP work: production / inventory inout / inbound
진행 중이던 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>
2026-04-29 18:54:54 +09:00
kjs
6ddc84f285 Update date handling in inventory and sales order pages
- 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.
2026-04-29 18:20:01 +09:00
kjs
198cb92a91 Refactor production plan service to handle empty due dates
- 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.
2026-04-29 13:59:52 +09:00
kjs
5dfae5e6b6 Refactor analytics report data retrieval and enhance equipment report logic
- 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.
2026-04-28 20:20:10 +09:00
kjs
310f644508 Implement item inspection information feature with server-side pagination
- 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.
2026-04-28 18:42:25 +09:00
kjs
0b7c967f56 Refactor analytics report data retrieval and improve logistics info page loading logic
- 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.
2026-04-28 18:15:22 +09:00
kjs
bf8d99ccf5 Implement KPI daily production feature
- 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.
2026-04-28 16:14:27 +09:00
kjs
4afb0f5ca4 Implement server-side pagination for order summaries, plans, and shipping orders
- 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.
2026-04-28 13:59:34 +09:00
kmh
9ed9915c98 refactor(pop): keep mhkim WIP popProductionController over gbpark merge
gbpark-node(ee8f274f) 머지 시 popProductionController.ts 충돌. 작업 중이던
mhkim 워킹트리 변경분(앞공정 양품 헬퍼/work_instruction 헤더 헬퍼/wi_*
커스텀 템플릿 우선 처리/CTE 기반 getProcessList 등)을 통째로 채택.
2026-04-27 16:49:56 +09:00
DDD1542
ee8f274feb 매미킴 2026-04-27 16:15:42 +09:00
DDD1542
34a44e0d9c Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into gbpark-node 2026-04-27 14:46:26 +09:00
kmh
e18a62f56f refactor(pop): trim main page widgets, drop layout auto-clone
- Remove KpiCarousel/RecentActivity from pop main pages (7 companies)
- Empty banner default; rename settings key home -> main
- Strip API fetch/cache from usePopSettings, return hardcoded defaults
- Drop screen_layouts_pop auto-clone/fallback for regular users
- Add SUPER_ADMIN direct-entry branch in AppLayout pop handler

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 14:45:00 +09:00
kjs
346a1314a2 Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-26 18:33:52 +09:00
kmh
dcbcdb2f52 refactor(pop): isolate new shell, add super-admin entry, drop /pop fallback
- per-company PopShell copies under (main)/COMPANY_*/pop/_components/common/
  (no longer imports @/components/pop/hardcoded/PopShell)
- new components/pop/shell/CompanySwitchModal for new POP entry
- AppLayout: SUPER_ADMIN POP-mode toggle + company-select modal flow
- usePopSettings: handle /COMPANY_X/pop/<tail> URLs (extractScreenKey)
- authController + AppLayout: drop legacy /pop fallback;
  use /\${companyCode}/pop/main when childMenus>1 lacks [POP_LANDING]

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 15:07:44 +09:00
kjs
5f4838cb19 feat(pop): implement process list and result retrieval endpoints
- Added `getProcessList` to retrieve the list of work order processes along with their results, grouped by process ID.
- Implemented `getProcessResult` to fetch details of a specific work order process result by its ID.
- Updated `popProductionRoutes` to enable the new endpoints for accessing process data.

These additions enhance the functionality of the POP production module, allowing for better tracking and management of work order processes and their results.
2026-04-24 18:48:43 +09:00
kjs
5518288f18 refactor(pop): update popProductionController and routes
- Changed the `copyChecklistToSplit` function to be exported for better accessibility.
- Temporarily commented out the `getProcessList` and `getProcessResult` routes in `popProductionRoutes` due to missing implementations, with a note for future restoration.
- Updated the loop in `salesOrderBulkService` to use `Array.from()` for better clarity in iterating over entries.

These changes aim to improve code organization and maintainability while addressing current implementation gaps.
2026-04-24 18:23:32 +09:00
kjs
f922841d8d Merge branch 'mhkim-node' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-24 17:59:00 +09:00
kjs
7e3a503adc feat: Add sales order bulk upload functionality
- Introduced a new controller for handling bulk uploads of sales orders via Excel, allowing users to efficiently manage large volumes of sales data.
- Implemented validation to ensure required fields are present and provided appropriate error messages for missing data.
- Enhanced the service layer to support item creation and master data management during the upload process.
- Updated routes to include a new endpoint for the bulk upload feature, ensuring secure access through token authentication.

These changes aim to streamline the sales order management process and improve user experience when handling bulk data uploads.
2026-04-24 17:58:11 +09:00
kmh
cb5331778f chore(ops): allow skipping AI assistant boot via env, drop stale peer flag 2026-04-24 15:00:50 +09:00
kmh
6656a525a2 feat(backend/work-instruction): re-project master checklist snapshot on wi edit 2026-04-24 15:00:38 +09:00
kmh
450f1fe9f5 feat(backend/receiving): normalize type via category resolver, rollback source on qty edit, aggregate production received_qty 2026-04-24 15:00:34 +09:00
kjs
37ca354af9 feat: Implement cutting plan management and work instruction modal
- Introduced a new cutting plan management page for COMPANY_9, allowing users to manage cutting plans effectively.
- Added a Work Instruction Apply Modal to facilitate the application of work instructions linked to cutting plans.
- Enhanced data handling by incorporating additional fields such as condition_unit, condition_base_value, condition_tolerance, condition_auto_collect, and condition_plc_data in relevant controllers and database interactions.
- Updated UI components to support new features, including displaying batch numbers and item sizes in the work instruction page.

These changes aim to improve the efficiency and usability of cutting plan and work instruction management processes.
2026-04-24 11:12:32 +09:00
kjs
4a9e3768a9 feat: Optimize batch management and improve performance
- Reduced timeout for RestApiConnector to 20 seconds to ensure timely feedback for previews.
- Implemented caching for external DB metadata to minimize connection overhead and improve response times.
- Enhanced internal DB table and column retrieval with TTL caching to prevent database pool exhaustion.
- Introduced error handling for external DB timeouts, providing clearer feedback to users.
- Updated batch management UI to improve user experience with better error messages and streamlined data handling.

These changes aim to enhance the efficiency and reliability of batch management processes.
2026-04-23 18:24:32 +09:00
kjs
c618283306 feat: Refactor work process and item inspection logic
- 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.
2026-04-23 17:36:04 +09:00
DDD1542
2efe30e282 2026-04-23 14:32:52 +09:00
DDD1542
b3de4fc6d8 Merge remote-tracking branch 'origin/jskim-node' into gbpark-node 2026-04-23 14:03:57 +09:00
DDD1542
28c1c8c029 feat: Add cutting plan management for COMPANY_30
- Cutting optimization (Guillotine FFDH) with mixed/homogeneous modes
- Remnant management with persistence (cutting_plan_sheet.remnants JSONB)
- Work instruction creation linked via batch_no/cutting_plan_id

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 14:03:45 +09:00
kmh
b493ac930a Merge branch 'jskim-node' of https://g.wace.me/jskim/vexplor_dev into mhkim-node 2026-04-22 14:55:32 +09:00
kmh
4ed4d5f66e WIP: POP + packaging 작업 중
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 14:55:28 +09:00
kjs
d9ced89a95 feat: Enhance packaging and work instruction functionality
- 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.
2026-04-22 14:49:40 +09:00
kjs
84a3b12346 Merge branch 'main' of https://g.wace.me/jskim/vexplor_dev into jskim-node 2026-04-22 12:27:36 +09:00
kjs
3b796ca9e3 feat: Add outsourcing outbound functionality
- 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.
2026-04-22 09:27:45 +09:00
kjs
08e601eab8 feat: Refactor production report data retrieval logic
- Updated the `getProductionReportData` function to utilize the `work_order_process` table for accurate production data retrieval.
- Enhanced the SQL query to include new fields such as `process_name`, `equipment_name`, and `plan_qty`, improving the detail and accuracy of the production report.
- Adjusted date and company filters to align with the new data structure, ensuring proper data segregation and retrieval based on company codes.
- Improved handling of equipment and item information by incorporating lateral joins for better data accuracy and representation.
2026-04-21 14:15:57 +09:00
kjs
a863427c4f feat: Update equipment handling in process management
- Enhanced the `getProcessEquipments` function to support matching both legacy equipment codes and new IDs, improving data retrieval accuracy.
- Updated the `availableEquipments` logic in the `ProcessMasterTab` component to handle both equipment codes and IDs, ensuring a seamless user experience when adding equipment.
- Improved error handling for equipment selection, providing user feedback when a selected equipment cannot be found.
- Refactored the display of equipment names to ensure accurate representation, even when equipment codes are not available.
2026-04-21 13:54:14 +09:00
kjs
51c4fddde0 feat: Add report cell value management functionality
- Introduced a new controller for managing custom input values in report cells, allowing users to retrieve and upsert values associated with specific reports and targets.
- Implemented API routes for fetching and saving report cell values, ensuring proper authentication and data handling.
- Enhanced the frontend components to support the new report cell input functionality, including the ability to edit and save input values in a modal.
- Updated inventory and equipment management pages to include new features for handling missing items and managing warehouse locations effectively.
2026-04-20 17:59:28 +09:00
kjs
68bc857eae feat: Implement pagination and enhanced keyword search in work instruction retrieval
- 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.
2026-04-20 14:51:32 +09:00
kjs
9737805bf9 feat: Enhance outbound and receiving update functionalities with inventory adjustments
- 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.
2026-04-20 14:14:24 +09:00
kjs
48b9ba3d2a feat: Enhance routing details and subcontractor mapping functionality
- 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.
2026-04-17 18:25:35 +09:00
kjs
173b85b476 feat: Implement copy functionality for item inspection information
- 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.
2026-04-17 13:11:01 +09:00
kjs
b158b0aa77 feat: Enhance mold serial summary retrieval and improve category handling
- Updated the `getMoldSerialSummary` function to dynamically retrieve category values for mold statuses and operations, allowing for more flexible data aggregation.
- Implemented a mapping mechanism to categorize status codes based on their labels, improving the clarity of the summary results.
- Adjusted SQL queries to utilize the new category mappings for more accurate counts of mold statuses.
- Refactored the packaging and loading unit deletion logic to handle company code checks more efficiently, ensuring proper data access control.
2026-04-16 18:23:20 +09:00