[M]修改排序方式,先按 站id 排序,再按rtu_no
This commit is contained in:
parent
79f70475b9
commit
5f1a4dabd3
@ -334,10 +334,10 @@ void CTrendInfoManage::loadDevGroupInfo(CDbApi *pReadDb)
|
||||
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, location_id from dev_group where sub_system > 3 ");
|
||||
if(!strLoctionFilter.isEmpty())
|
||||
{
|
||||
sqlSequenceQuery.append(QString(" and %1 order by dev_group_no asc;").arg(strLoctionFilter));
|
||||
sqlSequenceQuery.append(QString(" and %1 order by location_id , rtu_no , dev_group_no asc ,tag_name;").arg(strLoctionFilter));
|
||||
}else
|
||||
{
|
||||
sqlSequenceQuery.append(QStringLiteral(" order by dev_group_no asc;"));
|
||||
sqlSequenceQuery.append(QStringLiteral(" order by location_id , rtu_no , dev_group_no asc ,tag_name;"));
|
||||
}
|
||||
query.setForwardOnly(true);
|
||||
pReadDb->execute(sqlSequenceQuery, query);
|
||||
@ -371,8 +371,10 @@ void CTrendInfoManage::loadDeviceInfo(CDbApi *pReadDb)
|
||||
QString sqlSequenceQuery = QStringLiteral("select tag_name, description, group_tag_name, location_id from dev_info ");
|
||||
if(!strLoctionFilter.isEmpty())
|
||||
{
|
||||
sqlSequenceQuery.append(QString(" where %1;").arg(strLoctionFilter));
|
||||
sqlSequenceQuery.append(QString(" where %1").arg(strLoctionFilter));
|
||||
}
|
||||
sqlSequenceQuery.append(" order by location_id, tag_name;");
|
||||
|
||||
query.setForwardOnly(true);
|
||||
pReadDb->execute(sqlSequenceQuery, query);
|
||||
while(query.next())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user