sessions InclusionObligations (step 4) disable execution updates for TRDT/CURR/UNIT/IPOT

This commit is contained in:
ialbert 2024-07-31 16:49:55 +03:00
parent 9a51aa5558
commit 8c444e4e1c

View file

@ -135,6 +135,8 @@ public class InclusionObligations implements ISessionStage {
Optional<SessionType> ssnType = obtainSessionType(sessionId);
Map<Long, Registry> rgsToUpdate = new HashMap<>();
List<ExecutionCommon> execsToUpdate = new ArrayList<>();
boolean loadExecs = !IEnumKey.contains(sessionType,
SessionType.TRDT, SessionType.CURR, SessionType.UNIT, SessionType.IPOT);
for (Map.Entry<Long, List<Registry>> entrySet : registryByGroupId.entrySet()) {
log.debug("Processing set of registry with groupId: {}", entrySet.getKey());
String rgsSection = null;
@ -148,10 +150,14 @@ public class InclusionObligations implements ISessionStage {
rgsSection = registry.getSection();
}
}
execsToUpdate.addAll(updateExecutions(sessionId, entrySet.getKey(), rgsSection));
if (loadExecs) {
execsToUpdate.addAll(updateExecutions(sessionId, entrySet.getKey(), rgsSection));
}
}
registryImdg.putAll(rgsToUpdate);
updateExecsBatchV2(execsToUpdate);
if (loadExecs) {
updateExecsBatchV2(execsToUpdate);
}
return new StageResult(null, true);
}