|
@@ -52,7 +52,7 @@ bool FromWebAPI::initWebApi(const QString& url, const QString& serverID, const Q
|
|
|
}
|
|
}
|
|
|
LH_WRITE_LOG(QString("URL:%1").arg(url));
|
|
LH_WRITE_LOG(QString("URL:%1").arg(url));
|
|
|
LH_WRITE_LOG_DEBUG(QString("ServerID:%1").arg(serverID));
|
|
LH_WRITE_LOG_DEBUG(QString("ServerID:%1").arg(serverID));
|
|
|
- LH_WRITE_LOG_DEBUG(QString("ServerKey:%1").arg(serverKey));
|
|
|
|
|
|
|
+ // LH_WRITE_LOG_DEBUG(QString("ServerKey:%1").arg(serverKey));
|
|
|
|
|
|
|
|
void* pHttp = nullptr;
|
|
void* pHttp = nullptr;
|
|
|
int i = 0;
|
|
int i = 0;
|
|
@@ -390,6 +390,8 @@ bool FromWebAPI::getExecPlanData(int chnID, QList<OnePlanItemInfo>& list)
|
|
|
// SPDLOG_LOGGER_DEBUG(m_logger,"获取执行计划:\n{}",strRet.toStdString());
|
|
// SPDLOG_LOGGER_DEBUG(m_logger,"获取执行计划:\n{}",strRet.toStdString());
|
|
|
try
|
|
try
|
|
|
{
|
|
{
|
|
|
|
|
+ // LH_WRITE_LOG_DEBUG(QString::fromStdString(nJson::parse(strRet.toStdString()).dump(4)));
|
|
|
|
|
+
|
|
|
nJson lowerKeyJson = convertJsonKeyToLower(nJson::parse(strRet.toStdString()));
|
|
nJson lowerKeyJson = convertJsonKeyToLower(nJson::parse(strRet.toStdString()));
|
|
|
int retCode = lowerKeyJson["code"].get<int>();
|
|
int retCode = lowerKeyJson["code"].get<int>();
|
|
|
if(retCode != 0)
|
|
if(retCode != 0)
|
|
@@ -402,11 +404,12 @@ bool FromWebAPI::getExecPlanData(int chnID, QList<OnePlanItemInfo>& list)
|
|
|
{
|
|
{
|
|
|
OnePlanItemInfo info;
|
|
OnePlanItemInfo info;
|
|
|
info.ChannelID = chnID;
|
|
info.ChannelID = chnID;
|
|
|
- info.ChannelName = QString::fromStdString(it["channelName"].get<std::string>());
|
|
|
|
|
- info.onWeekDay = static_cast<enum_WeekDay>(it["onWeekday"].get<int>());
|
|
|
|
|
|
|
+ std::string strChnName = it["channelName"].is_null() ? "" : it["channelName"].get<std::string>();
|
|
|
|
|
+ info.ChannelName = QString::fromStdString(strChnName);
|
|
|
|
|
+ info.onWeekDay = static_cast<enum_WeekDay>(it["onweekday"].get<int>());
|
|
|
info.onDateTime.setDate(QDate::fromString(QString::fromStdString(it["ondate"].get<std::string>()), "yyyy-MM-dd"));
|
|
info.onDateTime.setDate(QDate::fromString(QString::fromStdString(it["ondate"].get<std::string>()), "yyyy-MM-dd"));
|
|
|
info.onDateTime.setTime(QTime::fromString(QString::fromStdString(it["ontime"].get<std::string>()), "hh:mm:ss"));
|
|
info.onDateTime.setTime(QTime::fromString(QString::fromStdString(it["ontime"].get<std::string>()), "hh:mm:ss"));
|
|
|
- info.offWeekDay = static_cast<enum_WeekDay>(it["offWeekday"].get<int>());
|
|
|
|
|
|
|
+ info.offWeekDay = static_cast<enum_WeekDay>(it["offweekday"].get<int>());
|
|
|
info.offDateTime.setDate(QDate::fromString(QString::fromStdString(it["offdate"].get<std::string>()), "yyyy-MM-dd"));
|
|
info.offDateTime.setDate(QDate::fromString(QString::fromStdString(it["offdate"].get<std::string>()), "yyyy-MM-dd"));
|
|
|
info.offDateTime.setTime(QTime::fromString(QString::fromStdString(it["offtime"].get<std::string>()), "hh:mm:ss"));
|
|
info.offDateTime.setTime(QTime::fromString(QString::fromStdString(it["offtime"].get<std::string>()), "hh:mm:ss"));
|
|
|
|
|
|