Platform data: Platform Transaction table Trans_info
Upstream data: Upstream reconciliation document
Reconciliation Table:
Check_account_batch//Reconciliation lot Table (reconciliation lot number, receipts agency, total amount (upstream and platform), total number of pens (upstream and platform), total number of successful reconciliations (upstream and platform), total number of reconciliation failures (upstream and platform), reconciliation results (success/failure/ongoing), Reconciliation file date, reconciliation document name, reconciliation date
Check_account_detail//Reconciliation Details table, success (field with Transaction table, Plus: Reconciliation status (Success/Transaction amount error/platform unilateral/upstream unilateral), reconciliation lot number, reconciliation account description)
Check_account_detail_fail/Reconciliation Details table, failure (IBID.)
Reconciliation Logic: 1, the selected reconciliation transaction date, generally for one day, the platform transaction period conditions must be the same as the transaction time period of the reconciliation documents, to ensure that the transaction time is not misplaced;
2, to determine the current batch number reconciliation status, if the account has been successful or in progress, no longer continue, reconciliation failed or not reconciled, then continue;
3, access to the Platform transaction list and reconciliation documents list;
4, if the reconciliation has failed, then delete the reconciliation batch records, delete reconciliation records (including success and failure);
5, Calculation: The total amount of transactions (upstream and platform), the total number of transactions (upstream and platform), the number of successful accounts (upstream and platform), reconciliation failure of the number of pens (upstream and platform);
6, to the upstream of the accounting documents, traversing the platform transaction data, compare the details of each transaction, the transaction details to the platform data, the reconciliation of successful transactions and reconciliation failure of the transaction record
7, insert the Account Details table, reconciliation success details and reconciliation failure details two tables, and indicate the status: Success, platform unilateral, upstream unilateral, the amount of error;
8, insert the reconciliation of the batch table;
9, the transaction data is generally too large, you can set a value such as 1000, bulk Insert table;