From 8458e64aab474c0fc2f49ae4ff22fb11ce5cf6e2 Mon Sep 17 00:00:00 2001
From: “djh” <“3298565835@qq.com”>
Date: 星期一, 11 十一月 2024 16:55:28 +0800
Subject: [PATCH] 批次新增学员查询条件,新增题目导入接口

---
 exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java
index 15d920a..ff0174e 100644
--- a/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java
+++ b/exam-system/src/main/java/com/gkhy/exam/system/service/impl/ExStudentServiceImpl.java
@@ -290,6 +290,31 @@
         return trainRecordVOList;
     }
 
+    @Override
+    public List<ExStudent> selectStudentCheckAll(ExStudent student) {
+        SysUser currentUser= SecurityUtils.getLoginUser().getUser();
+        if(!currentUser.getUserType().equals(UserTypeEnum.SYSTEM_USER.getCode())){
+            student.setCompanyId(currentUser.getCompanyId());
+            Map<String,Object> paramsMap=new HashMap<>();
+            if(currentUser.getUserType().equals(UserTypeEnum.DEPART_USER.getCode())) {//部门级用户
+                List<Long> workshopUserIds=userMapper.selectWorkshopUserIds(currentUser.getId());
+                if(workshopUserIds==null){
+                    workshopUserIds=new ArrayList<>();
+                }
+                workshopUserIds.add(currentUser.getId());
+                paramsMap.put("createIds",workshopUserIds);
+                student.setParams(paramsMap);
+            }else if(currentUser.getUserType().equals(UserTypeEnum.WORKSHOP_USER.getCode())){//车间级用户
+                List<Long> workshopUserIds=new ArrayList<>();
+                workshopUserIds.add(currentUser.getId());
+                workshopUserIds.add(currentUser.getParentId());
+                paramsMap.put("createIds",workshopUserIds);
+                student.setParams(paramsMap);
+            }
+        }
+        return baseMapper.selectStudentList(student);
+    }
+
     public ExStudent checkUserDataScope(Long studentId) {
         if(studentId==null){
             throw new ApiException("学员id为空!");

--
Gitblit v1.9.2