From 75309a59a676fb70f91dd01b05d93c7704a3836f Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 23 七月 2025 15:06:39 +0800
Subject: [PATCH] 新增培训计划

---
 multi-system/src/main/resources/mapper/system/ExExamRecordMapper.xml |   33 ++++++++++++++++++++++++++++-----
 1 files changed, 28 insertions(+), 5 deletions(-)

diff --git a/multi-system/src/main/resources/mapper/system/ExExamRecordMapper.xml b/multi-system/src/main/resources/mapper/system/ExExamRecordMapper.xml
index f438e61..4aba8f6 100644
--- a/multi-system/src/main/resources/mapper/system/ExExamRecordMapper.xml
+++ b/multi-system/src/main/resources/mapper/system/ExExamRecordMapper.xml
@@ -31,21 +31,35 @@
 
     <sql id="selectExamRecordVo">
         select a.id, a.company_id, a.student_id, a.plan_name, a.course_name,a.level,a.period,a.actual_period,a.score,
-               a.company_id,a.passed, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,b.name as company_name,
+               a.passed, a.create_by, a.create_time, a.update_by, a.update_time, a.remark,b.name as company_name,
                c.name as student_name,c.id_no as student_idno,c.phone as student_phone
         from ex_exam_record a
         left join sys_company b on b.id=a.company_id
         left join ex_student c on c.id=a.student_id
     </sql>
+    <insert id="insertFile">
+        INSERT INTO `record_file`
+        (`record_id`, `file_name`, `file_path`)
+        VALUES
+        <foreach collection="files" separator="," item="item">
+            (  #{recordId},#{item.fileName}, #{item.filePath})
+        </foreach>
+    </insert>
+    <delete id="deletedFile">
+        delete from  record_file where record_id = #{id}
+    </delete>
 
     <select id="selectExamRecordList" resultMap="ExamRecordResult">
         <include refid="selectExamRecordVo"/>
         <where>
-            <if test="planName != null and planName != ''">
-                AND a.plan_name like concat('%', #{planName}, '%')
+            <if test="courseName != null and courseName != ''">
+                AND a.course_name like concat('%', #{courseName}, '%')
             </if>
-            <if test="companyId != null ">
-                AND a.company_id =#{companyId}
+            <if test="companyName != null ">
+                AND b.name like concat('%',#{companyName},'%')
+            </if>
+            <if test="companyId!=null">
+                and a.company_id = #{companyId}
             </if>
         </where>
         order by a.id desc
@@ -55,4 +69,13 @@
         <include refid="selectExamRecordVo"/>
         where a.id=#{recordId}
     </select>
+    <select id="selectFiles" resultType="com.gkhy.exam.system.domain.RecordFile">
+        select
+            id,
+            record_id,
+            file_name,
+            file_path
+        from record_file
+        where record_id = #{id}
+    </select>
 </mapper>

--
Gitblit v1.9.2