cls26 collector
This commit is contained in:
parent
3f2aa8faa3
commit
1c27ed93f9
1 changed files with 82 additions and 86 deletions
|
|
@ -20,22 +20,19 @@ import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
public class ReportBR_0420317_collector extends ReportWithPeriodCollector<ReportBR_0420317> {
|
public class ReportBR_0420317_Collector extends ReportWithPeriodCollector<ReportBR_0420317> {
|
||||||
private Imdg<Company> companyImdg;
|
private Imdg<Company> companyImdg;
|
||||||
private Imdg<Relation> relationImdg;
|
private Imdg<Relation> relationImdg;
|
||||||
private Imdg<CompanySymbols> companySymbolsImdg;
|
private Imdg<CompanySymbols> companySymbolsImdg;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
public ReportBR_0420317_collector(ImdgProvider imdgProvider) {
|
public ReportBR_0420317_Collector(ImdgProvider imdgProvider) {
|
||||||
companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
companyImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Company, Company.class);
|
||||||
relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
|
relationImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_Relation, Relation.class);
|
||||||
companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
|
companySymbolsImdg = imdgProvider.getImdg(IMDGDistributedNames.Map_CompanySymbols, CompanySymbols.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<Relation> searchRelation(LocalDate startDate, LocalDate endDate, String service) {
|
Collection<Relation> searchRelation(LocalDate startDate, LocalDate endDate, String service) {
|
||||||
// String ql = String.format("'%s' <= updated and updated <= '%s' and service='MKR'", startDate, endDate);
|
|
||||||
// Collection<Relation> relations = relationImdg.getCollectionObjectsBySQL(ql);
|
|
||||||
|
|
||||||
ImdgPredicateBuilder pb = relationImdg.predicateBuilder();
|
ImdgPredicateBuilder pb = relationImdg.predicateBuilder();
|
||||||
Instant dateTimeLo = toInstantStartDay(startDate);
|
Instant dateTimeLo = toInstantStartDay(startDate);
|
||||||
Instant dateTimeHi = toInstantStartDay(endDate);
|
Instant dateTimeHi = toInstantStartDay(endDate);
|
||||||
|
|
@ -63,16 +60,15 @@ public class ReportBR_0420317_collector extends ReportWithPeriodCollector<Report
|
||||||
"companyId", company.getId()
|
"companyId", company.getId()
|
||||||
));
|
));
|
||||||
ReportBR_0420317.Info_0420317 info_0420317 = new ReportBR_0420317.Info_0420317(
|
ReportBR_0420317.Info_0420317 info_0420317 = new ReportBR_0420317.Info_0420317(
|
||||||
company.getClearingCode(),
|
toString(company.getClearingCode()),
|
||||||
toString(relation.getSupplierId()),
|
toString(toString(relation.getSupplierId())),
|
||||||
relation.getService(),
|
toString(relation.getService()),
|
||||||
relation.getServiceStatus(),
|
toString(relation.getServiceStatus()),
|
||||||
toString(relation.getUpdated()),
|
toString(relation.getUpdated()),
|
||||||
company.getFullName(),
|
toString(company.getFullName()),
|
||||||
companySymbol == null ? null : companySymbol.getCompanySymbolValue(),
|
companySymbol == null ? "" : toString(companySymbol.getCompanySymbolValue()),
|
||||||
company.getProfile().getCountryCode(),
|
toString(company.getProfile().getCountryCode()),
|
||||||
relation.getComment()
|
toString(relation.getComment()));
|
||||||
);
|
|
||||||
reportBR_0420317.getRows().add(info_0420317);
|
reportBR_0420317.getRows().add(info_0420317);
|
||||||
}
|
}
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue