Qeasy Cloud
Get Started

Date-Range Report to Receipt Voucher: A Cross-Platform Finance Sync Playbook

· 许创贵· Integration Solutions· 6 views· 4 min read

What This Strategy Solves

For one cross-border retail client, finance reconciliation had long been a pain point: the source ERP's finance module only exposes date-range aggregated reports, while the target finance system requires one standard receipt voucher per settlement. At month-end, finance staff had to manually split summary rows into vouchers, fill in third-party bill numbers, and add notes—slow and error-prone. The core value of this strategy is turning aggregated reports back into individual receipt vouchers that automatically land in the finance system, so transactions from the previous day are already in the receivable clearing pipeline by the next morning.

Data Flow and Field Mapping

The source side calls a WebAPI query endpoint /finance/asset/dateRangeReports/page, pulling report records within a purchaseStartDate to purchaseEndDate window. Inside the request body, queryDateType=0 means "market time"—an easy-to-miss detail in cross-border scenarios.

The middle layer on the Qeasy data integration platform handles two critical jobs: first, splitting one flat source report row into multiple receipt vouchers based on feeType and marketName; second, generating unique target-side IDs through variable concatenation rules.

The target side (Kingdee Cloud) uses the batchSave endpoint, packing multiple vouchers into a single HTTP request for batch submission. Key field mapping:

Business MeaningSource FieldTarget FieldHandling Note
Unique NumberidFTHIRDBILLNOConcatenate with feeType+marketName+settlementId to avoid duplicates
Source Platform IDidFHvtThirdSrcBillIdPass through original value
Source System FlagConstantFHvtThirdSrcTypeHard-coded as GERPGO
Voucher TypefeeTypeFBillTypeIDDictionary mapping, centrally managed
Custom NotemarketNameFHvtThirdCustomNoteConcatenate "market name + withdrawal"

How to Configure on Qeasy

On the source side, pick the WebAPI adapter and hard-code the pagination parameters page/pagesize (we typically use pagesize=100; going higher risks timeouts on the target batchSave). The two date range variables use Qeasy's built-in {{LAST_SYNC_TIME|date}} and {{CURRENT_TIME|date}}, with the time type set to market time.

On the target side, select the finance cloud batchSave. Constants like voucher type and source system are maintained centrally in Qeasy's mapping configuration—the pattern we call centralized code mapping management. When business changes the dictionary, the data flow itself does not need to be touched.

The middle layer adds a header-body phased process: first split report rows by settlementId, then assemble FTHIRDBILLNO in a transformation script. Idempotency relies on idCheck=true; the source number field follows the same concatenation rule so both ends align before persisting.

Implementation Steps

Step 1: Define the incremental starting point. The client usually wants "recalculate from the 1st of this month." On Qeasy, manually trigger one full sync and push LAST_SYNC_TIME to 00:00 on the 1st.

Step 2: Configure the schedule frequency. The source cron is 3 20-23,0-9 * * *, meaning run at minute 3 of every hour from 20:00 through 09:00 the next day—this covers multiple overseas settlement windows. The target cron is 55 0-9 * * *, running 5 minutes before each hour so source data is already persisted before batch push.

Step 3: Run the first full sync. Observe how many pages come back from the source, whether the row count after voucher splitting matches expectations, and whether batchSave succeeds on the first try.

Step 4: Switch to incremental mode. From the second run onward, LAST_SYNC_TIME advances automatically on a rolling hourly window.

Step 5: Run reconciliation checks. Qeasy provides a source-vs-target row-count dashboard; if the delta exceeds a threshold, alerts fire automatically.

Pitfalls We Have Hit

Pitfall 1: Wrong time zone, an entire night of skewed data. Picking the wrong queryDateType (market time vs zero-meridian time) causes the report window to misalign—a voucher that should land on Aug 31 ends up on Sep 1. The safe approach is to get written confirmation from the business side on which time cut-off applies, and parameterize the time type on Qeasy rather than hard-coding it.

Pitfall 2: Partial failure in batchSave rolls back the whole batch. Kingdee finance cloud's batchSave is transactional—one failed voucher can take down the whole batch. The mitigation is to pre-validate field length, required fields, and dictionary values in Qeasy's transformation layer; failures route to a separate error queue instead of polluting the main pipeline.

Pitfall 3: Duplicate third-party bill numbers. The source id is unique, but a single settlement can carry multiple feeType/marketName dimensions. You must use multi-variable concatenation like {{id}}-{{feeType}}-{{marketName}}-{{settlementId}} to guarantee global uniqueness for FTHIRDBILLNO; otherwise Kingdee will reject the submission.

Pitfall 4: Drifting incremental start. If LAST_SYNC_TIME uses local time but the source returns UTC, after a few days you will see missed or duplicated vouchers. Always keep source and middle layer on the same time-zone reference, or normalize time zones in the middle layer.

Pitfall 5: Timing of switching between incremental and full sync. Business often asks for a recalculation at month-start, but naively running a full sync will create duplicate vouchers. On Qeasy we rely on idCheck for idempotency—an existing FTHIRDBILLNO is automatically skipped. This is the standard dual-track incremental-and-full pattern.

When This Fits and When It Doesn't

Fits: Source can only expose aggregated reports and you need to restore them into individual receipt vouchers; cross-border multi-time-zone settlement windows; finance reconciliation requires T+1 automatic posting. Does not fit: Source already provides individual receipt vouchers (use 1:1 sync directly, no splitting layer needed); or the target voucher types cannot be mapped from source dimensions without manual judgment.

Original content. Please credit the source when reposting: https://www.qeasy.cloud/insights/solutions/strat-erp-kingdee-cloud-1306-nbb9ebb70-be0941da

Comments