fix bugs
This commit is contained in:
parent
6ccb5ec469
commit
cc8d129a29
@ -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 ");
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user