Fix calculating flag 5000; Set package status to Error if some errors occures
This commit is contained in:
parent
16bb8eb723
commit
deac68b9ae
2 changed files with 2 additions and 1 deletions
|
|
@ -237,6 +237,7 @@ public class SignalFacade {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
signalService.setPackageStatus(packageId, Status.ERROR);
|
||||||
log.error("Ошибка при поиске фидов или расчете флагов просрочек. Package_id {}", packageId, e);
|
log.error("Ошибка при поиске фидов или расчете флагов просрочек. Package_id {}", packageId, e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class FlagsService {
|
||||||
.map(Optional::get)
|
.map(Optional::get)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
if (!dataList.isEmpty() && dataList.stream().anyMatch(item -> item != null && item.getAmountPastDue().compareTo(BigDecimal.valueOf(5000)) > 0)) {
|
if (!dataList.isEmpty() && dataList.stream().anyMatch(item -> item != null && item.getAmountPastDue() != null && item.getAmountPastDue().compareTo(BigDecimal.valueOf(5000)) > 0)) {
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue