account-srvice http://jira.mfd.msk:8088/browse/CLS-361 CLS-271 дублирование ТКР поправил
This commit is contained in:
parent
f5783dbdb6
commit
fe0887b808
1 changed files with 8 additions and 12 deletions
|
|
@ -334,8 +334,8 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
||||||
tradingClearingRegistryImdg.insert(tradingClearingRegistry);
|
tradingClearingRegistryImdg.insert(tradingClearingRegistry);
|
||||||
log.info("New TCR.id={} was created.", tradingClearingRegistry.getId());
|
log.info("New TCR.id={} was created.", tradingClearingRegistry.getId());
|
||||||
|
|
||||||
sendNotificationToCompanySvc(tradingClearingRegistry);
|
// sendNotificationToCompanySvc(tradingClearingRegistry);
|
||||||
sendNotificationToClearingSvc(tradingClearingRegistry);
|
// sendNotificationToClearingSvc(tradingClearingRegistry);
|
||||||
sendNotificationToReportSvc(tradingClearingRegistry);
|
sendNotificationToReportSvc(tradingClearingRegistry);
|
||||||
|
|
||||||
log.debug("successfully processed, id {}", id);
|
log.debug("successfully processed, id {}", id);
|
||||||
|
|
@ -383,16 +383,12 @@ public class TradingClearingRegistryService extends QueueConsumer implements Ini
|
||||||
code = code.substring(code.length() - 4);
|
code = code.substring(code.length() - 4);
|
||||||
code = "%4s".formatted(code).replace(' ', '0');
|
code = "%4s".formatted(code).replace(' ', '0');
|
||||||
code += registryPurpose.getKey(); // C / M / ...
|
code += registryPurpose.getKey(); // C / M / ...
|
||||||
if (registryPurpose == TradingClearingRegistryPurpose.M) {
|
String trType = tradingRegistryType + "T"; // 2 символа
|
||||||
code += "AT" + id;
|
code += trType;
|
||||||
} else { // C, etc
|
String sId = "%5s".formatted(id).replace(' ', '0');
|
||||||
String trType = tradingRegistryType + "T"; // 2 символа
|
if (sId.length() > 5)
|
||||||
code += trType;
|
sId = sId.substring(sId.length() - 5);
|
||||||
String sId = "%5s".formatted(id).replace(' ', '0');
|
code += sId;
|
||||||
if (sId.length() > 5)
|
|
||||||
sId = sId.substring(sId.length() - 5);
|
|
||||||
code += sId;
|
|
||||||
}
|
|
||||||
return code; // 12 имволов
|
return code; // 12 имволов
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue