From Kingdee Receipt Notice to MES Inspection Task: A Single-Strategy Deep Dive into Master Data Sync
What This Strategy Solves
In one manufacturing client, the receiving workflow used to be this: the warehouse entered a "Receipt Notice" in Kingdee Cloud, and QC staff then hand-copied the data into MES as "Inspection Tasks." During a real engagement, we found the error rate in manual transcription was non-trivial — most commonly a missing digit in the material code or a misplaced decimal in the received quantity, which caused duplicate inspection tasks and a growing backlog on the MES side.
The goal of this strategy is direct: once a Kingdee receipt notice is approved, the data flows automatically into MES as a pending inspection task. The entire pipeline is hosted on the Qeasy Data Integration Platform. The source side hits Kingdee's executeBillQuery interface; the target side calls the MES creatQmsInspectTaskDto write interface. Qeasy sits in the middle to handle field alignment and exception isolation.
Data Flow and Field Mapping (Source → Middle Layer → Target)
Overall direction: Kingdee Cloud (B) → Qeasy middle layer → MES (A), a B_TO_A mixed sync of master data and transactional documents.
Key fields pulled from Kingdee, declared through Qeasy's request configuration:
| Source Field (Kingdee Cloud) | Meaning | Target Field (MES) | Meaning |
|---|---|---|---|
FBillNo | Bill number | inspectNo | Inspection slip number |
FMaterialId.FmasterID | Material master key | materialUuid | Material UUID |
FMATERIALID.FNumber | Material code | (passed through) | For traceability |
FStockOrgId.FNumber | Receiving org | companyCode | Company code |
FStockId (inside FDetailEntity) | Stock receipt key | receiveInvDetailUuid | Stock receipt UUID |
FActlandQty | Actual received qty | inspectNum | Inspection qty |
| (not in source, sample value in target) | — | inspectWeight | Inspection weight |
Once the middle layer receives the source data, it does three things: filters out unapproved or voided documents via FDocumentStatus, runs code mapping (material code → material UUID), and performs idempotent deduplication using FDetailEntity_FEntryID to prevent duplicate task creation.
How to Configure It on Qeasy
- Register the source platform: Add the Kingdee Cloud adapter, fill in authentication info (private-deployment intranet address — never write it into the strategy file), pick the
executeBillQueryinterface, POST method. - Declare request fields: In the metadata
requestarray, list every source field from the table above. Markis_requiredaccording to business needs, and put the real Kingdee field path invalue(e.g.,FMaterialId.FmasterID). - Register the target platform: Add "MES (API)" with the interface
/api/creatQmsInspectTaskDto, POST, effect set toEXECUTE. - Field mapping and variable interpolation: Write target
valueas{{source field}}templates (e.g.,{{FBillNo}},{{FActlandQty}}). For fixed values likecompanyCode, write the constant directly. - Enable idempotency and write-back: Set the source
FDetailEntity_FEntryIDas the primary key withidCheck = true. Qeasy uses the key to decide insert vs. update, avoiding duplicate triggers. - Exception handling: Enable retry with "document-level isolation" — one failed document won't take down the whole batch. Failed entries can be inspected in the Qeasy log center.
Implementation Steps
We usually run in four phases to avoid breaking both sides' ledgers on day one.
Phase 1: Anchor the incremental starting point. Pick a "business time anchor" in Kingdee (e.g., documents approved after 2025-09-01) and use FDate with FDocumentStatus='B' for the initial incremental pull. Clear the historical data day by day first.
Phase 2: Full-volume drill run. Pick an off-peak window (typically the early morning), trigger a manual full run, and reconcile the row counts between Qeasy logs and the Kingdee query result. A typical mistake here is going live with full volume immediately, only to discover missing mapped fields that pollute the MES side.
Phase 3: Bring up the schedule. The strategy's crontab is * 7-22 * * * — once per hour between 07:00 and 22:00. This covers normal business hours and leaves both Kingdee and MES free for nightly maintenance.
Phase 4: Dual-track increment + full reconciliation. Daily incremental pulls (by FDate); weekly full reconciliation (verifies the full set, with differences escalated as manual tickets). This "increment and full-volume dual-track" pattern is one of the most common operating models among Qeasy customers.
Lessons from the Trenches
- Always write the full Kingdee field path. A teammate once wrote
FMaterialIdinstead ofFMaterialId.FmasterID, and the result came back all null. The safe approach is to run a query in Kingdee's query assistant first, paste the real JSON response into Qeasy's field detector, and let it auto-identify. - Map header and body in separate phases. A receipt notice has a header + body structure, and material/qty live inside the body (
FDetailEntity). Early on we putFStockIdin the header slot, which made every targetreceiveInvDetailUuidempty. Switching to Qeasy's "header-body phased" configuration fixed it. - Centralize code mapping management. Don't scatter material code → UUID mappings across strategy scripts. Put them in Qeasy's "Code Mapping Center" — otherwise adding a batch of materials means editing N strategies.
- Don't hardcode
companyCodein production. Different private-deployment environments use differentcompanyCodevalues. The safe approach is to put it in an environment variable, so test values never leak into production. - Use a time window with hourly scheduling.
* 7-22 * * *is friendlier than0 * * * *(firing on the hour at all times): it covers business hours while spreading the load off the Kingdee side.
When This Applies — and When It Doesn't
Applies: Manufacturers that use Kingdee Cloud as the ERP backbone and MES as the shop-floor system, where the receipt notice is the single shared document between them.
Does not apply: Custom Kingdee fields not exposed via the standard interface; scenarios where MES inspection requires pre-allocation of inventory first; or situations where the material code has not yet been set up in MES (in that case, run the material master data strategy first).