diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java index b693c87..64436ad 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java @@ -65,6 +65,7 @@ public final class TreeUtil { List allIds = treeList.stream().map(node -> node.getId()).collect(Collectors.toList()); for (E baseNode : treeList) { if (!allIds.contains(baseNode.getPid()) || selfIdEqSelfParent.contains(baseNode.getPid())) { + baseNode.setPid(null); baseNode.setTopMenu(baseNode.getName()); trees.add(baseNode); } @@ -132,9 +133,10 @@ public final class TreeUtil { if (currMenus == null) { return Collections.emptyList(); } - ArrayList menus = new ArrayList<>(currMenus); + List menus = new ArrayList<>(currMenus); for (MenuRoleVO curr : currMenus) { if (curr.getPid().equals(StrPool.DEF_PARENT_ID)) { + curr.setPid(null); curr.setTopMenu(curr.getName()); } else { curr.setTopMenu(menuMap.get(curr.getPid()).getTopMenu()); @@ -153,40 +155,4 @@ public final class TreeUtil { return menus; } - - /** - * 动态判断redirect - * - * @param baseNode - */ - private static void checkRedirect(MenuRoleVO baseNode) { - checkMenuRedirect(baseNode, baseNode.getChildren()); - } - - private static Boolean checkMenuRedirect(MenuRoleVO baseNode, List menus) { - if (baseNode.getSize() > 0) { - for (MenuRoleVO menu : menus) { - if (menu.getPath().endsWith("Datav")) { - baseNode.setRedirect(menu.getComponent()); - return Boolean.TRUE; - } - - if (menu.getSize() == 0 && 0 == menu.getHidden()) { - baseNode.setRedirect(menu.getComponent()); - return Boolean.TRUE; - } - } - - //一轮没有合适的菜单 去三级菜单找 - for (MenuRoleVO menu : menus) { - if (menu.getSize() > 0) { - if (checkMenuRedirect(baseNode, menu.getChildren())) { - return Boolean.TRUE; - } - } - } - } - - return Boolean.FALSE; - } } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java b/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java index 2a3ae49..fb49fdf 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java @@ -38,7 +38,7 @@ public class CompanyFiscalCodeController { } @ApiOperation(value = "获取财政编码-配置", notes = "获取财政编码配置") - @PostMapping("/fiscal-and-seal/get-configure/") + @PostMapping("/fiscal-and-seal/get-configure") public ResCompanyFiscalCodeAndSealSnVO getFiscalAndSealCodeConfigure(@Valid @RequestBody ReqGetCompanyFiscalCodeAndSealSnPO request) { return companyFiscalCodeManage.getFiscalCodeConfigure(request); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java index e6ba96c..6c88351 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java @@ -1,14 +1,10 @@ package com.ningdatech.pmapi.sys.manage; import cn.hutool.core.bean.BeanUtil; -import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.util.TreeUtil; import com.ningdatech.pmapi.sys.model.entity.Menu; -import com.ningdatech.pmapi.sys.model.entity.RoleMenu; import com.ningdatech.pmapi.sys.model.vo.MenuRoleVO; -import com.ningdatech.pmapi.sys.service.IRoleMenuService; -import com.ningdatech.pmapi.user.util.LoginUserUtil; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -26,11 +22,7 @@ import java.util.List; @RequiredArgsConstructor public class MenuManage { - private final IRoleMenuService roleMenuService; - public List buildUserMenu(List list) { - List roleMenus = roleMenuService.list(Wrappers.lambdaQuery(RoleMenu.class) - .in(RoleMenu::getRoleId, LoginUserUtil.getRoleIdList())); List menuRoles = CollUtils.convert(list, w -> BeanUtil.copyProperties(w, MenuRoleVO.class)); return TreeUtil.buildUserTree(menuRoles); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml index 56e4cdd..e22baae 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml +++ b/pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml @@ -13,11 +13,13 @@ sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ is NULL THEN 1 end) todoNum, sum(CASE WHEN ht.assignee_ = #{userId} AND ht.end_time_ IS not NULL THEN 1 end) idoNum, sum(CASE WHEN hp.start_user_id_ = #{userId} THEN 1 end) mysubmitNum, - 0 ccmeNum + sum(CASE WHEN cc.user_id = #{userId} THEN 1 end) ccmeNum FROM act_hi_procinst hp LEFT JOIN act_hi_taskinst ht ON hp.proc_inst_id_ = ht.proc_inst_id_ + LEFT JOIN + wflow_cc_tasks cc ON cc.instance_id = hp.proc_inst_id_ GROUP BY hp.id_ ) tol