Browse Source

bug修复

dzx 7 months ago
parent
commit
71e818d680

+ 1 - 0
src/main/java/com/xjrsoft/module/liteflow/node/ImportStudentFaceNode.java

@@ -41,6 +41,7 @@ public class ImportStudentFaceNode extends NodeComponent {
             String result = FaceImportUtil.ImportStudentFace(hikvisionDataMapper.getStudentHikvisionId(dataObj.getUserId()), fileUrl);
             dataObj.setHikvisionResult(result);
             stundentFaceProcessService.updateById(dataObj);
+            stundentFaceProcessService.clearHistory(dataObj);
         }
     }
 }

+ 4 - 1
src/main/java/com/xjrsoft/module/personnel/mapper/StundentFaceProcessMapper.java

@@ -3,6 +3,8 @@ package com.xjrsoft.module.personnel.mapper;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.personnel.entity.StundentFaceProcess;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Update;
 
 /**
 * @title: 学生人脸信息审核
@@ -12,5 +14,6 @@ import org.apache.ibatis.annotations.Mapper;
 */
 @Mapper
 public interface StundentFaceProcessMapper extends MPJBaseMapper<StundentFaceProcess> {
-
+    @Update("UPDATE stundent_face_process SET delete_mark = 0 WHERE delete_mark = 0 AND user_id = #{dto.userID} and id != #{dto.id} and create_date < #{dto.createDate}")
+    Boolean clearHistory(@Param("dto") StundentFaceProcess process);
 }

+ 4 - 0
src/main/java/com/xjrsoft/module/personnel/mapper/TeacherFaceProcessMapper.java

@@ -3,6 +3,8 @@ package com.xjrsoft.module.personnel.mapper;
 import com.github.yulichang.base.MPJBaseMapper;
 import com.xjrsoft.module.personnel.entity.TeacherFaceProcess;
 import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Update;
 
 /**
 * @title: 人脸信息审核
@@ -13,4 +15,6 @@ import org.apache.ibatis.annotations.Mapper;
 @Mapper
 public interface TeacherFaceProcessMapper extends MPJBaseMapper<TeacherFaceProcess> {
 
+    @Update("UPDATE teacher_face_process SET delete_mark = 0 WHERE delete_mark = 0 AND user_id = #{dto.userId} and id != #{dto.id} and create_date < #{dto.createDate}")
+    Boolean clearHistory(@Param("dto") TeacherFaceProcess process);
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/personnel/service/IStundentFaceProcessService.java

@@ -19,4 +19,6 @@ public interface IStundentFaceProcessService extends MPJBaseService<StundentFace
     Boolean removeByIds(List<Long> ids);
 
     Boolean nsUploadFace(AddFaceManagementDto dto, MultipartFile file);
+
+    Boolean clearHistory(StundentFaceProcess process);
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/personnel/service/ITeacherFaceProcessService.java

@@ -15,4 +15,6 @@ import java.util.List;
 public interface ITeacherFaceProcessService extends MPJBaseService<TeacherFaceProcess> {
 
     Boolean removeByIds(List<Long> ids);
+
+    Boolean clearHistory(TeacherFaceProcess process);
 }

+ 5 - 0
src/main/java/com/xjrsoft/module/personnel/service/impl/StundentFaceProcessServiceImpl.java

@@ -147,4 +147,9 @@ public class StundentFaceProcessServiceImpl extends MPJBaseServiceImpl<StundentF
         this.save(studentFace);
         return true;
     }
+
+    @Override
+    public Boolean clearHistory(StundentFaceProcess process) {
+        return this.baseMapper.clearHistory(process);
+    }
 }

+ 5 - 0
src/main/java/com/xjrsoft/module/personnel/service/impl/TeacherFaceProcessServiceImpl.java

@@ -90,4 +90,9 @@ public class TeacherFaceProcessServiceImpl extends MPJBaseServiceImpl<TeacherFac
         }
         return true;
     }
+
+    @Override
+    public Boolean clearHistory(TeacherFaceProcess process) {
+        return null;
+    }
 }

+ 2 - 1
src/main/resources/mapper/textbook/TextbookMapper.xml

@@ -14,7 +14,7 @@
         LEFT JOIN base_class c2 ON c1.class_id = c2.id
         WHERE c1.textbook_id = t1.id) AS use_class,
         t6.name AS use_grade,t1.version,
-        t1.use_type,t1.publishing_date,t1.is_secd,t1.category,t1.plan_batch,t1.work_total_count,t1.textbook_category
+        t1.use_type,t1.publishing_date,t1.is_secd,t1.category,t1.plan_batch,t1.work_total_count,t8.name as textbook_category
         FROM textbook t1
         LEFT JOIN subject_group t2 ON t1.subject_group_id = t2.id
         LEFT JOIN base_semester t3 ON t1.base_semester_id = t3.id
@@ -22,6 +22,7 @@
         LEFT JOIN xjr_dictionary_detail t5 ON t1.textbook_type = t5.code AND t5.item_id = 1739209191193636865
         LEFT JOIN base_grade t6 ON t1.grade_id = t6.id
         LEFT JOIN xjr_dictionary_detail t7 ON t1.is_textbook_plan = t7.code AND t7.item_id = 1737360269850038273
+        LEFT JOIN xjr_dictionary_detail t8 ON t1.textbook_category = t8.code
         WHERE t1.delete_mark = 0
         <if test="dto.textbookType != null and dto.textbookType != ''">
             and t1.textbook_type = #{dto.textbookType}