- 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.
46 lines
1.5 KiB
C++
46 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <QSet>
|
|
#include <db/EventInfo.h>
|
|
|
|
class EventDAO {
|
|
public:
|
|
[[nodiscard]] static int insertEvent(const EventInfo &event);
|
|
|
|
[[nodiscard]] static bool updateEvent(
|
|
int id,
|
|
const EventStatus &status,
|
|
const QString &comment
|
|
);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getAllEvents(const EventStatus &status);
|
|
|
|
[[nodiscard]] static EventInfo getFirstWaitEventByDeviceId(const QString &key);
|
|
|
|
[[nodiscard]] static bool existsActiveByExternalId(const QString &externalId);
|
|
|
|
[[nodiscard]] static QList<EventInfo> cancelWaitingByType(const QString &deviceId, EventType type, const QString &bankName = {});
|
|
|
|
[[nodiscard]] static QList<EventInfo> cancelWaitingByMaterial(const QString &materialId, EventType type);
|
|
|
|
[[nodiscard]] static QList<EventInfo> cancelWaitingByBank(const QString &deviceId, const QString &bankName);
|
|
|
|
[[nodiscard]] static bool updateScreenshot(int id, const QByteArray &screenshot);
|
|
|
|
[[nodiscard]] static QByteArray getScreenshot(int id);
|
|
|
|
[[nodiscard]] static bool updateEventAmount(int id, double amount);
|
|
|
|
[[nodiscard]] static bool markSentToServer(int id);
|
|
|
|
[[nodiscard]] static QList<EventInfo> getEvents(int page, int pageSize);
|
|
|
|
[[nodiscard]] static int getTotalCount();
|
|
|
|
[[nodiscard]] static bool hasPendingEvents();
|
|
|
|
[[nodiscard]] static QSet<QString> getDevicesWithPendingEvents();
|
|
|
|
[[nodiscard]] static QList<EventInfo> getRecentEvents(int hours);
|
|
};
|