LMES Product Information Distribution Process User Guide
1. Overview
The product information distribution process is a set of standard processes customized based on the standard product distribution process of the platform.
The core process steps are:
- Product information is distributed from the ERP system to the intermediate table of the MES system.
- The MES system reads the intermediate table data and writes it to the MES system's product information table.
- The MES system synchronizes the product information to the production line equipment.
2. Process Detailed Design
2.1 Product Information Synchronization
The synchronization of product information is mainly completed through the background job ProductSyncJob.
2.1.1 Job Logic
- Read unpublished product information from the intermediate table
T_ERP_Product. - Iterate through the product information and verify the validity of the data.
- Write valid product information to the MES system product table
T_MES_Product. - Update the status of the intermediate table data to "Processed".
2.1.2 Exception Handling
- If data verification fails, the error information is recorded in the log table
T_MES_SyncLog, and the status of the intermediate table data is updated to "Error". - If a system exception occurs, the transaction is rolled back, and the exception stack is recorded in the system log.
2.2 Synchronization to Equipment
After the product information is successfully written to the MES system, the system will trigger the event ProductCreatedEvent. The event handler ProductToDeviceHandler is responsible for synchronizing the data to the PLC or other terminal devices.
3. Configuration Instructions
Configure the synchronization frequency and database connection string in appsettings.json:
{
"SyncSettings": {
"Interval": 60,
"ErpConnectionString": "..."
}
}
4. FAQ
Q: Why is the product information not synchronized?
A: Please check the T_MES_SyncLog table to see if there are any error records. Check if the ERP database connection is normal.