Project

General

Profile

Wiki » History » Version 5

Soh Keong, 11/16/2023 02:15 PM

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 5 Soh Keong
	STATUS VARCHAR(2) DEFAULT 'A',
42 4 Soh Keong
	CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
43
	PRIMARY KEY(PROCESS_DATE,TRX_REF_NO))
44
</pre>
45
46
<pre>
47 2 Soh Keong
CREATE TABLE RP_PURGE (
48
    PROCESS_DATE INTEGER NOT NULL,
49
    MEMBER_ID VARCHAR(20) NOT NULL,
50
    RP_EARN DECIMAL(15,2), 
51
	RP_UTILIZE DECIMAL(15,2),
52
	RP_TOTAL_UTILIZED DECIMAL(15,2) DEFAULT 0,
53
	RP_UTILIZED_PROCESS_DATE VARCHAR(25),
54
	RP_PURGE DECIMAL(15,2),
55
	RP_TO_BE_EXPIRED DECIMAL(15,2),
56
	EXPIRY_DATE DATE,
57
	PROCESS_IND VARCHAR(1) DEFAULT 'N',
58 3 Soh Keong
	PURGE_IND VARCHAR(1) DEFAULT 'N',
59 2 Soh Keong
    CREATE_DATETIME TIMESTAMP NOT NULL DEFAULT CURRENT TIMESTAMP,
60
    MODIFY_DATETIME TIMESTAMP, 
61
    PRIMARY KEY (PROCESS_DATE,MEMBER_ID));
62
</pre>
63
64 1 Soh Keong
h2. SCM
65
66
h3. Batch
67
68
<pre>
69
Host: svn+ssh://192.168.2.66/svn/ecosway-batch
70
Path: /ecosway-batch/src-ecos
71
Class: ECpurgeRP , GenHKRPDaily
72
Tag: HEAD
73
</pre>
74
75
h3. Web Service
76
77
<pre>
78
Host: svn+ssh://192.168.2.66/svn/OnlineControllerDaoService
79
Path: /OnlineControllerDaoService
80
Tag: HEAD
81
</pre>