|
|
@ -96,6 +96,7 @@ public class XmMenuController { |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
RequestUtils.transformArray(xmMenu, "menuIds"); |
|
|
RequestUtils.transformArray(xmMenu, "menuIds"); |
|
|
RequestUtils.transformArray(xmMenu, "tagIdList"); |
|
|
RequestUtils.transformArray(xmMenu, "tagIdList"); |
|
|
|
|
|
RequestUtils.transformArray(xmMenu, "dclasss"); |
|
|
PageUtils.startPage(xmMenu); |
|
|
PageUtils.startPage(xmMenu); |
|
|
String menuId= (String) xmMenu.get("menuId"); |
|
|
String menuId= (String) xmMenu.get("menuId"); |
|
|
Object menuIds= xmMenu.get("menuIds"); |
|
|
Object menuIds= xmMenu.get("menuIds"); |
|
|
@ -149,6 +150,7 @@ public class XmMenuController { |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
RequestUtils.transformArray(xmMenu, "menuIds"); |
|
|
RequestUtils.transformArray(xmMenu, "menuIds"); |
|
|
RequestUtils.transformArray(xmMenu, "tagIdList"); |
|
|
RequestUtils.transformArray(xmMenu, "tagIdList"); |
|
|
|
|
|
RequestUtils.transformArray(xmMenu, "dclasss"); |
|
|
PageUtils.startPage(xmMenu); |
|
|
PageUtils.startPage(xmMenu); |
|
|
Tips tips=new Tips("查询成功"); |
|
|
Tips tips=new Tips("查询成功"); |
|
|
String menuId= (String) xmMenu.get("menuId"); |
|
|
String menuId= (String) xmMenu.get("menuId"); |
|
|
@ -230,57 +232,6 @@ public class XmMenuController { |
|
|
return m; |
|
|
return m; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@RequestMapping(value="/listWithPhase",method=RequestMethod.GET) |
|
|
|
|
|
public Map<String,Object> listWithPhase( @ApiIgnore @RequestParam Map<String,Object> xmMenu){ |
|
|
|
|
|
Map<String,Object> m = new HashMap<>(); |
|
|
|
|
|
RequestUtils.transformArray(xmMenu, "menuIds"); |
|
|
|
|
|
RequestUtils.transformArray(xmMenu, "tagIdList"); |
|
|
|
|
|
PageUtils.startPage(xmMenu); |
|
|
|
|
|
Tips tips=new Tips("查询成功"); |
|
|
|
|
|
String menuId= (String) xmMenu.get("menuId"); |
|
|
|
|
|
Object menuIds= xmMenu.get("menuIds"); |
|
|
|
|
|
String projectId= (String) xmMenu.get("projectId"); |
|
|
|
|
|
String mmUserid= (String) xmMenu.get("mmUserid"); |
|
|
|
|
|
String pmenuId= (String) xmMenu.get("pmenuId"); |
|
|
|
|
|
String productId= (String) xmMenu.get("productId"); |
|
|
|
|
|
String excludeIterationId= (String) xmMenu.get("excludeIterationId"); |
|
|
|
|
|
|
|
|
|
|
|
User user = LoginUtils.getCurrentUserInfo(); |
|
|
|
|
|
|
|
|
|
|
|
xmMenu.put("userid",user.getUserid()); |
|
|
|
|
|
if( !StringUtils.hasText(menuId) && !(StringUtils.hasText(projectId) || StringUtils.hasText(mmUserid)|| StringUtils.hasText(pmenuId)||menuIds!=null |
|
|
|
|
|
|| StringUtils.hasText(productId) || StringUtils.hasText(excludeIterationId) ) ){ |
|
|
|
|
|
xmMenu.put("compete",user.getUserid()); |
|
|
|
|
|
} |
|
|
|
|
|
List<Map<String,Object>> xmMenuList = xmMenuService.selectListMapByWhereWithPhase(xmMenu); //列出XmMenu列表 |
|
|
|
|
|
PageUtils.responePage(m, xmMenuList); |
|
|
|
|
|
if("1".equals(xmMenu.get("withParents")) && !"1".equals(xmMenu.get("isTop"))&& xmMenuList.size()>0){ |
|
|
|
|
|
Set<String> pidPathsSet=new HashSet<>(); |
|
|
|
|
|
Set<String> idSet=new HashSet<>(); |
|
|
|
|
|
for (Map<String, Object> map : xmMenuList) { |
|
|
|
|
|
String id= (String) map.get("menuId"); |
|
|
|
|
|
idSet.add(id); |
|
|
|
|
|
String pidPaths= (String) map.get("pidPaths"); |
|
|
|
|
|
pidPaths=PubTool.getPidPaths(pidPaths,id); |
|
|
|
|
|
if(pidPaths==null || pidPaths.length()<=2){ |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
pidPathsSet.add(pidPaths); |
|
|
|
|
|
} |
|
|
|
|
|
if(pidPathsSet!=null && pidPathsSet.size()>0){ |
|
|
|
|
|
List<Map<String,Object>> parentList=xmMenuService.selectListMapByWhereWithPhase(map("pidPathsList",pidPathsSet.stream().collect(Collectors.toList()))); |
|
|
|
|
|
parentList=parentList.stream().filter(i->!idSet.contains(i.get("menuId"))).collect(Collectors.toList()); |
|
|
|
|
|
if(parentList!=null && parentList.size()>0){ |
|
|
|
|
|
xmMenuList.addAll(parentList); |
|
|
|
|
|
m.put("total", NumberUtil.getInteger(m.get("total"),0)+parentList.size()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
m.put("data",xmMenuList); |
|
|
|
|
|
m.put("tips", tips); |
|
|
|
|
|
return m; |
|
|
|
|
|
} |
|
|
|
|
|
/***/ |
|
|
/***/ |
|
|
@ApiOperation( value = "新增一条项目菜单表信息",notes="addXmMenu,主键如果为空,后台自动生成") |
|
|
@ApiOperation( value = "新增一条项目菜单表信息",notes="addXmMenu,主键如果为空,后台自动生成") |
|
|
@ApiResponses({ |
|
|
@ApiResponses({ |
|
|
|