etreschenkov 2023-05-29 19:01:49 +03:00
parent 3bf9d651cd
commit b3a5565dc0

View file

@ -124,7 +124,11 @@ public class InspectionObligations implements ISessionStage {
currentRegistry.getCompanyId());
Registry counterRegistry = registryImdg.getSingleObjectBySQL(sqlCounterRegistryCondition);
if (counterRegistry == null) {
log.warn("Not found registry by params: {}", sqlCounterRegistryCondition);
log.warn("Not found registry by params: {}; set not uncovered", sqlCounterRegistryCondition);
currentRegistry.setRegistryStatus("UNCV");
alreadyUpdatedToUncover.add(currentRegistry.getId());
insecurityGroups.add(currentRegistry.getGroupId());
registryImdg.update(currentRegistry);
continue;
}
if (currentRegistry.getBalance().compareTo(counterRegistry.getBalance()) > 0) {
@ -144,6 +148,7 @@ public class InspectionObligations implements ISessionStage {
for (Long insecuritiesGroupId : insecurityGroups) {
for (Registry registry : registryByGroupIdAndCompanyId.get(insecuritiesGroupId)) {
if (!alreadyUpdatedToUncover.contains(registry)) {
log.warn("set fail for registry.id: {}", registry.getId());
registry.setRegistryStatus("FAIL");
registryImdg.update(registry);
}