Added handling for interpolation, carry over and prepaid.
This commit is contained in:
parent
026c791c79
commit
c6d396f34b
@ -25,6 +25,9 @@
|
|||||||
#include "time_range_header.h"
|
#include "time_range_header.h"
|
||||||
#include "tariff_timestep_config.h"
|
#include "tariff_timestep_config.h"
|
||||||
#include "tariff_product.h"
|
#include "tariff_product.h"
|
||||||
|
#include "tariff_interpolation.h"
|
||||||
|
#include "tariff_prepaid.h"
|
||||||
|
#include "tariff_carryover.h"
|
||||||
|
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
@ -41,6 +44,9 @@ public:
|
|||||||
using TimeRangeType = std::multimap<int, ATBTimeRange>;
|
using TimeRangeType = std::multimap<int, ATBTimeRange>;
|
||||||
using TariffProductType = std::multimap<int, ATBTariffProduct>;
|
using TariffProductType = std::multimap<int, ATBTariffProduct>;
|
||||||
using ATBPaymentOptionType = std::multimap<int, ATBPaymentOption>;
|
using ATBPaymentOptionType = std::multimap<int, ATBPaymentOption>;
|
||||||
|
using TariffInterpolationType = std::multimap<int, ATBInterpolation>;
|
||||||
|
using TariffPrepaidType = std::multimap<int, ATBPrepaid>;
|
||||||
|
using TariffCarryOverType = std::multimap<int, ATBCarryOver>;
|
||||||
|
|
||||||
ATBProject project;
|
ATBProject project;
|
||||||
ATBCurrency Currency;
|
ATBCurrency Currency;
|
||||||
@ -61,6 +67,9 @@ public:
|
|||||||
multimap<int, ATBTimeBase> TimeBase;
|
multimap<int, ATBTimeBase> TimeBase;
|
||||||
multimap<int, ATBCustomer> Customer;
|
multimap<int, ATBCustomer> Customer;
|
||||||
TariffProductType TariffProduct;
|
TariffProductType TariffProduct;
|
||||||
|
TariffInterpolationType TariffInterpolations;
|
||||||
|
TariffPrepaidType TariffPrepaidOptions;
|
||||||
|
TariffCarryOverType TariffCarryOverOptions;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parse JSON string
|
/// Parse JSON string
|
||||||
@ -85,6 +94,8 @@ public:
|
|||||||
std::optional<QVector<ATBPaymentRate>> getPaymentRateForKey(int key) const;
|
std::optional<QVector<ATBPaymentRate>> getPaymentRateForKey(int key) const;
|
||||||
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForAllKeys() const;
|
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForAllKeys() const;
|
||||||
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForKey(int key) const;
|
std::optional<QVector<ATBDailyTicket>> getDailyTicketsForKey(int key) const;
|
||||||
|
std::optional<ATBInterpolation> getInterpolationType(int type) const;
|
||||||
|
std::optional<ATBPrepaid> getPrepaidType(int type) const;
|
||||||
std::optional<QVector<ATBTariffProduct>> getTariffProductForAllKeys() const;
|
std::optional<QVector<ATBTariffProduct>> getTariffProductForAllKeys() const;
|
||||||
std::optional<QVector<ATBTariffProduct>> getTariffProductForProductId(int id) const;
|
std::optional<QVector<ATBTariffProduct>> getTariffProductForProductId(int id) const;
|
||||||
std::optional<QVector<ATBTariffProduct>> getTariffProductForProductId(PermitType permitType) const;
|
std::optional<QVector<ATBTariffProduct>> getTariffProductForProductId(PermitType permitType) const;
|
||||||
@ -92,6 +103,8 @@ public:
|
|||||||
std::optional<ATBCustomer> getCustomerForType(ATBCustomer::CustomerType customerType);
|
std::optional<ATBCustomer> getCustomerForType(ATBCustomer::CustomerType customerType);
|
||||||
std::optional<ATBWeekDaysWorktime> getWeekDayWorkTime(QTime const &time, Qt::DayOfWeek dayOfWeek);
|
std::optional<ATBWeekDaysWorktime> getWeekDayWorkTime(QTime const &time, Qt::DayOfWeek dayOfWeek);
|
||||||
|
|
||||||
|
std::optional<QDateTime> adaptStart(QDateTime const &start, int prepaid_option_id);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Identify type of JSON member
|
/// Identify type of JSON member
|
||||||
|
Loading…
Reference in New Issue
Block a user