#include "workutil.h"
#include "QDate"
#include <QApplication>
#include <QSettings>


QString g_stroid = "99998";
QString g_station_id = "01" ;
QString g_operator_id = "01";
QString g_trans_id = "1";
int g_amount = 0;
int g_num = 0;
QMap<QString, QStringList> g_map;


bool readvalueforkey(const QString &cfgfilename, const QString &section, const QString &key, QString &value)
{
    QString path = qApp->applicationDirPath() + "/" + cfgfilename;

    //QLOG_INFO() << "read cfg file path:" << path;

    QSettings *configIniRead = new QSettings(path, QSettings::IniFormat);
    configIniRead->setIniCodec("utf-8");

    QString akey = "/" + section + "/" + key;
    value = configIniRead->value(akey).toString();

    delete configIniRead;

    return value == "" ? false : true;
}

