Переглянути джерело

Merge remote-tracking branch 'origin/master'

tags/24080901
CMM 1 рік тому
джерело
коміт
fa723c1958
4 змінених файлів з 7 додано та 47 видалено
  1. +3
    -37
      pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/fiscal/controller/CompanyFiscalCodeController.java
  3. +0
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/sys/manage/MenuManage.java
  4. +3
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/mapper/StatisticsMapper.xml

+ 3
- 37
pmapi/src/main/java/com/ningdatech/pmapi/common/util/TreeUtil.java Переглянути файл

@@ -65,6 +65,7 @@ public final class TreeUtil {
List<? extends Serializable> 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<MenuRoleVO> menus = new ArrayList<>(currMenus);
List<MenuRoleVO> 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<MenuRoleVO> 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;
}
}

+ 1
- 1
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);
}


+ 0
- 8
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<MenuRoleVO> buildUserMenu(List<Menu> list) {
List<RoleMenu> roleMenus = roleMenuService.list(Wrappers.lambdaQuery(RoleMenu.class)
.in(RoleMenu::getRoleId, LoginUserUtil.getRoleIdList()));
List<MenuRoleVO> menuRoles = CollUtils.convert(list, w -> BeanUtil.copyProperties(w, MenuRoleVO.class));
return TreeUtil.buildUserTree(menuRoles);
}


+ 3
- 1
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
</select>


Завантаження…
Відмінити
Зберегти