| Line 88... |
Line 88... |
| 88 |
|
88 |
|
| 89 |
for (Map.Entry<WalletReferenceType, List<UserWalletHistory>> entry : referenceWiseWalletHistory
|
89 |
for (Map.Entry<WalletReferenceType, List<UserWalletHistory>> entry : referenceWiseWalletHistory
|
| 90 |
.entrySet()) {
|
90 |
.entrySet()) {
|
| 91 |
LocalDate dateToReconcile = yesterday;
|
91 |
LocalDate dateToReconcile = yesterday;
|
| 92 |
List<UserWalletHistory> history = entry.getValue();
|
92 |
List<UserWalletHistory> history = entry.getValue();
|
| 93 |
List<Serializable> reconciliation = Arrays.asList(partnerId, retailerNameMap.get(partnerId),
|
93 |
List<Serializable> reconciliation = new ArrayList<>();
|
| 94 |
dateToReconcile);
|
94 |
reconciliation.addAll(Arrays.asList(partnerId, retailerNameMap.get(partnerId), dateToReconcile));
|
| 95 |
Map<Integer, Integer> referenceWalletMap = entry.getValue().stream().collect(
|
95 |
Map<Integer, Integer> referenceWalletMap = entry.getValue().stream().collect(
|
| 96 |
Collectors.groupingBy(x -> x.getReference(), Collectors.summingInt(x -> x.getAmount())));
|
96 |
Collectors.groupingBy(x -> x.getReference(), Collectors.summingInt(x -> x.getAmount())));
|
| 97 |
switch (entry.getKey()) {
|
97 |
switch (entry.getKey()) {
|
| 98 |
case PURCHASE:
|
98 |
case PURCHASE:
|
| 99 |
reconciliation.addAll(
|
99 |
reconciliation.addAll(
|
| Line 185... |
Line 185... |
| 185 |
totalSchemeInWalletCredited += transactionsOnThatDate.get(transactionId);
|
185 |
totalSchemeInWalletCredited += transactionsOnThatDate.get(transactionId);
|
| 186 |
for (SchemeInOut sio : sios) {
|
186 |
for (SchemeInOut sio : sios) {
|
| 187 |
if (sio.getCreateTimestamp().toLocalDate().equals(localDate)) {
|
187 |
if (sio.getCreateTimestamp().toLocalDate().equals(localDate)) {
|
| 188 |
schemeInAmountAdded += sio.getAmount();
|
188 |
schemeInAmountAdded += sio.getAmount();
|
| 189 |
}
|
189 |
}
|
| - |
|
190 |
if (sio.getRolledBackTimestamp() != null
|
| 190 |
if (sio.getRolledBackTimestamp() != null && sio.getRolledBackTimestamp().toLocalDate().equals(localDate)) {
|
191 |
&& sio.getRolledBackTimestamp().toLocalDate().equals(localDate)) {
|
| 191 |
schemeInAmountRolledBack += sio.getAmount();
|
192 |
schemeInAmountRolledBack += sio.getAmount();
|
| 192 |
}
|
193 |
}
|
| 193 |
}
|
194 |
}
|
| 194 |
|
195 |
|
| 195 |
}
|
196 |
}
|
| Line 217... |
Line 218... |
| 217 |
totalSchemeOutWalletCredited += transactionsOnThatDate.get(fofoOrderId);
|
218 |
totalSchemeOutWalletCredited += transactionsOnThatDate.get(fofoOrderId);
|
| 218 |
for (SchemeInOut sio : sios) {
|
219 |
for (SchemeInOut sio : sios) {
|
| 219 |
if (sio.getCreateTimestamp().toLocalDate().equals(localDate)) {
|
220 |
if (sio.getCreateTimestamp().toLocalDate().equals(localDate)) {
|
| 220 |
schemeOutAmountAdded += sio.getAmount();
|
221 |
schemeOutAmountAdded += sio.getAmount();
|
| 221 |
}
|
222 |
}
|
| - |
|
223 |
if (sio.getRolledBackTimestamp() != null
|
| 222 |
if (sio.getRolledBackTimestamp() != null && sio.getRolledBackTimestamp().toLocalDate().equals(localDate)) {
|
224 |
&& sio.getRolledBackTimestamp().toLocalDate().equals(localDate)) {
|
| 223 |
schemeOutAmountRolledBack += sio.getAmount();
|
225 |
schemeOutAmountRolledBack += sio.getAmount();
|
| 224 |
}
|
226 |
}
|
| 225 |
}
|
227 |
}
|
| 226 |
}
|
228 |
}
|
| 227 |
boolean reconciled = Math
|
229 |
boolean reconciled = Math
|