From cf4a5deced71464d424ce5931774f6df0c4c6bb3 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 26 十一月 2025 16:30:07 +0800
Subject: [PATCH] 修改新增

---
 multi-system/src/main/resources/mapper/system/CompanySummaryMapper.xml |  105 +++++++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 91 insertions(+), 14 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/CompanySummaryMapper.xml b/multi-system/src/main/resources/mapper/system/CompanySummaryMapper.xml
index 42f9a2c..6acb0e7 100644
--- a/multi-system/src/main/resources/mapper/system/CompanySummaryMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/CompanySummaryMapper.xml
@@ -13,6 +13,27 @@
             <if test="companySummary != null and companySummary !=''" >
                 company_summary = #{companySummary},
             </if>
+            <if test="companyType != null " >
+                company_type = #{companyType},
+            </if>
+            <if test="industry != null and industry != ''" >
+                industry = #{industry},
+            </if>
+            <if test="legalPersonCode != null and legalPersonCode != ''" >
+                legal_person_code = #{legalPersonCode},
+            </if>
+            <if test="legalPerson != null and legalPerson != ''" >
+                legal_person = #{legalPerson},
+            </if>
+            <if test="registeredCapital != null and registeredCapital != ''" >
+                registered_capital = #{registeredCapital},
+            </if>
+            <if test="officeAddress != null and officeAddress != ''" >
+                office_address = #{officeAddress},
+            </if>
+            <if test="otherAddress != null and otherAddress != ''" >
+                other_address = #{otherAddress},
+            </if>
             <if test="filePath!=null and filePath != ''">
                 file_path = #{filePath},
             </if>
@@ -40,26 +61,82 @@
 
     <select id="selectCompanySummaryList" resultType="com.gkhy.exam.system.domain.CompanySummary">
         SELECT
-            cs.`id`,
-            cs.`company_id`,
-            sc.`name` as company_name,
-            cs.`company_summary`,
-            cs.file_path,
-            cs.file_name,
-            cs.`del_flag`,
-            cs.`create_by`,
-            cs.`create_time`,
-            cs.`update_by`,
-            cs.`update_time`
+        cs.`id`,
+        cs.`company_id`,
+        sc.`name` as company_name,
+        cs.`company_summary`,
+        cs.file_path,
+        cs.file_name,
+        cs.`del_flag`,
+        cs.`create_by`,
+        cs.`create_time`,
+        cs.`update_by`,
+        cs.`update_time`,
+        cs.company_type,
+        cs.industry,
+        cs.legal_person_code,
+        cs.legal_person,
+        cs.registered_capital,
+        cs.office_address,
+        cs.other_address
         FROM
-            company_summary cs
+        company_summary cs
         left join sys_company sc on cs.company_id = sc.id
         WHERE
-             cs.del_flag = 1
+        cs.del_flag = 1
         <if test="companyId!=null and companyId!=''">
             and cs.company_id = #{companyId}
         </if>
         ORDER BY
-            cs.create_time DESC
+        cs.create_time DESC
     </select>
+
+
+
+
+    <resultMap id="CompanyStatisticsMap" type="com.gkhy.exam.system.domain.vo.statistic.CompanyStatisticsVo">
+
+        <result property="companyId" column="company_id"/>
+        <result property="companyName" column="company_name"/>
+        <result property="companyType" column="company_type"/>
+        <result property="industry" column="industry"/>
+        <result property="legalPersonCode" column="legal_person_code"/>
+        <result property="legalPerson" column="legal_person"/>
+        <result property="registeredCapital" column="registered_capital"/>
+        <result property="officeAddress" column="office_address"/>
+        <result property="otherAddress" column="other_address"/>
+<!--        <result property="totalEmployee" column="total_employee"/>-->
+<!--        <result property="professionalEmployee" column="professional_employee"/>-->
+        <collection property="companyCertificateVOList" javaType="java.util.List" resultMap="CompanyCertificateVO"/>
+    </resultMap>
+    <resultMap id="CompanyCertificateVO" type="com.gkhy.exam.system.domain.vo.statistic.CompanyCertificateVO">
+        <result property="certificateName" column="certificate_name"/>
+        <result property="certificateNum" column="certificate_num"/>
+        <result property="effectiveTime" column="effective_time"/>
+        <result property="getTime" column="get_time"/>
+    </resultMap>
+
+    <select id="selectCompanyStatistics" resultMap="CompanyStatisticsMap" parameterType="int">
+        SELECT cs.`company_id`,
+               sc.`name` as company_name,
+               cs.company_type,
+               cs.industry,
+               cs.legal_person_code,
+               cs.legal_person,
+               cs.registered_capital,
+               cs.office_address,
+               cs.other_address,
+               cc.certificate_name,
+               cc.certificate_num,
+               cc.effective_time,
+               cc.get_time
+        FROM company_summary cs
+                 inner join sys_company sc on cs.company_id = sc.id and sc.del_flag = 0
+                 left join company_certificate cc on cs.company_id = cc.company_id and cc.del_flag = 1
+        WHERE cs.del_flag = 1
+          and cs.company_id = #{companyId}
+    </select>
+
+
+
 </mapper>

--
Gitblit v1.9.2