Kingdee Cloud Operation Planning Query Interface Field Manual: Full-Link Practice from executeBillQuery to MySQL
What This Interface Solves
The Operation Planning query interface pulls process planning data from Kingdee Cloud (including production orders, operations, work centers, and qualified quantities) into MySQL on a modification-date incremental basis. It enables MES, planning dashboards, and sales reconciliation systems to perform traceability, statistics, and execution monitoring based on a unified process detail table. It is a critical link in the traceability chain of Sales Order → Production Order → Operation Plan.
Interface Capability Overview
- Authentication: Kingdee Cloud WebAPI, typically using a third-party account with tenant authorization, with App ID and secret passed in request headers.
- Request Endpoint:
/k3cloud/Kingdee.BOS.WebApi.ServicesStub.DynamicFormService.executeBillQuery.common.kdsvc. - Input Structure: Core parameters are
FormId,FilterString,FieldKeys,OrderString,Top,StartRow,Limit. - Return Structure: JSON array, each record corresponding to one Operation Planning entry row.
- Pagination/Incremental Mode: Pagination via
Top + StartRow + Limit; incremental driven by FilterString likeFModifyDate >= '{{DAYS_AGO_s10|datetime}}' and FSaleOrderNumber <> '', combined with a scheduled task (commonly*/16 7-22 * * *in real scenarios, every 16 minutes during business hours).
Typical Field Mapping
| Field Name | Type | Meaning | Practical Notes |
|---|---|---|---|
| FID | string | Master table inner key | Unique within Kingdee; recommended as hash key for cross-system reconciliation |
| FSubEntity_FDetailID | string | Entry detail ID | Corresponds to metadata id; unique at document level |
| FBillNo | string | Operation plan document number | Corresponds to metadata number; commonly used as business document number |
| FMONumber | string | Production order number | Combined with FMOEntrySeq locates the production order line |
| FMOEntrySeq | string | Production order line number | Stored as string, watch leading zeros |
| FMOQty | string | Header quantity | Carried in entry rows too, easy to double-count during capacity planning |
| FSaleOrderNumber | string | Demand order number | One of the key incremental filter fields |
| F_QOQG_Text2 | string | Customer short name | Custom field, varies by tenant |
| FProductId_FNumber / FProductId_FName | string | Product code / name | Recommend storing both for search and display |
| FProcessId_FName | string | Operation/process name | Used for routing reconstruction |
| FOperDescription | string | Operation description | May contain special characters; watch encoding |
| FOperUnitId_FName | string | Operation unit | pcs, kg, etc. |
| FProcessOrgId_FNumber | string | Processing organization | Must be stored for multi-org tenants |
| FWorkCenterId_FNumber | string | Work center code | Primary dimension for scheduling/capacity analysis |
| FOperQty | string | Operation quantity | Planned quantity, note difference from FMOQty |
| FQualifiedQty | string | Qualified quantity | Completed and inspected |
| FOperStatus | string | Operation execution status | Common: Not Started / In Progress / Completed |
| FAPPROVERID / FCREATEDATE / FApproveDate | string | Approver / Create / Approve date | Audit fields for change tracking |
How to Configure on QeasyCloud
- Adapter Encapsulation: QeasyCloud Data Integration Platform has a built-in "Kingdee Cloud WebAPI" adapter. You can directly select the
executeBillQueryaction, setFormId = SFC_OperationPlanning, and skip writing HTTP clients and signing logic manually. - Field Mapper: Source metadata fields like FID/FBillNo and entry fields like FSubEntity_FDetailID are auto-parsed. The target MySQL table
process_plan_detailcan be bound via drag-and-drop in the mapper. Common concept mappings such asFProductId_FNumber → product_codeandFProcessId_FName → process_namecan reuse platform-built naming templates. - FilterString Template: QeasyCloud supports variable interpolation like
{{DAYS_AGO_s10|datetime}}, turning "last 10 minutes of modifications" into a configurable parameter, then layering the business filterFSaleOrderNumber <> ''on top, so every tenant does not have to rewrite SQL. - Scheduling and Pagination: The adapter directly configures
StartRow/Limitpagination and scheduling policies (the common*/16 7-22 * * *pattern runs every 16 minutes during business hours), and automatically merges paginated results into the target database.
Cross-Strategy Practical Highlights
- Always Combine Primary Keys: Only
FBillNo + FSubEntity_FDetailIDuniquely locks one row in Kingdee; usingFBillNoalone will collide at the entry dimension. - End-to-End Traceability: FMONumber → FSaleOrderNumber must both land in MySQL, so downstream sales reconciliation and plan write-back do not need to query Kingdee again.
- Store Quantities and Units Separately: FOperQty/FQualifiedQty/FMOQty are stored as strings to avoid front-end conversion; FOperUnitId_FName in its own column for unit-based aggregation.
- Choose Incremental Fields Carefully: FModifyDate is more stable than FCREATEDATE and covers unapprove/modify scenarios; add document status filter when needed to reduce empty runs.
- Dictionary Table for Status Fields: FOperStatus enumerations differ across tenants and versions. The stable practice is to maintain a mapping dictionary in QeasyCloud rather than hardcoding.
- Work Center is the Primary Key for Capacity Analysis: Storing FWorkCenterId_FNumber + FProcessOrgId_FNumber combination as the fact-table primary key supports later OEE and bottleneck analysis.
Pitfall Review
- Missing Entry Primary Key: Only using FID as primary key causes conflicts in MySQL; always include FSubEntity_FDetailID.
- Quantity Fields Treated as Numbers for Aggregation: FMOQty repeats in entry rows, so direct SUM multiplies by N. Deduplicate or read from header before aggregating.
- FilterString Time Window Drift: Building
FModifyDatewith local timezone easily misses records. Use UTC or Kingdee server timezone and keep a 2-5 minute overlap window. - Inconsistent Custom Field Names: Fields like F_QOQG_Text2 have different meanings across tenants (customer short name vs. remark). In QeasyCloud, add notes in the field mapper and allow manual overrides.
- Status Enumeration Changes: After Kingdee version upgrades, FOperStatus gains new statuses; old downstream consumers crash without tolerance. Normalize enumerations in the QeasyCloud field mapper before landing.
When to Use
Use this interface when you need to sync Kingdee Cloud's Operation Planning data into your own data warehouse or MES at the entry granularity, while preserving the sales order traceability chain and work center dimensions. If you only need document-level summaries or real-time inventory snapshots, switch to Kingdee's instant inventory query or other aggregate interfaces.