This commit is contained in:
zhangsheng 2025-05-27 18:17:52 +08:00
parent b19f3027fd
commit 54985fd568

View File

@ -908,16 +908,16 @@ std::string JsonData::JsonCmd_Cgi_62(Param_62 &param){
if(param.straxis == ""){ if(param.straxis == ""){
if (param.mMode == 1){ if (param.mMode == 1){
sprintf(whereCon, " channelID like '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null)", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str()); sprintf(whereCon, " channelID like '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = 0 or nodeResend is null)", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str());
}else{ }else{
sprintf(whereCon, " data_nodeno like '%%%s%%' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null)", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str()); sprintf(whereCon, " data_nodeno like '%%%s%%' and timeStamp < '%s' and timeStamp > '%s' and (resend = 0 or resend == '')", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str());
} }
} }
else{ else{
if (param.mMode == 1){ if (param.mMode == 1){
sprintf(whereCon, " channelID = '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null)", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str()); sprintf(whereCon, " channelID = '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = 0 or nodeResend is null)", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str());
}else{ }else{
sprintf(whereCon, " data_nodeno = '%s-%s' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null)", param.MeasurementID.c_str(),param.straxis.c_str(), param.timeEnd.c_str(), param.timeStart.c_str()); sprintf(whereCon, " data_nodeno = '%s-%s' and timeStamp < '%s' and timeStamp > '%s' and (resend = 0 or resend == '')", param.MeasurementID.c_str(),param.straxis.c_str(), param.timeEnd.c_str(), param.timeStart.c_str());
} }
} }
@ -951,15 +951,15 @@ std::string JsonData::JsonCmd_Cgi_62(Param_62 &param){
if(param.straxis == "") if(param.straxis == "")
{ {
if (param.mMode == 1){ if (param.mMode == 1){
sprintf(whereCon, " channelID like '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum); sprintf(whereCon, " channelID like '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = 0 or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum);
}else{ }else{
sprintf(whereCon, " data_nodeno like '%%%s%%' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum); sprintf(whereCon, " data_nodeno like '%%%s%%' and timeStamp < '%s' and timeStamp > '%s' and (resend = 0 or resend == '') order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum);
} }
}else{ }else{
if (param.mMode == 1){ if (param.mMode == 1){
sprintf(whereCon, " channelID = '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum); sprintf(whereCon, " channelID = '%s-X' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = 0 or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum);
}else{ }else{
sprintf(whereCon, "data_nodeno = '%s-%s' and timeStamp < '%s' and timeStamp > '%s' and (nodeResend = '0' or nodeResend is null) order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(),param.straxis.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum); sprintf(whereCon, "data_nodeno = '%s-%s' and timeStamp < '%s' and timeStamp > '%s' and (resend = 0 or resend == '') order by timeStamp asc LIMIT %d OFFSET %d", param.MeasurementID.c_str(),param.straxis.c_str(), param.timeEnd.c_str(), param.timeStart.c_str(), 550, packgeNum);
} }
} }
array_t vecRes; array_t vecRes;