Skip to content

Commit

Permalink
Merge pull request #535 from spacious-team/hotfix-2022.9.2
Browse files Browse the repository at this point in the history
Релиз 2022.9.2
  • Loading branch information
vananiev authored Apr 23, 2023
2 parents 9985524 + ab086ef commit e860f34
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Investbook в сравнении с [Intelinvest](https://intelinvest.ru) и [Sn

### Брокеры
Приложение анализирует отчеты брокеров Тинькофф (xlsx), Сбербанк (xlsx), ВТБ (xls), Промсвязьбанк (xlsx, xml)
и Уралсиб (zip с xls). В ближайшее время будет поддерживать Альфа-Инвестиции, БКС и Финам. Если ваш счет открыт у
другого брокера, напишите [нам](https://t.me/investbook_support). Также вы можете уже на вашей версии приложения
воспользоваться [формами](src/main/asciidoc/investbook-forms.adoc) ввода информации или
и Твой Брокер / Уралсиб (zip с xls). Если ваш счет открыт у другого брокера,
напишите [нам](https://t.me/investbook_support). Также вы можете уже на вашей версии приложения воспользоваться
[формами](src/main/asciidoc/investbook-forms.adoc) ввода информации или
[загрузить](src/main/asciidoc/investbook-input-format.adoc) данные из excel файла. Также поддержку вашего брокера могут
предложить сторонние разработчики через функционал расширений. Инструкция для установки расширений доступна для
операционных систем [windows](docs/install-on-windows.md), [mac](docs/install-on-linux.md) и [linux](docs/install-on-linux.md).
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</parent>
<groupId>ru.investbook</groupId>
<artifactId>investbook</artifactId>
<version>2022.9.1</version>
<version>2022.9.2</version>

<name>investbook</name>
<description>Investor Accounting Book</description>
Expand Down Expand Up @@ -62,7 +62,7 @@

<properties>
<!-- Valid version is (0-255).(0-255).(0-65535) -->
<win.msi.version>22.9.1</win.msi.version>
<win.msi.version>22.9.2</win.msi.version>
<java.version>18</java.version>
<!-- version 3.2.0 provided by Spring Boot 2.4.1 bugged, using version from Spring Boot 2.3.4
https://stackoverflow.com/questions/65910112/maven-clean-install-failed-to-execute-goal-org-apache-maven-pluginsmaven-resou
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,16 @@
import java.util.zip.ZipInputStream;

import static java.util.Objects.requireNonNull;
import static org.spacious_team.table_wrapper.api.TableCellAddress.NOT_FOUND;

@EqualsAndHashCode(callSuper = true)
public class UralsibBrokerReport extends AbstractExcelBrokerReport {
// "УРАЛСИБ Брокер" или "УРАЛСИБ Кэпитал - Финансовые услуги" (старый формат 2018 г)
private static final String PORTFOLIO_MARKER = "Номер счета Клиента:";
private final Predicate<Object> uralsibReportPredicate = (cell) ->
(cell instanceof String) && ((String) cell).contains("УРАЛСИБ");
(cell instanceof String value) && (value.contains("Твой Брокер") || value.contains("УРАЛСИБ"));
private final Predicate<Object> dateMarkerPredicate = (cell) ->
(cell instanceof String) && ((String) cell).contains("за период");
(cell instanceof String value) && value.contains("за период");
private final Workbook book;

public UralsibBrokerReport(ZipInputStream zis, SecurityRegistrar securityRegistrar) {
Expand Down Expand Up @@ -79,8 +80,8 @@ public UralsibBrokerReport(String excelFileName, InputStream is, SecurityRegistr
}

private void checkReportFormat(Path path, ReportPage reportPage) {
if (reportPage.find(0, 1, uralsibReportPredicate) == TableCellAddress.NOT_FOUND) {
throw new RuntimeException("В файле " + path + " не содержится отчет брокера Уралсиб");
if (reportPage.find(0, 1, uralsibReportPredicate) == NOT_FOUND) {
throw new RuntimeException("В файле " + path + " не содержится отчет брокера Твой Брокер (Уралсиб)");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class UralsibBrokerReportFactory extends AbstractBrokerReportFactory {
private final SecurityRegistrar securityRegistrar;

@Getter
private final String brokerName = "Уралсиб";
private final String brokerName = "Твой Брокер (Уралсиб)";
private final Pattern zippedExpectedFileNamePattern = Pattern.compile("^brok_rpt_.*\\.xls(x)?\\.zip$");
private final Pattern expectedFileNamePattern = Pattern.compile("^brok_rpt_.*\\.xls(x)?$");

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/investbook/upgrade/SqlDataExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@RequiredArgsConstructor
public class SqlDataExporter {
private static final String EXPORT_FILE_NAME = "export-2022.9.sql";
private final List<String> expectedInvestbookVersionsForExport = List.of("2022.9", "2022.9.1");
private final List<String> expectedInvestbookVersionsForExport = List.of("2022.9", "2022.9.1", "2022.9.2");
private final BuildProperties buildProperties;
private final InvestbookProperties investbookProperties;
private final JdbcTemplate jdbcTemplate;
Expand Down

0 comments on commit e860f34

Please sign in to comment.