Commit 5016f737 authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Updated Gov::SrvcMvVrVp.

parent c0bb8810
......@@ -23,38 +23,66 @@
#pragma once
#include "src/datovka_shared/gov_services/service/gov_service.h"
#include <QCoreApplication> /* Q_DECLARE_TR_FUNCTIONS */
/*!
* GOV MV service
* Name: Výpis z veřejného rejstříku
* DS: xhzkdqv - Automat CzP (Ministerstvo vnitra)
* XML: czpathome.xml - nutno zadat IČ do xml.
* Source DS type: FO, PFO, PO.
*/
class GovMvVrVp : public GovService {
#include "src/datovka_shared/gov_services/service/gov_service.h"
public:
namespace Gov {
/*!
* @brief Constructor.
* GOV MV service
* Name: Výpis z veřejného rejstříku
* DS: xhzkdqv - Automat CzP (Ministerstvo vnitra)
* XML: czpathome.xml - nutno zadat IČ do xml.
* Source DS type: FO, PFO, PO.
*/
GovMvVrVp(void);
class SrvcMvVrVp : public Service {
Q_DECLARE_TR_FUNCTIONS(SrvcMvCrrVbh)
/*!
* @brief Destructor.
*/
virtual
~GovMvVrVp(void) Q_DECL_OVERRIDE;
public:
/*!
* @brief Constructor.
*/
SrvcMvVrVp(void);
/*!
* @brief Create and fill XML attachment content.
*
* @param[in] dbOwnerInfo DS owner info.
* @param[in] reqFields Gov service required information.
* @return XML string for attachment.
*/
virtual
const QByteArray createXmlAttachment(const Isds::DbOwnerInfo &dbOwnerInfo,
XmlRequiredFileds reqFields) Q_DECL_OVERRIDE;
};
virtual
const QString &internalId(void) const Q_DECL_OVERRIDE;
virtual
const QString &fullName(void) const Q_DECL_OVERRIDE;
virtual
const QString &instituteName(void) const Q_DECL_OVERRIDE;
virtual
const QString &boxId(void) const Q_DECL_OVERRIDE;
virtual
const QString &dmAnnotation(void) const Q_DECL_OVERRIDE;
virtual
const QString &dmSenderIdent(void) const Q_DECL_OVERRIDE;
virtual
const QString &dmFileDescr(void) const Q_DECL_OVERRIDE;
virtual
bool canSend(enum Isds::Type::DbType dbType) const Q_DECL_OVERRIDE;
virtual
QList<RequiredInput> requiredFields(void) const Q_DECL_OVERRIDE;
virtual
bool setRequiredField(const QString &key, const QString &val) Q_DECL_OVERRIDE;
virtual
bool haveAllMandatoryFields(void) const Q_DECL_OVERRIDE;
virtual
QByteArray binaryXmlContent(const Isds::DbOwnerInfo &dbOwnerInfo) const Q_DECL_OVERRIDE;
private:
QString m_ic; /*!< Identification number. */
};
}
......@@ -28,7 +28,7 @@
#include "src/datovka_shared/gov_services/service/gov_mv_rt_vt.h"
#include "src/datovka_shared/gov_services/service/gov_mv_rtpo_vt.h"
#include "src/datovka_shared/gov_services/service/gov_mv_skd_vp.h"
//#include "src/datovka_shared/gov_services/service/gov_mv_vr_vp.h"
#include "src/datovka_shared/gov_services/service/gov_mv_vr_vp.h"
//#include "src/datovka_shared/gov_services/service/gov_mv_zr_vp.h"
#include "src/datovka_shared/gov_services/service/gov_service.h"
#include "src/datovka_shared/gov_services/service/gov_szr_rob_vu.h"
......@@ -157,6 +157,20 @@ void GovWrapper::initGovServices(void)
}
}
/* Výpis z veřejného rejstříku */
gs = new (std::nothrow) Gov::SrvcMvVrVp;
if (gs != Q_NULLPTR) {
const QString &key(gs->internalId());
if (!m_govServices.contains(key)) {
m_govServices.insert(key, gs);
} else {
logError(
"Key '%s' already exists in gov services container.",
key.toUtf8().constData());
delete gs;
}
}
/* Výpis z Registru obyvatel */
gs = new (std::nothrow) Gov::SrvcSzrRobVu;
if (gs != Q_NULLPTR) {
......@@ -202,10 +216,6 @@ void GovWrapper::initGovServices(void)
// /* Výpis z živnostenského rejstříku */
// GovMvZrVp *gs7 = new GovMvZrVp();
// m_govServices.insert(gs7->serviceId(), gs7);
// /* Výpis z veřejného rejstříku */
// GovMvVrVp *gs8 = new GovMvVrVp();
// m_govServices.insert(gs8->serviceId(), gs8);
}
void GovWrapper::loadServicesToModel(const QVariant &srvcModelVariant) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment