Commit 93f31062 authored by Karel Slaný's avatar Karel Slaný Committed by Martin Straka

Updated Gov::SrvcMvZrVp.

parent 5016f737
......@@ -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 živnostenského rejstříku
* DS: xhzkdqv - Automat CzP (Ministerstvo vnitra)
* XML: czpathome.xml - nutno zadat IČ do xml.
* Source DS type: FO, PFO, PO
*/
class GovMvZrVp : public GovService {
#include "src/datovka_shared/gov_services/service/gov_service.h"
public:
namespace Gov {
/*!
* @brief Constructor.
* GOV MV service
* Name: Výpis z živnostenského rejstříku
* DS: xhzkdqv - Automat CzP (Ministerstvo vnitra)
* XML: czpathome.xml - nutno zadat IČ do xml.
* Source DS type: FO, PFO, PO
*/
GovMvZrVp(void);
class SrvcMvZrVp : public Service {
Q_DECLARE_TR_FUNCTIONS(SrvcMvZrVp)
/*!
* @brief Destructor.
*/
virtual
~GovMvZrVp(void) Q_DECL_OVERRIDE;
public:
/*!
* @brief Constructor.
*/
SrvcMvZrVp(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. */
};
}
......@@ -29,7 +29,7 @@
#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_zr_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"
#include "src/datovka_shared/gov_services/service/gov_szr_rob_vvu.h"
......@@ -171,6 +171,20 @@ void GovWrapper::initGovServices(void)
}
}
/* Výpis z živnostenského rejstříku */
gs = new (std::nothrow) Gov::SrvcMvZrVp;
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) {
......@@ -212,10 +226,6 @@ void GovWrapper::initGovServices(void)
delete gs;
}
}
// /* Výpis z živnostenského rejstříku */
// GovMvZrVp *gs7 = new GovMvZrVp();
// m_govServices.insert(gs7->serviceId(), gs7);
}
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