Drafting Process Documents and Exception Reports for Production Planning and Shop Scheduling: Deployment and Upgrade

This category of data originates from enterprise ERP order and inventory systems, BOM lists and process routes, equipment capacity ledgers, staff

What this category of data looks like

This category of data originates from enterprise ERP order and inventory systems, BOM lists and process routes, equipment capacity ledgers, staff shift schedules, work-in-progress inventory, and supplier arrival records. Daily processed documents include sales orders, master production schedules, material requirements plans, weekly scheduling sheets, work orders, material shortage lists, and delivery change notices. Each document includes fields such as process number, capacity working hours, material code, and team number. Data updates occur daily, weekly, or in real time when orders are placed or exceptions arise.

What constraints these characteristics impose during deployment and upgrade

Data sources for this category are scattered, and update rhythms vary. The category includes both batch-imported historical scheduling data and real-time triggered exception report data. Deployment must adapt to high-concurrency database connection and cache configurations. Processed document formats are diverse, from structured Excel scheduling sheets to unstructured process description documents. Deployment requires a multi-format compatible file parsing module. Data involves sensitive production planning and exception information. Deployment needs fine-grained access permissions to block unauthorized access to core production data. During upgrades, compatibility with historical business data must be maintained to avoid loss of core data such as work orders and scheduling sheets during version updates.

How to set the configurations

Configuration ItemRecommended SettingRationale
MONGODB_URImongodb://[username]:[password]@[host address]:[port]/fastgpt?authSource=adminStores structured business data such as work orders, scheduling sheets, and exception reports. Requires specifying the authentication source and database name
PG_URLpostgresql://[username]:[password]@[host address]:[port]/fastgptRelational database connection for storing structured business data, adapted for complex queries in certain scenarios
REDIS_URLredis://:[password]@[host address]:[port]/0Caches real-time updated equipment capacity and staff shift data to reduce pressure on concurrent database read and write operations
DB_MAX_LINK20–30This category of data has frequent concurrent read and write operations. Prevents service interruptions caused by exhausted database connections
STORAGE_S3_ENDPOINTFill in according to the enterprise's self-built object storage addressStores process documents, exception report attachments, and historical scheduling records. Adapts to the enterprise's existing storage architecture
FILE_TOKEN_KEYRandomly generated 32-bit stringEncrypts file download links to prevent unauthorized access to sensitive production data

Three common mistakes

  • Symptom: When connecting a local large model via OneAPI, application debugging is unresponsive, and an error prompt indicates session timeout. Cause: REDIS_URL is not configured correctly, leading to invalid context caching for large model calls and inability to maintain session state.
  • Symptom: Published assistants can be accessed by unauthorized users to view full scheduling data. Cause: File access permissions are not configured via FILE_TOKEN_KEY, and the usage scope of ROOT_KEY is not restricted, resulting in failed permission control.
  • Symptom: Imported material shortage lists have missing fields or garbled text. Cause: The storage protocol for STORAGE_S3_ENDPOINT is not adapted, leading to failure to properly read process document attachments and affecting content generation for exception reports.

How to confirm the configuration is complete

  • Log in to the FastGPT v4.17.0 backend management panel, access the database connection status module, and confirm that the connection test results for MONGODB_URI and PG_URL show normal.
  • Upload a test work order document, trigger the exception report generation process, and check whether the returned results include correct process numbers, material codes, and capacity requirements.
  • Create a temporary test account, verify that the account can only access authorized production plan data, and cannot view unauthorized weekly scheduling sheets or delivery change notices.
  • Restart the FastGPT service, check the cache indicator panel corresponding to REDIS_URL, and confirm that the cache update frequency of real-time capacity data meets business requirements.

The values provided are common starting points and should be measured against the reader's own samples.