mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	update 优化根部门不允许删除以及办理人权限名称回显
This commit is contained in:
		@@ -113,6 +113,9 @@ public class SysDeptController extends BaseController {
 | 
			
		||||
    @Log(title = "部门管理", businessType = BusinessType.DELETE)
 | 
			
		||||
    @DeleteMapping("/{deptId}")
 | 
			
		||||
    public R<Void> remove(@PathVariable Long deptId) {
 | 
			
		||||
        if (StringUtils.equals(SystemConstants.ROOT_DEPT_ANCESTORS, String.valueOf(deptId))) {
 | 
			
		||||
            return R.warn("根部门不允许删除");
 | 
			
		||||
        }
 | 
			
		||||
        if (deptService.hasChildByDeptId(deptId)) {
 | 
			
		||||
            return R.warn("存在下级部门,不允许删除");
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -106,15 +106,10 @@ public class FlwTaskAssigneeServiceImpl implements IFlwTaskAssigneeService, Hand
 | 
			
		||||
            .map(entry -> {
 | 
			
		||||
                String storageId = entry.getKey();
 | 
			
		||||
                Pair<TaskAssigneeEnum, Long> parsed = entry.getValue();
 | 
			
		||||
                String handlerName = "格式错误";
 | 
			
		||||
                if (parsed != null) {
 | 
			
		||||
                    Map<Long, String> nameMapping = nameMap.getOrDefault(parsed.getKey(), Collections.emptyMap());
 | 
			
		||||
                    handlerName = nameMapping.getOrDefault(parsed.getValue(), "未知名称");
 | 
			
		||||
                }
 | 
			
		||||
                HandlerFeedBackVo backVo = new HandlerFeedBackVo();
 | 
			
		||||
                backVo.setStorageId(storageId);
 | 
			
		||||
                backVo.setHandlerName(handlerName);
 | 
			
		||||
                return backVo;
 | 
			
		||||
                String handlerName = (parsed == null) ? null
 | 
			
		||||
                    : nameMap.getOrDefault(parsed.getKey(), Collections.emptyMap())
 | 
			
		||||
                    .get(parsed.getValue());
 | 
			
		||||
                return new HandlerFeedBackVo(storageId, handlerName);
 | 
			
		||||
            }).toList();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user