|
@@ -149,9 +149,12 @@ bool CNodeDataService::QueryAllValid(QList<CNodeData> &cNodeDataList, int projec
|
|
QString selectSql =
|
|
QString selectSql =
|
|
QString("SELECT id,project_id, eval_type,number,p_number,name,remark,dimension,type,is_effective FROM "
|
|
QString("SELECT id,project_id, eval_type,number,p_number,name,remark,dimension,type,is_effective FROM "
|
|
"t_node_data WHERE "
|
|
"t_node_data WHERE "
|
|
- "project_id = %1 and eval_type= %2 and is_effective!=1 order by number")
|
|
|
|
|
|
+ "project_id = %1 and eval_type= %2 order by number")
|
|
.arg(projectId)
|
|
.arg(projectId)
|
|
.arg(evalType);
|
|
.arg(evalType);
|
|
|
|
+ qDebug() << __FUNCTION__ << __LINE__ << selectSql << endl;
|
|
|
|
+
|
|
|
|
+ QList<CNodeData> tempList;
|
|
if (query.exec(selectSql)) {
|
|
if (query.exec(selectSql)) {
|
|
while (query.next()) {
|
|
while (query.next()) {
|
|
if (query.isNull(0) == false) {
|
|
if (query.isNull(0) == false) {
|
|
@@ -166,12 +169,22 @@ bool CNodeDataService::QueryAllValid(QList<CNodeData> &cNodeDataList, int projec
|
|
cNodeData.dimension = query.value(7).toString();
|
|
cNodeData.dimension = query.value(7).toString();
|
|
cNodeData.type = query.value(8).toInt();
|
|
cNodeData.type = query.value(8).toInt();
|
|
cNodeData.isEffective = query.value(9).toInt();
|
|
cNodeData.isEffective = query.value(9).toInt();
|
|
- cNodeDataList.append(cNodeData);
|
|
|
|
|
|
+
|
|
|
|
+ tempList.append(cNodeData);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
ret = true;
|
|
ret = true;
|
|
|
|
+
|
|
|
|
+ CMind mind;
|
|
|
|
+ mind.setNodeList(tempList);
|
|
|
|
+
|
|
|
|
+ for (CNodeData node : tempList) {
|
|
|
|
+ if (mind.isInvalidated(node.number) == false) {
|
|
|
|
+ cNodeDataList.append(node);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- qDebug() << "QueryAll" << query.lastError();
|
|
|
|
|
|
+ qDebug() << "QueryAllValid" << query.lastError();
|
|
}
|
|
}
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|