From 2bd486469a93cc6e2940d16cb37c3ebfa035e56f Mon Sep 17 00:00:00 2001 From: vananiev Date: Tue, 19 Nov 2024 00:19:30 +0300 Subject: [PATCH] add filter by cash flow type --- ...ventCashFlowEntitySearchSpecification.java | 11 +++++---- ...oreignExchangeRateSearchSpecification.java | 2 +- .../PortfolioCashSearchSpecification.java | 8 +++---- .../PortfolioPropertySearchSpecification.java | 4 ++-- ...ecurityDescriptionSearchSpecification.java | 4 ++-- ...ventCashFlowEntitySearchSpecification.java | 10 ++++---- .../SecurityQuoteSearchSpecification.java | 6 ++--- .../repository/specs/SpecificationHelper.java | 24 +++++++++++++++---- .../specs/TransactionSearchSpecification.java | 8 +++---- .../filter/EventCashFlowFormFilterModel.java | 9 ++++--- .../ForeignExchangeRateFormFilterModel.java | 5 ++-- .../filter/PortfolioCashFormFilterModel.java | 9 +++---- .../PortfolioPropertyFormFilterModel.java | 7 +++--- .../SecurityDescriptionFormFilterModel.java | 5 ++-- .../SecurityEventCashFlowFormFilterModel.java | 11 +++++---- .../filter/SecurityQuoteFormFilterModel.java | 7 +++--- .../filter/TransactionFormFilterModel.java | 9 +++---- .../service/EventCashFlowFormsService.java | 2 +- .../SecurityEventCashFlowFormsService.java | 4 ++-- .../resources/templates/events/table.html | 1 + .../resources/templates/fragments/search.html | 15 ++++++++++++ .../templates/security-events/table.html | 1 + 22 files changed, 106 insertions(+), 56 deletions(-) diff --git a/src/main/java/ru/investbook/repository/specs/EventCashFlowEntitySearchSpecification.java b/src/main/java/ru/investbook/repository/specs/EventCashFlowEntitySearchSpecification.java index ca210911..4233f36d 100644 --- a/src/main/java/ru/investbook/repository/specs/EventCashFlowEntitySearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/EventCashFlowEntitySearchSpecification.java @@ -24,6 +24,7 @@ import jakarta.persistence.criteria.Root; import lombok.RequiredArgsConstructor; import org.checkerframework.checker.nullness.qual.Nullable; +import org.spacious_team.broker.pojo.CashFlowType; import org.springframework.data.jpa.domain.Specification; import ru.investbook.entity.EventCashFlowEntity; import ru.investbook.entity.EventCashFlowEntity_; @@ -37,16 +38,18 @@ @RequiredArgsConstructor(staticName = "of") public class EventCashFlowEntitySearchSpecification implements Specification { - private final String portfolio; - private final LocalDate dateFrom; - private final LocalDate dateTo; + private final @Nullable String portfolio; + private final @Nullable LocalDate dateFrom; + private final @Nullable LocalDate dateTo; + private final @Nullable CashFlowType cashFlowType; @Override public Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { return Stream.of( filterByPortfolio(root, builder, EventCashFlowEntity_.portfolio, portfolio), filterByDateFrom(root, builder, EventCashFlowEntity_.timestamp, dateFrom), - filterByDateTo(root, builder, EventCashFlowEntity_.timestamp, dateTo)) + filterByDateTo(root, builder, EventCashFlowEntity_.timestamp, dateTo), + filterByEquals(root, builder, EventCashFlowEntity_.cashFlowType, cashFlowType)) .filter(Objects::nonNull) .reduce(builder::and) .orElseGet(builder::conjunction); diff --git a/src/main/java/ru/investbook/repository/specs/ForeignExchangeRateSearchSpecification.java b/src/main/java/ru/investbook/repository/specs/ForeignExchangeRateSearchSpecification.java index a946d128..b45a2307 100644 --- a/src/main/java/ru/investbook/repository/specs/ForeignExchangeRateSearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/ForeignExchangeRateSearchSpecification.java @@ -39,7 +39,7 @@ @RequiredArgsConstructor(staticName = "of") public class ForeignExchangeRateSearchSpecification implements Specification { - private final String currency; + private final @Nullable String currency; private final @Nullable LocalDate date; @Override diff --git a/src/main/java/ru/investbook/repository/specs/PortfolioCashSearchSpecification.java b/src/main/java/ru/investbook/repository/specs/PortfolioCashSearchSpecification.java index 9995f3d4..a2ba8d39 100644 --- a/src/main/java/ru/investbook/repository/specs/PortfolioCashSearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/PortfolioCashSearchSpecification.java @@ -38,10 +38,10 @@ @RequiredArgsConstructor(staticName = "of") public class PortfolioCashSearchSpecification implements Specification { - private final String portfolio; - private final LocalDate dateFrom; - private final LocalDate dateTo; - private final String currency; + private final @Nullable String portfolio; + private final @Nullable LocalDate dateFrom; + private final @Nullable LocalDate dateTo; + private final @Nullable String currency; @Override public Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { diff --git a/src/main/java/ru/investbook/repository/specs/PortfolioPropertySearchSpecification.java b/src/main/java/ru/investbook/repository/specs/PortfolioPropertySearchSpecification.java index 0e1f6132..eaabde2f 100644 --- a/src/main/java/ru/investbook/repository/specs/PortfolioPropertySearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/PortfolioPropertySearchSpecification.java @@ -38,8 +38,8 @@ @RequiredArgsConstructor(staticName = "of") public class PortfolioPropertySearchSpecification implements Specification { - private final String portfolio; - private final LocalDate date; + private final @Nullable String portfolio; + private final @Nullable LocalDate date; private final @Nullable PortfolioPropertyType property; @Override diff --git a/src/main/java/ru/investbook/repository/specs/SecurityDescriptionSearchSpecification.java b/src/main/java/ru/investbook/repository/specs/SecurityDescriptionSearchSpecification.java index b175553d..77f3ca1d 100644 --- a/src/main/java/ru/investbook/repository/specs/SecurityDescriptionSearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/SecurityDescriptionSearchSpecification.java @@ -38,8 +38,8 @@ @RequiredArgsConstructor(staticName = "of") public class SecurityDescriptionSearchSpecification implements Specification { - private final String security; - private final String securitySector; + private final @Nullable String security; + private final @Nullable String securitySector; @Override public Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { diff --git a/src/main/java/ru/investbook/repository/specs/SecurityEventCashFlowEntitySearchSpecification.java b/src/main/java/ru/investbook/repository/specs/SecurityEventCashFlowEntitySearchSpecification.java index a968ee59..6685e451 100644 --- a/src/main/java/ru/investbook/repository/specs/SecurityEventCashFlowEntitySearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/SecurityEventCashFlowEntitySearchSpecification.java @@ -40,10 +40,11 @@ @RequiredArgsConstructor(staticName = "of") public class SecurityEventCashFlowEntitySearchSpecification implements Specification { - private final String portfolio; - private final String security; - private final LocalDate dateFrom; - private final LocalDate dateTo; + private final @Nullable String portfolio; + private final @Nullable String security; + private final @Nullable LocalDate dateFrom; + private final @Nullable LocalDate dateTo; + private final @Nullable CashFlowType cashFlowType; @Override public Predicate toPredicate(Root root, @@ -54,6 +55,7 @@ public Predicate toPredicate(Root root, filterByDateFrom(root, builder, SecurityEventCashFlowEntity_.timestamp, dateFrom), filterByDateTo(root, builder, SecurityEventCashFlowEntity_.timestamp, dateTo), filterBySecurity(root, builder, SecurityEventCashFlowEntity_.security, security), + filterByEquals(root, builder, SecurityEventCashFlowEntity_.cashFlowType, cashFlowType), filterByCacheFlowType(root, builder)) .filter(Objects::nonNull) .reduce(builder::and) diff --git a/src/main/java/ru/investbook/repository/specs/SecurityQuoteSearchSpecification.java b/src/main/java/ru/investbook/repository/specs/SecurityQuoteSearchSpecification.java index 78eb3a36..1f6bba7d 100644 --- a/src/main/java/ru/investbook/repository/specs/SecurityQuoteSearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/SecurityQuoteSearchSpecification.java @@ -38,9 +38,9 @@ @RequiredArgsConstructor(staticName = "of") public class SecurityQuoteSearchSpecification implements Specification { - private final String security; - private final String currency; - private final LocalDate date; + private final @Nullable String security; + private final @Nullable String currency; + private final @Nullable LocalDate date; @Override public Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { diff --git a/src/main/java/ru/investbook/repository/specs/SpecificationHelper.java b/src/main/java/ru/investbook/repository/specs/SpecificationHelper.java index 7f295643..0cb0f93e 100644 --- a/src/main/java/ru/investbook/repository/specs/SpecificationHelper.java +++ b/src/main/java/ru/investbook/repository/specs/SpecificationHelper.java @@ -27,6 +27,8 @@ import jakarta.persistence.metamodel.SingularAttribute; import lombok.NoArgsConstructor; import org.checkerframework.checker.nullness.qual.Nullable; +import org.spacious_team.broker.pojo.CashFlowType; +import ru.investbook.entity.CashFlowTypeEntity; import ru.investbook.entity.PortfolioEntity; import ru.investbook.entity.PortfolioEntity_; import ru.investbook.entity.SecurityEntity; @@ -37,6 +39,7 @@ import java.time.LocalTime; import java.time.ZoneId; +import static java.util.Objects.nonNull; import static lombok.AccessLevel.PRIVATE; import static org.springframework.util.StringUtils.hasText; @@ -46,7 +49,7 @@ class SpecificationHelper { static @Nullable Predicate filterBySecurity(Root root, CriteriaBuilder builder, SingularAttribute attribute, - String security) { + @Nullable String security) { if (hasText(security)) { Path securityPath = root.get(attribute); return builder.or( @@ -60,7 +63,7 @@ class SpecificationHelper { static @Nullable Predicate filterBySecurityId(Root root, CriteriaBuilder builder, SingularAttribute attribute, - String security, + @Nullable String security, CriteriaQuery query) { if (hasText(security)) { // Do sub-query because SecurityEntity is not related to SecurityDescriptionEntity in Java model, so @@ -131,7 +134,7 @@ class SpecificationHelper { static Predicate filterByPortfolio(Root root, CriteriaBuilder builder, SingularAttribute attribute, - String portfolio) { + @Nullable String portfolio) { if (hasText(portfolio)) { Path path = root.get(attribute) .get(PortfolioEntity_.ID); @@ -145,7 +148,7 @@ static Predicate filterByPortfolio(Root root, static Predicate filterByPortfolioName(Root root, CriteriaBuilder builder, SingularAttribute attribute, - String portfolio, + @Nullable String portfolio, CriteriaQuery query) { Path transactionPortfolioPath = root.get(attribute); if (hasText(portfolio)) { @@ -166,6 +169,19 @@ static Predicate filterByPortfolioName(Root root, .value(enabledPortfolioIds); } + static @Nullable Predicate filterByEquals(Root root, + CriteriaBuilder builder, + SingularAttribute attribute, + @Nullable CashFlowType value) { + if (nonNull(value)) { + Path path = root.get(attribute); + CashFlowTypeEntity entity = new CashFlowTypeEntity(); + entity.setId(value.getId()); + return builder.equal(path, entity); + } + return null; + } + static @Nullable Predicate filterByEquals(Root root, CriteriaBuilder builder, SingularAttribute attribute, diff --git a/src/main/java/ru/investbook/repository/specs/TransactionSearchSpecification.java b/src/main/java/ru/investbook/repository/specs/TransactionSearchSpecification.java index 2cb602a9..5b27f5cf 100644 --- a/src/main/java/ru/investbook/repository/specs/TransactionSearchSpecification.java +++ b/src/main/java/ru/investbook/repository/specs/TransactionSearchSpecification.java @@ -38,10 +38,10 @@ @RequiredArgsConstructor(staticName = "of") public class TransactionSearchSpecification implements Specification { - private final String portfolio; - private final String security; - private final LocalDate dateFrom; - private final LocalDate dateTo; + private final @Nullable String portfolio; + private final @Nullable String security; + private final @Nullable LocalDate dateFrom; + private final @Nullable LocalDate dateTo; @Override public Predicate toPredicate(Root root, @Nullable CriteriaQuery query, CriteriaBuilder builder) { diff --git a/src/main/java/ru/investbook/web/forms/model/filter/EventCashFlowFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/EventCashFlowFormFilterModel.java index f8f9b46b..028aa706 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/EventCashFlowFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/EventCashFlowFormFilterModel.java @@ -21,6 +21,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.spacious_team.broker.pojo.CashFlowType; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,9 +31,10 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class EventCashFlowFormFilterModel extends AbstractFormFilterModel { - private String portfolio; + private @Nullable String portfolio; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateFrom; + private @Nullable LocalDate dateFrom; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateTo; + private @Nullable LocalDate dateTo; + private @Nullable CashFlowType cashFlowType; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/ForeignExchangeRateFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/ForeignExchangeRateFormFilterModel.java index b7d80e32..54623fa1 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/ForeignExchangeRateFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/ForeignExchangeRateFormFilterModel.java @@ -21,6 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,7 +30,7 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class ForeignExchangeRateFormFilterModel extends AbstractFormFilterModel { - private String currency; + private @Nullable String currency; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @Nullable LocalDate date; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/PortfolioCashFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/PortfolioCashFormFilterModel.java index fa31653b..9c4aca5b 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/PortfolioCashFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/PortfolioCashFormFilterModel.java @@ -21,6 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,10 +30,10 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class PortfolioCashFormFilterModel extends AbstractFormFilterModel { - private String portfolio; + private @Nullable String portfolio; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateFrom; + private @Nullable LocalDate dateFrom; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateTo; - private String currency; + private @Nullable LocalDate dateTo; + private @Nullable String currency; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/PortfolioPropertyFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/PortfolioPropertyFormFilterModel.java index 7c48dbcb..e9f7ab77 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/PortfolioPropertyFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/PortfolioPropertyFormFilterModel.java @@ -21,6 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; import org.spacious_team.broker.pojo.PortfolioPropertyType; import org.springframework.format.annotation.DateTimeFormat; @@ -30,8 +31,8 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class PortfolioPropertyFormFilterModel extends AbstractFormFilterModel { - private String portfolio; + private @Nullable String portfolio; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; - private PortfolioPropertyType property; + private @Nullable LocalDate date; + private @Nullable PortfolioPropertyType property; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/SecurityDescriptionFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/SecurityDescriptionFormFilterModel.java index d5cb4622..266e7e35 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/SecurityDescriptionFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/SecurityDescriptionFormFilterModel.java @@ -21,11 +21,12 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class SecurityDescriptionFormFilterModel extends AbstractFormFilterModel { - private String security; - private String securitySector; + private @Nullable String security; + private @Nullable String securitySector; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/SecurityEventCashFlowFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/SecurityEventCashFlowFormFilterModel.java index 8cad8af3..68cadb6b 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/SecurityEventCashFlowFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/SecurityEventCashFlowFormFilterModel.java @@ -21,6 +21,8 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; +import org.spacious_team.broker.pojo.CashFlowType; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,10 +31,11 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class SecurityEventCashFlowFormFilterModel extends AbstractFormFilterModel { - private String portfolio; - private String security; + private @Nullable String portfolio; + private @Nullable String security; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateFrom; + private @Nullable LocalDate dateFrom; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateTo; + private @Nullable LocalDate dateTo; + private @Nullable CashFlowType cashFlowType; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/SecurityQuoteFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/SecurityQuoteFormFilterModel.java index 37407867..ebcb9c2e 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/SecurityQuoteFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/SecurityQuoteFormFilterModel.java @@ -21,6 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,8 +30,8 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class SecurityQuoteFormFilterModel extends AbstractFormFilterModel { - private String security; - private String currency; + private @Nullable String security; + private @Nullable String currency; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate date; + private @Nullable LocalDate date; } diff --git a/src/main/java/ru/investbook/web/forms/model/filter/TransactionFormFilterModel.java b/src/main/java/ru/investbook/web/forms/model/filter/TransactionFormFilterModel.java index 4fe985d6..00aec478 100644 --- a/src/main/java/ru/investbook/web/forms/model/filter/TransactionFormFilterModel.java +++ b/src/main/java/ru/investbook/web/forms/model/filter/TransactionFormFilterModel.java @@ -21,6 +21,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; +import org.checkerframework.checker.nullness.qual.Nullable; import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDate; @@ -29,10 +30,10 @@ @ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class TransactionFormFilterModel extends AbstractFormFilterModel { - private String portfolio; - private String security; + private @Nullable String portfolio; + private @Nullable String security; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateFrom; + private @Nullable LocalDate dateFrom; @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) - private LocalDate dateTo; + private @Nullable LocalDate dateTo; } diff --git a/src/main/java/ru/investbook/web/forms/service/EventCashFlowFormsService.java b/src/main/java/ru/investbook/web/forms/service/EventCashFlowFormsService.java index d34a1483..af4eeaac 100644 --- a/src/main/java/ru/investbook/web/forms/service/EventCashFlowFormsService.java +++ b/src/main/java/ru/investbook/web/forms/service/EventCashFlowFormsService.java @@ -70,7 +70,7 @@ public Optional getById(Integer id) { @Transactional(readOnly = true) public Page getPage(EventCashFlowFormFilterModel filter) { EventCashFlowEntitySearchSpecification spec = EventCashFlowEntitySearchSpecification.of( - filter.getPortfolio(), filter.getDateFrom(), filter.getDateTo()); + filter.getPortfolio(), filter.getDateFrom(), filter.getDateTo(), filter.getCashFlowType()); Sort sort = Sort.by(Order.asc("portfolio.id"), Order.desc(EventCashFlowEntity_.TIMESTAMP)); PageRequest page = PageRequest.of(filter.getPage(), filter.getPageSize(), sort); diff --git a/src/main/java/ru/investbook/web/forms/service/SecurityEventCashFlowFormsService.java b/src/main/java/ru/investbook/web/forms/service/SecurityEventCashFlowFormsService.java index bfeeb53a..460a6d1a 100644 --- a/src/main/java/ru/investbook/web/forms/service/SecurityEventCashFlowFormsService.java +++ b/src/main/java/ru/investbook/web/forms/service/SecurityEventCashFlowFormsService.java @@ -71,8 +71,8 @@ public Optional getById(Integer id) { @Transactional(readOnly = true) public Page getPage(SecurityEventCashFlowFormFilterModel filter) { SecurityEventCashFlowEntitySearchSpecification spec = - SecurityEventCashFlowEntitySearchSpecification.of( - filter.getPortfolio(), filter.getSecurity(), filter.getDateFrom(), filter.getDateTo()); + SecurityEventCashFlowEntitySearchSpecification.of(filter.getPortfolio(), filter.getSecurity(), + filter.getDateFrom(), filter.getDateTo(), filter.getCashFlowType()); Sort sort = Sort.by(asc("portfolio.id"), desc(SecurityEventCashFlowEntity_.TIMESTAMP), asc("security.id")); PageRequest page = PageRequest.of(filter.getPage(), filter.getPageSize(), sort); diff --git a/src/main/resources/templates/events/table.html b/src/main/resources/templates/events/table.html index e591e035..29934af2 100644 --- a/src/main/resources/templates/events/table.html +++ b/src/main/resources/templates/events/table.html @@ -47,6 +47,7 @@

События по счетам

+
diff --git a/src/main/resources/templates/fragments/search.html b/src/main/resources/templates/fragments/search.html index 17bc60bf..56d6da1d 100644 --- a/src/main/resources/templates/fragments/search.html +++ b/src/main/resources/templates/fragments/search.html @@ -47,6 +47,21 @@ + +