This commit is contained in:
akulikov 2023-08-04 13:32:27 +03:00
parent 9ba69c188f
commit 117e94ef2e
7 changed files with 42 additions and 0 deletions

View file

@ -61,6 +61,12 @@ public abstract class ExecutedDealReportBuilderCommon<P> extends CSVReportBuilde
for (ExecutionFond executionFond : executionFonds) {
try {
Company company = companyImdg.getSingleObjectByID(executionFond.getCompanyId());
if (company == null) {
log.warn("For execution id = {} company with id = {} not found, execution was skipped",
executionFond.getId(),
executionFond.getCompanyId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
STrades sTrade = null;

View file

@ -74,6 +74,12 @@ public class UnfulfilledDealReportBuilder extends CSVReportBuilder<SessionIdPara
for (ExecutionFond executionFond : executionFonds) {
try {
Company company = companyImdg.getSingleObjectByID(executionFond.getCompanyId());
if (company == null) {
log.warn("For execution id = {} company with id = {} not found, execution was skipped",
executionFond.getId(),
executionFond.getCompanyId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;;
STrades sTrade = sTradesImdg.getFirstObjectByFieldValues(

View file

@ -85,6 +85,12 @@ public class KSCommissionTradesReportBuilder extends CSVReportBuilder<EmptyParam
for (Registry registry : registries) {
try {
Company company = companyImdg.getSingleObjectByID(registry.getCompanyId());
if (company == null) {
log.warn("For registry id = {} company with id = {} not found, registry was skipped",
registry.getId(),
registry.getCompanyId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
CompanySymbols companySymbols = companySymbolsImdg.getFirstObjectByFieldValues(

View file

@ -81,6 +81,12 @@ public class KSRepCashRegisterSumsReportBuilder extends CSVReportBuilder<EmptyPa
for (Statement statement : statements) {
try {
Company company = companyImdg.getSingleObjectByID(statement.getAddresseeId());
if (company == null) {
log.warn("For statement id = {} company with id = {} not found, statement was skipped",
statement.getId(),
statement.getAddresseeId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
ImdgPredicateBuilder pbRegistry = registryImdg.predicateBuilder();

View file

@ -84,6 +84,12 @@ public class KSRepCashRegistersReportBuilder extends CSVReportBuilder<EmptyParam
for (Registry registry : registries) {
try {
Company company = companyImdg.getSingleObjectByID(registry.getCompanyId());
if (company == null) {
log.warn("For registry id = {} company with id = {} not found, registry was skipped",
registry.getId(),
registry.getCompanyId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
KSRepCashRegistersReport ksRepCashRegistersReport = new KSRepCashRegistersReport();

View file

@ -91,6 +91,12 @@ public class KSRepDepoRegisterQuantitiesReportBuilder extends CSVReportBuilder<E
for (Statement statement : statements) {
try {
Company company = companyImdg.getSingleObjectByID(statement.getAddresseeId());
if (company == null) {
log.warn("For statement id = {} company with id = {} not found, statement was skipped",
statement.getId(),
statement.getAddresseeId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
ImdgPredicateBuilder pbRegistry = registryImdg.predicateBuilder();

View file

@ -82,6 +82,12 @@ public class KSRepDepoRegistersReportBuilder extends CSVReportBuilder<EmptyParam
for (Registry registry : registries) {
try {
Company company = companyImdg.getSingleObjectByID(registry.getCompanyId());
if (company == null) {
log.warn("For registry id = {} company with id = {} not found, registry was skipped",
registry.getId(),
registry.getCompanyId());
continue;
}
if (!WorkflowStatus.Active.equalsByKey(company.getWorkflowStatus())) continue;
KSRepDepoRegistersReport ksRepDepoRegistersReport = new KSRepDepoRegistersReport();