Kingdee Cloud Settlement Type Query Interface Handbook: ExecuteBillQuery Field Mapping & Incremental Sync Guide
What This Interface Solves
In Kingdee-to-DingTalk integration scenarios, settlement type is a foundational master data that touches collections, payments, expense reimbursement, and approval flows. By pulling Kingdee Cloud's BD_SETTLETYPE table via ExecuteBillQuery, you establish a unified, trustworthy, and traceable payment dictionary. Downstream business documents can then reference a single source of truth for "select settlement type," avoiding reconciliation headaches caused by inconsistent definitions on both sides.
API Capability Overview
- Protocol: Kingdee Cloud WebAPI,
ExecuteBillQuery, FormIdBD_SETTLETYPE, HTTP POST. - Authentication: Standard Kingdee third-party login (typically
userName + password + appId + appSecretor OAuth-derivedaccess_token), encapsulated by the Qeasy adapter so you don't handcraft tokens. - Request structure:
FormId,FieldKeys,FilterString,Limit,StartRow,OrderString. - Response structure: JSON array, each row keyed by
FieldKey; the primary key and code both surface asNumber. - Pagination:
Limit + StartRowbased; recommended page size 2000-5000 rows—larger pages risk Kingdee-side timeouts. - Incremental mode:
FilterString: FModifyDate>='{{LAST_SYNC_TIME|datetime}}'; crontab typically1 8-22 * * *for high-frequency refresh during business hours. - Strategy type: QUERY_ONLY—never writes back to a target system.
Typical Field Mapping
| Field Name | Type | Meaning | Production Notes |
|---|---|---|---|
| Number | string | Business code (FNumber) | Both id and number map here in metadata; the canonical cross-system key. Qeasy's field mapper treats it as the unique identifier by default. |
| Name | string | Display name | Used for selectors and UI rendering downstream. |
| SETTLECATEGORY | string | Category (cash / instrument / bank) | Common dimension for financial classification. |
| TYPE | string | Business type (receive / pay) | Must be differentiated—determines downstream usability. |
| PAYTYPE | string | Specific payment method | Align with the payment-method field on DingTalk approval forms. |
| FISDEFAULT | string | Whether it is the default | Auto-populated when new documents are created. |
| IsSysPreset | string | System-preset flag | Preset records usually cannot be deleted, only disabled. |
| ForbidStatus | string | Disabled status | When disabled, downstream selectors must hide it; otherwise users may still pick it. |
| IsSupBankPay | string | Supports online banking payment | Strongly validated for bank-related flows. |
| FModifyDate | string | Last modified date | The reliable anchor for incremental sync; keep timezone consistent. |
| CreateOrgId_Id/Name/Number | string | Creating org trio | Required for multi-tenant isolation. |
| UseOrgId_Id/Name/Number | string | Using org trio | Visibility may differ across organizations. |
| CreatorId_/ModifierId_/AuditorID_/ForbidderID_ | string | Audit chain quartet | For change traceability; Qeasy auto-expands. |
| DocumentStatus | string | Approval status | Syncing only audited data avoids dirty records. |
Configuring It on Qeasy
On the Qeasy Data Integration Platform, "Query Kingdee Settlement Type" is typically packaged as a query template within the Kingdee Cloud adapter:
- Data source setup: Provide the Kingdee tenant endpoint, account set ID, and app secret. The adapter handles token lifecycle automatically.
- Form selection: Pick
BD_SETTLETYPEfrom the dropdown; the platform preloads the standard field set for that form. - Field mapper: In Qeasy's visual mapping canvas, drag Kingdee fields like
Number/Name/SETTLECATEGORY/PAYTYPE/FModifyDateto your target schema. The built-in id/number merge strategy automatically usesNumberas both primary key and code. - Incremental configuration: In the FilterString editor, reference the built-in variable
{{LAST_SYNC_TIME}}; the first run is full sync, subsequent runs are incremental—seamless. - Scheduler: Configure crontab
1 8-22 * * *visually; the platform auto-retries with backoff within the window. - Target write: Because the strategy is QUERY_ONLY, data lands in the Qeasy master data pool, where other strategies (DingTalk approval, sales order, etc.) can reference it.
Cross-Project Best Practices
- Confirm Number's dual identity: Across multiple client projects we consistently map
Numberto both id and number. Never use Name as a cross-system key—same-name-different-code is extremely common. - Unify FModifyDate as the incremental anchor: CreateDate can change during auditing or backfilling, but FModifyDate is the only reliable anchor for incremental sync.
- Sync the disabled state downstream: When
ForbidStatus='B', the DingTalk selector must hide the entry; otherwise users will pick a disabled settlement type and downstream document generation will fail. - Don't store only the ID for multi-org fields: Always carry the full Id/Name/Number trio for CreateOrgId and UseOrgId; later filtering or display becomes trivial.
- High frequency during business hours, low at night: The crontab
1 8-22 * * *is field-tested—settlement types rarely change overnight, so reducing frequency saves quota. - Two-step full-then-incremental: The first run must use an empty FilterString to pull everything and reconcile the row count with Kingdee; only then switch to incremental. This pattern is easier to debug.
Pitfall Replays
- FilterString time format with T and Z: Kingdee's FModifyDate comparison requires
yyyy-MM-dd HH:mm:ss. Using ISO strings returns empty or full data—this is where projects commonly trip. The safe approach is to format explicitly within Qeasy's FilterString expression. - Mistakenly deleting system-preset records: Records with
IsSysPreset='1'cannot be deleted, only disabled. If the downstream logic is "sync and delete on missing," it will error out. Add a skip rule in the mapper. - Pagination Limit too large causes timeout: Setting Limit to 10000 triggers a 60-second timeout on the Kingdee side and returns an empty array—easy to mistake for "no data." In real projects, keeping Limit at or below 3000 is safest.
- Incremental data loss: One project used UTC for LAST_SYNC_TIME while Kingdee uses UTC+8, so changes during early morning were missed. Always align Qeasy's timezone configuration with Kingdee.
- Same-named settlement types confuse users: Within the same enterprise, "Cash" and "Cash (Reserve)" share similar Names but different Numbers. Downstream displays should append the Number suffix for unambiguous troubleshooting.
When to Use
This interface fits scenarios where Kingdee is the single source of truth for settlement types and you need to push that dictionary to downstream systems like DingTalk, or unify payment semantics across multiple business documents. If your business only uses cash and you don't need cross-system coordination, hardcoding is simpler and this interface is unnecessary.