|
@@ -2,9 +2,12 @@
|
|
|
|
|
|
#include "QFDAlert.h"
|
|
|
|
|
|
+#include "ProjectManager.h"
|
|
|
+
|
|
|
#include <dbService/ClassSet.h>
|
|
|
#include <dbService/UserService.h>
|
|
|
#include <dbService/UserConfigService.h>
|
|
|
+#include <dbService/NodeMatrixService.h>
|
|
|
|
|
|
#include "common/QFDIcon.h"
|
|
|
|
|
@@ -147,22 +150,36 @@ void ConfigExpertDataWidget::setProcess(SchemePlanManager::SchemeProcessInfo pro
|
|
|
|
|
|
void ConfigExpertDataWidget::loadData()
|
|
|
{
|
|
|
+ // 获取专家列表数据
|
|
|
qDeleteAll(m_expertList);
|
|
|
m_expertList.clear();
|
|
|
if (!UserService().QueryUserListNotAdmin(&m_expertList)) {
|
|
|
QFDAlert::showAlertWithCode(QF_CODE_DATA_ERROR, this);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
+ // 获取项目专家配置
|
|
|
qDeleteAll(m_configList);
|
|
|
m_configList.clear();
|
|
|
if (!UserConfigService().QueryUserConfigListInfoByEngineerId(&m_configList, m_process.projectId)) {
|
|
|
QFDAlert::showAlertWithCode(QF_CODE_DATA_ERROR, this);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
+ // 获取专家录入数据
|
|
|
+ QString indexName = ProjectManager::nameOfIndexType((ProjectManager::IndexType)m_process.indexType);
|
|
|
+ QList<NodeMatrixInfo *> dataList;
|
|
|
+ NodeMatrixService().QueryExpertDataByProjectAndIndex(&dataList, indexName, m_process.projectId);
|
|
|
+ m_nodeData.clear();
|
|
|
+ for (NodeMatrixInfo *info : dataList) {
|
|
|
+ if (m_nodeData.keys().contains(info->expertId) == false) {
|
|
|
+ m_nodeData[info->expertId] = QList<NodeMatrixInfo *>();
|
|
|
+ }
|
|
|
+ m_nodeData[info->expertId].append(info);
|
|
|
+ }
|
|
|
+
|
|
|
+ qDebug() << __FUNCTION__ << __LINE__ << m_nodeData.size() << endl;
|
|
|
+
|
|
|
refreshExpList();
|
|
|
- refreshAddedList();
|
|
|
+ refreshConfigList();
|
|
|
}
|
|
|
|
|
|
void ConfigExpertDataWidget::showEvent(QShowEvent *event)
|
|
@@ -178,7 +195,7 @@ void ConfigExpertDataWidget::hideEvent(QHideEvent *event)
|
|
|
Q_UNUSED(event)
|
|
|
}
|
|
|
|
|
|
-void ConfigExpertDataWidget::refreshAddedList()
|
|
|
+void ConfigExpertDataWidget::refreshConfigList()
|
|
|
{
|
|
|
m_configListWidget->clear();
|
|
|
|