|
@@ -10,10 +10,10 @@ bool NodeMatrixService::AddNodeMatrixInfo(const NodeMatrixInfo &nodeMatrixInfo)
|
|
|
Transaction t(SqlDBHelper::getDatabase());
|
|
|
InsertQuery q = t.insertInto("t_node_matrix_info (expert_name, engineer_id, node, "
|
|
|
"abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_name,write_date,mark)");
|
|
|
+ "node_value, expert_id,mind_name,write_date,mark,str_uuid)");
|
|
|
q.values(nodeMatrixInfo.expertName, nodeMatrixInfo.engineerId, nodeMatrixInfo.node, nodeMatrixInfo.abscissa,
|
|
|
nodeMatrixInfo.ordinate, nodeMatrixInfo.nodeValue, nodeMatrixInfo.expertId, nodeMatrixInfo.mindId,
|
|
|
- nodeMatrixInfo.writeDate.toString(), nodeMatrixInfo.mark)
|
|
|
+ nodeMatrixInfo.writeDate.toString(), nodeMatrixInfo.mark, nodeMatrixInfo.strUuid)
|
|
|
.exec();
|
|
|
t.commit();
|
|
|
ret = true;
|
|
@@ -33,11 +33,11 @@ bool NodeMatrixService::AddNodeMatrixInfoList(const QList<NodeMatrixInfo *> &jbI
|
|
|
NodeMatrixInfo *nodeMatrixInfo = jbInfoList.at(i);
|
|
|
InsertQuery query = t.insertInto("t_node_matrix_info (expert_name, engineer_id, node, abscissa, "
|
|
|
"ordinate, "
|
|
|
- "node_value, expert_id,mind_id,write_date,mark,table_msg)");
|
|
|
+ "node_value, expert_id,mind_id,write_date,mark,table_msg,str_uuid)");
|
|
|
query.values(nodeMatrixInfo->expertName, nodeMatrixInfo->engineerId, nodeMatrixInfo->node,
|
|
|
nodeMatrixInfo->abscissa, nodeMatrixInfo->ordinate, nodeMatrixInfo->nodeValue,
|
|
|
nodeMatrixInfo->expertId, nodeMatrixInfo->mindId, nodeMatrixInfo->writeDate.toString(),
|
|
|
- nodeMatrixInfo->mark, nodeMatrixInfo->tableMsg)
|
|
|
+ nodeMatrixInfo->mark, nodeMatrixInfo->tableMsg, nodeMatrixInfo->strUuid)
|
|
|
.exec();
|
|
|
t.commit();
|
|
|
}
|
|
@@ -105,14 +105,15 @@ bool NodeMatrixService::UpdateNodeMatrixNodeValueList(const QList<NodeMatrixInfo
|
|
|
QString updateSql = QString("UPDATE t_node_matrix_info SET NODE_VALUE ='%1' WHERE "
|
|
|
"ENGINEER_ID = %2 AND expert_name = '%3'"
|
|
|
" AND abscissa = '%4' AND ordinate = '%5' and table_msg = '%6' "
|
|
|
- "and mark = '%7'")
|
|
|
+ "and mark = '%7' and str_uuid = '%8'")
|
|
|
.arg(nodeMatrixInfo->nodeValue)
|
|
|
.arg(nodeMatrixInfo->engineerId)
|
|
|
.arg(nodeMatrixInfo->expertName)
|
|
|
.arg(nodeMatrixInfo->abscissa)
|
|
|
.arg(nodeMatrixInfo->ordinate)
|
|
|
.arg(nodeMatrixInfo->tableMsg)
|
|
|
- .arg(nodeMatrixInfo->mark);
|
|
|
+ .arg(nodeMatrixInfo->mark)
|
|
|
+ .arg(nodeMatrixInfo->strUuid);
|
|
|
// qDebug() << updateSql;
|
|
|
query.exec(updateSql);
|
|
|
ret = true;
|
|
@@ -208,7 +209,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertNameAndEngineerId(QList<NodeM
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_id,write_date from "
|
|
|
+ "node_value, expert_id,mind_id,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where expert_name "
|
|
|
"= '%1' and engineer_id ='%2'")
|
|
|
.arg(expertName)
|
|
@@ -228,6 +229,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertNameAndEngineerId(QList<NodeM
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -273,7 +275,7 @@ bool NodeMatrixService::QueryNodesByExpertNameAndEngineerId2(QList<NodeMatrixInf
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_id,write_date from "
|
|
|
+ "node_value, expert_id,mind_id,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where expert_name "
|
|
|
"= '%1' and engineer_id ='%2' and table_msg='%3' and mark = '%4' and tab_index = '%5'")
|
|
|
.arg(expertName)
|
|
@@ -297,6 +299,7 @@ bool NodeMatrixService::QueryNodesByExpertNameAndEngineerId2(QList<NodeMatrixInf
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -338,7 +341,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertIdAndEngineerId(QList<NodeMat
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_id,write_date from "
|
|
|
+ "node_value, expert_id,mind_id,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where expert_id "
|
|
|
"= '%1' and engineer_id ='%2' and table_msg ='%3'")
|
|
|
.arg(QString::number(expertId))
|
|
@@ -360,6 +363,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertIdAndEngineerId(QList<NodeMat
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -377,7 +381,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertIdAndEngineerId2(QList<NodeMa
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_id,write_date from "
|
|
|
+ "node_value, expert_id,mind_id,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where expert_id "
|
|
|
"= '%1' and engineer_id ='%2' and table_msg ='%3'")
|
|
|
.arg(QString::number(expertId))
|
|
@@ -399,6 +403,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertIdAndEngineerId2(QList<NodeMa
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -416,7 +421,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertName(QList<NodeMatrixInfo *>
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_name,write_date from "
|
|
|
+ "node_value, expert_id,mind_name,write_date ,str_uuid from "
|
|
|
"t_node_matrix_info where expert_name = '%1'")
|
|
|
.arg(expertName);
|
|
|
if (query.exec(selectSql)) {
|
|
@@ -434,6 +439,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertName(QList<NodeMatrixInfo *>
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -451,7 +457,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertId(QList<NodeMatrixInfo *> *n
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id,mind_name,write_date from "
|
|
|
+ "node_value, expert_id,mind_name,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where expert_id = '%1'")
|
|
|
.arg(expertId);
|
|
|
if (query.exec(selectSql)) {
|
|
@@ -469,6 +475,7 @@ bool NodeMatrixService::QueryNodeMatrixListByExpertId(QList<NodeMatrixInfo *> *n
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|
|
@@ -485,7 +492,7 @@ bool NodeMatrixService::QueryNodeMatrixListByEngineerId(QList<NodeMatrixInfo *>
|
|
|
QSqlQuery query(db);
|
|
|
bool ret = false;
|
|
|
QString selectSql = QString("select id,expert_name, engineer_id, node, abscissa, ordinate, "
|
|
|
- "node_value, expert_id ,mind_name,write_date from "
|
|
|
+ "node_value, expert_id ,mind_name,write_date,str_uuid from "
|
|
|
"t_node_matrix_info where engineer_id = '%1'")
|
|
|
.arg(engineerId);
|
|
|
if (query.exec(selectSql)) {
|
|
@@ -503,6 +510,7 @@ bool NodeMatrixService::QueryNodeMatrixListByEngineerId(QList<NodeMatrixInfo *>
|
|
|
nodeMatrixInfo->mindId = query.value(8).toInt();
|
|
|
nodeMatrixInfo->writeDate = query.value(9).toDateTime();
|
|
|
nodeMatrixInfo->mark = query.value(10).toString();
|
|
|
+ nodeMatrixInfo->strUuid = query.value(11).toString();
|
|
|
nodeMatrixInfoList->append(nodeMatrixInfo);
|
|
|
}
|
|
|
ret = true;
|