diff --git a/jsonparse/web_cmd_parse3.cpp b/jsonparse/web_cmd_parse3.cpp index cb2a00f..782a5cc 100644 --- a/jsonparse/web_cmd_parse3.cpp +++ b/jsonparse/web_cmd_parse3.cpp @@ -1420,6 +1420,7 @@ std::string JsonData::JsonCmd_Cgi_67(Param_67 ¶m){ char selectCon[128] = {0}; char column[128] = {0}; char tablename[256] = {0}; + std::string batteryPower = ""; if(param.mMode == 0){ sprintf(selectCon, " t_sensor_info.MeasurementID = t_debug_info.MeasurementID "); sprintf(column, " t_debug_info.*,t_sensor_info.status,t_sensor_info.dataNodeName "); diff --git a/uart/uart_feature_parse.cpp b/uart/uart_feature_parse.cpp index fea0f4f..c7d5d4a 100644 --- a/uart/uart_feature_parse.cpp +++ b/uart/uart_feature_parse.cpp @@ -537,7 +537,7 @@ int Uart::DealDataNodeFeature(const char *pData, int flag) { sqlite_db_ctrl::instance().UpdateTableData(T_DATA_INFO(TNAME), updateSql, whereCon); } else { memset(whereCon, 0x00, sizeof(whereCon)); - sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend = 0 ", (strMeasurementID + "-X").c_str(), strTime.c_str()); + sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend IN (0, 1, 2) ", (strMeasurementID + "-X").c_str(), strTime.c_str()); sqlite_db_ctrl::instance().UpdateTableData(szTableName, updateSql, whereCon); memset(whereCon, 0x00, sizeof(whereCon)); @@ -634,7 +634,7 @@ int Uart::DealDataNodeFeature(const char *pData, int flag) { sqlite_db_ctrl::instance().UpdateTableData(T_DATA_INFO(TNAME), updateSql, whereCon); } else { memset(whereCon, 0x00, sizeof(whereCon)); - sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend = 0 ", (strMeasurementID + "-Y").c_str(), strTime.c_str()); + sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend IN (0, 1, 2) ", (strMeasurementID + "-Y").c_str(), strTime.c_str()); sqlite_db_ctrl::instance().UpdateTableData(szTableName, updateSql, whereCon); memset(whereCon, 0x00, sizeof(whereCon)); sprintf(whereCon, "channelID='%s' ", (strMeasurementID + "-Y").c_str()); @@ -737,7 +737,7 @@ int Uart::DealDataNodeFeature(const char *pData, int flag) { sqlite_db_ctrl::instance().UpdateTableData(T_DATA_INFO(TNAME), updateSql, whereCon); } else { memset(whereCon, 0x00, sizeof(whereCon)); - sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend = 0 ", (strMeasurementID + "-Z").c_str(), strTime.c_str()); + sprintf(whereCon, "channelID='%s' and timeStamp = '%s' and nodeResend IN (0, 1, 2) ", (strMeasurementID + "-Z").c_str(), strTime.c_str()); sqlite_db_ctrl::instance().UpdateTableData(szTableName, updateSql, whereCon); memset(whereCon, 0x00, sizeof(whereCon)); sprintf(whereCon, "channelID='%s' ", (strMeasurementID + "-Z").c_str()); @@ -815,7 +815,7 @@ int Uart::DealDataNodeFeature(const char *pData, int flag) { if(flag == 1){ zlog_info(zct, "resend data,dont send to mqtt"); - return; + return -1; } int iRet = data_publish(strstatisticData.c_str(), GlobalConfig::Topic_G.mPubData.c_str()); zlog_info(zct, "dataNodeNo = '%s' and TimeStamp = '%s',MQTT ret = %d", strMeasurementID.c_str(), nowTimetamp.c_str(), iRet);