From 20ffcfb5507daf34f81346ca3dfa4c031e7b2fe3 Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期日, 27 四月 2025 22:13:53 +0800
Subject: [PATCH] 0427

---
 internal_system_v1/exporttofile.cpp |  330 +++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 310 insertions(+), 20 deletions(-)

diff --git a/internal_system_v1/exporttofile.cpp b/internal_system_v1/exporttofile.cpp
index 8a7533b..366e933 100644
--- a/internal_system_v1/exporttofile.cpp
+++ b/internal_system_v1/exporttofile.cpp
@@ -23,6 +23,10 @@
     QDir dir(demoPath);
     if(!dir.exists()){
         demoPath = QDir::currentPath()+"/release/Data/闄勪欢2_鍐呭缁�01琛╛鍗曚綅鍙婂唴閮ㄥ璁℃満鏋勫熀鏈儏鍐佃〃-1.301鐗坃demo.xls";
+        QDir dir_realse(demoPath);
+        if(!dir_realse.exists()){
+            demoPath = QDir::currentPath()+"/Data/闄勪欢2_鍐呭缁�01琛╛鍗曚綅鍙婂唴閮ㄥ璁℃満鏋勫熀鏈儏鍐佃〃-1.301鐗坃demo.xls";
+        }
     }
     QString dt = QDateTime::currentDateTime().toString("yyyyMMdd-HHmmss");
     QString savePath = QFileDialog::getSaveFileName(nullptr,"淇濆瓨鏂囦欢",QDir::currentPath()+QString("/鍐呭缁�01琛╛%1_%2.xls").arg(QString::fromLocal8Bit(info.name)).arg(dt),"Excel File(*.xls;*.xlsx)");
@@ -214,27 +218,34 @@
 
 }
 
-int ExportToFile::saveToExcelFromThreeMergePro()
+int ExportToFile::saveToExcelFromThreeMergePro(QString name,QVector<ThreeMergeInfo> &threeMergeInfos)
 {
-    return 0;
-}
+    qDebug()<<"涓夊悎涓�鍙版湰淇濆瓨瀵煎嚭";
 
-int ExportToFile::saveToExcelFromNeiShenZonghe(QString name,NeiShenZongHeInfo &nszh)
-{
-    qDebug()<<"鍐呭缁煎悎淇濆瓨瀵煎嚭";
+    if(threeMergeInfos.size() == 0) {
+        QMessageBox::information(nullptr,"鍐呭涓虹┖","璇锋煡璇㈠埌鏁版嵁鍐嶅鍑轰繚瀛�");
+        return -1; // 鏂囦欢涓虹┖
+    }
 
-    if(name.size() == 0) return -1; // 鏂囦欢涓虹┖
+    if(name.size() == 0) {
+        QMessageBox::information(nullptr,"鍏徃鍚嶄负绌�","璇烽�夋嫨涓�涓叕鍙稿啀瀵煎嚭淇濆瓨");
+        return -1; // 鏂囦欢涓虹┖
+    }
 
-    QString demoPath = QDir::currentPath()+"/Data/闄勪欢4_鍐呭缁�03琛╛鍐呴儴瀹¤缁熻缁煎悎琛╛demo.xls";
+    QString demoPath = QDir::currentPath()+"/Data/涓夊悎涓�.xlsx";
     QDir dir(demoPath);
     if(!dir.exists()){
-        demoPath = QDir::currentPath()+"/release/Data/闄勪欢4_鍐呭缁�03琛╛鍐呴儴瀹¤缁熻缁煎悎琛╛demo.xls";
+        demoPath = QDir::currentPath()+"/release/Data/涓夊悎涓�.xlsx";
+        QDir dir_realese(demoPath);
+        if(!dir_realese.exists()){
+            demoPath = QDir::currentPath()+"/Data/涓夊悎涓�.xlsx";
+        }
     }
+
+    //QMessageBox::information(nullptr,"涓夊悎涓�璺緞",demoPath);
     QString dt = QDateTime::currentDateTime().toString("yyyyMMdd-HHmmss");
-    QString savePath = QFileDialog::getSaveFileName(nullptr,"淇濆瓨鏂囦欢",QDir::currentPath()+QString("/缁煎悎琛╛%1_%2.xls").arg(name).arg(dt),"Excel File(*.xls;*.xlsx)");
+    QString savePath = QFileDialog::getSaveFileName(nullptr,"淇濆瓨鏂囦欢",QDir::currentPath()+QString("/涓夊悎涓�_%1_%2.xls").arg(name).arg(dt),"Excel File(*.xls;*.xlsx)");
     qDebug()<<"savepath:"<<savePath << endl << "demoPath:"<<demoPath;
-
-
 
     if(savePath.size() > 0){
         QAxObject excel("ket.Application");
@@ -258,22 +269,301 @@
         qDebug()<<"r--c:"<<rows<<columns;
 
         // 淇敼鍐呭
+        for(int i=0;i<threeMergeInfos.size();++i){
+            // 鍙戠幇闂
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('A').arg(4+i))->setProperty("Value2", threeMergeInfos[i].id); // 搴忓彿
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('B').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_type)); // 瀹¤绫诲埆
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('C').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_year)); // 瀹¤骞村害
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('D').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_unit)); // 瀹¤鍗曚綅
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('E').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_method)); // 瀹¤鏂瑰紡
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('F').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].responsible_subject_name)); // 璐d换涓讳綋鍚嶇О
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('G').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_item)); // 瀹¤椤圭洰
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('H').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_item_name)); // 瀹¤椤圭洰鍚嶇О
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('I').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].pro_type)); // 闂绫诲埆
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('J').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_qualification)); // 闂瀹氭��
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('K').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_desript)); // 闂鎻忚堪
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('L').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_qualifi_basis)); // 闂瀹氭�ф硶瑙勪緷鎹�
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('M').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_money_basis)); // 瀹¤鍙戠幇闂閲戦瀹氭��
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('N').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_num_basis)); // 瀹¤鍙戠幇闂涓暟瀹氭��
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('O').arg(4+i))->setProperty("Value2", threeMergeInfos[i].money_involved); // 娑夊強閲戦锛堜竾鍏冿級
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('P').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].problem_desript_evidence_material)); // 闂鎻忚堪浣愯瘉璧勬枡
+
+            // 鏁存敼鎯呭喌
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('Q').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].audit_rectified)); // 瀹¤鏈熼棿宸叉暣鏀�
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('R').arg(4+i))->setProperty("Value2", threeMergeInfos[i].rectify_money); // 鏁存敼閲戦锛堜竾鍏冿級
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('S').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_situation_1)); // 鏁存敼鎯呭喌1
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('T').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_situation_evidence_mat_1)); // 鏁存敼鎯呭喌浣愯瘉璧勬枡1
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('U').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_res)); // 鏁存敼缁撴灉
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('V').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_complete_time)); // 鏁存敼瀹屾垚鏃堕棿
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('W').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_not_over_reason)); // 灏氭湭鏁存敼鍒颁綅鐨勫師鍥�
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('X').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_will_complete_time)); // 鏁存敼棰勮瀹屾垚鏃堕棿
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('Y').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_situation_2)); // 鏁存敼鎯呭喌2
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('Z').arg(4+i))->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_situation_evidence_mat_2)); // 鏁存敼鎯呭喌浣愯瘉璧勬枡2
+
+            // 澶勫垎缁撴灉
+            sheet->querySubObject("Cells(int,int)", 4+i,27)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].punish_type)); // 澶勫垎绫诲瀷
+            //sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg('AA').arg(4+i))->setProperty("Value2", threeMergeInfos[i].punish_person_num); // 澶勫垎浜烘暟锛堝崟浣嶏細浜猴級
+            sheet->querySubObject("Cells(int,int)", 4+i,27+1)->setProperty("Value2", threeMergeInfos[i].punish_person_num); // 澶勫垎浜烘暟锛堝崟浣嶏細浜猴級 // 瓒呰繃Z浜嗭紝寰楀畨涓嬫爣鏉ュ鐞嗕簡
+
+
+//            // 绉婚�佷俊鎭�
+            sheet->querySubObject("Cells(int,int)", 4+i,28+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].transfer_info)); // 绉婚�佽缁嗕俊鎭�
+            sheet->querySubObject("Cells(int,int)", 4+i,29+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].punish_res)); // 澶勭悊缁撴灉
+            sheet->querySubObject("Cells(int,int)", 4+i,30+1)->setProperty("Value2", threeMergeInfos[i].involved_person_num); // 娑夋浜哄憳锛堝崟浣嶏細浜猴級
+
+            // 鏁存敼妫�鏌ョ粨鏋�
+            sheet->querySubObject("Cells(int,int)", 4+i,31+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_check_time)); // 妫�鏌ユ椂闂�
+            sheet->querySubObject("Cells(int,int)", 4+i,32+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_check_mothod)); // 妫�鏌ユ柟寮�
+            sheet->querySubObject("Cells(int,int)", 4+i,33+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].rectify_check_res)); // 妫�鏌ョ粨鏋�
+
+            // 鏁存敼绫诲瀷-宸叉暣鏀�
+            sheet->querySubObject("Cells(int,int)", 4+i,34+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].correct_problem)); // 绾犳闂
+            sheet->querySubObject("Cells(int,int)", 4+i,35+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].improve_the_system)); // 瀹屽杽鍒跺害
+            sheet->querySubObject("Cells(int,int)", 4+i,36+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].complete_time)); // 瀹屾垚鏃堕棿
+
+            // 鏁存敼绫诲瀷-姝e湪鏁存敼
+            sheet->querySubObject("Cells(int,int)", 4+i,37+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].during_main_reason)); // 涓昏鍘熷洜
+            sheet->querySubObject("Cells(int,int)", 4+i,38+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].during_end_complete_time)); // 瀹屾垚鏃堕檺
+
+            // 鏁存敼绫诲瀷-灏氭湭鏁存敼
+            sheet->querySubObject("Cells(int,int)", 4+i,39+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].not_main_reason)); // 涓昏鍘熷洜
+            sheet->querySubObject("Cells(int,int)", 4+i,40+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].departen_or_person)); // 璐d换閮ㄩ棬鎴栬矗浠讳汉
+            sheet->querySubObject("Cells(int,int)", 4+i,41+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].not_end_complete_time)); // 瀹屾垚鏃堕檺
+
+            // 鏁存敼缁撴灉-闂鏁存敼(閲戦绫�)
+            sheet->querySubObject("Cells(int,int)", 4+i,42+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].money_res)); // 閲戦绫绘暣鏀规垚鏋�
+            sheet->querySubObject("Cells(int,int)", 4+i,43+1)->setProperty("Value2", threeMergeInfos[i].money_res_money); // 閲戦锛堝厓锛�
+
+            // 鏁存敼缁撴灉-闂鏁存敼(闈為噾棰濈被)
+            sheet->querySubObject("Cells(int,int)", 4+i,44+1)->setProperty("Value2", QString::fromLocal8Bit(threeMergeInfos[i].no_money_res)); // 闈為噾棰濈被鏁存敼鎴愭灉
+            sheet->querySubObject("Cells(int,int)", 4+i,45+1)->setProperty("Value2", threeMergeInfos[i].no_money_res_num); // 鏁伴噺锛堜釜锛�
+
+
+        }
+
+
+
+        // 瀹屼簨浜嗭紝缁撴潫锛屼繚瀛樻垨鑰呴��鍑�
+        wb->dynamicCall("SaveAs(const QString&)",QDir::toNativeSeparators(savePath));
+        wbs->dynamicCall("Close()");
+        excel.dynamicCall("Quit(void)");
+
+        QMessageBox::information(nullptr,"瀵煎嚭瀹屾垚","鏂囦欢浣嶇疆:"+savePath);
+    }
+
+
+    return 0;
+}
+
+int ExportToFile::saveToExcelFromNeiShenZonghe(QString name,NeiShenZongHeInfo &nszh)
+{
+    qDebug()<<"鍐呭缁煎悎淇濆瓨瀵煎嚭";
+
+    if(name.size() == 0) {
+        QMessageBox::information(nullptr,"鍏徃鍚嶄负绌�","璇烽�夋嫨涓�涓叕鍙稿啀瀵煎嚭淇濆瓨");
+        return -1; // 鏂囦欢涓虹┖
+    }
+
+    QString demoPath = QDir::currentPath()+"/Data/闄勪欢4_鍐呭缁�03琛╛鍐呴儴瀹¤缁熻缁煎悎琛�.xls";
+    QDir dir(demoPath);
+    if(!dir.exists()){
+        demoPath = QDir::currentPath()+"/release/Data/闄勪欢4_鍐呭缁�03琛╛鍐呴儴瀹¤缁熻缁煎悎琛�.xls";
+        QDir dir_realse(demoPath);
+        if(!dir_realse.exists()){
+            demoPath = QDir::currentPath()+"/Data/闄勪欢4_鍐呭缁�03琛╛鍐呴儴瀹¤缁熻缁煎悎琛�.xls";
+        }
+    }
+    QString dt = QDateTime::currentDateTime().toString("yyyyMMdd-HHmmss");
+    QString savePath = QFileDialog::getSaveFileName(nullptr,"淇濆瓨鏂囦欢",QDir::currentPath()+QString("/缁煎悎琛╛%1_%2.xls").arg(name).arg(dt),"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);
+        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;
+
+        // 淇敼鍐呭
 
         // 鍥� 椤圭洰瀹¤  鍗曚綅 涓�
-        char index[5]={'G','H','I','J','K'};
+        char index[5]={'F','G','H','I','J'};
 
         for(int i=0;i<5;++i){
-            QString cellStr = QString("%1%2").arg(index[i]).arg(40);
-            qDebug()<<cellStr<<nszh.code_030300[i];
-            qDebug()<<"淇敼涔嬪墠:"<<sheet->querySubObject("Range(QVariant, QVariant)", cellStr)->property("Value2").toInt();
-            sheet->querySubObject("Range(QVariant, QVariant)", cellStr)->setProperty("Value2", nszh.code_030300[i]); // 瀹¤椤圭洰
-            qDebug()<<"淇敼缁撴灉:"<<sheet->querySubObject("Range(QVariant, QVariant)", cellStr)->property("Value2").toInt();
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(39))->setProperty("Value2", nszh.code_030300[i]); // 瀹¤椤圭洰
         }
         for(int i=0;i<5;++i){
-            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(41))->setProperty("Value2", nszh.code_030301[i]); // 鍏朵腑锛氳疮褰昏惤瀹炲浗瀹堕噸澶ф斂绛栨帾鏂藉璁�
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(40))->setProperty("Value2", nszh.code_030301[i]); // 鍏朵腑锛氳疮褰昏惤瀹炲浗瀹堕噸澶ф斂绛栨帾鏂藉璁�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(41))->setProperty("Value2", nszh.code_030302[i]); // 璐㈡斂璐㈠姟鏀舵敮瀹¤
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(42))->setProperty("Value2", nszh.code_030303[i]); // 鍥哄畾璧勪骇鎶曡祫瀹¤
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(43))->setProperty("Value2", nszh.code_030304[i]); // 鍐呴儴鎺у埗鍜岄闄╃鐞嗗璁�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(44))->setProperty("Value2", nszh.code_030305[i]); // 缁忔祹璐d换瀹¤
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(45))->setProperty("Value2", nszh.code_030306[i]); // 淇℃伅绯荤粺瀹¤
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(46))->setProperty("Value2", nszh.code_030307[i]); // 澧冨瀹¤
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(47))->setProperty("Value2", nszh.code_030308[i]); // 鍏朵粬
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(48))->setProperty("Value2", nszh.code_030310[i]); // 鍏朵腑锛氬鎵樺鍖呴」鐩�
         }
 
-        qDebug()<<40;
+        qDebug()<<39;
+
+        // 浜� 鏈~鎶ュ懆鏈熷唴閮ㄥ璁″伐浣滈噺  闅愯棌
+
+        // 鍏�佸璁″彂鐜伴棶棰橀噾棰� 鍗曚綅 鍏�
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(50))->setProperty("Value2", nszh.code_030500[i]); // 瀹¤鍙戠幇闂閲戦
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(51))->setProperty("Value2", nszh.code_030510[i]); // 鍏朵腑锛氱哗鏁堢被闂閲戦
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(52))->setProperty("Value2", nszh.code_030520[i]); // 鍚堣鎬ч棶棰橀噾棰�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(53))->setProperty("Value2", nszh.code_030521[i]); // 鍏朵腑锛氫細璁℃牳绠楁柟闈�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(54))->setProperty("Value2", nszh.code_030522[i]); // 杩濊浣跨敤璧勯噾
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(55))->setProperty("Value2", nszh.code_030523[i]); // 鎴暀銆佹矇娣�璧勯噾
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(56))->setProperty("Value2", nszh.code_030524[i]); // 鎹熷け娴垂
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(57))->setProperty("Value2", nszh.code_030525[i]); // 鎸敤璧勯噾
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(58))->setProperty("Value2", nszh.code_030526[i]); // 鍋锋紡绋庤垂
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(59))->setProperty("Value2", nszh.code_030527[i]); // 杩濊鍙栧緱鏀跺叆
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(60))->setProperty("Value2", nszh.code_030528[i]); // 鍏朵粬
+        }
+
+
+        // 涓冦�佸璁″彂鐜伴棶棰樹釜鏁�
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(61))->setProperty("Value2", nszh.code_030600[i]); // 瀹¤鍙戠幇闂涓暟
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(62))->setProperty("Value2", nszh.code_030610[i]); // 鍏朵腑锛氶噾棰濈被闂涓暟
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(63))->setProperty("Value2", nszh.code_030620[i]); // 闈為噾棰濈被闂涓暟
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(64))->setProperty("Value2", nszh.code_030621[i]); // 鍏朵腑锛氬浗瀹舵斂绛栨帾鏂借惤瀹炴柟闈�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(65))->setProperty("Value2", nszh.code_030622[i]); // 鍙戝睍瑙勫垝涓庢垬鐣ュ喅绛栨柟闈�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(66))->setProperty("Value2", nszh.code_030623[i]); // 鍐呴儴鎺у埗涓庨闄╃鐞嗘柟闈�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(67))->setProperty("Value2", nszh.code_030624[i]); // 鍏朵粬
+        }
+
+
+        // 鍏�佸璁″彂鐜伴棶棰樻暣鏀癸紙閲戦绫伙級  鍗曚綅 鍏�
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(68))->setProperty("Value2", nszh.code_030700[i]); // 瀹¤鍙戠幇闂鏁存敼锛堥噾棰濈被锛�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(69))->setProperty("Value2", nszh.code_030701[i]); // 鍏朵腑锛氳皟鏁翠細璁¤处鐩�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(70))->setProperty("Value2", nszh.code_030702[i]); // 鏀跺洖璧勯噾
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(71))->setProperty("Value2", nszh.code_030703[i]); // 鎸藉洖鎹熷け
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(72))->setProperty("Value2", nszh.code_030704[i]); // 褰掕繕鍘熻祫閲戞笭閬�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(73))->setProperty("Value2", nszh.code_030705[i]); // 琛ョ即绋庤垂
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(74))->setProperty("Value2", nszh.code_030706[i]); // 鍏朵粬
+        }
+
+
+        // 涔濄�佸璁″彂鐜伴棶棰樻暣鏀癸紙闈為噾棰濈被锛�  鍗曚綅 涓�
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(75))->setProperty("Value2", nszh.code_030800[i]); // 瀹¤鍙戠幇闂鏁存敼锛堥潪閲戦绫伙級
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(76))->setProperty("Value2", nszh.code_030801[i]); // 鍏朵腑锛氭柊鍒跺畾鍒跺害
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(77))->setProperty("Value2", nszh.code_030802[i]); // 淇瀹屽杽鍒跺害
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(78))->setProperty("Value2", nszh.code_030803[i]); // 浼樺寲瀹屽杽涓氬姟娴佺▼
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(79))->setProperty("Value2", nszh.code_030804[i]); // 鍏朵粬
+        }
+
+
+        // 鍗併�佹牴鎹璁″缓璁粰浜堝厷绾�佹斂鍔″拰鍐呴儴绾緥澶勫垎  鍗曚綅 浜�
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(80))->setProperty("Value2", nszh.code_030900[i]); // 鏍规嵁瀹¤寤鸿缁欎簣鍏氱邯銆佹斂鍔″拰鍐呴儴绾緥澶勫垎
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(81))->setProperty("Value2", nszh.code_030901[i]); // 鍏朵腑锛氬厷绾鍒�
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(82))->setProperty("Value2", nszh.code_030902[i]); // 鏀垮姟澶勫垎
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(83))->setProperty("Value2", nszh.code_030903[i]); // 鍐呴儴绾緥澶勫垎
+        }
+
+
+        // 鍗佷竴銆佸悜鍙告硶鏈哄叧绉婚�佹垨鎶ュ憡妗堜欢绾跨储
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(84))->setProperty("Value2", nszh.code_031000[i]); // 鍚戝徃娉曟満鍏崇Щ閫佹垨鎶ュ憡妗堜欢绾跨储
+        }
+        for(int i=0;i<5;++i){
+            sheet->querySubObject("Range(QVariant, QVariant)", QString("%1%2").arg(index[i]).arg(85))->setProperty("Value2", nszh.code_031001[i]); // 鍏朵腑锛氭秹妗堜汉鍛�
+        }
 
 
         // 瀹屼簨浜嗭紝缁撴潫锛屼繚瀛樻垨鑰呴��鍑�

--
Gitblit v1.8.0