Merge branch 'dg102_feature_new_process' of http://192.168.1.212:3000/zhangsheng/WLG into dg102_feature_new_process

This commit is contained in:
pandx 2026-03-23 17:57:53 +08:00
commit bff551aeb8
2 changed files with 8 additions and 2 deletions

View File

@ -1567,6 +1567,12 @@ void SqliteDB::NewBatteryIdentify(){
} }
} }
void SqliteDB::ShutdownCheck(){ void SqliteDB::ShutdownCheck(){
int shutdownDetection = readIntValue("config", "shutdownDetection", (char *)GlobalConfig::Config_G.c_str());
if (!shutdownDetection)
{
return ;
}
int checkNumber = readIntValue("config", "shutdownNumber", (char *)GlobalConfig::Config_G.c_str()); int checkNumber = readIntValue("config", "shutdownNumber", (char *)GlobalConfig::Config_G.c_str());
char whereCon[1024] = {0}; char whereCon[1024] = {0};
char updateSql[1024] = {0}; char updateSql[1024] = {0};

View File

@ -1524,7 +1524,7 @@ std::string JsonData::JsonCmd_Cgi_68(Param_68 &param){
memset(whereCon,0,sizeof(whereCon)); memset(whereCon,0,sizeof(whereCon));
memset(updateSql,0,sizeof(updateSql)); memset(updateSql,0,sizeof(updateSql));
sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam68[i].measurementID.c_str()); sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam68[i].measurementID.c_str());
sprintf(updateSql, " status = '%d',statisticType = '%d', threshold = '%f'",param.vecParam68[i].status,param.vecParam68[i].statisticType,param.vecParam68[i].threshold); sprintf(updateSql, " status = '%d',statisticType = '%d', threshold = '%f',effect = '0' ",param.vecParam68[i].status,param.vecParam68[i].statisticType,param.vecParam68[i].threshold);
sqlite_db_ctrl::instance().UpdateTableData(" t_shutdown_info ", updateSql, whereCon); sqlite_db_ctrl::instance().UpdateTableData(" t_shutdown_info ", updateSql, whereCon);
} }
} }
@ -1580,7 +1580,7 @@ std::string JsonData::JsonCmd_Cgi_69(Param_69 &param){
memset(whereCon,0,sizeof(whereCon)); memset(whereCon,0,sizeof(whereCon));
memset(updateSql,0,sizeof(updateSql)); memset(updateSql,0,sizeof(updateSql));
sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam69[i].measurementID.c_str()); sprintf(whereCon, " MeasurementID = '%s' ", param.vecParam69[i].measurementID.c_str());
sprintf(updateSql, " status = '%d',trigerType = '%d',statisticType = '%d', threshold = '%f'",param.vecParam69[i].status,param.vecParam69[i].trigerType,param.vecParam69[i].statisticType,param.vecParam69[i].threshold); sprintf(updateSql, " status = '%d',trigerType = '%d',statisticType = '%d', threshold = '%f' , effect = '0'",param.vecParam69[i].status,param.vecParam69[i].trigerType,param.vecParam69[i].statisticType,param.vecParam69[i].threshold);
sqlite_db_ctrl::instance().UpdateTableData(" t_wave_triger_info ", updateSql, whereCon); sqlite_db_ctrl::instance().UpdateTableData(" t_wave_triger_info ", updateSql, whereCon);
} }
} }