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