MES Quality Inspection Sync to Kingdee Other Inbound Orders: A Practical Qeasy-Based On-Premise Integration Guide
What This Strategy Solves
On a discrete manufacturing shop floor, in-process quality inspection is a hard gate: after each process step, items must be inspected, and only the qualified ones are moved into stock while defects go to rework or scrap. The MES records every inspection result, but finance and warehouse accounting only look at inbound orders in Kingdee Cloud. Manual transcription is slow and error-prone. What we address here is pushing MES inspection records with non-empty process steps, at document granularity, into Kingdee Cloud's Other Inbound Orders, so that inventory is posted the same day and reports stay current.
Data Flow and Field Mapping
The overall flow is MES (source) → Qeasy middleware → Kingdee Cloud (target). The source side pulls inspection records by inspectNo through the common/search interface, and the target side calls batchSave to write Other Inbound Orders.
| Dimension | MES Source Field | Middle Layer | Kingdee Target Field |
|---|---|---|---|
| Header | inspectNo (inspection number) | Used as document number | FBillNo |
| Doc Type | — | Fixed value | FBillTypeID = QTRKD01_SYS |
| Stock Org | — | Default config | FStockOrgId = 100 |
| Pick Org | — | Default config | FPickOrgId = 100 |
| Owner Type | — | Fixed base data | FOwnerTypeIdHead = BD_OwnerOrg |
| Body | Process, material, qualified qty | Filter non-empty process, then map | FEntity detail rows |
Qeasy handles three things here: extraction, filtering, and mapping. On the source side, pageSize=100 paginates the pull; on the target side, buildModel=true auto-builds the document body model. Encoding mappings are maintained centrally on the platform—one of the most common patterns among Qeasy customers—to avoid scattering mappings across scripts.
How to Configure in Qeasy
In the Qeasy Data Integration platform, on the "New Strategy" page, configure by these key points:
- Source connection: Select the MES platform, interface
common/search, methodPOST, paginate withpageNum/pageSizedefaults;wsIdandqueryKeyare filled according to the on-site environment (actual values must be confirmed in the customer's on-premise environment, placeholders used here). - Target connection: Select Kingdee Cloud, interface
batchSave, methodPOST, enablebuildModelso the platform assembles the document body automatically. - Filter condition: Add the "process step not empty" filter in the source
paramsto drop unqualified records and empty-process documents before they reach Kingdee. - Field mapping: Map
inspectNotoFBillNo; document type, stock org, and other base data use fixed values. - Encoding mapping: Material codes, warehouse codes, and owner codes are maintained in the platform's mapping center for easy adjustment later.
Implementation Steps
We recommend a phased rollout:
Phase 1: Incremental starting point initialization. Pick a business date as the starting point (e.g., last Monday), run a small-batch verification first to confirm source pagination is stable and the target document body is generated correctly. Never go straight to full load here—dumping years of history at once can overwhelm Kingdee.
Phase 2: Full-load trigger and reconciliation. Run a historical full load during off-peak hours (weekend or night), combined with Kingdee's document number de-duplication to block duplicate documents. We suggest enabling Qeasy's logging and reconciliation at the same time, comparing quantities between both sides record by record.
Phase 3: Routine scheduling. Set the crontab to * 7-22 * * *, triggering hourly between 7 AM and 10 PM daily. This strategy serves the requirement of posting inspection results on the same day—running more frequently is unnecessary, less frequent hurts inventory timeliness. Another common pattern among Qeasy customers is "incremental plus full-load dual track": scheduled jobs run increments, and a manual or timed task runs full load monthly as a safety net.
Pitfalls and Lessons
- No "process step not empty" filter. A typical mistake is pushing all inspection records, which creates rows with empty process steps in the inbound order and causes Kingdee to error out. The safe approach is to filter in the source
params. - Document number collision. The same
inspectNomay already exist in Kingdee from manual entry, and Qeasy pushing it again causes a conflict. We recommend evaluatingidCheck=truetogether with Kingdee's "allow duplicate save" setting. - Hardcoded stock organization. Hardcoding
FStockOrgIdas100causes all documents to land in the wrong org once a multi-org enterprise switches orgs. The safe approach is to take the org from MES business fields, or maintain an org routing table in Qeasy. - Forgotten pagination parameters. Default
pageSizeof 100 easily causes record loss on overflow. Validate with a small batch before scaling up. - On-premise network jitter. When MES and Kingdee sit in different network segments, the Qeasy runtime node needs to reach both. We recommend deploying the Qeasy runtime node inside the customer's private network to avoid public internet traversal.
Applicable and Non-Applicable Scenarios
Applicable: Multi-process discrete manufacturing, where finished lines are immediately inspected and need same-day inbound posting; Kingdee serves as the ERP ledger of record and MES as the execution system, with unidirectional data flow.
Not applicable: Single-process small-batch production, MES and Kingdee deployed in the same database with direct interface calls, or scenarios where inspection results need to be written back to MES for traceability—the latter usually requires bidirectional sync strategies, and unidirectional push is not enough.