From 5011ebf747ddfa41840b352c9e39cf369a8f047c Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 26 十一月 2025 16:22:34 +0800
Subject: [PATCH] 情况汇总

---
 multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml |   68 +++++++++++++++++++--------------
 1 files changed, 39 insertions(+), 29 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml b/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
index 9e9637b..04aa843 100644
--- a/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/InternalAuditCheckMapper.xml
@@ -2,38 +2,48 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.gkhy.exam.system.mapper.InternalAuditCheckMapper">
 
-    <resultMap id="BaseResultMap" type="com.gkhy.exam.system.domain.InternalAuditCheck">
-        <id column="id" jdbcType="BIGINT" property="id" />
-        <result column="company_id" jdbcType="INTEGER" property="companyId" />
-        <result column="dept_id" jdbcType="BIGINT" property="deptId" />
-        <result column="audit_id" jdbcType="BIGINT" property="auditId" />
-        <result column="audit_date" jdbcType="TIMESTAMP" property="auditDate" />
-        <result column="caluse_num" jdbcType="VARCHAR" property="caluseNum" />
-        <result column="caluse_content" jdbcType="VARCHAR" property="caluseContent" />
-        <result column="check_record" jdbcType="VARCHAR" property="checkRecord" />
-        <result column="inconsistent" jdbcType="VARCHAR" property="inconsistent" />
-        <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
-        <result column="create_by" jdbcType="VARCHAR" property="createBy" />
-        <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
-        <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
-        <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
-        <result column="dept_name" jdbcType="VARCHAR" property="deptName" />
-    </resultMap>
 
-    <select id="selectInternalAuditCheckList" parameterType="int" resultMap="BaseResultMap">
-            select
-        a.id, a.company_id, a.dept_id, b.dept_name,a.audit_id, a.audit_date, a.caluse_num, a.caluse_content, a.check_record, a.inconsistent, a.del_flag, a.create_by, a.create_time, a.update_by, a.update_time
-            from internal_audit_check a
-        left join sys_dept b on a.dept_id = b.dept_id
+    <select id="selectInternalAuditCheckList" resultType="com.gkhy.exam.system.domain.InternalAuditCheck">
+        SELECT
+            iac.`id`,
+            iac.`company_id`,
+            iac.`dept_id`,
+            sd.dept_name,
+            iac.`person_id`,
+            es.`name` as person_name,
+            iac.`check_time`,
+            iac.`del_flag`,
+            iac.`create_by`,
+            iac.`create_time`,
+            iac.`update_by`,
+            iac.`update_time`
+        FROM
+            `internal_audit_check` iac
+                LEFT JOIN sys_dept sd ON iac.dept_id = sd.dept_id
+                LEFT JOIN ex_student es on iac.person_id = es.id
+        WHERE
+            iac.del_flag = 0
+        <if test="companyId!=null">
+            and iac.company_id = #{companyId}
+        </if>
+        ORDER BY
+            iac.create_time DESC
+    </select>
+    <select id="selectAuditCheckCatalogue"
+            resultType="com.gkhy.exam.system.domain.InternalAuditCheckCatalogue">
 
-            where a.del_flag = 0
-                <if test="companyId != null">
-                    and a.company_id = #{companyId}
-                </if>
-            order by a.create_time desc
     </select>
 
 
-
-
+    <select id ="getStatisticData" resultType="int">
+        select count(*)
+        from internal_audit_check_content aa
+                 INNER JOIN internal_audit_check_catalogue bb on aa.check_catalogue_id = bb.id
+                 INNER JOIN internal_audit_check cc on bb.check_id = cc.id
+        where aa.del_flag = 0
+          and bb.del_flag = 0
+          and cc.del_flag = 0
+          and aa.result != 1
+          and cc.company_id = #{companyId} and cc.check_time between #{startTime} and #{endTime}
+    </select>
 </mapper>

--
Gitblit v1.9.2