[pref]优化,趋势页面的排序,按tagname排序

This commit is contained in:
shijianquan 2025-06-05 10:23:45 +08:00
parent e5cf57c679
commit 4c1b704750

View File

@ -383,7 +383,7 @@ void CTrendInfoManage::loadDevGroupInfo(CDbApi *pReadDb)
{
return ;
}
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, location_id from dev_group where sub_system > 3 ");
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, location_id from dev_group where sub_system > 3 order by tag_name");
if(!strLoctionFilter.isEmpty())
{
sqlSequenceQuery.append(QString(" and %1 order by dev_group_no asc;").arg(strLoctionFilter));
@ -420,7 +420,7 @@ void CTrendInfoManage::loadDeviceInfo(CDbApi *pReadDb)
}
strLoctionFilter = QString("(group_tag_name in ('%1'))").arg(listLocation.join("','"));
}
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, group_tag_name, location_id from dev_info");
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, group_tag_name, location_id from dev_info order by tag_name");
if(!strLoctionFilter.isEmpty())
{
sqlSequenceQuery.append(QString(" where %1;").arg(strLoctionFilter));