Project

General

Profile

Batch » History » Version 5

Soh Keong, 10/18/2023 08:46 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 4 Soh Keong
> -3 - Roll back (3)
18 3 Soh Keong
19 1 Soh Keong
> -2 - Roll back (2)
20 3 Soh Keong
21 2 Soh Keong
22
23
h2. Report
24
25
Program Class : GenHKRPDaily
26
Steps         :
27
# Call webservice (EcHkMemberController.getRPBalanceExpiryDateList) get HK & MC RP balance with expiry date.
28
# Write RP to file name : RPyymmdd.HK
29 5 Soh Keong
30
31
h2. Table
32
33
CREATE TABLE RP_PURGE (
34
    PROCESS_DATE INTEGER NOT NULL,
35
    MEMBER_ID VARCHAR(20) NOT NULL,
36
    RP_EARN DECIMAL(15,2), 
37
	RP_UTILIZE DECIMAL(15,2),
38
	RP_TOTAL_UTILIZED DECIMAL(15,2) DEFAULT 0,
39
	RP_UTILIZED_PROCESS_DATE VARCHAR(25),
40
	RP_PURGE DECIMAL(15,2),
41
	RP_TO_BE_EXPIRED DECIMAL(15,2),
42
	EXPIRY_DATE DATE,
43
	PROCESS_IND VARCHAR(1) DEFAULT 'N',
44
    CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
45
    MODIFY_DATETIME TIMESTAMP, 
46
    PRIMARY KEY (PROCESS_DATE,MEMBER_ID));