From 162311be680b94a0dcd5250acbf36aead6350cb1 Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期三, 30 十月 2024 23:50:34 +0800
Subject: [PATCH] 1030

---
 Data/附件2_内审统01表_单位及内部审计机构基本情况表-1.301版(1).xls |    0 
 internal_system_v1/converinfo2.h             |    4 
 internal_system_v1/converinfo2.cpp           |   83 ++++++++++---
 internal_system_v1/converinfo2.ui            |   18 ++
 internal_system_v1/exporttofile.cpp          |  205 +++++++++++++++++++++++++++++++++
 5 files changed, 283 insertions(+), 27 deletions(-)

diff --git "a/Data/\351\231\204\344\273\2662_\345\206\205\345\256\241\347\273\23701\350\241\250_\345\215\225\344\275\215\345\217\212\345\206\205\351\203\250\345\256\241\350\256\241\346\234\272\346\236\204\345\237\272\346\234\254\346\203\205\345\206\265\350\241\250-1.301\347\211\210\0501\051.xls" "b/Data/\351\231\204\344\273\2662_\345\206\205\345\256\241\347\273\23701\350\241\250_\345\215\225\344\275\215\345\217\212\345\206\205\351\203\250\345\256\241\350\256\241\346\234\272\346\236\204\345\237\272\346\234\254\346\203\205\345\206\265\350\241\250-1.301\347\211\210\0501\051.xls"
index b552258..6008602 100644
--- "a/Data/\351\231\204\344\273\2662_\345\206\205\345\256\241\347\273\23701\350\241\250_\345\215\225\344\275\215\345\217\212\345\206\205\351\203\250\345\256\241\350\256\241\346\234\272\346\236\204\345\237\272\346\234\254\346\203\205\345\206\265\350\241\250-1.301\347\211\210\0501\051.xls"
+++ "b/Data/\351\231\204\344\273\2662_\345\206\205\345\256\241\347\273\23701\350\241\250_\345\215\225\344\275\215\345\217\212\345\206\205\351\203\250\345\256\241\350\256\241\346\234\272\346\236\204\345\237\272\346\234\254\346\203\205\345\206\265\350\241\250-1.301\347\211\210\0501\051.xls"
Binary files differ
diff --git a/internal_system_v1/converinfo2.cpp b/internal_system_v1/converinfo2.cpp
index 466e8b9..0afa25e 100644
--- a/internal_system_v1/converinfo2.cpp
+++ b/internal_system_v1/converinfo2.cpp
@@ -570,136 +570,137 @@
 
                 // 鍥涖�佸唴瀹′汉鍛橀厤澶囧熀鏈儏鍐�
                 // 缂栧埗鏁�
-                QVariant organazationNum = valRows[56].toList().at(4);
+                //QVariant organazationNum = valRows[56].toList().at(4);
+                QVariant organazationNum = valRows[60].toList().at(4);
                 if(organazationNum.isValid()){
                     curComInfo.organazationNum = organazationNum.toInt();
                     qDebug()<<"organazationNum"<<organazationNum;
                 }
                 // 瀹炴湁浜哄憳鏁�
-                QVariant realNum = valRows[56].toList().at(4);
+                QVariant realNum = valRows[60].toList().at(6);
                 if(realNum.isValid()){
                     curComInfo.realNum = realNum.toInt();
                     qDebug()<<"realNum"<<realNum;
                 }
                 // 涓撹亴浜哄憳鏁�
-                QVariant professionalNum = valRows[56].toList().at(4);
+                QVariant professionalNum = valRows[60].toList().at(8);
                 if(professionalNum.isValid()){
                     curComInfo.professionalNum = professionalNum.toInt();
                     qDebug()<<"professionalNum"<<professionalNum;
                 }
                 // 鎷ユ湁CIA浜哄憳鏁�
-                QVariant CIANum = valRows[56].toList().at(4);
+                QVariant CIANum = valRows[61].toList().at(6);
                 if(CIANum.isValid()){
                     curComInfo.CIANum = CIANum.toInt();
                     qDebug()<<"CIANum"<<CIANum;
                 }
                 // 瀛﹀巻锛氱澹強浠ヤ笂 浜哄憳鏁�
-                QVariant masterNum = valRows[56].toList().at(4);
+                QVariant masterNum = valRows[62].toList().at(6);
                 if(masterNum.isValid()){
                     curComInfo.masterNum = masterNum.toInt();
                     qDebug()<<"masterNum"<<masterNum;
                 }
                 // 澶у鏈
-                QVariant undergraduatesNum = valRows[56].toList().at(4);
+                QVariant undergraduatesNum = valRows[63].toList().at(6);
                 if(undergraduatesNum.isValid()){
                     curComInfo.undergraduatesNum = undergraduatesNum.toInt();
                     qDebug()<<"undergraduatesNum"<<undergraduatesNum;
                 }
                 // 涓撶鍙婁互涓�
-                QVariant juniorNum = valRows[56].toList().at(4);
+                QVariant juniorNum = valRows[64].toList().at(6);
                 if(juniorNum.isValid()){
                     curComInfo.juniorNum = juniorNum.toInt();
                     qDebug()<<"juniorNum"<<juniorNum;
                 }
 
                 // 鑱岀О 楂樼骇鑱岀О
-                QVariant seniorNum = valRows[56].toList().at(4);
+                QVariant seniorNum = valRows[65].toList().at(6);
                 if(seniorNum.isValid()){
                     curComInfo.seniorNum = seniorNum.toInt();
                     qDebug()<<"seniorNum"<<seniorNum;
                 }
                 // 涓骇鑱岀О
-                QVariant intermediateNum = valRows[56].toList().at(4);
+                QVariant intermediateNum = valRows[66].toList().at(6);
                 if(intermediateNum.isValid()){
                     curComInfo.intermediateNum = intermediateNum.toInt();
                     qDebug()<<"intermediateNum"<<intermediateNum;
                 }
                 // 鍒濈骇鑱岀О
-                QVariant primaryNum = valRows[56].toList().at(4);
+                QVariant primaryNum = valRows[67].toList().at(6);
                 if(primaryNum.isValid()){
                     curComInfo.primaryNum = primaryNum.toInt();
                     qDebug()<<"primaryNum"<<primaryNum;
                 }
                 // 鏃犺亴绉�
-                QVariant noTitleNum = valRows[56].toList().at(4);
+                QVariant noTitleNum = valRows[68].toList().at(6);
                 if(noTitleNum.isValid()){
                     curComInfo.noTitleNum = noTitleNum.toInt();
                     qDebug()<<"noTitleNum"<<noTitleNum;
                 }
 
                 // 骞撮緞缁撴瀯 50宀佷互涓�
-                QVariant upFiftyOldNum = valRows[56].toList().at(4);
+                QVariant upFiftyOldNum = valRows[69].toList().at(6);
                 if(upFiftyOldNum.isValid()){
                     curComInfo.upFiftyOldNum = upFiftyOldNum.toInt();
                     qDebug()<<"upFiftyOldNum"<<upFiftyOldNum;
                 }
                 // 30-50宀�
-                QVariant upThirtyOldNum = valRows[56].toList().at(4);
+                QVariant upThirtyOldNum = valRows[70].toList().at(6);
                 if(upThirtyOldNum.isValid()){
                     curComInfo.upThirtyOldNum = upThirtyOldNum.toInt();
                     qDebug()<<"upThirtyOldNum"<<upThirtyOldNum;
                 }
                 // 30宀佷互涓�
-                QVariant downThirtyOldNum = valRows[56].toList().at(4);
+                QVariant downThirtyOldNum = valRows[71].toList().at(6);
                 if(downThirtyOldNum.isValid()){
                     curComInfo.downThirtyOldNum = downThirtyOldNum.toInt();
                     qDebug()<<"downThirtyOldNum"<<downThirtyOldNum;
                 }
 
                 // 鐭ヨ瘑缁撴瀯 瀹¤
-                QVariant auditNum = valRows[56].toList().at(4);
+                QVariant auditNum = valRows[72].toList().at(6);
                 if(auditNum.isValid()){
                     curComInfo.auditNum = auditNum.toInt();
                     qDebug()<<"auditNum"<<auditNum;
                 }
                 // 浼氳
-                QVariant accountingNum = valRows[56].toList().at(4);
+                QVariant accountingNum = valRows[73].toList().at(6);
                 if(accountingNum.isValid()){
                     curComInfo.accountingNum = accountingNum.toInt();
                     qDebug()<<"accountingNum"<<accountingNum;
                 }
                 // 缁忔祹
-                QVariant economyNum = valRows[56].toList().at(4);
+                QVariant economyNum = valRows[74].toList().at(6);
                 if(economyNum.isValid()){
                     curComInfo.economyNum = economyNum.toInt();
                     qDebug()<<"economyNum"<<economyNum;
                 }
                 // 娉曞緥
-                QVariant lawNum = valRows[56].toList().at(4);
+                QVariant lawNum = valRows[75].toList().at(6);
                 if(lawNum.isValid()){
                     curComInfo.lawNum = lawNum.toInt();
                     qDebug()<<"lawNum"<<lawNum;
                 }
                 // 绠$悊
-                QVariant managerNum = valRows[56].toList().at(4);
+                QVariant managerNum = valRows[76].toList().at(6);
                 if(managerNum.isValid()){
                     curComInfo.managerNum = managerNum.toInt();
                     qDebug()<<"managerNum"<<managerNum;
                 }
                 // 淇℃伅鎶�鏈�
-                QVariant itNum = valRows[56].toList().at(4);
+                QVariant itNum = valRows[77].toList().at(6);
                 if(itNum.isValid()){
                     curComInfo.itNum = itNum.toInt();
                     qDebug()<<"itNum"<<itNum;
                 }
                 // 宸ョ▼
-                QVariant engineeringNum = valRows[56].toList().at(4);
+                QVariant engineeringNum = valRows[78].toList().at(6);
                 if(engineeringNum.isValid()){
                     curComInfo.engineeringNum = engineeringNum.toInt();
                     qDebug()<<"engineeringNum"<<engineeringNum;
                 }
                 // 鍏朵粬
-                QVariant otherNum = valRows[56].toList().at(4);
+                QVariant otherNum = valRows[79].toList().at(6);
                 if(otherNum.isValid()){
                     curComInfo.otherNum = otherNum.toInt();
                     qDebug()<<"otherNum"<<otherNum;
@@ -1086,7 +1087,7 @@
     qDebug()<<"excel:"<<excel.className();
     QAxObject * wbs = excel.querySubObject("WorkBooks");
     qDebug()<<"wbs:"<<wbs->className();
-    QAxObject * wb = wbs->querySubObject("Open(QString&)",path);
+    QAxObject * wb = wbs->querySubObject("Open(QString&)",path); // 鍝釜瀵硅薄鏄疧pen鐨勮繑鍥炲�硷紝鍝釜灏卞彲浠ヤ繚瀛�
     //QAxObject* pWorkBook = excel.querySubObject("ActiveWorkBook");
     //QAxObject* pWorkSheets = pWorkBook->querySubObject("Sheets");//鑾峰彇宸ヤ綔琛�
     //QAxObject * shs = wb->querySubObject("Sheets"); // WorkSheets 涔熷彲浠�
@@ -1378,6 +1379,30 @@
             qDebug()<<"financeDepartment"<<financeDepartment;
         }
         // 娉曞姟閮ㄩ棬銆佸唴閮ㄦ帶鍒堕儴闂ㄣ�佺邯妫�閮ㄩ棬銆佸叾浠栭儴闂�
+        // 闇�瑕佺壒娈婅幏鍙�
+        QAxObject *checkBox = sheet->querySubObject("CheckBoxes(const QString&)", QString::fromLocal8Bit("璐㈠姟閮ㄩ棬"));
+        if(checkBox){
+            qDebug()<<"鍙栧埌璐㈠姟閮ㄩ棬"<<checkBox->property("Value2").toInt()<<checkBox->property("Value").toInt()<<checkBox->property("Value2").toBool();
+            if(checkBox->property("Value").toBool()){
+                qDebug()<<"璐㈠姟閮ㄩ棬鍕鹃��";
+            }else{
+                qDebug()<<"璐㈠姟閮ㄩ棬鏈嬀閫�";
+            }
+        }else{
+            qDebug()<<"鏈彇鍒拌储鍔¢儴闂�";
+        }
+
+        QAxObject *checkBox1 = sheet->querySubObject("CheckBoxes(const QString&)", QString::fromLocal8Bit("娉曞姟閮ㄩ棬"));
+        if(checkBox1){
+            qDebug()<<"鍙栧埌娉曞姟閮ㄩ棬"<<checkBox1->property("Value").toInt();
+            if(checkBox1->property("Value").toBool()){
+                qDebug()<<"娉曞姟閮ㄩ棬鍕鹃��";
+            }else{
+                qDebug()<<"娉曞姟閮ㄩ棬鏈嬀閫�";
+            }
+        }else{
+            qDebug()<<"鏈彇鍒版硶鍔¢儴闂�";
+        }
 
         // 鍐呭鏈烘瀯灞傜骇
         QVariant intavalAuditLeval = valRows[56].toList().at(4);
@@ -1681,3 +1706,15 @@
 {
     readInfo(); // 鍔犺浇琛ㄦ牸
 }
+
+void ConverInfo2::on_pushButton_save_to_file_clicked()
+{
+    QString name = ui->lineEdit_name->text();
+    if(name.size()== 0){
+        QMessageBox::information(this,"鍗曚綅鍚嶇О涓虹┖,璇峰厛閫変腑涓�瀹跺崟浣�","璇峰厛閫変腑涓�瀹跺崟浣�");
+        return;
+    }
+    ExportToFile etf(this);
+    ComInfo cif = m_nameAndComInfos[name];
+    etf.saveToExcelFromComInfo(cif);
+}
diff --git a/internal_system_v1/converinfo2.h b/internal_system_v1/converinfo2.h
index 6605179..0aadf91 100644
--- a/internal_system_v1/converinfo2.h
+++ b/internal_system_v1/converinfo2.h
@@ -7,6 +7,8 @@
 #include <QAxObject>
 #include "struct_data.h"
 #include <QSqlError>
+#include "exporttofile.h"
+#include <QMessageBox>
 
 namespace Ui {
 class ConverInfo2;
@@ -48,6 +50,8 @@
 
     void showExcelSlot(); // 鍔犺浇鏄剧ず鐢靛瓙琛ㄦ牸鐨勬Ы
 
+    void on_pushButton_save_to_file_clicked(); // 瀵煎嚭淇濆瓨
+
 private:
     Ui::ConverInfo2 *ui;
     QMenu *m_menu;
diff --git a/internal_system_v1/converinfo2.ui b/internal_system_v1/converinfo2.ui
index e44570c..f6377d2 100644
--- a/internal_system_v1/converinfo2.ui
+++ b/internal_system_v1/converinfo2.ui
@@ -38,8 +38,8 @@
       <widget class="QWidget" name="scrollAreaWidgetContents">
        <property name="geometry">
         <rect>
-         <x>0</x>
-         <y>0</y>
+         <x>-215</x>
+         <y>-1034</y>
          <width>1100</width>
          <height>1600</height>
         </rect>
@@ -3476,6 +3476,19 @@
          <string>鎵嬪姩鍔犺浇</string>
         </property>
        </widget>
+       <widget class="QPushButton" name="pushButton_save_to_file">
+        <property name="geometry">
+         <rect>
+          <x>420</x>
+          <y>1500</y>
+          <width>241</width>
+          <height>41</height>
+         </rect>
+        </property>
+        <property name="text">
+         <string>瀵煎嚭淇濆瓨</string>
+        </property>
+       </widget>
        <zorder>label_70</zorder>
        <zorder>label_webSite</zorder>
        <zorder>label_townCode</zorder>
@@ -3670,6 +3683,7 @@
        <zorder>label_129</zorder>
        <zorder>pushButton_commit</zorder>
        <zorder>pushButton_laodFile</zorder>
+       <zorder>pushButton_save_to_file</zorder>
       </widget>
      </widget>
     </item>
diff --git a/internal_system_v1/exporttofile.cpp b/internal_system_v1/exporttofile.cpp
index 7e56b0f..b4b9a46 100644
--- a/internal_system_v1/exporttofile.cpp
+++ b/internal_system_v1/exporttofile.cpp
@@ -1,5 +1,10 @@
 锘�#include "exporttofile.h"
+#include <QFileDialog>
+#include <QDebug>
+#include <QAxObject>
+#include <QFile>
 
+#pragma execution_character_set("utf-8")
 ExportToFile::ExportToFile(QObject *parent) : QObject(parent)
 {
 
@@ -7,15 +12,211 @@
 
 int ExportToFile::saveToExcelFromComInfo(ComInfo &info)
 {
+    // 璇诲彇褰撳墠鐩綍涓嬬殑妯℃澘鏂囦欢锛岀劧鍚庡線閲屽啓鏁版嵁锛屼慨鏀逛繚瀛�
+
+//    QString savePath = QFileDialog::getExistingDirectory(nullptr,"閫夋嫨鏂囦欢澶�",QDir::currentPath());
+//    qDebug()<<"savepath:"<<savePath;
+
+    QString demoPath = QDir::currentPath()+"/Data/闄勪欢2_鍐呭缁�01琛╛鍗曚綅鍙婂唴閮ㄥ璁℃満鏋勫熀鏈儏鍐佃〃-1.301鐗坃demo.xls";
+    QDir dir(demoPath);
+    if(!dir.exists()){
+        demoPath = QDir::currentPath()+"/release/Data/闄勪欢2_鍐呭缁�01琛╛鍗曚綅鍙婂唴閮ㄥ璁℃満鏋勫熀鏈儏鍐佃〃-1.301鐗坃demo.xls";
+    }
+
+    QString savePath = QFileDialog::getSaveFileName(nullptr,"淇濆瓨鏂囦欢",QDir::currentPath()+"/鍐呭缁�01琛�.xls","Excel File(*.xls,*.xlsx)");
+    qDebug()<<"savepath:"<<savePath <<endl << "demoPath:"<<demoPath;
+
+
+
+    if(savePath.size() > 0){
+        QAxObject excel("ket.Application");
+        if(!excel.setControl("ket"
+                             ".Application")){  // windows鍐呮牳
+            excel.setControl("Excel.Application"); // wps鍐呮牳
+        }
+
+        excel.setProperty("Visible",false);
+        excel.setProperty("DisplayAlerts",false);
+        QAxObject * wbs = excel.querySubObject("WorkBooks");
+        qDebug()<<"wbs:"<<wbs->className();
+        QAxObject * wb = wbs->querySubObject("Open(QString&)",demoPath);
+        qDebug()<<"wb open ok";
+        QAxObject * shs = wb->querySubObject("WorkSheets"); // WorkSheets 涔熷彲浠�
+        // 鑾峰彇鍏蜂綋琛ㄦ牸锛岃鍒�
+        QAxObject * sheet = shs->querySubObject("Item(int)", 1); // 绗竴涓〃
+        QAxObject *usedRange = sheet->querySubObject("UsedRange");
+        int rows = usedRange->querySubObject("Rows")->property("Count").toInt();
+        int columns = usedRange->querySubObject("Columns")->property("Count").toInt();
+        qDebug()<<"r--c:"<<rows<<columns;
+
+        // 淇敼鏌愪釜鍊�
+        //sheet->querySubObject("Cells(int,int)", 1, 10)->dynamicCall("SetValue(const QString&)","1000200300");
+//        QAxObject *cell1 = sheet->querySubObject("Range(QVariant, QVariant)", "D10");
+//        qDebug()<<"B3鍘熸暟鎹細"<<cell1->dynamicCall("Value2()").toString();
+//        /* ---- 淇敼鍗曚釜鍗曞厓鏍间腑鐨勬暟鎹� ---- */
+//        cell1->setProperty("Value2", "21321321312");
+//        qDebug()<<"B3淇敼鍚庣殑鏁版嵁锛�"<<cell1->dynamicCall("Value2()").toString();
+
+//        QAxObject *cell2 = sheet->querySubObject("Range(QVariant, QVariant)", "G63");
+//        qDebug()<<"B3鍘熸暟鎹細"<<cell2->dynamicCall("Value2()").toString();
+//        /* ---- 淇敼鍗曚釜鍗曞厓鏍间腑鐨勬暟鎹� ---- */
+//        cell2->setProperty("Value2", "10");
+//        qDebug()<<"G63淇敼鍚庣殑鏁版嵁锛�"<<cell2->dynamicCall("Value2()").toString();
+
+//        QAxObject *cell3 = sheet->querySubObject("Range(QVariant, QVariant)", "E57");
+//        qDebug()<<"B3鍘熸暟鎹細"<<cell3->dynamicCall("Value2()").toString();
+//        /* ---- 淇敼鍗曚釜鍗曞厓鏍间腑鐨勬暟鎹� ---- */
+//        cell3->setProperty("Value2", "4 鍏朵粬");
+//        qDebug()<<"E57淇敼鍚庣殑鏁版嵁锛�"<<cell3->dynamicCall("Value2()").toString();
+
+        // 渚濇璧嬪��
+        // 鍩烘湰鎯呭喌
+        sheet->querySubObject("Range(QVariant, QVariant)", "D10")->setProperty("Value2", info.creditCode); // 缁熶竴淇$敤浠g爜
+        qDebug()<<1;
+        sheet->querySubObject("Range(QVariant, QVariant)", "I10")->setProperty("Value2", QString::fromLocal8Bit(info.name)); // 鍗曚綅鍚嶇О
+        qDebug()<<2;
+        sheet->querySubObject("Range(QVariant, QVariant)", "D13")->setProperty("Value2", QString::fromLocal8Bit(info.comType)); // 鏈烘瀯绫诲瀷
+        qDebug()<<3;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C19")->setProperty("Value2", QString::fromLocal8Bit(info.business)); // 涓氬姟娲诲姩
+        qDebug()<<4;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E20")->setProperty("Value2", info.businessCode); // 琛屼笟浠g爜
+        qDebug()<<5;
+        sheet->querySubObject("Range(QVariant, QVariant)", "B22")->setProperty("Value2", QString::fromLocal8Bit(info.addr)); // 娉ㄥ唽鍦板強鍖哄垝
+        qDebug()<<6;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C25")->setProperty("Value2", info.areaCode); // 鍖哄煙浠g爜
+        qDebug()<<7;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G25")->setProperty("Value2", info.townCode); // 鍩庝埂浠g爜
+        qDebug()<<8;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C26")->setProperty("Value2", QString::fromLocal8Bit(info.scale)); // 鍗曚綅瑙勬ā
+        qDebug()<<9;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G27")->setProperty("Value2", info.people); // 浠庝笟浜哄憳鏁伴噺
+        qDebug()<<10;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E28")->setProperty("Value2", QString::fromLocal8Bit(info.representative)); // 娉曚汉
+        qDebug()<<11;
+        sheet->querySubObject("Range(QVariant, QVariant)", "I28")->setProperty("Value2", QString::fromLocal8Bit(info.standardType)); // 鎵ц浼氳鏍囧噯
+        qDebug()<<12;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C32")->setProperty("Value2", info.trunkCode); // 闀块�斿尯鍙�
+        qDebug()<<13;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C33")->setProperty("Value2", info.fixedTel); // 鍥哄畾鐢佃瘽
+        qDebug()<<14;
+        sheet->querySubObject("Range(QVariant, QVariant)", "C34")->setProperty("Value2", info.postCode); // 閭斂缂栫爜
+        qDebug()<<15;
+        sheet->querySubObject("Range(QVariant, QVariant)", "F31")->setProperty("Value2", info.email); // 鐢靛瓙閭
+        qDebug()<<16;
+        sheet->querySubObject("Range(QVariant, QVariant)", "F33")->setProperty("Value2", info.webSite); // 缃戝潃
+        qDebug()<<17;
+
+        // 浜� 鍗曚綅缁勭粐缁撴瀯鎯呭喌
+        sheet->querySubObject("Range(QVariant, QVariant)", "E36")->setProperty("Value2", QString::fromLocal8Bit(info.hasUpLegal)); // 鏄惁鏈変笂涓�绾ф硶浜�
+        qDebug()<<18;
+        sheet->querySubObject("Range(QVariant, QVariant)", "H37")->setProperty("Value2", QString::fromLocal8Bit(info.upCreditCode)); // 涓婁竴绾х粺涓�绀句細淇$敤浠g爜
+        qDebug()<<19;
+        sheet->querySubObject("Range(QVariant, QVariant)", "H38")->setProperty("Value2", QString::fromLocal8Bit(info.oldCreditCode)); // 鍘熺粍缁囨満鏋勪唬鐮�
+        qDebug()<<20;
+        sheet->querySubObject("Range(QVariant, QVariant)", "H39")->setProperty("Value2", QString::fromLocal8Bit(info.upName)); // 涓婁竴绾у崟浣嶅悕绉�
+        qDebug()<<21;
+
+        // 涓� 鎬诲璁″笀涓庡唴閮ㄥ璁℃満鏋勫熀鏈儏鍐�
+        sheet->querySubObject("Range(QVariant, QVariant)", "E41")->setProperty("Value2", QString::fromLocal8Bit(info.hasChiefDesigner)); // 鏄惁璁剧疆鎬诲璁″笀
+        qDebug()<<22;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E42")->setProperty("Value2", QString::fromLocal8Bit(info.ChiefDesignerLevel)); // 鎬诲璁″笀鑱屼綅灞傜骇
+        qDebug()<<23;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E45")->setProperty("Value2", QString::fromLocal8Bit(info.employmentMode)); // 鎬诲浠昏亴鏂瑰紡
+        qDebug()<<24;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E48")->setProperty("Value2", QString::fromLocal8Bit(info.hasSetIntervalAudit)); // 鏄惁璁剧疆鍐呭鏈烘瀯
+        qDebug()<<25;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E49")->setProperty("Value2", QString::fromLocal8Bit(info.internalName)); // 鍐呭鏈烘瀯鍚嶇О
+        qDebug()<<26;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E50")->setProperty("Value2", QString::fromLocal8Bit(info.leadingOrganization)); // 棰嗗鏈烘瀯
+        qDebug()<<27;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E54")->setProperty("Value2", QString::fromLocal8Bit(info.hasSetSeparateIA)); // 鏄惁鐙珛璁剧疆鍐呭鏈烘瀯
+        qDebug()<<28;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E56")->setProperty("Value2", info.financeDepartment); // 璐㈠姟閮ㄩ棬
+        qDebug()<<29;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E56")->setProperty("Value2", info.legalDepartment); // 娉曞姟閮ㄩ棬
+        qDebug()<<30;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E56")->setProperty("Value2", info.internalConDepart); // 鍐呴儴鎺у埗閮ㄩ棬
+        qDebug()<<31;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E56")->setProperty("Value2", info.disceplineInDepart); // 绾閮ㄩ棬
+        qDebug()<<32;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E56")->setProperty("Value2", info.otherDepart); // 鍏朵粬閮ㄩ棬
+        qDebug()<<33;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E57")->setProperty("Value2", QString::fromLocal8Bit(info.intavalAuditLeval)); // 鍐呭灞傜骇
+        qDebug()<<34;
+
+        // 鍥� 鍐呴儴瀹¤浜哄憳閰嶅鍩烘湰鎯呭喌
+        sheet->querySubObject("Range(QVariant, QVariant)", "E61")->setProperty("Value2", info.organazationNum); // 缂栧埗鏁伴噺
+        qDebug()<<35;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G61")->setProperty("Value2", info.realNum); // 瀹炴湁浜哄憳鏁�
+        qDebug()<<36;
+        sheet->querySubObject("Range(QVariant, QVariant)", "I61")->setProperty("Value2", info.professionalNum); // 涓撹亴浜哄憳鏁伴噺
+        qDebug()<<37;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G62")->setProperty("Value2", info.CIANum); // 鎷ユ湁CIA浜烘暟
+        qDebug()<<38;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G63")->setProperty("Value2", info.masterNum); // 纭曞+瀛﹀巻浠ヤ笂浜烘暟
+        qDebug()<<39;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G64")->setProperty("Value2", info.undergraduatesNum); // 鏈浜烘暟
+        qDebug()<<40;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G65")->setProperty("Value2", info.juniorNum); // 涓撶鍙婁互涓嬩汉鏁�
+        qDebug()<<41;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G66")->setProperty("Value2", info.seniorNum); // 楂樼骇鑱岀О浜烘暟
+        qDebug()<<42;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G67")->setProperty("Value2", info.intermediateNum); // 涓骇鑱岀О浜烘暟
+        qDebug()<<43;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G68")->setProperty("Value2", info.primaryNum); // 鍒濈骇鑱岀О浜烘暟
+        qDebug()<<44;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G69")->setProperty("Value2", info.noTitleNum); // 鏃犺亴绉颁汉鏁�
+        qDebug()<<45;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G70")->setProperty("Value2", info.upFiftyOldNum); // 50宀佷互涓婁汉鏁�
+        qDebug()<<46;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G71")->setProperty("Value2", info.upThirtyOldNum); // 30-50宀佷汉鏁�
+        qDebug()<<47;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G72")->setProperty("Value2", info.downThirtyOldNum); // 30宀佷互涓嬩汉鏁�
+        qDebug()<<48;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G73")->setProperty("Value2", info.auditNum); // 瀹¤鏁伴噺
+        qDebug()<<49;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G74")->setProperty("Value2", info.accountingNum); // 浼氳鏁伴噺
+        qDebug()<<50;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G75")->setProperty("Value2", info.economyNum); // 缁忔祹鏁伴噺
+        qDebug()<<51;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G76")->setProperty("Value2", info.lawNum); // 娉曞緥鏁伴噺
+        qDebug()<<52;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G77")->setProperty("Value2", info.managerNum); // 绠$悊鏁伴噺
+        qDebug()<<53;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G78")->setProperty("Value2", info.itNum); // 淇℃伅鎶�鏈暟閲�
+        qDebug()<<54;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G79")->setProperty("Value2", info.engineeringNum); // 宸ョ▼鏁伴噺
+        qDebug()<<55;
+        sheet->querySubObject("Range(QVariant, QVariant)", "G80")->setProperty("Value2", info.otherNum); // 鍏朵粬鏁伴噺
+        qDebug()<<56;
+
+        // 鍚庨潰鐨�4涓俊鎭�
+        sheet->querySubObject("Range(QVariant, QVariant)", "B82")->setProperty("Value2", QString::fromLocal8Bit(info.statisticalConOfficer)); // 缁熻璐熻矗浜�
+        qDebug()<<57;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E82")->setProperty("Value2", QString::fromLocal8Bit(info.personFilling)); // 濉〃浜�
+        qDebug()<<58;
+        sheet->querySubObject("Range(QVariant, QVariant)", "B83")->setProperty("Value2", QString::fromLocal8Bit(info.officerTel)); // 鑱旂郴鐢佃瘽
+        qDebug()<<59;
+        sheet->querySubObject("Range(QVariant, QVariant)", "E83")->setProperty("Value2", QString::fromLocal8Bit(info.fillingDateTime)); // 濉姤鏃ユ湡
+        qDebug()<<60;
+
+        // 瀹屼簨浜嗭紝缁撴潫锛屼繚瀛樻垨鑰呴��鍑�
+        wb->dynamicCall("SaveAs(const QString&)",QDir::toNativeSeparators(savePath));
+        wbs->dynamicCall("Close()");
+        excel.dynamicCall("Quit(void)");
+
+
+    }
+    return 0;
 
 }
 
 int ExportToFile::saveToExcelFromThreeMergePro()
 {
-
+    return 0;
 }
 
 int ExportToFile::saveToExcelFromNeiShenZonghe()
 {
-
+    return 0;
 }

--
Gitblit v1.8.0