clearing-service Sdf13 ожидание полностью готовой группы в SessionMonitor
This commit is contained in:
parent
47d0830e9e
commit
f5d5c8acfb
2 changed files with 18 additions and 10 deletions
|
|
@ -283,16 +283,15 @@ public class StatementService extends QueueConsumer implements InitializingBean
|
|||
AbstractExecutor service = executorsMap.get(SdfTable.SDF_13);
|
||||
Result res = service.execute(sdfGroup, statementRequest);
|
||||
SessionContinueEvent continueSessionBn = new SessionContinueEvent(SdfTable.SDF_13);
|
||||
// if (res.isAnyHasError()) { todo
|
||||
// NotificationNewRequest nRequest = new NotificationNewRequest();
|
||||
// nRequest.setObjectType(ObjectType.rgst.getKey());
|
||||
// nRequest.setPriority(Priority.HIGH.getKey());
|
||||
// nRequest.setComment(String.format("Ошибка : некоторые из новых SDF_13 имеют неправильный статус"));
|
||||
// kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, nRequest);
|
||||
// } else {
|
||||
// kafkaSender.sendRequestToQueue(Consts.CONTINUE_SESSION_BN_FIRST_PART, continueSessionBn);
|
||||
// }
|
||||
kafkaSender.sendRequestToQueue(Consts.CONTINUE_SESSION_BN_FIRST_PART, continueSessionBn);
|
||||
if (res.isAnyHasError()) {
|
||||
NotificationNewRequest nRequest = new NotificationNewRequest();
|
||||
nRequest.setObjectType(ObjectType.rgst.getKey());
|
||||
nRequest.setPriority(Priority.HIGH.getKey());
|
||||
nRequest.setComment("Поручения из клиринговой системы имеют неисполненный статус в ответе ДФ-13 из расчетной организации");
|
||||
kafkaSender.sendRequestToQueue(Consts.NOTIFICATION_NEW, nRequest);
|
||||
} else {
|
||||
kafkaSender.sendRequestToQueue(Consts.CONTINUE_SESSION_BN_FIRST_PART, continueSessionBn);
|
||||
}
|
||||
// finishSendCommand(res, service, statementRequest);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package ru.spcex.clearing.service.executors;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
|
@ -62,6 +63,14 @@ public class Sdf13Executor extends AbstractExecutor<SDf13> {
|
|||
Result result = new Result();
|
||||
Long generationIdForGroup = imdgProvider.getImdgIdGenerator().nextId();
|
||||
result.setChildGenerationId(generationIdForGroup);
|
||||
result.setAnyHasError(false);
|
||||
for (SDf13 sdf13 : sdf) {
|
||||
if (!StringUtils.startsWith(sdf13.getResult(), "OK")) {
|
||||
log.warn("groupId={} stop execute cause: sdf13[{}].result=\"{}\" was not ok.", statementRequest.getGroupId(), sdf13.getId(), sdf13.getResult());
|
||||
result.setAnyHasError(true);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
// for (SDf13 sdf13 : sdf) {
|
||||
// //обычно мы ищем по группу sdf04, здесь как будто всегда только одна запись, todo нужно прочекать этот момент
|
||||
// SDf12 sDf12 = selectSdf12bySdf13(sdf13);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue