fix web cmd 70 bugs

This commit is contained in:
zhangsheng 2026-03-31 16:56:51 +08:00
parent 8887d777b5
commit 7685e7240c

View File

@ -1621,13 +1621,16 @@ std::string JsonData::JsonCmd_Cgi_70(Param_70 &param){
jsonVal["message"] = " "; jsonVal["message"] = " ";
char selectCon[256] = {0}, szTableName[100] = {0x00}, whereCon[256] = {0x00}; char selectCon[256] = {0}, szTableName[100] = {0x00}, whereCon[256] = {0x00};
sprintf(szTableName,"t_process_info"); sprintf(szTableName,"t_process_info");
int rows = sqlite_db_ctrl::instance().GetTableRows(szTableName, NULL); memset(whereCon, 0x00, sizeof(whereCon));
sprintf(whereCon, "timeStamp < '%s' and timeStamp > '%s'", param.timeEnd.c_str(), param.timeStart.c_str());
int rows = sqlite_db_ctrl::instance().GetTableRows(szTableName, whereCon);
int packgeNo = param.mPackageFlag; int packgeNo = param.mPackageFlag;
int packgeMax = 0; int packgeMax = 0;
int packgeNum = 0; int packgeNum = 0;
jsonVal["package"] = packgeNo; jsonVal["package"] = packgeNo;
int lastSize = rows % 550; int lastSize = rows % 550;
int index = rows / 550; int index = rows / 550;
zlog_info(zct, "rows = %d, lastSize = %d, index = %d", rows, lastSize, index);
if (lastSize > 0 && index > 0) { if (lastSize > 0 && index > 0) {
packgeMax = index + 1; packgeMax = index + 1;
if (packgeNo + 1 == packgeMax) { if (packgeNo + 1 == packgeMax) {