Qeasy Cloud
Get Started

Authoritative Tutorial on the Jky Assembly/Disassembly Outbound Query Interface: Field Handbook for Yonyou NCC Integration

· Engineering Best Practices· 19 views· 5 min read
吉客云用友NCC接口字段手册轻易云供应链集成组装拆卸出库

What Problem Does This Interface Solve

In a Jky-to-Yonyou NCC supply-chain integration, the assembly/disassembly business generates two parallel data streams: the Assembly/Disassembly Order and the Assembly/Disassembly Outbound Order. The latter is responsible for synchronizing the finished-goods vs. raw-material conversion, inventory movement, batch, and cost information into the Yonyou NCC Form-Conversion document in real time. This interface (erp.storage.goodsdocout.v2) is the dedicated incremental query channel for that purpose. It hard-codes the outbound type as inouttype=207 and pulls orders together with their line items based on a creation-time window.

Interface Capability Overview

  • Authentication: Jky Open Platform AppKey/AppSecret signature, transmitted via HTTP header. On the Qeasy Data Integration Platform this is fully encapsulated by the Jky adapter, so no manual signing is needed.
  • Request structure: POST with a JSON body containing startDate, endDate, inouttype=207, pageIndex, pageSize, and optional filters (goodsDocNo, warehouseCode, outBillNo, billNo).
  • Response structure: JSON. The top level carries data.list (master array) and data.hasMore. Each master record nests a goodsDocDetailList array of detail rows.
  • Pagination & incremental pattern: pageIndex starts at 0; pageSize is recommended at 50. startDate defaults to the last sync time ({{LAST_SYNC_TIME}}) and endDate to the current time, giving a rolling incremental pull keyed on creation time.
  • Reference frequency: The scheduled task 1-59/3 6-23 * * * runs every 3 minutes between 06:00 and 23:00 every day.

Typical Field Mapping

FieldTypeMeaningPractical Notes
recIdstringMaster table system IDGlobally unique. The Qeasy field mapper defaults it to outbound_order_id on the target side for idempotent deduplication.
goodsdocNostringOutbound business numberOne of the reconciliation keys. The safe approach is to use this (not recId) as the cross-system reconciliation number.
billNo / sourceBillNostringRelated order no. / source order no.When mapping to the NCC form-conversion document, prefer billNo.
inouttype / inouttypeNamestringOutbound type code and nameHard-coded to 207 in this strategy. In Qeasy, set the default in the request-parameter panel so you never accidentally pull 201/202 records.
gmtCreatestringCreation timeDrives the incremental cursor. Time zone is UTC+8; convert to UTC before persisting.
warehouseCode / warehouseNamestringWarehouse code and nameCode flows into NCC; the name is display-only.
companyCode / companyNamestringCompany code and nameMapped against the NCC organization master; the Qeasy "Master-Data Lookup" node can attach a value set directly.
vendCustomerCodestringBusiness-partner codeAssembly/disassembly typically involves internal orgs, so an empty value is normal.
currencyCode / currencyRatestringCurrency and exchange rateIn cross-currency scenarios, persist the rate as well, otherwise downstream cost will drift.
redStatusstringReverse-status (1/2/9)Common pitfall: reverse documents must be filtered or handled by business rules.
financeBillStatusstringFinance status (1/11/21/25/31)Cost is only stable at 21/25. For form-conversion cost delivery, prefer those two.
goodsDocDetailList[].recIdstringDetail-line IDCombine with the master recId to form a unique row key.
goodsNo / skuId / skuBarcodestringMaterial code / SKU ID / barcodeAny one suffices; the barcode is the most stable. The Qeasy mapper supports priority fallback.
batchNo / batchNumberstringBatch code / batch numberMandatory for batch-strict industries (food, pharma); align with the NCC batch master.
quantity / unitNamestringQuantity and unitWhen units differ, convert using cuValue first.
estPrice / estPriceNoTax / estCost / estCostNoTax / estTaxstringEstimated prices and cost / tax (with/without tax)The "est" prefix means estimated. Real cost comes from transHasTaxAmount after financeBillStatus=21/25.
transHasTaxAmount / transNoTaxAmount / transTaxAmountstringTransaction amounts (with/without tax) and taxThis is the authoritative basis for form-conversion cost delivery.
field15 / detailField15stringUser-defined extension fieldsTick them in the Qeasy "Custom Fields" panel and they pass through transparently.

How to Configure on Qeasy

  1. Adapter selection: Choose "Jky" as the data source and the action erp.storage.goodsdocout.v2 for outbound query.
  2. Parameter hardening: In Qeasy's request-parameter panel, fix the default value of inouttype to 207. Bind startDate and endDate to the built-in variables {{LAST_SYNC_TIME}} and {{CURRENT_TIME}} respectively.
  3. Field mapping: Set the target side to "Write-NoOp" (this strategy is a pure query), but still map recId, goodsdocNo, and gmtCreate into an intermediate table so the downstream "Outbound → NCC Form-Conversion" write strategy can reuse them.
  4. Pagination & rate limiting: The Qeasy Jky adapter has built-in pageSize=50 and hasMore loop logic, so no manual pagination is required. For high-frequency runs, use every-3-minutes as the baseline schedule.
  5. Error retry: On network jitter or throttling, Qeasy automatically retries with exponential backoff. Failed records are routed to a "Pending" queue for manual replay.

Cross-Strategy Practical Lessons

  1. Hard-code the outbound type: Only 207 records should flow through this channel; otherwise downstream form-conversion documents will receive dirty data such as sales or transfer outbounds.
  2. Use goodsdocNo as the business key and recId as the technical key: A dual-key strategy is the most robust for cross-system reconciliation and idempotent writes.
  3. The incremental cursor must be gmtCreate, not inOutDate: Business dates can change on un-approval, while creation time is immutable once persisted.
  4. Batch and expiry are critical for assembly/disassembly: The raw-material batchNo, the finished-goods productionDate, expirationDate, and shelfLife must all be propagated to NCC unchanged.
  5. Read cost fields only when financeBillStatus allows: Do not trust transHasTaxAmount before status 21/25, otherwise costs will flap.
  6. Build a unique index on detail lines: Use master recId + detail recId as a composite primary key to prevent row overwrites.

Pitfall Recap

  • Pitfall 1: Passing inouttype as the Chinese string "207-组装拆卸出库". Jky requires the numeric code; passing Chinese returns an empty result set.
  • Pitfall 2: Ignoring redStatus=9 reverse documents. Without filtering, the downstream ends up with negative cost and phantom inventory reduction. The safe move in Qeasy is to add redStatus != 9 in the filter.
  • Pitfall 3: Using the business date instead of creation time for startDate. Un-approval then shifts the incremental window and a large batch of records is missed.
  • Pitfall 4: Setting pageSize above 200. Jky's default ceiling is 50; anything larger returns HTTP 429. Qeasy's adapter defaults to 50, so do not enlarge it manually.
  • Pitfall 5: Writing both estCost and transHasTaxAmount to downstream. The two cost bases collide and reconciliation becomes painful. Always pick one based on the finance status.

When to Use This Interface

This interface is appropriate when assembly/disassembly outbounds from Jky need to be incrementally synchronized into Yonyou NCC form-conversion documents, or when batch, expiry, cost, and tax information must be propagated to a downstream ERP/MES. If you only need a GL summary or a dashboard view, prefer the on-hand inventory query instead — the line-level granularity here would be wasted overhead.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/engineering/hb-p2-067-3407

Comments