解决 非 web 上下文无法获取 HttpServletRequest 问题
This commit is contained in:
parent
747f6eea2a
commit
771239b6da
|
@ -81,8 +81,8 @@ public class SysEvaluationRecordServiceImpl implements ISysEvaluationRecordServi
|
|||
Long batchNo = bo.getBatchNo();
|
||||
List<String> scaleIds = bo.getScaleIds();
|
||||
//判断人数
|
||||
boolean flag = deptService.isParent(deptId);
|
||||
List<SysUser> sysUsers = userMapper.selectStudentListByDeptId(deptId, flag);
|
||||
boolean parent = deptService.isParent(deptId);
|
||||
List<SysUser> sysUsers = userMapper.selectStudentListByDeptId(deptId, parent);
|
||||
List<SysEvaluationRecord> recordList = new ArrayList<>();
|
||||
for (String scaleId : scaleIds) {
|
||||
for (SysUser user : sysUsers) {
|
||||
|
|
|
@ -237,7 +237,6 @@ public class WebServiceImpl implements IWebService {
|
|||
List<String> questionNum = questionMapByFactor.get(factorId.toString());
|
||||
List<String> questionIds = new ArrayList<>();
|
||||
|
||||
|
||||
questionNum.forEach(q -> {
|
||||
questionIds.add(q);
|
||||
Long questionId = Long.parseLong(q);
|
||||
|
|
|
@ -45,4 +45,6 @@ public interface SysDeptMapper extends BaseMapperPlus<SysDept, SysDeptVo> {
|
|||
*/
|
||||
List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
|
||||
|
||||
String selectAncestorsById(Long deptId);
|
||||
|
||||
}
|
||||
|
|
|
@ -328,8 +328,8 @@ public class SysDeptServiceImpl implements ISysDeptService, DeptService {
|
|||
|
||||
@Override
|
||||
public boolean isParent(Long deptId) {
|
||||
SysDeptVo dept = baseMapper.selectDeptById(deptId);
|
||||
List<String> split = StrUtil.split(dept.getAncestors(), StringUtils.SEPARATOR);
|
||||
String ancestors = baseMapper.selectAncestorsById(deptId);
|
||||
List<String> split = StrUtil.split(ancestors, StringUtils.SEPARATOR);
|
||||
if (split.size() <= 2) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
|
@ -26,4 +26,7 @@
|
|||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
<select id="selectAncestorsById" resultType="java.lang.String">
|
||||
select ancestors from sys_dept where dept_id = #{deptId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue