изменения по финальной МКР сессии шаг 5 фикс поиска DM*X
This commit is contained in:
parent
f90365a191
commit
84ccc444b8
1 changed files with 19 additions and 14 deletions
|
|
@ -112,20 +112,24 @@ public class InspectionObligationsDepositReturn implements ISessionStage {
|
|||
log.debug("groupId={}, OM*T.id={}", entry.getKey(), omtRgs.getId());
|
||||
BigDecimal omtBalance = safeBD(omtRgs.getBalance());
|
||||
|
||||
Optional<Registry> dmx = searchDmx(omtRgs);
|
||||
if (dmx.isPresent()) {
|
||||
BigDecimal dmxBalance = safeBD(dmx.get().getBalance());
|
||||
log.debug("OM*T.id={} -> DM*X.id={}, dmxBalance={}, omtBalance={}",
|
||||
omtRgs.getId(),
|
||||
dmx.get().getId(),
|
||||
dmxBalance, omtBalance
|
||||
);
|
||||
if (dmxBalance.compareTo(omtBalance) >= 0) {
|
||||
group.forEach(rgs -> updateStatus(rgs, RegistryStatus.OK));
|
||||
} else {
|
||||
group.forEach(rgs -> updateStatus(rgs, registryStatusForDmxCheckFailed()));
|
||||
if (omtRgs.getValueDate() != null
|
||||
&& omtRgs.getSettlementDate() != null
|
||||
&& omtRgs.getValueDate().isBefore(omtRgs.getSettlementDate())) {
|
||||
Optional<Registry> dmx = searchDmx(omtRgs);
|
||||
if (dmx.isPresent()) {
|
||||
BigDecimal dmxBalance = safeBD(dmx.get().getBalance());
|
||||
log.debug("OM*T.id={} -> DM*X.id={}, dmxBalance={}, omtBalance={}",
|
||||
omtRgs.getId(),
|
||||
dmx.get().getId(),
|
||||
dmxBalance, omtBalance
|
||||
);
|
||||
if (dmxBalance.compareTo(omtBalance) >= 0) {
|
||||
group.forEach(rgs -> updateStatus(rgs, RegistryStatus.OK));
|
||||
} else {
|
||||
group.forEach(rgs -> updateStatus(rgs, registryStatusForDmxCheckFailed()));
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Optional<Registry> amfAssetO = searchAssetByOMT(omtRgs);
|
||||
|
|
@ -168,7 +172,8 @@ public class InspectionObligationsDepositReturn implements ISessionStage {
|
|||
}
|
||||
continue;
|
||||
}
|
||||
log.info("OM*T.id={} -> no DM*X/DM*T(INFO/CLRN) registry found. setting MNG status to group", omtRgs.getId());
|
||||
log.info("OM*T.id={} -> no DM*X/DM*T(INFO/CLRN) registry found. setting {} status to group",
|
||||
omtRgs.getId(), registryStatusForDmxCheckFailed());
|
||||
group.forEach(rgs -> updateStatus(rgs, registryStatusForDmxCheckFailed()));
|
||||
}
|
||||
return new StageResult<>(null, true);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue