Project

General

Profile

Wiki » History » Version 4

Soh Keong, 11/07/2023 11:06 AM

1 1 Soh Keong
{{toc}}
2
3
h1. Wiki
4
5
h2. Specification
6
7
See [[Batch]]
8
See [[WebService]]
9
10
h2. Description
11
12
<pre>
13
RP 2023 - expiry on 31 Dec 2024
14
RP Jan - Jun 2024 - expiry on 31 Dec 2025 (period 1.5 years)
15
RP Jul - Dec 2024 - expiry on 30 Jun 2026 (period 1.5 years)
16
RP Jan - Jun 2025 - expiry on 31 Dec 2026 (period 1.5 years)
17
18
19
20
21
============================================================
22
    In the backend, we need to prepare 3 separate pieces of code for these changes because each condition is different:
23
        Starting from 1st Nov 2023, the current balance should be updated to December 31, 2024.
24
25
    On 4 Jan 2024, the balance for 2023 should be adjusted by subtracting the earnings and utilization for January 2024.
26
        The reason for updating only on January 4, 2024, is that POS sales data is imported daily, and in case of any late imports, we need to deduct the utilization and account for returns related to December 2023 sales that were imported in January 2024.
27
28
    The program will run by transaction for six months:
29
        RP from January to June 2024 will expire on December 31, 2025 (a period of 1.5 years).
30
        RP from July to December 2024 will expire on June 30, 2026 (a period of 1.5 years).
31
        RP from January to June 2025 will expire on December 31, 2026 (a period of 1.5 years).
32
</pre>
33
34 2 Soh Keong
35
h2. Table
36
37
<pre>
38 4 Soh Keong
CREATE TABLE RP_PURGE_TRANSACTION (
39
	PROCESS_DATE DATE NOT NULL,
40
	TRX_REF_NO INTEGER NOT NULL,
41
	CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
42
	PRIMARY KEY(PROCESS_DATE,TRX_REF_NO))
43
</pre>
44
45
<pre>
46 2 Soh Keong
CREATE TABLE RP_PURGE (
47
    PROCESS_DATE INTEGER NOT NULL,
48
    MEMBER_ID VARCHAR(20) NOT NULL,
49
    RP_EARN DECIMAL(15,2), 
50
	RP_UTILIZE DECIMAL(15,2),
51
	RP_TOTAL_UTILIZED DECIMAL(15,2) DEFAULT 0,
52
	RP_UTILIZED_PROCESS_DATE VARCHAR(25),
53
	RP_PURGE DECIMAL(15,2),
54
	RP_TO_BE_EXPIRED DECIMAL(15,2),
55
	EXPIRY_DATE DATE,
56
	PROCESS_IND VARCHAR(1) DEFAULT 'N',
57 3 Soh Keong
	PURGE_IND VARCHAR(1) DEFAULT 'N',
58 2 Soh Keong
    CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
59
    MODIFY_DATETIME TIMESTAMP, 
60
    PRIMARY KEY (PROCESS_DATE,MEMBER_ID));
61
</pre>
62
63 1 Soh Keong
h2. SCM
64
65
h3. Batch
66
67
<pre>
68
Host: svn+ssh://192.168.2.66/svn/ecosway-batch
69
Path: /ecosway-batch/src-ecos
70
Class: ECpurgeRP , GenHKRPDaily
71
Tag: HEAD
72
</pre>
73
74
h3. Web Service
75
76
<pre>
77
Host: svn+ssh://192.168.2.66/svn/OnlineControllerDaoService
78
Path: /OnlineControllerDaoService
79
Tag: HEAD
80
</pre>