From 3c8e94af36e9f83485414f14a0e136e19c7a5137 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期三, 27 十一月 2024 09:03:45 +0800
Subject: [PATCH] 修改

---
 exam-system/src/main/resources/mapper/institutionaccess/ThStudentBatchMapper.xml                                    |    2 +-
 exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml                                            |    2 +-
 exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml                                     |    4 ++--
 exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java |    2 +-
 exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml                                      |    2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java
index b2fd30d..4778334 100644
--- a/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java
+++ b/exam-system/src/main/java/com/gkhy/exam/institutionalaccess/service/serviceImpl/TripartiteInterfaceServiceImpl.java
@@ -556,7 +556,7 @@
         List<ThStudentBatch> updateThStudentBatchList = new ArrayList<>();
         for (ThStudentReqDTO studentReqDTO : saveStudentReqDTOList) {
             //学生表中过滤
-            List<ThStudent> collect = students.stream().filter(s -> s.getIdcard().equals(studentReqDTO.getIdcard())).collect(Collectors.toList());
+            List<ThStudent> collect = students.stream().filter(s -> s.getIdcard().equals(studentReqDTO.getIdcard()) && s.getInstitutionId().equals(institutionUser.getId()) ).collect(Collectors.toList());
             if(collect.size() > 0){
                 ThStudent student = collect.get(0);
                 //修改
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml
index ae52354..581bc7e 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThCertMapper.xml
@@ -7,7 +7,7 @@
         select a.*,b.batch_name  from th_cert a
         left join th_batch b on a.batch_uuid=b.uuid
         <where>
-            and a.del_flag=0
+            and a.del_flag=0 and b.del_flag =0
             <if test="institutionName!=null and institutionName!=''">
                  and a.institution_name =#{institutionName}
             </if>
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml
index 0f7bb27..742be6c 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThExamRecordMapper.xml
@@ -11,7 +11,7 @@
         LEFT JOIN th_student s ON s.idcard = e.idcard
         LEFT JOIN th_batch b ON b.uuid = e.batch_uuid
         WHERE
-        e.del_flag = 0
+        e.del_flag = 0 and s.del_flag = 0 and b.del_flag = 0
         <if test="query.idcard != null and query.idcard != ''">
             and e.idcard = #{query.idcard}
         </if>
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThStudentBatchMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThStudentBatchMapper.xml
index 6cff219..bac9fba 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThStudentBatchMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThStudentBatchMapper.xml
@@ -123,7 +123,7 @@
     </update>
 
     <select id="getStudentBatchVOByBatchUuid" resultType="com.gkhy.exam.institutionalaccess.model.vo.ThStudentBatchVO">
-        select sb.*, b.batch_lesson_num from th_student_batch sb INNER JOIN th_batch b ON sb.batch_uuid = b.uuid where sb.del_flag = 0 and sb.batch_uuid = #{batchUuid}
+        select sb.*, b.batch_lesson_num from th_student_batch sb INNER JOIN th_batch b ON sb.batch_uuid = b.uuid where sb.del_flag = 0 and b.del_flag=0 and sb.batch_uuid = #{batchUuid}
     </select>
 
     <select id="getByIdCards" resultType="com.gkhy.exam.institutionalaccess.entity.ThStudentBatch" >
diff --git a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml
index cd6c189..c557339 100644
--- a/exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml
+++ b/exam-system/src/main/resources/mapper/institutionaccess/ThStudyDetailMapper.xml
@@ -39,10 +39,10 @@
         </if>
         <if test="query.status == 0"></if>
         <if test="query.status == 1">
-            and TIMESTAMPDIFF(SECOND, start_time, finish_time) = d.duration
+            and (d.duration - TIMESTAMPDIFF(SECOND, start_time, finish_time)) &lt;= 30
         </if>
         <if test="query.status == 2">
-            and TIMESTAMPDIFF(SECOND, start_time, finish_time) &lt; d.duration
+            and (d.duration-TIMESTAMPDIFF(SECOND, start_time, finish_time)) &gt; 30
         </if>
         ORDER BY
         d.id DESC

--
Gitblit v1.9.2