Explorar el Código

'资源包导入及节点添加strUuid字段'

zsf hace 1 año
padre
commit
aa9dc71cf4

+ 37 - 0
QFD/dbService/CNodeDataService.cpp

@@ -24,6 +24,26 @@ int CNodeDataService::AddCNodeData(const CNodeData &cNodeData)
     return ret;
 }
 
+bool CNodeDataService::SaveCNodeData(const CNodeData &cNodeData)
+{
+    bool ret = false;
+    try {
+        Transaction t(SqlDBHelper::getDatabase());
+        InsertQuery query = t.insertInto("t_node_data(`id`, `project_id`, `eval_type`, `number`, `p_number`, `name`, "
+                                         "`remark`,  `dimension`)");
+
+        NonQueryResult result = query.values(cNodeData.id, cNodeData.projectId, cNodeData.indexType, cNodeData.number,
+                                             cNodeData.pNumber, cNodeData.name, cNodeData.remark, cNodeData.dimension)
+                                        .exec();
+        qDebug() << "SaveCNodeData" << result.lastQuery();
+        t.commit();
+        ret = true;
+    } catch (const DBException &ex) {
+        qDebug() << "SaveCNodeData" << ex.lastError.text();
+    }
+    return ret;
+}
+
 //更新节点信息
 bool CNodeDataService::UpdateCNodeData(const CNodeData &cNodeData)
 {
@@ -159,3 +179,20 @@ bool CNodeDataService::DeleteCNodeDataById(int id)
     }
     return ret;
 }
+
+//根据id删除
+bool CNodeDataService::DeleteAllNodeData()
+{
+    bool ret = false;
+    try {
+        qDebug() << __FUNCTION__ << __LINE__
+                 << SqlDBHelper::getDatabase().driver()->hasFeature(QSqlDriver::Transactions) << endl;
+        Transaction t(SqlDBHelper::getDatabase());
+        t.deleteFrom("t_node_data");
+        t.commit();
+        ret = true;
+    } catch (const DBException &ex) {
+        qDebug() << ex.lastError.text();
+    }
+    return ret;
+}

+ 3 - 0
QFD/dbService/CNodeDataService.h

@@ -8,6 +8,7 @@ public:
     CNodeDataService(QObject *parent = nullptr);
     //添加节点
     int AddCNodeData(const CNodeData &cNodeData);
+    bool SaveCNodeData(const CNodeData &cNodeData);
     //更新节点
     bool UpdateCNodeData(const CNodeData &cNodeData);
 
@@ -22,6 +23,8 @@ public:
 
     //根据id删除
     bool DeleteCNodeDataById(int id);
+    //删除所有
+    bool DeleteAllNodeData();
 };
 
 #endif  // CNODEDATASERVICE_H

+ 2 - 1
QFD/dbService/ClassSet.h

@@ -56,7 +56,8 @@ public:
     QDateTime writeDate;  //填写时间
     QString mark;         //页码
     QString tableMsg;
-    int tabIndex;  // tab索引
+    int tabIndex;     // tab索引
+    QString strUuid;  //区分组
 };
 
 class ClassSet

+ 21 - 13
QFD/dbService/NodeMatrixService.cpp

@@ -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;

+ 42 - 0
QFD/dbService/ProjectService.cpp

@@ -28,6 +28,33 @@ int ProjectService::AddProjectInfo(const ProjectInfo &projectInfo)
     return ret;
 }
 
+//保存项目
+bool ProjectService::SaveProjectInfo(const ProjectInfo &projectInfo)
+{
+    bool ret = false;
+    try {
+        Transaction t(SqlDBHelper::getDatabase());
+        InsertQuery query = t.insertInto(
+                "t_project_info(`id`,`project_name`, `remark`, `task_name`, `estimate_time`, `estimate_objective`, "
+                "`estimate_dept`, `estimate_person`,`estimate_type`, `positional_titles`, `create_time`)");
+
+        NonQueryResult result =
+                query.values(projectInfo.id, projectInfo.projectName, projectInfo.remark, projectInfo.taskName,
+                             projectInfo.estimateTime, projectInfo.estimateObjective, projectInfo.estimateDept,
+                             projectInfo.estimatePerson, projectInfo.estimateType, projectInfo.positionalTitles,
+                             projectInfo.createTime)
+                        .exec();
+        qDebug() << "------------------" << result.lastQuery();
+
+        t.commit();
+
+        ret = true;
+    } catch (const DBException &ex) {
+        qDebug() << ex.lastError.text();
+    }
+    return ret;
+}
+
 //更新项目信息
 bool ProjectService::UpdateProjectInfo(const ProjectInfo &proInfo)
 {
@@ -200,6 +227,21 @@ bool ProjectService::DeleteById(int id)
     return ret;
 }
 
+//根据id删除
+bool ProjectService::DeleteAll()
+{
+    bool ret = false;
+    try {
+        Transaction t(SqlDBHelper::getDatabase());
+        t.deleteFrom("t_project_info");
+        t.commit();
+        ret = true;
+    } catch (const DBException &ex) {
+        qDebug() << ex.lastError.text();
+    }
+    return ret;
+}
+
 bool ProjectService::SelectAllByPage(QList<ProjectInfo *> *projectInfoList, int &totalPages, int page, int pageSize,
                                      QString name)
 {

+ 3 - 0
QFD/dbService/ProjectService.h

@@ -8,6 +8,7 @@ public:
     ProjectService(QObject *parent = nullptr);
     //添加项目
     int AddProjectInfo(const ProjectInfo &projectInfo);
+    bool SaveProjectInfo(const ProjectInfo &projectInfo);
     //更新项目
     bool UpdateProjectInfo(const ProjectInfo &projectInfo);
     //根据ID更新脑图ID
@@ -27,6 +28,8 @@ public:
     //根据id删除
     bool DeleteById(int id);
 
+    bool DeleteAll();
+
     //分页查询
     bool SelectAllByPage(QList<ProjectInfo *> *projectInfoList, int &totalPages, int page, int pageSize, QString name);
 };

+ 1 - 1
QFD/dbService/SqlDBHelper.h

@@ -14,7 +14,7 @@ public:
         MYSQL,
         NOTHING
     };
-    static QSqlDatabase getDatabase(SqlDBType dbType              = MYSQL,
+    static QSqlDatabase getDatabase(SqlDBType dbType              = SQLITE3,
                                     const QString &connectionName = QSqlDatabase::defaultConnection);
 
     static QSqlDatabase getDatabase2(SqlDBType dbType              = SQLITE3,

+ 17 - 1
QFD/dbService/UserService.cpp

@@ -22,7 +22,7 @@ int UserService::AddUserInfo(const QFUser &userInfo)
         returnId = result.lastInsertId().toInt();
 
     } catch (const DBException &ex) {
-        qDebug() << ex.lastError.text();
+        qDebug() << "AddUserInfo" << ex.lastError.text();
         returnId = -1;
     }
     return returnId;
@@ -511,4 +511,20 @@ int UserService::AddUserInfo2(const QFUser &userInfo)
     return returnId;
 }
 
+//删除除管理管外的所有用户
+bool UserService::DeleteAllUser()
+{
+    QSqlDatabase db = SqlDBHelper::getDatabase();
+    QSqlQuery query(db);
+    bool ret          = false;
+    QString deleteSql = QString("DELETE FROM t_user_info ");
+    if (query.exec(deleteSql)) {
+        ret = true;
+        qDebug() << "deleteSql success!";
+    } else {
+        qDebug() << query.lastError();
+    }
+    return ret;
+}
+
 //////////////////////用户信息表-end////////////////////

+ 2 - 0
QFD/dbService/UserService.h

@@ -36,6 +36,8 @@ public:
     bool UpdateUserInfo2(const QFUser &userInfo);
 
     int AddUserInfo2(const QFUser &userInfo);
+
+    bool DeleteAllUser();
 };
 
 #endif  // USERSERVICE_H

+ 88 - 0
QFD/helper/ImportDataUtil.cpp

@@ -0,0 +1,88 @@
+#include "importDataUtil.h"
+#include <QDebug>
+#include <QSettings>
+#include "dbService/ClassSet.h"
+#include "dbService/ProjectService.h"
+#include "dbService/CNodeDataService.h"
+#include "dbService/UserService.h"
+#include "CNode.h"
+
+ImportDataUtil::ImportDataUtil() { }
+
+bool ImportDataUtil::importSystemData()
+{
+    bool ret = false;
+    try {
+        // TODO 解析exportData数据
+        QSettings exportData("exportData.ini", QSettings::IniFormat);
+        exportData.setIniCodec("UTF-8");
+        QString projectInfo = exportData.value("EXPORTDATA/projectInfo", "").toString();
+        QString nodeDate    = exportData.value("EXPORTDATA/nodeDate", "").toString();
+        QString userInfo    = exportData.value("EXPORTDATA/userInfo", "").toString();
+        //清除表相关数据
+        ProjectService().DeleteAll();
+        CNodeDataService().DeleteAllNodeData();
+        UserService().DeleteAllUser();
+        //插入工程
+        QStringList proList = projectInfo.split(",");
+        ProjectInfo proj;
+        proj.id                = proList[0].toInt();
+        proj.projectName       = proList[1];
+        proj.remark            = proList[2];
+        proj.taskName          = proList[3];
+        proj.estimateTime      = proList[4];
+        proj.estimateObjective = proList[5];
+        proj.estimateDept      = proList[6];
+        proj.estimatePerson    = proList[7];
+        proj.estimateType      = proList[8];
+        proj.positionalTitles  = proList[9];
+        proj.createTime        = proList[10];
+        bool ret               = ProjectService().SaveProjectInfo(proj);
+        //保存节点信息系
+        QStringList nodeList = nodeDate.split(";");
+        for (int i = 0; i < nodeList.size(); i++) {
+            CNodeData nodeData;
+            QStringList nodeDataList = nodeList[i].split(",");
+            if (nodeDataList.size() > 1) {
+                nodeData.id        = nodeDataList[0].toInt();
+                nodeData.projectId = nodeDataList[1].toInt();
+                nodeData.indexType = nodeDataList[2].toInt();
+                nodeData.number    = nodeDataList[3].toInt();
+                nodeData.pNumber   = nodeDataList[4].toInt();
+                nodeData.name      = nodeDataList[5];
+                nodeData.remark    = nodeDataList[6];
+                nodeData.dimension = nodeDataList[7];
+                CNodeDataService().SaveCNodeData(nodeData);
+            }
+        }
+
+        //保存用户信息
+        QStringList userList = userInfo.split(";");
+        for (int i = 0; i < userList.size(); i++) {
+            QFUser user;
+            QStringList userInfoList = userList[i].split(",");
+            if (userInfoList.size() > 1) {
+                user.id              = userInfoList[0].toInt();
+                user.userName        = userInfoList[1];
+                user.userNo          = userInfoList[2];
+                user.password        = userInfoList[3];
+                user.role            = static_cast<QFUser::Role>(userInfoList[4].toInt());
+                user.post            = userInfoList[5];
+                user.major           = userInfoList[6];
+                user.workPosition    = userInfoList[7];
+                user.educationDegree = userInfoList[8];
+                user.phone           = userInfoList[9];
+                user.remark          = userInfoList[10];
+                user.projectId       = userInfoList[11];
+                user.writeTime       = userInfoList[12];
+                int retuser          = UserService().AddUserInfo(user);
+                qDebug() << "-------------retUser=" << retuser;
+            }
+        }
+        ret = true;
+    } catch (const std::exception &e) {
+        // 捕获到std::exception类型的异常
+        qDebug() << "Caught exception: " << e.what();
+    }
+    return ret;
+}

+ 11 - 0
QFD/helper/ImportDataUtil.h

@@ -0,0 +1,11 @@
+#ifndef IMPORTDATAUTIL_H
+#define IMPORTDATAUTIL_H
+
+class ImportDataUtil
+{
+public:
+    ImportDataUtil();
+    bool importSystemData();
+};
+
+#endif  // IMPORTDATAUTIL_H

+ 2 - 0
QFD/helper/helper.pri

@@ -1,6 +1,7 @@
 HEADERS += \
     $$PWD/FileUtil.h \
     $$PWD/GenerateMiniDump.h \
+    $$PWD/ImportDataUtil.h \
     $$PWD/MathUtil.h \
     $$PWD/QExcel/ExcelExport.h \
     $$PWD/QWord/QWord.h \
@@ -10,6 +11,7 @@ HEADERS += \
 
 SOURCES += \
     $$PWD/FileUtil.cpp \
+    $$PWD/ImportDataUtil.cpp \
     $$PWD/QExcel/ExcelExport.cpp \
     $$PWD/QWord/QWord.cpp \
     $$PWD/QWord/QWordDemo.cpp \

+ 22 - 1
QFD/main.cpp

@@ -7,6 +7,10 @@
 #include <QDesktopWidget>
 #include <QTextCodec>
 #include <locale>
+#include <QSettings>
+#include "FileUtil.h"
+#include "importDataUtil.h"
+#include "dbService/ClassSet.h"
 
 int main(int argc, char *argv[])
 {
@@ -45,7 +49,24 @@ int main(int argc, char *argv[])
     w.move((QApplication::primaryScreen()->availableGeometry().width() - w.width()) / 2,
            (QApplication::primaryScreen()->availableGeometry().height() - w.height()) / 2);
 
-    w.show();
+    QSettings config("config.ini", QSettings::IniFormat);
+    config.setIniCodec("UTF-8");
+    int roleType = config.value("USERCONFIG/RoleType", "").toInt();
+    if (roleType == 0) {
+        w.show();
+    } else {
+        qDebug() << "---------------------";
+        // TODO 导入文件入库操作
+        bool result = FileUtil().importEngineerFile();
+        if (result) {
+            ImportDataUtil().importSystemData();
+            w.show();
+        } else {
+            qDebug() << "----";
+            qApp->exit();
+        }
+    }
+    // w.show();
 
     return a.exec();
 }

+ 4 - 0
QFD/view/HomeView.cpp

@@ -246,9 +246,13 @@ void HomeView::slotExportProject(ProjectInfo *proj)
     QString nodeDate    = "";
     QString userInfo    = "";
     projectInfo.append(QString::number(proj->id))
+            .append(",")
+            .append(proj->projectName)
             .append(",")
             .append(proj->remark)
             .append(",")
+            .append(proj->taskName)
+            .append(",")
             .append(proj->estimateTime)
             .append(",")
             .append(proj->estimateObjective)