From aa013c2f4e69e2ba4eb72081dc004d8334d59257 Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期一, 28 十月 2024 23:15:27 +0800
Subject: [PATCH] 1028

---
 internal_system_v1/threemergeproblemlist.cpp |   22 ++++---
 internal_system_v1/internal_system_v1.pro    |    6 +
 internal_system_v1/main.cpp                  |   30 ++++++++++
 internal_system_v1/converinfo2.h             |    5 +
 修改_241015/附件1-问题整改台账修改后1015.xlsx             |    0 
 修改_241015/内审系统存在问题反馈1015.docx                |    0 
 internal_system_v1/exporttofile.h            |   23 +++++++
 internal_system_v1/converinfo2.cpp           |   70 +++++++++++++++++++++++
 修改_241015/附件4_内审统03表_内部审计统计综合表修改后1015.xls    |    0 
 internal_system_v1/threemergeproblemlist.h   |    3 
 internal_system_v1/exporttofile.cpp          |   21 +++++++
 11 files changed, 166 insertions(+), 14 deletions(-)

diff --git a/internal_system_v1/converinfo2.cpp b/internal_system_v1/converinfo2.cpp
index b9930c3..466e8b9 100644
--- a/internal_system_v1/converinfo2.cpp
+++ b/internal_system_v1/converinfo2.cpp
@@ -17,6 +17,7 @@
     //initUi();
     //readInfo(); // 鍔犺浇琛ㄦ牸
     addMenu(); // 澧炲姞鑿滃崟
+    disableWheelEvent(); // 绂佺敤涓嬫媺妗嗙殑婊氳疆浜嬩欢
 
     // 鑷�傚簲澶勭悊
     ui->treeWidget->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
@@ -106,13 +107,48 @@
 {
     QString name = index.model()->data(index).toString();
     qDebug()<<"鍙屽嚮"<<index<<name;
+    ComInfo curCominfo = m_nameAndComInfos[name];
     if(name.contains("(鏈骇)")){
         QStringList sps = name.split("(鏈骇)");
         name = sps.at(0);
+        curCominfo = m_nameAndComInfos[name];
     }else if(name.contains("(姹囨��)")){
         name = name.split("(姹囨��)").at(0);
+        qDebug()<<"姹囨�诲鐞�:";
+        // 鍋氫竴涓眹鎬荤殑澶勭悊锛屾妸鎵�鏈変笅绾х殑閮界疮鍔犺捣鏉�
+        ComInfo allCominfo = m_nameAndComInfos[name];
+        for(QString cur:m_treeNodes[name]){
+            if(name != cur){
+                ComInfo &tmp = m_nameAndComInfos[cur];
+                allCominfo.organazationNum += tmp.organazationNum;
+                allCominfo.realNum += tmp.realNum;
+                allCominfo.professionalNum += tmp.professionalNum;
+                allCominfo.CIANum += tmp.CIANum;
+                allCominfo.masterNum += tmp.masterNum;
+                allCominfo.undergraduatesNum += tmp.undergraduatesNum;
+                allCominfo.juniorNum += tmp.juniorNum;
+                allCominfo.seniorNum += tmp.seniorNum;
+                allCominfo.intermediateNum += tmp.intermediateNum;
+                allCominfo.primaryNum += tmp.primaryNum;
+                allCominfo.noTitleNum += tmp.noTitleNum;
+                allCominfo.upFiftyOldNum += tmp.upFiftyOldNum;
+                allCominfo.upThirtyOldNum += tmp.upThirtyOldNum;
+                allCominfo.downThirtyOldNum += tmp.downThirtyOldNum;
+                allCominfo.auditNum += tmp.auditNum;
+                allCominfo.accountingNum += tmp.accountingNum;
+                allCominfo.economyNum += tmp.economyNum;
+                allCominfo.lawNum += tmp.lawNum;
+                allCominfo.managerNum += tmp.managerNum;
+                allCominfo.itNum += tmp.itNum;
+                allCominfo.engineeringNum += tmp.engineeringNum;
+                allCominfo.otherNum += tmp.otherNum;
+            }
+
+        }
+        curCominfo = allCominfo;
+
     }
-    ComInfo curCominfo = m_nameAndComInfos[name];
+    //ComInfo curCominfo = m_nameAndComInfos[name];
     // 涓�銆佸崟浣嶅熀鏈儏鍐�
     ui->lineEdit_creditCode->setText(curCominfo.creditCode);
     ui->lineEdit_name->setText(QString::fromLocal8Bit( curCominfo.name));
@@ -1556,6 +1592,38 @@
         }
     }
 }
+
+void ConverInfo2::disableWheelEvent()
+{
+    ui->comboBox_ChiefDesignerLevel->installEventFilter(this);
+    ui->comboBox_comType->installEventFilter(this);
+    ui->comboBox_employmentMode->installEventFilter(this);
+    ui->comboBox_hasChiefDesigner->installEventFilter(this);
+    ui->comboBox_hasSetIntervalAudit->installEventFilter(this);
+    ui->comboBox_hasSetSeparateIA->installEventFilter(this);
+    ui->comboBox_hasUpLegal->installEventFilter(this);
+    ui->comboBox_intavalAuditLeval->installEventFilter(this);
+    ui->comboBox_leadingOrganization->installEventFilter(this);
+    ui->comboBox_scale->installEventFilter(this);
+    ui->comboBox_standardType->installEventFilter(this);
+}
+
+bool ConverInfo2::eventFilter(QObject *watched, QEvent *event)
+{
+    QString cls = watched->metaObject()->className();
+    if(cls == "QComboBox"){
+        //qDebug()<<"鍙戠幇涓嬫媺妗�";
+        if(event->type() == QEvent::Wheel){
+            //qDebug()<<"浣跨敤浜嗘粴杞�";
+            return true;  // 杩斿洖鐪熻〃绀虹鐢紝杩斿洖鍋囧垯鑳界敤
+        }
+    }else{
+        qDebug()<<"鍏朵粬绫诲瀷:"<<cls;
+    }
+
+    return QMainWindow::eventFilter(watched,event);
+
+}
 void ConverInfo2::addTreeWidgetNode(QVariant upName,QVariant name){
     // 娣诲姞宸﹁竟鏍戝舰鍥剧浉鍏�
     // 鑿滃崟鐩稿叧  褰撲笂绾у叕鍙镐负绌轰笂绾ф椂锛岃嚜宸卞綋鑷繁鐨勪笂绾э紝骞朵笖缃楀垪杩涘幓褰� 鏈骇
diff --git a/internal_system_v1/converinfo2.h b/internal_system_v1/converinfo2.h
index 660afcd..6605179 100644
--- a/internal_system_v1/converinfo2.h
+++ b/internal_system_v1/converinfo2.h
@@ -27,6 +27,11 @@
     void addTreeWidgetNode(QVariant upName, QVariant name);
     void createTreeNode();
 
+    // 澶勭悊婊氳疆鐨勬搷浣滐紝绂佺敤涓嬫媺妗嗙殑婊氳疆浜嬩欢
+    void disableWheelEvent();
+
+    bool eventFilter(QObject *watched, QEvent *event);
+
 signals:
     void loadFinished(); // 鍔犺浇瀹屾垚鐨勪俊鍙�
     void loadProgress(int); // 鍔犺浇杩涘害
diff --git a/internal_system_v1/exporttofile.cpp b/internal_system_v1/exporttofile.cpp
new file mode 100644
index 0000000..7e56b0f
--- /dev/null
+++ b/internal_system_v1/exporttofile.cpp
@@ -0,0 +1,21 @@
+锘�#include "exporttofile.h"
+
+ExportToFile::ExportToFile(QObject *parent) : QObject(parent)
+{
+
+}
+
+int ExportToFile::saveToExcelFromComInfo(ComInfo &info)
+{
+
+}
+
+int ExportToFile::saveToExcelFromThreeMergePro()
+{
+
+}
+
+int ExportToFile::saveToExcelFromNeiShenZonghe()
+{
+
+}
diff --git a/internal_system_v1/exporttofile.h b/internal_system_v1/exporttofile.h
new file mode 100644
index 0000000..72ca76e
--- /dev/null
+++ b/internal_system_v1/exporttofile.h
@@ -0,0 +1,23 @@
+锘�#ifndef EXPORTTOFILE_H
+#define EXPORTTOFILE_H
+
+#include <QObject>
+#include "struct_data.h"
+
+// 缁熶竴鍐欏ソ瀵煎嚭鎺ュ彛锛屾彁渚涚粰鐩稿簲妯″潡浣跨敤
+class ExportToFile : public QObject
+{
+    Q_OBJECT
+public:
+    explicit ExportToFile(QObject *parent = nullptr);
+
+
+    int saveToExcelFromComInfo(ComInfo &info); // 灏侀潰淇℃伅瀵煎嚭
+    int saveToExcelFromThreeMergePro(); // 3鍜�1瀵煎嚭
+    int saveToExcelFromNeiShenZonghe(); // 鍐呭缁煎悎瀵煎嚭
+signals:
+
+public slots:
+};
+
+#endif // EXPORTTOFILE_H
diff --git a/internal_system_v1/internal_system_v1.pro b/internal_system_v1/internal_system_v1.pro
index c83a7e1..89a7341 100644
--- a/internal_system_v1/internal_system_v1.pro
+++ b/internal_system_v1/internal_system_v1.pro
@@ -46,7 +46,8 @@
     filedialogdelegate.cpp \
     customheaderview.cpp \
     comboboxdelegate.cpp \
-    datedelegate.cpp
+    datedelegate.cpp \
+    exporttofile.cpp
 
 HEADERS += \
         clientmainwindow.h \
@@ -70,7 +71,8 @@
     filedialogdelegate.h \
     customheaderview.h \
     comboboxdelegate.h \
-    datedelegate.h
+    datedelegate.h \
+    exporttofile.h
 
 FORMS += \
         clientmainwindow.ui \
diff --git a/internal_system_v1/main.cpp b/internal_system_v1/main.cpp
index 32d434b..21ecba5 100644
--- a/internal_system_v1/main.cpp
+++ b/internal_system_v1/main.cpp
@@ -1,5 +1,8 @@
 锘�#include "clientmainwindow.h"
 #include <QApplication>
+#include <QStandardPaths>
+#include <QDebug>
+#pragma execution_character_set("utf-8")
 
 int main(int argc, char *argv[])
 {
@@ -27,5 +30,32 @@
 
     w.show();
 
+    // 澶勭悊蹇嵎鏂瑰紡鍒版闈�
+
+    QString strAppPath = QApplication::applicationFilePath();
+    QString strDesktopLink = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation) + "/";
+    strDesktopLink += "internal_system.lnk";
+    qDebug()<<"妗岄潰璺緞:"<<strDesktopLink;
+    qDebug()<<"app:"<<QApplication::applicationFilePath();
+
+    QFile desk(strDesktopLink);
+
+    QFile fApp(strAppPath);
+    if(!desk.exists()){
+        fApp.link(strDesktopLink);
+        qDebug()<<"娣诲姞蹇嵎鏂瑰紡鎴愬姛";
+    }else{
+        qDebug()<<"蹇嵎鏂瑰紡宸插瓨鍦紝涓嶆坊鍔�";
+    }
+
+
+//    //寤虹珛寮�濮嬭彍鍗曞揩鎹锋柟寮�
+//    QString strMenuLink = QStandardPaths::writableLocation(QStandardPaths::ApplicationsLocation) + "/";
+//    strMenuLink += "notepad/";
+//    QDir pathDir;
+//    pathDir.mkpath(strMenuLink);
+//    strMenuLink += "notepad.lnk";
+//    fApp.link(strMenuLink);
+
     return a.exec();
 }
diff --git a/internal_system_v1/threemergeproblemlist.cpp b/internal_system_v1/threemergeproblemlist.cpp
index b25ef6b..6e10620 100644
--- a/internal_system_v1/threemergeproblemlist.cpp
+++ b/internal_system_v1/threemergeproblemlist.cpp
@@ -172,7 +172,7 @@
 
 // path 涓烘枃浠跺畬鏁磋矾寰�
 // id涓哄瓙鐩綍鍚嶅瓧
-int ThreeMergeProblemList::saveFile(QString path, QString id,QString &absSavePath)
+int ThreeMergeProblemList::saveFile(QString path, QString id,QString &absSavePath,QString proName)
 {
     // 鏍规嵁id鏉ユ寚瀹氬瓙鐩綍杩涜鏂囦欢鐨勬嫹璐濆拰瀛樺偍
     // 榛樿淇濆瓨鍒板綋鍓峞vidence鐩綍涓嬬殑id瀛愮洰褰曚腑
@@ -182,7 +182,7 @@
         return -1;
     }
 
-    QString curPath = QString("./evidence/%1/").arg(id);
+    QString curPath = QString("./evidence/%1_%2/").arg(id).arg(proName);
     QDir dir;
     if(!dir.exists(curPath)){
         // 鍒欑洿鎺ュ垱寤�
@@ -620,19 +620,20 @@
             QString spath = ui->tableWidget->item(row,17)->text();
             QString tpath = ui->tableWidget->item(row,23)->text();
             QString fid = ui->tableWidget->item(row,0)->text();
-            qDebug()<<"鎷疯礉鏂囦欢:"<<fid<<fpath;
+            QString proName = ui->tableWidget->item(row,7)->text(); // 椤圭洰鍚嶇О
+            qDebug()<<"鎷疯礉鏂囦欢:"<<fid<<proName<<fpath;
 
             QString absSavePath1,absSavePath2,absSavePath3;
 
-            int sflag1 = saveFile(fpath,fid,absSavePath1); // 淇濆瓨绗竴涓�
+            int sflag1 = saveFile(fpath,fid,absSavePath1,proName); // 淇濆瓨绗竴涓�
             if(sflag1==1){
                 ui->tableWidget->setItem(row,13,new QTableWidgetItem(absSavePath1));
             }
-            int sflag2 = saveFile(spath,fid,absSavePath2); // 淇濆瓨绗簩涓�
+            int sflag2 = saveFile(spath,fid,absSavePath2,proName); // 淇濆瓨绗簩涓�
             if(sflag2==1){
                 ui->tableWidget->setItem(row,17,new QTableWidgetItem(absSavePath2));
             }
-            int sflag3 = saveFile(tpath,fid,absSavePath3); // 淇濆瓨绗笁涓�
+            int sflag3 = saveFile(tpath,fid,absSavePath3,proName); // 淇濆瓨绗笁涓�
             if(sflag3==1){
                 ui->tableWidget->setItem(row,23,new QTableWidgetItem(absSavePath3));
             }
@@ -839,19 +840,20 @@
             QString spath = ui->tableWidget->item(i,17)->text();
             QString tpath = ui->tableWidget->item(i,23)->text();
             QString fid = ui->tableWidget->item(i,0)->text();
-            qDebug()<<"鎷疯礉鏂囦欢:"<<fid<<fpath;
+            QString proName = ui->tableWidget->item(i,7)->text(); // 椤圭洰鍚嶇О
+            qDebug()<<"鎷疯礉鏂囦欢:"<<fid<<proName<<fpath;
 
             QString absSavePath1,absSavePath2,absSavePath3;
 
-            int sflag1 = saveFile(fpath,fid,absSavePath1); // 淇濆瓨绗竴涓�
+            int sflag1 = saveFile(fpath,fid,absSavePath1,proName); // 淇濆瓨绗竴涓�
             if(sflag1==1){
                 ui->tableWidget->setItem(i,13,new QTableWidgetItem(absSavePath1));
             }
-            int sflag2 = saveFile(spath,fid,absSavePath2); // 淇濆瓨绗簩涓�
+            int sflag2 = saveFile(spath,fid,absSavePath2,proName); // 淇濆瓨绗簩涓�
             if(sflag2==1){
                 ui->tableWidget->setItem(i,17,new QTableWidgetItem(absSavePath2));
             }
-            int sflag3 = saveFile(tpath,fid,absSavePath3); // 淇濆瓨绗笁涓�
+            int sflag3 = saveFile(tpath,fid,absSavePath3,proName); // 淇濆瓨绗笁涓�
             if(sflag3==1){
                 ui->tableWidget->setItem(i,23,new QTableWidgetItem(absSavePath3));
             }
diff --git a/internal_system_v1/threemergeproblemlist.h b/internal_system_v1/threemergeproblemlist.h
index 81e424a..5266b86 100644
--- a/internal_system_v1/threemergeproblemlist.h
+++ b/internal_system_v1/threemergeproblemlist.h
@@ -38,7 +38,8 @@
     int selectSQL(QString sql,QVector<QVector<QString>> &result); // 鎷跨粨鏋滈泦鐨剆ql
     int changeSQL(QString sql); // 鎷挎潯鏁扮殑sql
     int saveDataLine(int row); // 淇濆瓨鎸囧畾琛� 鍏堝垽鏂搴旂殑绱㈠紩id鏄惁瀛樺湪锛屽瓨鍦ㄥ垯鏇存柊锛屼笉瀛樺湪鍒欐柊寤烘彃鍏�
-    int saveFile(QString path, QString id,QString &absSavePath); // 鏍规嵁id鏉ユ寚瀹氬瓙鐩綍杩涜鏂囦欢鐨勬嫹璐濆拰瀛樺偍
+    // 淇濇寔璺緞鍔犱笂 id+椤圭洰鍚嶇О
+    int saveFile(QString path, QString id,QString &absSavePath,QString proName); // 鏍规嵁id鏉ユ寚瀹氬瓙鐩綍杩涜鏂囦欢鐨勬嫹璐濆拰瀛樺偍
 
     int loadPdfFile(QString path); // 鍔犺浇pdf鏂囦欢
 
diff --git "a/\344\277\256\346\224\271_241015/\345\206\205\345\256\241\347\263\273\347\273\237\345\255\230\345\234\250\351\227\256\351\242\230\345\217\215\351\246\2101015.docx" "b/\344\277\256\346\224\271_241015/\345\206\205\345\256\241\347\263\273\347\273\237\345\255\230\345\234\250\351\227\256\351\242\230\345\217\215\351\246\2101015.docx"
new file mode 100644
index 0000000..8555491
--- /dev/null
+++ "b/\344\277\256\346\224\271_241015/\345\206\205\345\256\241\347\263\273\347\273\237\345\255\230\345\234\250\351\227\256\351\242\230\345\217\215\351\246\2101015.docx"
Binary files differ
diff --git "a/\344\277\256\346\224\271_241015/\351\231\204\344\273\2661-\351\227\256\351\242\230\346\225\264\346\224\271\345\217\260\350\264\246\344\277\256\346\224\271\345\220\2161015.xlsx" "b/\344\277\256\346\224\271_241015/\351\231\204\344\273\2661-\351\227\256\351\242\230\346\225\264\346\224\271\345\217\260\350\264\246\344\277\256\346\224\271\345\220\2161015.xlsx"
new file mode 100644
index 0000000..65cbacc
--- /dev/null
+++ "b/\344\277\256\346\224\271_241015/\351\231\204\344\273\2661-\351\227\256\351\242\230\346\225\264\346\224\271\345\217\260\350\264\246\344\277\256\346\224\271\345\220\2161015.xlsx"
Binary files differ
diff --git "a/\344\277\256\346\224\271_241015/\351\231\204\344\273\2664_\345\206\205\345\256\241\347\273\23703\350\241\250_\345\206\205\351\203\250\345\256\241\350\256\241\347\273\237\350\256\241\347\273\274\345\220\210\350\241\250\344\277\256\346\224\271\345\220\2161015.xls" "b/\344\277\256\346\224\271_241015/\351\231\204\344\273\2664_\345\206\205\345\256\241\347\273\23703\350\241\250_\345\206\205\351\203\250\345\256\241\350\256\241\347\273\237\350\256\241\347\273\274\345\220\210\350\241\250\344\277\256\346\224\271\345\220\2161015.xls"
new file mode 100644
index 0000000..72955bd
--- /dev/null
+++ "b/\344\277\256\346\224\271_241015/\351\231\204\344\273\2664_\345\206\205\345\256\241\347\273\23703\350\241\250_\345\206\205\351\203\250\345\256\241\350\256\241\347\273\237\350\256\241\347\273\274\345\220\210\350\241\250\344\277\256\346\224\271\345\220\2161015.xls"
Binary files differ

--
Gitblit v1.8.0