diff --git a/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/SysEvaluationRecordServiceImpl.java b/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/SysEvaluationRecordServiceImpl.java index 9837944..30671ff 100644 --- a/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/SysEvaluationRecordServiceImpl.java +++ b/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/SysEvaluationRecordServiceImpl.java @@ -81,8 +81,8 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi Long batchNo = bo.getBatchNo(); List scaleIds = bo.getScaleIds(); //判断人数 - boolean flag = deptService.isParent(deptId); - List sysUsers = userMapper.selectStudentListByDeptId(deptId, flag); + boolean parent = deptService.isParent(deptId); + List sysUsers = userMapper.selectStudentListByDeptId(deptId, parent); List recordList = new ArrayList<>(); for (String scaleId : scaleIds) { for (SysUser user : sysUsers) { diff --git a/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/WebServiceImpl.java b/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/WebServiceImpl.java index 51056f3..1d3197d 100644 --- a/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/WebServiceImpl.java +++ b/ruoyi-modules/rouyi-scale/src/main/java/org/dromara/scale/service/impl/WebServiceImpl.java @@ -237,7 +237,6 @@ public class WebServiceImpl implements IWebService { List questionNum = questionMapByFactor.get(factorId.toString()); List questionIds = new ArrayList<>(); - questionNum.forEach(q -> { questionIds.add(q); Long questionId = Long.parseLong(q); diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SysDeptMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SysDeptMapper.java index 3e52db6..e18fe04 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SysDeptMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/mapper/SysDeptMapper.java @@ -45,4 +45,6 @@ public interface SysDeptMapper extends BaseMapperPlus { */ List selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly); + String selectAncestorsById(Long deptId); + } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java index 01f854b..975b166 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/org/dromara/system/service/impl/SysDeptServiceImpl.java @@ -328,8 +328,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService { @Override public boolean isParent(Long deptId) { - SysDeptVo dept = baseMapper.selectDeptById(deptId); - List split = StrUtil.split(dept.getAncestors(), StringUtils.SEPARATOR); + String ancestors = baseMapper.selectAncestorsById(deptId); + List split = StrUtil.split(ancestors, StringUtils.SEPARATOR); if (split.size() <= 2) { return true; } else { diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml index bba949d..0896cae 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml @@ -26,4 +26,7 @@ order by d.parent_id, d.order_num +