Vesna
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TicketIssueBusinessLogic.h
Go to the documentation of this file.
1 #ifndef TICKETISSUEBUSINESSLOGIC_H
2 #define TICKETISSUEBUSINESSLOGIC_H
3 
4 #include "BusinessLogic.h"
5 
6 #include "datainput/ETarifa.h"
7 #include "appcore/ticketissuelogic/ETicketIssueLogicDefines.h"
8 
9 class QDateTime;
10 class QString;
11 
12 namespace EM
13 {
14  namespace Strojcek
15  {
16  namespace VstupneUdaje
17  {
18  namespace CestovnePoriadky
19  {
20  class EZastavkaVypis;
21  }
22  }
23  }
24  namespace TicketIssueLogic
25  {
26  class ETicketIssueLogicOutputData;
27  }
28 }
29 
31 {
32 public:
34 
36  virtual ~TicketIssueBusinessLogic();
37 
43  bool IsAllowedPaymentOnSelectedTariffSetting( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa::AllowedPaymentType requiredPaymentType );
44 
49  bool IsSelectedTicketCountValidForTicketIssue( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const int selectedTicketCount );
50 
56  QString GetZonesOnBusStop( EM::Strojcek::VstupneUdaje::CestovnePoriadky::EZastavkaVypis *busStopListing );
57 
65  bool GetTimeTicketCardWriteOperationByTariffPayment( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType &paymentType, EM::TicketIssueLogic::EIssueLogicDefines::CardWriteOperations &operationType );
66 
73  bool GetTimeTicketCardValidityStart( const long timeTicketIndex, QDateTime &validityStart );
74 
85  bool CheckOverlappingWithTimeTicketOnCard( short timeTicketIndex, unsigned long startValidity, unsigned long endValidity, const unsigned short its, const long utn, bool &validOverlappingTicketFound );
86 
94  bool CheckOverlappingWithAllTimeTicketsOnCard( unsigned long startValidity, unsigned long endValidity, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, bool &validOverlappingTicketFound );
95 
103  static bool GetITSAndUTNFromTariff( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned short &its, long &utn );
104 
112  bool PrepareTimeTicketZoneListByPriceListRow( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned char priceListRow, std::list< unsigned long > &zoneList );
113 
121  bool GetTimeTicketZoneListSpecific( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, long timeTicketIndex, std::list<unsigned long> &zoneList );
122 
123  bool CheckMultiplePassengersOnTimeTicket( std::vector<const EM::TicketIssueLogic::ETicketIssueLogicOutputData *> *outputDataCollection, unsigned short &maximalCountFullFare, unsigned short &maximalCountReducedFare );
124 
125  bool IsEnteredTimePeriodValidForTimeTicket( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const QDateTime &timeTicketValidityStartDateTime, const QDateTime &timeTicketValidityEndDateTime, QString &messageToDisplay );
126 
127 private:
129 
130  class DataClass;
131  QScopedPointer<DataClass> d;
132 
134 };
135 
136 #endif // TICKETISSUEBUSINESSLOGIC_H
bool IsSelectedTicketCountValidForTicketIssue(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const int selectedTicketCount)
Check selected count of tickets is lower than setting on tariff 'LimitPreHromVydaj'/36.
Definition: TicketIssueBusinessLogic.cpp:193
bool GetTimeTicketCardWriteOperationByTariffPayment(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const EM::TicketIssueLogic::EIssueLogicDefines::PaymentType &paymentType, EM::TicketIssueLogic::EIssueLogicDefines::CardWriteOperations &operationType)
GetTimeTicketCardWriteOperationByTariffPayment returns CardWriteOperation based on tariff's settings ...
Definition: TicketIssueBusinessLogic.cpp:223
bool IsEnteredTimePeriodValidForTimeTicket(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, const QDateTime &timeTicketValidityStartDateTime, const QDateTime &timeTicketValidityEndDateTime, QString &messageToDisplay)
Definition: TicketIssueBusinessLogic.cpp:758
bool GetTimeTicketZoneListSpecific(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, long timeTicketIndex, std::list< unsigned long > &zoneList)
GetTimeTicketZoneListSpecific returns zone list from concrete time ticket with timeTicketIndex.
Definition: TicketIssueBusinessLogic.cpp:602
bool PrepareTimeTicketZoneListByPriceListRow(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned char priceListRow, std::list< unsigned long > &zoneList)
PrepareTimeTicketZoneListByPriceListRow returns zone list based on price list row.
Definition: TicketIssueBusinessLogic.cpp:499
The BusinessLogic class is the base class of all business logic classes. Every inherited class has to...
Definition: BusinessLogic.h:11
TicketIssueBusinessLogic()
Definition: TicketIssueBusinessLogic.cpp:164
Definition: ApplicationDefines.h:219
Definition: TicketIssueBusinessLogic.cpp:60
static const ApplicationDefines::BusinessLogicType mBusinessLogicType
Definition: TicketIssueBusinessLogic.h:33
bool CheckOverlappingWithTimeTicketOnCard(short timeTicketIndex, unsigned long startValidity, unsigned long endValidity, const unsigned short its, const long utn, bool &validOverlappingTicketFound)
CheckOverlappingWithTimeTicketOnCard check if concrete time ticket with timeTicketIndex overlap it's ...
Definition: TicketIssueBusinessLogic.cpp:331
Definition: TicketIssueBusinessLogic.h:30
bool GetTimeTicketCardValidityStart(const long timeTicketIndex, QDateTime &validityStart)
GetTimeTicketCardValidityStart returns validity start date of new issuing time ticket based on readed...
Definition: TicketIssueBusinessLogic.cpp:295
static bool GetITSAndUTNFromTariff(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, unsigned short &its, long &utn)
GetITSAndUTNFromTariff - method gets ITS (IDS) and UTN (cislo MHD) from tariff.
Definition: TicketIssueBusinessLogic.cpp:467
QString GetZonesOnBusStop(EM::Strojcek::VstupneUdaje::CestovnePoriadky::EZastavkaVypis *busStopListing)
GetZonesOnBusStop - finds all zones on specified bus stop and returns those, which have correct IDS n...
Definition: TicketIssueBusinessLogic.cpp:218
bool CheckMultiplePassengersOnTimeTicket(std::vector< const EM::TicketIssueLogic::ETicketIssueLogicOutputData * > *outputDataCollection, unsigned short &maximalCountFullFare, unsigned short &maximalCountReducedFare)
Definition: TicketIssueBusinessLogic.cpp:688
Definition: AutomaticCardHandlingBusinessLogic.h:6
BusinessLogicType
Definition: ApplicationDefines.h:186
bool IsAllowedPaymentOnSelectedTariffSetting(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *selectedTariff, const EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa::AllowedPaymentType requiredPaymentType)
IsAllowedPaymentOnSelectedTariff checks setting 'Platba'/3 on selected tariff.
Definition: TicketIssueBusinessLogic.cpp:174
bool CheckOverlappingWithAllTimeTicketsOnCard(unsigned long startValidity, unsigned long endValidity, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, bool &validOverlappingTicketFound)
CheckOverlappingWithAllTimeTicketsOnCard checks overlapping with all time tickets on card using metho...
Definition: TicketIssueBusinessLogic.cpp:426
virtual ~TicketIssueBusinessLogic()
Definition: TicketIssueBusinessLogic.cpp:170