This commit is contained in:
zhangsheng 2026-04-08 13:50:38 +08:00
parent 6ccb5ec469
commit cc8d129a29
2 changed files with 5 additions and 4 deletions

View File

@ -1420,6 +1420,7 @@ std::string JsonData::JsonCmd_Cgi_67(Param_67 &param){
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 ");

View File

@ -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);