From 6680ad0c95b04ee59bab0b7c1cd65351f279b7bf Mon Sep 17 00:00:00 2001
From: wumu <mayi@mayi.com>
Date: 星期五, 01 三月 2024 00:32:35 +0800
Subject: [PATCH] 0301

---
 internal_system_v1/searchinfo.cpp  |   78 +++++++++++++++++++
 internal_system_v1/converinfo2.cpp |  140 +++++++++++++++++++++++++++++++++++
 internal_system_v1/searchinfo.h    |    3 
 3 files changed, 220 insertions(+), 1 deletions(-)

diff --git a/internal_system_v1/converinfo2.cpp b/internal_system_v1/converinfo2.cpp
index 9160e92..5207561 100644
--- a/internal_system_v1/converinfo2.cpp
+++ b/internal_system_v1/converinfo2.cpp
@@ -733,6 +733,146 @@
     QString webSite = ui->lineEdit_webSite->text();
 
     // 鍗曚綅缁勭粐缁撴瀯鎯呭喌
+    QString hasUpLegal = ui->comboBox_hasUpLegal->currentText();
+    QString upCreditCode = ui->lineEdit_upCreditCode->text();
+    QString oldCreditCode = ui->lineEdit_oldCreditCode->text();
+    QString upName = ui->lineEdit_upName->text();
+
+    // 鎬诲璁″笀涓庡唴瀹℃満鏋勫熀鏈儏鍐�
+    QString hasChiefDesigner = ui->comboBox_hasChiefDesigner->currentText();
+    QString ChiefDesignerLevel = ui->comboBox_ChiefDesignerLevel->currentText();
+    QString employmentMode = ui->comboBox_employmentMode->currentText();
+    QString hasSetIntervalAudit = ui->comboBox_hasSetIntervalAudit->currentText();
+    QString internalName = ui->lineEdit_internalName->text();
+    QString leadingOrganization = ui->comboBox_leadingOrganization->currentText();
+    QString hasSetSeparateIA = ui->comboBox_hasSetSeparateIA->currentText();
+    bool financeDepartment = ui->checkBox_financeDepartment->isChecked();
+    bool legalDepartment = ui->checkBox_legalDepartment->isChecked();
+    bool internalConDepart = ui->checkBox_internalConDepart->isChecked();
+    bool disceplineInDepart = ui->checkBox_disceplineInDepart->isChecked();
+    bool otherDepart = ui->checkBox_otherDepart->isChecked();
+    QString intavalAuditLeval = ui->comboBox_intavalAuditLeval->currentText();
+
+    // 鍥涖�佸唴瀹′汉鍛橀厤澶囧熀鏈儏鍐�
+    int organazationNum = ui->lineEdit_organazationNum->text().toInt();
+    int realNum = ui->lineEdit_realNum->text().toInt();
+    int professionalNum = ui->lineEdit_professionalNum->text().toInt();
+    int CIANum = ui->lineEdit_CIANum->text().toInt();
+    int masterNum = ui->lineEdit_masterNum->text().toInt();
+    int undergraduatesNum = ui->lineEdit_undergraduatesNum->text().toInt();
+    int juniorNum = ui->lineEdit_juniorNum->text().toInt();
+    int seniorNum = ui->lineEdit_seniorNum->text().toInt();
+    int intermediateNum = ui->lineEdit_intermediateNum->text().toInt();
+    int primaryNum = ui->lineEdit_primaryNum->text().toInt();
+    int noTitleNum = ui->lineEdit_noTitleNum->text().toInt();
+    int upFiftyOldNum = ui->lineEdit_upFiftyOldNum->text().toInt();
+    int upThirtyOldNum = ui->lineEdit_upThirtyOldNum->text().toInt();
+    int downThirtyOldNum = ui->lineEdit_downThirtyOldNum->text().toInt();
+    int auditNum = ui->lineEdit_auditNum->text().toInt();
+    int accountingNum = ui->lineEdit_accountingNum->text().toInt();
+    int economyNum = ui->lineEdit_economyNum->text().toInt();
+    int lawNum = ui->lineEdit_lawNum->text().toInt();
+    int managerNum = ui->lineEdit_managerNum->text().toInt();
+    int itNum = ui->lineEdit_itNum->text().toInt();
+    int engineeringNum = ui->lineEdit_engineeringNum->text().toInt();
+    int otherNum = ui->lineEdit_otherNum->text().toInt();
+
+    // 鍚庨潰鐨�4涓俊鎭�
+    QString statisticalConOfficer = ui->lineEdit_statisticalConOfficer->text();
+    QString personFilling = ui->lineEdit_personFilling->text();
+    QString officerTel = ui->lineEdit_officerTel->text();
+    QString fillingDateTime = ui->lineEdit_fillingDateTime->text();
+
+    qDebug()<<"缁熻璐熻矗浜�"<<statisticalConOfficer;
+
+    // 鏇存柊鍒癿ap涓�
+    auto &curComInfo = m_nameAndComInfos[name];
+    strcpy(curComInfo.creditCode,creditCode.toLocal8Bit().data());
+    strcpy(curComInfo.name,name.toLocal8Bit().data());
+    strcpy(curComInfo.comType,comType.toLocal8Bit().data());
+    strcpy(curComInfo.business,business.toLocal8Bit().data());
+    strcpy(curComInfo.businessCode,businessCode.toLocal8Bit().data());
+    strcpy(curComInfo.addr,addr.toLocal8Bit().data());
+    strcpy(curComInfo.areaCode,areaCode.toLocal8Bit().data());
+    strcpy(curComInfo.townCode,townCode.toLocal8Bit().data());
+    strcpy(curComInfo.scale,scale.toLocal8Bit().data());
+    curComInfo.people = people.toInt();
+    strcpy(curComInfo.representative,representative.toLocal8Bit().data());
+    strcpy(curComInfo.standardType,standardType.toLocal8Bit().data());
+    strcpy(curComInfo.trunkCode,trunkCode.toLocal8Bit().data());
+    strcpy(curComInfo.fixedTel,fixedTel.toLocal8Bit().data());
+    strcpy(curComInfo.postCode,postCode.toLocal8Bit().data());
+    strcpy(curComInfo.email,email.toLocal8Bit().data());
+    strcpy(curComInfo.webSite,webSite.toLocal8Bit().data());
+
+    // 浜�
+    strcpy(curComInfo.hasUpLegal,hasUpLegal.toLocal8Bit().data());
+    strcpy(curComInfo.upCreditCode,upCreditCode.toLocal8Bit().data());
+    strcpy(curComInfo.oldCreditCode,oldCreditCode.toLocal8Bit().data());
+    strcpy(curComInfo.upName,upName.toLocal8Bit().data());
+
+    // 涓�
+    strcpy(curComInfo.hasChiefDesigner,hasChiefDesigner.toLocal8Bit().data());
+    strcpy(curComInfo.ChiefDesignerLevel,ChiefDesignerLevel.toLocal8Bit().data());
+    strcpy(curComInfo.employmentMode,employmentMode.toLocal8Bit().data());
+    strcpy(curComInfo.hasSetIntervalAudit,hasSetIntervalAudit.toLocal8Bit().data());
+    strcpy(curComInfo.internalName,internalName.toLocal8Bit().data());
+    strcpy(curComInfo.leadingOrganization,leadingOrganization.toLocal8Bit().data());
+    strcpy(curComInfo.hasSetSeparateIA,hasSetSeparateIA.toLocal8Bit().data());
+    curComInfo.financeDepartment = financeDepartment;
+    curComInfo.legalDepartment = legalDepartment;
+    curComInfo.internalConDepart = internalConDepart;
+    curComInfo.disceplineInDepart = disceplineInDepart;
+    curComInfo.otherDepart = otherDepart;
+    strcpy(curComInfo.intavalAuditLeval,intavalAuditLeval.toLocal8Bit().data());
+
+    // 鍥�
+    curComInfo.organazationNum = organazationNum;
+    curComInfo.realNum = realNum;
+    curComInfo.professionalNum = professionalNum;
+    curComInfo.CIANum = CIANum;
+    curComInfo.masterNum = masterNum;
+    curComInfo.undergraduatesNum = undergraduatesNum;
+    curComInfo.juniorNum = juniorNum;
+    curComInfo.seniorNum = seniorNum;
+    curComInfo.intermediateNum = intermediateNum;
+    curComInfo.primaryNum = primaryNum;
+    curComInfo.noTitleNum = noTitleNum;
+    curComInfo.upFiftyOldNum = upFiftyOldNum;
+    curComInfo.upThirtyOldNum = upThirtyOldNum;
+    curComInfo.downThirtyOldNum = downThirtyOldNum;
+    curComInfo.auditNum = auditNum;
+    curComInfo.accountingNum = accountingNum;
+    curComInfo.economyNum = economyNum;
+    curComInfo.lawNum = lawNum;
+    curComInfo.managerNum = managerNum;
+    curComInfo.itNum = itNum;
+    curComInfo.engineeringNum = engineeringNum;
+    curComInfo.otherNum = otherNum;
+
+    // 鍚�4涓俊鎭�
+    strcpy(curComInfo.statisticalConOfficer,statisticalConOfficer.toLocal8Bit().data());
+    strcpy(curComInfo.personFilling,personFilling.toLocal8Bit().data());
+    strcpy(curComInfo.officerTel,officerTel.toLocal8Bit().data());
+    strcpy(curComInfo.fillingDateTime,fillingDateTime.toLocal8Bit().data());
 
 
+    // 鏇存柊鍒版暟鎹簱
+
+    // 鍏堝垽鏂槸涓嶆槸宸茬粡瀛樺湪鍏徃鍚嶄簡锛岃嫢宸插瓨鍦紝鍒欐洿鏂帮紝涓嶅瓨鍦ㄥ垯鎻掑叆
+    QString sql = QString("select id,name from all_company_info where name='%1'").arg(name);
+    QSqlQuery query;
+    int rowCnt = 0;
+    if(query.exec(sql)){
+        qDebug()<<"size:"<<query.size();
+
+        while (query.next()) {
+            rowCnt++;
+        }
+    }
+    if(rowCnt == 0){
+        // 涓嶅瓨鍦紝鍒欐彃鍏ヤ竴鏉℃柊鏁版嵁
+    }else{
+        // 鏇存柊
+    }
 }
diff --git a/internal_system_v1/searchinfo.cpp b/internal_system_v1/searchinfo.cpp
index ce9f9e8..cf7616b 100644
--- a/internal_system_v1/searchinfo.cpp
+++ b/internal_system_v1/searchinfo.cpp
@@ -137,6 +137,84 @@
     createTableHasUnit("case_clue");
     m_itemAndTable["妗堜欢绾跨储"] = "case_clue";
 
+    // 鍗曚綅鐨勬墍鏈変俊鎭〃  鍒涘缓
+    createTableAllComInfo("all_company_info");
+
+
+}
+
+// 鍗曚綅淇℃伅琛� 鍏�
+void SearchInfo::createTableAllComInfo(QString tableName){
+    QString sql = QString("CREATE TABLE %1 (\
+            id       INTEGER      PRIMARY KEY AUTOINCREMENT,\
+            name     VARCHAR (30),\
+            code     VARCHAR (30),\
+            鏈烘瀯绫诲瀷     TEXT,\
+            涓昏涓氬姟娲诲姩   TEXT,\
+            琛屼笟浠g爜     TEXT,\
+            鍗曚綅娉ㄥ唽鍦板強鍖哄煙 TEXT,\
+            鍖哄煙浠g爜     TEXT,\
+            鍩庝埂浠g爜     TEXT,\
+            鍗曚綅瑙勬ā     TEXT,\
+            浠庝笟鏈熸湯浜烘暟   TEXT,\
+            娉曞畾浠h〃浜�    TEXT,\
+            鎵ц浼氳鏍囧噯绫诲埆 TEXT,\
+            闀块�斿尯鍙�     TEXT,\
+            鍥哄畾鐢佃瘽     TEXT,\
+            閭斂缂栫爜     TEXT,\
+            鐢靛瓙閭     TEXT,\
+            缃戝潃       TEXT,\
+            鏄惁鏈変笂涓�绾ф硶浜�       TEXT,\
+            涓婁竴绾х粺淇′唬鐮�       TEXT,\
+            鍘熺粍缁囦唬鐮�       TEXT,\
+            涓婄骇鍗曚綅鍚嶇О       TEXT,\
+            鏄惁璁剧疆鎬诲璁″笀       TEXT,\
+            鎬诲璁″笀鑱屼綅灞傜骇       TEXT,\
+            鎬诲浠昏亴鏂瑰紡       TEXT,\
+            鏄惁璁剧疆鍐呭鏈烘瀯       TEXT,\
+            鍐呭鏈烘瀯鍚嶇О       TEXT,\
+            棰嗗鏈烘瀯       TEXT,\
+            鏄惁鐙珛璁剧疆鍐呭鏈烘瀯       TEXT,\
+            璐㈠姟閮ㄩ棬       INTEGER,\
+            娉曞姟閮ㄩ棬       INTEGER,\
+            鍐呴儴鎺у埗閮ㄩ棬       INTEGER,\
+            绾閮ㄩ棬       INTEGER,\
+            鍏朵粬閮ㄩ棬       INTEGER,\
+            鍐呭灞傜骇       TEXT,\
+            缂栧埗鏁伴噺       INTEGER,\
+            瀹炴湁浜烘暟閲�       INTEGER,\
+            涓撹亴浜哄憳鏁伴噺       INTEGER,\
+            鎷ユ湁CIA浜烘暟       INTEGER,\
+            纭曞+瀛﹀巻浠ヤ笂浜烘暟       INTEGER,\
+            鏈浜烘暟       INTEGER,\
+            涓撶鍙婁互涓嬩汉鏁�       INTEGER,\
+            楂樼骇鑱岀О浜烘暟       INTEGER,\
+            涓骇鑱岀О浜烘暟       INTEGER,\
+            鍒濈骇鑱岀О浜烘暟       INTEGER,\
+            鏃犺亴绉颁汉鏁�       INTEGER,\
+            50宀佷互涓婁汉鏁�       INTEGER,\
+            30-50宀佸瞾浜烘暟       INTEGER,\
+            30宀佷互涓嬩汉鏁�       INTEGER,\
+            瀹¤鏁伴噺       INTEGER,\
+            浼氳鏁伴噺       INTEGER,\
+            缁忔祹鏁伴噺       INTEGER,\
+            娉曞緥鏁伴噺       INTEGER,\
+            绠$悊鏁伴噺       INTEGER,\
+            淇℃伅鎶�鏈暟閲�       INTEGER,\
+            宸ョ▼鏁伴噺       INTEGER,\
+            鍏朵粬鏁伴噺       INTEGER,\
+            缁熻璐熻矗浜�       TEXT,\
+            濉〃浜�       TEXT,\
+            鑱旂郴鐢佃瘽       TEXT,\
+            濉姤鏃ユ湡       TEXT,\
+        )").arg(tableName);
+    QSqlQuery query;
+    if(query.exec(sql))
+    {
+        qDebug()<<QString("create %1 ok...").arg(tableName);
+    }else{
+        qDebug()<<QString("create %1 fail...").arg(tableName)<<query.lastError().text();
+    }
 }
 
 void SearchInfo::createTableHasEvidences(QString tableName)
diff --git a/internal_system_v1/searchinfo.h b/internal_system_v1/searchinfo.h
index 134aafb..12becd2 100644
--- a/internal_system_v1/searchinfo.h
+++ b/internal_system_v1/searchinfo.h
@@ -1,4 +1,4 @@
-#ifndef SEARCHINFO_H
+锘�#ifndef SEARCHINFO_H
 #define SEARCHINFO_H
 
 #include <QMainWindow>
@@ -26,6 +26,7 @@
     QVector<QVector<QString>> getResult(QString &sql,int colCnt);
     void setLabels();
 
+    void createTableAllComInfo(QString tableName);
 private slots:
     void on_pushButton_search_clicked();
 

--
Gitblit v1.8.0