| Line 1037... |
Line 1037... |
| 1037 |
ActivatedImei activatedImei = activatedImeiMap.get(serialNumber);
|
1037 |
ActivatedImei activatedImei = activatedImeiMap.get(serialNumber);
|
| 1038 |
if (activatedImei == null) {
|
1038 |
if (activatedImei == null) {
|
| 1039 |
continue;
|
1039 |
continue;
|
| 1040 |
}
|
1040 |
}
|
| 1041 |
Scheme scheme = schemesMap.get(pendingPayout.getSchemeId());
|
1041 |
Scheme scheme = schemesMap.get(pendingPayout.getSchemeId());
|
| 1042 |
if (activatedImei.getActivationTimestamp().isBefore(scheme.getEndDateTime())
|
1042 |
if (scheme.isWithinRange(activatedImei.getActivationTimestamp())) {
|
| 1043 |
&& activatedImei.getActivationTimestamp().isAfter(scheme.getStartDateTime())) {
|
- |
|
| 1044 |
int fofoId = ii.getFofoId();
|
1043 |
int fofoId = ii.getFofoId();
|
| 1045 |
// Get latest order Id
|
1044 |
// Get latest order Id
|
| 1046 |
int orderId = scanRecordRepository.selectByInventoryItemId(ii.getId()).stream()
|
1045 |
int orderId = scanRecordRepository.selectByInventoryItemId(ii.getId()).stream()
|
| 1047 |
.filter(x -> x.getOrderId() > 0)
|
1046 |
.filter(x -> x.getOrderId() > 0)
|
| 1048 |
.sorted(Comparator.comparing(ScanRecord::getCreateTimestamp).reversed()).findFirst().get()
|
1047 |
.sorted(Comparator.comparing(ScanRecord::getCreateTimestamp).reversed()).findFirst().get()
|