1
0
forked from BRT/arc
arc/android/dushanbe/GetLastTransactionsScript.h
slava 628323184f Refine transaction fetching and parsing:
- Add date header parsing and swipe functionality for streamlined `Ozon` transactions list processing.
- Improve deduplication logic, date assignment, and scroll behavior in `Dushanbe` and `Ozon` scripts.
- Introduce screenshot handling for debugging transaction fetching workflows.
- Add cancellation logic by `materialId` in `EventDAO`.
- Update mock server for enhanced filename generation and PATCH support for bank profiles.
2026-04-13 22:41:15 +07:00

45 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "CommonScript.h"
#include <QDateTime>
#include <QJsonObject>
#include "db/DeviceInfo.h"
#include "db/BankProfileInfo.h"
namespace Dushanbe {
class GetLastTransactionsScript final : public CommonScript {
Q_OBJECT
public:
explicit GetLastTransactionsScript(
QString deviceId,
QString appCode,
double searchAmount = 0,
QDateTime searchTime = {},
QObject *parent = nullptr
);
~GetLastTransactionsScript() override;
signals:
// Испускается, когда транзакция найдена и распарсена с экрана деталей.
// EventHandler использует эти данные напрямую для task_result вместо
// повторного чтения из БД.
void transactionParsed(const QJsonObject &tx);
// Скриншот списка транзакций (при ошибке отправляется в мониторинг)
void screenshotReady(const QByteArray &screenshot);
protected:
void doStart() override;
private:
QString m_deviceId;
const QString m_appCode;
const double m_searchAmount; // сумма в сомони (0 = все последние)
const QDateTime m_searchTime; // примерное время (UTC)
QString m_error;
};
} // namespace Dushanbe