| 36619 |
amit |
1 |
package in.shop2020.model.v1.order;
|
|
|
2 |
|
|
|
3 |
import java.util.ArrayList;
|
|
|
4 |
import java.util.Arrays;
|
|
|
5 |
import java.util.List;
|
|
|
6 |
|
|
|
7 |
public class OrderStatusGroups {
|
|
|
8 |
|
|
|
9 |
private final List<OrderStatus> codCancellable;
|
|
|
10 |
private final List<OrderStatus> prepaidCancellableBeforeBilled;
|
|
|
11 |
private final List<OrderStatus> prepaidCancellableAfterBilled;
|
|
|
12 |
private final List<OrderStatus> openOrders;
|
|
|
13 |
private final List<OrderStatus> refundedOrders;
|
|
|
14 |
private final List<OrderStatus> shippedOrders;
|
|
|
15 |
private final List<OrderStatus> failedOrders;
|
|
|
16 |
|
|
|
17 |
public OrderStatusGroups() {
|
|
|
18 |
this.codCancellable = new ArrayList<>(Arrays.asList(
|
|
|
19 |
OrderStatus.COD_VERIFICATION_PENDING,
|
|
|
20 |
OrderStatus.SUBMITTED_FOR_PROCESSING,
|
|
|
21 |
OrderStatus.ACCEPTED,
|
|
|
22 |
OrderStatus.INVENTORY_LOW,
|
|
|
23 |
OrderStatus.LOW_INV_PO_RAISED,
|
|
|
24 |
OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
|
|
|
25 |
OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
|
|
|
26 |
OrderStatus.BILLED,
|
|
|
27 |
OrderStatus.PAYMENT_FLAGGED
|
|
|
28 |
));
|
|
|
29 |
|
|
|
30 |
this.prepaidCancellableBeforeBilled = new ArrayList<>(Arrays.asList(
|
|
|
31 |
OrderStatus.COD_VERIFICATION_PENDING,
|
|
|
32 |
OrderStatus.SUBMITTED_FOR_PROCESSING,
|
|
|
33 |
OrderStatus.ACCEPTED,
|
|
|
34 |
OrderStatus.INVENTORY_LOW,
|
|
|
35 |
OrderStatus.LOW_INV_PO_RAISED,
|
|
|
36 |
OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
|
|
|
37 |
OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT
|
|
|
38 |
));
|
|
|
39 |
|
|
|
40 |
this.prepaidCancellableAfterBilled = new ArrayList<>(Arrays.asList(
|
|
|
41 |
OrderStatus.BILLED,
|
|
|
42 |
OrderStatus.PAYMENT_FLAGGED
|
|
|
43 |
));
|
|
|
44 |
|
|
|
45 |
this.openOrders = new ArrayList<>(Arrays.asList(
|
|
|
46 |
OrderStatus.PAYMENT_PENDING,
|
|
|
47 |
OrderStatus.COD_VERIFICATION_PENDING,
|
|
|
48 |
OrderStatus.SUBMITTED_FOR_PROCESSING,
|
|
|
49 |
OrderStatus.ACCEPTED,
|
|
|
50 |
OrderStatus.INVENTORY_LOW,
|
|
|
51 |
OrderStatus.BILLED,
|
|
|
52 |
OrderStatus.PAYMENT_FLAGGED,
|
|
|
53 |
OrderStatus.SHIPPED_FROM_WH,
|
|
|
54 |
OrderStatus.SHIPPED_TO_LOGST,
|
|
|
55 |
OrderStatus.PAYMENT_FLAGGED_DENIED,
|
|
|
56 |
OrderStatus.SHIPPED_TO_DESTINATION_CITY,
|
|
|
57 |
OrderStatus.REACHED_DESTINATION_CITY,
|
|
|
58 |
OrderStatus.CANCEL_REQUEST_RECEIVED,
|
|
|
59 |
OrderStatus.CANCEL_REQUEST_CONFIRMED,
|
|
|
60 |
OrderStatus.RTO_IN_TRANSIT,
|
|
|
61 |
OrderStatus.RTO_RECEIVED_PRESTINE,
|
|
|
62 |
OrderStatus.DOA_PICKUP_REQUEST_RAISED,
|
|
|
63 |
OrderStatus.DOA_PICKUP_CONFIRMED,
|
|
|
64 |
OrderStatus.DOA_RETURN_IN_TRANSIT,
|
|
|
65 |
OrderStatus.DOA_RECEIVED_PRESTINE,
|
|
|
66 |
OrderStatus.DOA_CERT_INVALID,
|
|
|
67 |
OrderStatus.DOA_CERT_VALID,
|
|
|
68 |
OrderStatus.LOW_INV_PO_RAISED,
|
|
|
69 |
OrderStatus.LOW_INV_REVERSAL_IN_PROCESS,
|
|
|
70 |
OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT,
|
|
|
71 |
OrderStatus.LOW_INV_PO_RAISED_TIMEOUT,
|
|
|
72 |
OrderStatus.LOW_INV_REVERSAL_TIMEOUT,
|
|
|
73 |
OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,
|
|
|
74 |
OrderStatus.CAPTURE_IN_PROCESS,
|
|
|
75 |
OrderStatus.DOA_REQUEST_RECEIVED,
|
|
|
76 |
OrderStatus.DOA_REQUEST_AUTHORIZED,
|
|
|
77 |
OrderStatus.DOA_RECEIVED_DAMAGED,
|
|
|
78 |
OrderStatus.DOA_LOST_IN_TRANSIT,
|
|
|
79 |
OrderStatus.RTO_RECEIVED_DAMAGED,
|
|
|
80 |
OrderStatus.RTO_LOST_IN_TRANSIT,
|
|
|
81 |
OrderStatus.RTO_INVENTORY_REVERSED,
|
|
|
82 |
OrderStatus.RET_REQUEST_RECEIVED,
|
|
|
83 |
OrderStatus.RET_REQUEST_AUTHORIZED,
|
|
|
84 |
OrderStatus.RET_PICKUP_REQUEST_RAISED,
|
|
|
85 |
OrderStatus.RET_PICKUP_DENIED,
|
|
|
86 |
OrderStatus.RET_PICKUP_CONFIRMED,
|
|
|
87 |
OrderStatus.RET_RETURN_IN_TRANSIT,
|
|
|
88 |
OrderStatus.RET_RECEIVED_PRESTINE,
|
|
|
89 |
OrderStatus.RET_RECEIVED_DAMAGED,
|
|
|
90 |
OrderStatus.RET_LOST_IN_TRANSIT,
|
|
|
91 |
OrderStatus.RET_PRODUCT_USABLE,
|
|
|
92 |
OrderStatus.DELIVERED_AT_STORE,
|
|
|
93 |
OrderStatus.RECEIVED_AT_STORE
|
|
|
94 |
));
|
|
|
95 |
|
|
|
96 |
this.refundedOrders = new ArrayList<>(Arrays.asList(
|
|
|
97 |
OrderStatus.CANCELLED_ON_CUSTOMER_REQUEST,
|
|
|
98 |
OrderStatus.RTO_REFUNDED,
|
|
|
99 |
OrderStatus.DOA_VALID_REFUNDED,
|
|
|
100 |
OrderStatus.DOA_INVALID_REFUNDED,
|
|
|
101 |
OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
|
|
|
102 |
OrderStatus.DOA_REFUNDED_RCVD_DAMAGED,
|
|
|
103 |
OrderStatus.DOA_REFUNDED_LOST_IN_TRANSIT,
|
|
|
104 |
OrderStatus.RTO_DAMAGED_REFUNDED,
|
|
|
105 |
OrderStatus.RTO_LOST_IN_TRANSIT_REFUNDED,
|
|
|
106 |
OrderStatus.RET_PRODUCT_USABLE_REFUNDED,
|
|
|
107 |
OrderStatus.RET_PRODUCT_UNUSABLE_REFUNDED,
|
|
|
108 |
OrderStatus.RET_REFUNDED_LOST_IN_TRANSIT,
|
|
|
109 |
OrderStatus.RET_REFUNDED_RCVD_DAMAGED,
|
|
|
110 |
OrderStatus.LOST_IN_TRANSIT_REFUNDED
|
|
|
111 |
));
|
|
|
112 |
|
|
|
113 |
this.shippedOrders = new ArrayList<>(Arrays.asList(
|
|
|
114 |
OrderStatus.SHIPPED_FROM_WH,
|
|
|
115 |
OrderStatus.SHIPPED_TO_LOGST,
|
|
|
116 |
OrderStatus.SHIPPED_TO_DESTINATION_CITY,
|
|
|
117 |
OrderStatus.REACHED_DESTINATION_CITY,
|
|
|
118 |
OrderStatus.RTO_IN_TRANSIT,
|
|
|
119 |
OrderStatus.RTO_RECEIVED_PRESTINE,
|
|
|
120 |
OrderStatus.DOA_PICKUP_REQUEST_RAISED,
|
|
|
121 |
OrderStatus.DOA_PICKUP_CONFIRMED,
|
|
|
122 |
OrderStatus.DOA_RETURN_IN_TRANSIT,
|
|
|
123 |
OrderStatus.DOA_RECEIVED_PRESTINE,
|
|
|
124 |
OrderStatus.DOA_CERT_INVALID,
|
|
|
125 |
OrderStatus.DOA_CERT_VALID,
|
|
|
126 |
OrderStatus.FIRST_DELIVERY_ATTEMPT_MADE,
|
|
|
127 |
OrderStatus.DOA_REQUEST_RECEIVED,
|
|
|
128 |
OrderStatus.DOA_REQUEST_AUTHORIZED,
|
|
|
129 |
OrderStatus.DOA_RECEIVED_DAMAGED,
|
|
|
130 |
OrderStatus.DOA_LOST_IN_TRANSIT,
|
|
|
131 |
OrderStatus.RTO_RECEIVED_DAMAGED,
|
|
|
132 |
OrderStatus.RTO_LOST_IN_TRANSIT,
|
|
|
133 |
OrderStatus.RTO_INVENTORY_REVERSED,
|
|
|
134 |
OrderStatus.RET_REQUEST_RECEIVED,
|
|
|
135 |
OrderStatus.RET_REQUEST_AUTHORIZED,
|
|
|
136 |
OrderStatus.RET_PICKUP_REQUEST_RAISED,
|
|
|
137 |
OrderStatus.RET_PICKUP_DENIED,
|
|
|
138 |
OrderStatus.RET_PICKUP_CONFIRMED,
|
|
|
139 |
OrderStatus.RET_RETURN_IN_TRANSIT,
|
|
|
140 |
OrderStatus.RET_RECEIVED_PRESTINE,
|
|
|
141 |
OrderStatus.RET_RECEIVED_DAMAGED,
|
|
|
142 |
OrderStatus.RET_LOST_IN_TRANSIT,
|
|
|
143 |
OrderStatus.RET_PRODUCT_USABLE,
|
|
|
144 |
OrderStatus.RET_PRODUCT_UNUSABLE,
|
|
|
145 |
OrderStatus.LOST_IN_TRANSIT,
|
|
|
146 |
OrderStatus.DELIVERED_AT_STORE,
|
|
|
147 |
OrderStatus.RECEIVED_AT_STORE
|
|
|
148 |
));
|
|
|
149 |
|
|
|
150 |
this.failedOrders = new ArrayList<>(Arrays.asList(
|
|
|
151 |
OrderStatus.PAYMENT_FAILED,
|
|
|
152 |
OrderStatus.CANCELLED_DUE_TO_LOW_INVENTORY,
|
|
|
153 |
OrderStatus.REJECTED,
|
|
|
154 |
OrderStatus.DOA_INVALID_REFUNDED,
|
|
|
155 |
OrderStatus.DOA_INVALID_RESHIPPED,
|
|
|
156 |
OrderStatus.DOA_VALID_REFUNDED,
|
|
|
157 |
OrderStatus.DOA_VALID_RESHIPPED,
|
|
|
158 |
OrderStatus.RTO_REFUNDED,
|
|
|
159 |
OrderStatus.RTO_RESHIPPED,
|
|
|
160 |
OrderStatus.COD_VERIFICATION_FAILED
|
|
|
161 |
));
|
|
|
162 |
}
|
|
|
163 |
|
|
|
164 |
public List<OrderStatus> getCodCancellable() { return codCancellable; }
|
|
|
165 |
public List<OrderStatus> getPrepaidCancellableBeforeBilled() { return prepaidCancellableBeforeBilled; }
|
|
|
166 |
public List<OrderStatus> getPrepaidCancellableAfterBilled() { return prepaidCancellableAfterBilled; }
|
|
|
167 |
public List<OrderStatus> getOpenOrders() { return openOrders; }
|
|
|
168 |
public List<OrderStatus> getRefundedOrders() { return refundedOrders; }
|
|
|
169 |
public List<OrderStatus> getShippedOrders() { return shippedOrders; }
|
|
|
170 |
public List<OrderStatus> getFailedOrders() { return failedOrders; }
|
|
|
171 |
}
|