| 
					
				 | 
			
			
				@@ -16,6 +16,7 @@ import com.ozs.common.core.domain.entity.SysMenu; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.vo.SysDeptVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.vo.SysRoleRequestVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.common.core.domain.vo.SysUserVo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.ozs.common.exception.ServiceException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.service.entity.BaseRailwayManagement; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.service.entity.BaseUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ozs.service.service.BaseUserService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -162,7 +163,7 @@ public class SysRoleController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermi('system:role:edit')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "角色管理", businessType = BusinessType.UPDATE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @RequestMapping 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @RequestMapping("/edit") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult edit(@Validated @RequestBody SysRole role) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        roleService.checkRoleAllowed(role); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        roleService.checkRoleDataScope(role.getRoleId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -176,6 +177,11 @@ public class SysRoleController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return error("超级管理员角色不能修改"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if ("2".equals(role.getStatus())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (roleService.countUserRoleByRoleId(role.getRoleId()) > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    throw new ServiceException(String.format("%1$s已分配,不能禁用", role.getRoleName())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (UserConstants.NOT_UNIQUE.equals(roleService.checkRoleKeyUnique(role))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 return error("修改角色'" + role.getRoleName() + "'失败,角色权限已存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -228,7 +234,7 @@ public class SysRoleController extends BaseController { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				      */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @PreAuthorize("@ss.hasPermi('system:role:remove')") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Log(title = "角色管理", businessType = BusinessType.DELETE) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @RequestMapping("/{roleIds}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @RequestMapping("remove/{roleIds}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public AjaxResult remove(@PathVariable Long[] roleIds) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return toAjax(roleService.deleteRoleByIds(roleIds)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |