parent
d3fc4ae105
commit
04b5498542
4 changed files with 12 additions and 6 deletions
|
|
@ -9,6 +9,7 @@ import ru.clearing.classes.statics.data.company.Company;
|
|||
import ru.clearing.classes.statics.data.company.CompanySymbols;
|
||||
import ru.clearing.classes.statics.data.profile.ProfileDocument;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.CompanySymbol;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
|
|
@ -58,9 +59,9 @@ public class NCMPNotificationBuilder extends NotificationBuilder {
|
|||
return null;
|
||||
}
|
||||
|
||||
String companySymbolsValueINN = getCompanySymbolValue("companyId = %d AND companySymbol = INN".formatted(consumerId), companySymbolsImdg);
|
||||
String companySymbolValueCLRC = getCompanySymbolValue("companyId = %d AND companySymbol = CLRC".formatted(consumerId), companySymbolsImdg);
|
||||
String companySymbolValueRGRC = getCompanySymbolValue("companyId = %d AND companySymbol = RGRC".formatted(consumerId), companySymbolsImdg);
|
||||
String companySymbolsValueINN = getCompanySymbolValue("companyId = %d AND companySymbol = %s".formatted(consumerId, CompanySymbol.INN.getKey()), companySymbolsImdg);
|
||||
String companySymbolValueCLRC = getCompanySymbolValue("companyId = %d AND companySymbol = %s".formatted(consumerId, CompanySymbol.CLRC.getKey()), companySymbolsImdg);
|
||||
String companySymbolValueRGRC = getCompanySymbolValue("companyId = %d AND companySymbol = %s".formatted(consumerId, CompanySymbol.RGRC.getKey()), companySymbolsImdg);
|
||||
|
||||
String accountSql = "companyId = %d AND accountType = INFO".formatted(consumerId);
|
||||
Account account = null;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import ru.clearing.classes.statics.data.company.Company;
|
|||
import ru.clearing.classes.statics.data.company.CompanySymbols;
|
||||
import ru.clearing.classes.statics.data.registry.TradingClearingRegistry;
|
||||
import ru.spcex.clearing.imdg.IMDGDistributedNames;
|
||||
import ru.spcex.platform.enumeration.CompanySymbol;
|
||||
import ru.spcex.platform.imdg.api.Imdg;
|
||||
import ru.spcex.platform.imdg.api.ImdgProvider;
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ public class NTCRNotificationBuilder extends NotificationBuilder {
|
|||
return null;
|
||||
}
|
||||
|
||||
String companySymbolValueCLRC = getCompanySymbolValue("companyId = %d AND companySymbol = CLRC".formatted(consumerId), companySymbolsImdg);
|
||||
String companySymbolValueCLRC = getCompanySymbolValue("companyId = %d AND companySymbol = %s".formatted(consumerId, CompanySymbol.INN.getKey()), companySymbolsImdg);
|
||||
|
||||
|
||||
Map<String, String> valuesForTemplate = new HashMap<>();
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import ru.spcex.clearing.platform.messaging.service.QueueConsumer;
|
|||
import ru.spcex.clearing.platform.messaging.service.RequestInfoUpdate;
|
||||
import ru.spcex.clearing.reports.config.element.ReportsServiceSettings;
|
||||
import ru.spcex.clearing.reports.notifications.NCMPNotificationBuilder;
|
||||
import ru.spcex.clearing.reports.notifications.NTCRNotificationBuilder;
|
||||
import ru.spcex.clearing.util.security.UserRoleVerification;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -23,6 +24,7 @@ public class NotificationService extends QueueConsumer implements InitializingBe
|
|||
private final Logger log = LoggerFactory.getLogger(getClass());
|
||||
private final UserRoleVerification userRoleVerification;
|
||||
private final NCMPNotificationBuilder ncmpNotificationBuilder;
|
||||
private final NTCRNotificationBuilder ntcrNotificationBuilder;
|
||||
|
||||
private final File outFolder;
|
||||
|
||||
|
|
@ -30,10 +32,12 @@ public class NotificationService extends QueueConsumer implements InitializingBe
|
|||
Producer<String, Object> kafkaResponseQueue,
|
||||
UserRoleVerification userRoleVerification,
|
||||
NCMPNotificationBuilder ncmpNotificationBuilder,
|
||||
NTCRNotificationBuilder ntcrNotificationBuilder,
|
||||
ReportsServiceSettings reportsServiceSettings) {
|
||||
super(kafkaQueue, kafkaResponseQueue);
|
||||
this.userRoleVerification = userRoleVerification;
|
||||
this.ncmpNotificationBuilder = ncmpNotificationBuilder;
|
||||
this.ntcrNotificationBuilder = ntcrNotificationBuilder;
|
||||
this.outFolder = new File(reportsServiceSettings.getNotificationModuleOut());
|
||||
assert outFolder.isDirectory();
|
||||
}
|
||||
|
|
@ -76,7 +80,7 @@ public class NotificationService extends QueueConsumer implements InitializingBe
|
|||
|
||||
logUnknownProperties(userRequest);
|
||||
|
||||
File outFile = ncmpNotificationBuilder.buildNotification(req.getConsumerId(), outFolder);
|
||||
File outFile = ntcrNotificationBuilder.buildNotification(req.getConsumerId(), outFolder);
|
||||
if (outFile == null) {
|
||||
log.error("Create notification NTCR for id={} failed, see log", req.getConsumerId());
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class DOCXServiceTest {
|
|||
file.delete();
|
||||
}
|
||||
|
||||
// @Test//для отладки алгоритма объединения ключей
|
||||
// @Test//для отладки алгоритма объединения ключей в методе DOCXService.collectKeysFromParagraph(XWPFParagraph paragraph)
|
||||
void normalize() {
|
||||
List<String> data = Arrays.asList(new String[]{"test ", "someText${", "some", "Key}/${ano", "ther", "Key}someText", "test"});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue