Project

General

Profile

Batch » History » Version 7

Soh Keong, 10/18/2023 09:08 AM

1 1 Soh Keong
{{toc}}
2
3
h1. Batches
4
5
h2. PurgeRP
6
7
Program Class : ECpurgeRP
8
Run Indicator : 
9
> 0  - First Time run only, For earn and get from table MEMBER_ACCOUNT
10 3 Soh Keong
11 1 Soh Keong
> 1  - Subsequence to Calculate Earn and Utilize RP from table TRANSACTION
12 3 Soh Keong
13 1 Soh Keong
> 2  - Calculate Utilized RP and Deduct from ProcessDate Balance
14 3 Soh Keong
15 1 Soh Keong
> 3  - Purge expired RP
16 3 Soh Keong
17 7 Soh Keong
> 4  - Add missing RP by period
18
19
> -4 - Roll back (4)
20
21 4 Soh Keong
> -3 - Roll back (3)
22 3 Soh Keong
23 1 Soh Keong
> -2 - Roll back (2)
24 3 Soh Keong
25 2 Soh Keong
26
27
h2. Report
28
29
Program Class : GenHKRPDaily
30
Steps         :
31
# Call webservice (EcHkMemberController.getRPBalanceExpiryDateList) get HK & MC RP balance with expiry date.
32
# Write RP to file name : RPyymmdd.HK
33 5 Soh Keong
34
35
h2. Table
36
37 6 Soh Keong
<pre>
38 5 Soh Keong
CREATE TABLE RP_PURGE (
39
    PROCESS_DATE INTEGER NOT NULL,
40
    MEMBER_ID VARCHAR(20) NOT NULL,
41
    RP_EARN DECIMAL(15,2), 
42
	RP_UTILIZE DECIMAL(15,2),
43
	RP_TOTAL_UTILIZED DECIMAL(15,2) DEFAULT 0,
44
	RP_UTILIZED_PROCESS_DATE VARCHAR(25),
45
	RP_PURGE DECIMAL(15,2),
46
	RP_TO_BE_EXPIRED DECIMAL(15,2),
47
	EXPIRY_DATE DATE,
48
	PROCESS_IND VARCHAR(1) DEFAULT 'N',
49
    CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
50
    MODIFY_DATETIME TIMESTAMP, 
51
    PRIMARY KEY (PROCESS_DATE,MEMBER_ID));
52 6 Soh Keong
</pre>