|  | @@ -296,11 +296,13 @@ public class MenuController {
 | 
	
		
			
				|  |  |                  Map<Long, Long> map = userMenuRelationVo.getUserMenuRelationVos().stream().collect(Collectors.toMap(UserMenuRelationVo::getDataId, UserMenuRelationVo::getNodeId));
 | 
	
		
			
				|  |  |                  for (UserMenuRelation userMenuRelation : userMenuRelationList) {
 | 
	
		
			
				|  |  |                      //父菜单不需要放到页面勾选的集合,因为只要勾选了子菜单,父菜单就会被勾选,然后如果勾选了父菜单,所有的子菜单都会被选上
 | 
	
		
			
				|  |  | -                    if (parentSets.contains(userMenuRelation.getMenuId())) {
 | 
	
		
			
				|  |  | +                    if (parentSets.contains(userMenuRelation.getMenuId()) && !currentParentList.contains(userMenuRelation.getMenuId())) {
 | 
	
		
			
				|  |  |                          currentParentList.add(userMenuRelation.getMenuId());
 | 
	
		
			
				|  |  |                          continue;
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | -                    returnSet.add(map.get(userMenuRelation.getMenuId()));
 | 
	
		
			
				|  |  | +                    if (!returnSet.contains(userMenuRelation.getMenuId())) {
 | 
	
		
			
				|  |  | +                        returnSet.add(map.get(userMenuRelation.getMenuId()));
 | 
	
		
			
				|  |  | +                    }
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              resultMap.put("code", 0);
 | 
	
	
		
			
				|  | @@ -383,15 +385,15 @@ public class MenuController {
 | 
	
		
			
				|  |  |          Map<String, Object> resultMap = new HashMap<>();
 | 
	
		
			
				|  |  |          try {
 | 
	
		
			
				|  |  |              List<User> userList = userService.queryAllUser();
 | 
	
		
			
				|  |  | -            if (userList == null || userList.size()==0) {
 | 
	
		
			
				|  |  | +            if (userList == null || userList.size() == 0) {
 | 
	
		
			
				|  |  |                  resultMap.put("code", -1);
 | 
	
		
			
				|  |  |                  resultMap.put("message", "查询用户树失败,没有任何用户信息!");
 | 
	
		
			
				|  |  |                  return resultMap;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  |              List<ZdUnitCode> zdUnitCodes = zdUnitCodeService.queryAllDeptInCache();
 | 
	
		
			
				|  |  |              List<String> userIdCodes = userList.stream().map(u -> u.getUserIdCode()).collect(Collectors.toList());
 | 
	
		
			
				|  |  | -            Map<String,Long> userMap =userList.stream().collect(Collectors.toMap(User::getUserIdCode,User::getId));
 | 
	
		
			
				|  |  | -            List<Employee> employees= employeeService.queryByCodes(userIdCodes);
 | 
	
		
			
				|  |  | +            Map<String, Long> userMap = userList.stream().collect(Collectors.toMap(User::getUserIdCode, User::getId));
 | 
	
		
			
				|  |  | +            List<Employee> employees = employeeService.queryByCodes(userIdCodes);
 | 
	
		
			
				|  |  |              List<String> deptNos = null;
 | 
	
		
			
				|  |  |              if (employees != null && employees.size() > 0) {
 | 
	
		
			
				|  |  |                  deptNos = employees.stream().map(e -> e.getDeptCode()).collect(Collectors.toList());
 | 
	
	
		
			
				|  | @@ -433,6 +435,7 @@ public class MenuController {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  |       * 构造部门集合
 | 
	
		
			
				|  |  | +     *
 | 
	
		
			
				|  |  |       * @param trees
 | 
	
		
			
				|  |  |       * @param nodesMap
 | 
	
		
			
				|  |  |       * @param zd
 |