Authoritative Tutorial: Querying Jky Assembly/Disassembly Inbound Orders — Field Reference
What Problem This Interface Solves
In Jky-to-Kingdee supply chain integration, assembly and disassembly operations generate inbound orders that must flow across systems. The erp.storage.goodsdocin.v2 endpoint, filtered by inouttype=107, precisely retrieves assembly/disassembly inbound orders and their line details (materials, batches, costs, taxes), providing the single source of truth for downstream Kingdee assembly/disassembly order synchronization.
Interface Capabilities Overview
- Authentication: Jky OpenAPI signature auth using AppKey/AppSecret via Header or QueryString.
- Request Structure: POST-style query with body parameters
startDate,endDate,inouttype,pageIndex,pageSize,selelctFields,goodsDocNo. - Response Structure: JSON returning the main header plus the
goodsDocDetailListarray, withhasNextas pagination flag. - Pagination/Incremental Mode: Time-range based pagination,
pageIndexstarting at 0, defaultpageSize100; the incremental cursor advances on{{LAST_SYNC_TIME}}. - Execution Cadence: Cron
1-59/5 6-23 * * *, every 5 minutes from 06:00 to 23:00 daily.
Typical Field Mappings
| Field | Type | Meaning | Practical Notes |
|---|---|---|---|
| recId | string | Header primary key | Unique identifier, anchor for cross-system reconciliation |
| goodsdocNo | string | Inbound order number | Business code used by external systems |
| billNo | string | Related order number | Links to assembly/disassembly order, key for Kingdee mapping |
| inouttype | string | Inbound type | Hardcoded to 107 in this strategy |
| gmtCreate | string | Creation time | Baseline timestamp for incremental sync |
| gmtModified | string | Last modified | Combine with red/finance status changes |
| redStatus | string | Red-invoice status | 1 blue / 2 reversed / 9 reversing; recommend filtering |
| financeBillStatus | string | Finance status | 1/11/21/25/31; affects cost and tax fields |
| warehouseCode | string | Warehouse code | Stable key for Kingdee warehouse mapping |
| companyCode | string | Organization code | Required in multi-org scenarios |
| goodsDocDetailList.recId | string | Line primary key | Uniqueness anchor for detail rows |
| goodsNo | string | Material code | Key for Kingdee material mapping |
| skuId / skuBarcode | string | SKU ID / barcode | Essential for multi-SKU scenarios |
| batchNo | string | Batch number | Batch management and shelf-life traceability |
| quantity | string | Quantity | String type — must be converted to numeric |
| estPrice / estCost / estTax | string | Estimated price/cost/tax | Distinct from transactional trans* fields |
| transHasTaxAmount | string | Tax-included amount | Aligns with Kingdee amount field |
How to Configure on Qeasy
On the Qeasy Data Integration Platform, this interface is typically wrapped as the "Jky Inbound Order Query Adapter", with a pre-built request template and field mapper for erp.storage.goodsdocin.v2. In the strategy editor:
- Select source system "Jky" → interface "Inbound Order Query v2";
- Pin
inouttype=107in the request panel and bindstartDate/endDateto Qeasy's built-inLAST_SYNC_TIME/CURRENT_TIMEvariables; - Qeasy's field mapper automatically expands
goodsDocDetailListas a nested header/detail structure and offers quick bindings such as "primary key → id" and "business code → number" on the mapping canvas; - Because the Target is configured as a "no-op write" (a pure query strategy), no target write configuration is needed; the result dataset is consumed by downstream strategies (e.g., "Jky Assembly Order → Kingdee Assembly Order").
Cross-Scenario Best Practices
- Hardcode inbound type to 107: Across multiple customer projects, mistyped
inouttypehas caused data mixing with unrelated business documents. - Prefer
gmtCreateovergmtModifiedfor incremental sync: A consistent finding is thatgmtModifiedcan roll back (e.g., on un-approval), causing missed records. - Always declare detail fields in
selelctFields: Without explicit fields, some responses omitgoodsDocDetailList, breaking downstream reconciliation. pageSize=100is the performance sweet spot: Below 50 wastes requests; above 100 risks throttling.- Use both
hasNextandpageIndex: Relying solely onhasNextmisses the last full page. - Filter
redStatus=9: Without filtering, reversing orders create duplicate inbound postings in Kingdee.
Pitfalls and Resolutions
- Pitfall 1: Misaligned incremental watermark. A retail client used
gmtModified, but reversing writes caused timestamps to roll back, producing missed records. The fix is to standardize ongmtCreate, with a one-time full pull before switching to incremental. - Pitfall 2: Empty detail array. Another client omitted detail fields in
selelctFields, so the API returned only the header. The fix is to explicitly includegoodsDocDetailList.recId,goodsNo,quantity, etc. - Pitfall 3: String arithmetic on quantity. Because
quantityis a string,1+1becomes11. Enable Qeasy mapper's numeric conversion or callparseFloatin the script. - Pitfall 4: Wrong cost field.
estCostis the estimated cost; transactional cost must come fromtransHasTaxAmount/transNoTaxAmount. - Pitfall 5: Cross-org warehouse collision. A multi-org client did not pass
companyCode, so same-coded warehouses across organizations overwrote each other. Fix: always include the company dimension in request parameters.
When to Use
Suitable for private-deployment supply chain integrations where Jky assembly/disassembly inbound orders must synchronize into Kingdee. If only inventory ledger snapshots are needed, prefer the inventory snapshot interface to reduce bandwidth and reconciliation complexity.