Project

General

Profile

Wiki » History » Version 2

Soh Keong, 10/18/2023 09:10 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
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
</pre>
53
54 1 Soh Keong
h2. SCM
55
56
h3. Batch
57
58
<pre>
59
Host: svn+ssh://192.168.2.66/svn/ecosway-batch
60
Path: /ecosway-batch/src-ecos
61
Class: ECpurgeRP , GenHKRPDaily
62
Tag: HEAD
63
</pre>
64
65
h3. Web Service
66
67
<pre>
68
Host: svn+ssh://192.168.2.66/svn/OnlineControllerDaoService
69
Path: /OnlineControllerDaoService
70
Tag: HEAD
71
</pre>