Commit 190897f0 by 宋祥

1.fixBug:树节点子集获取条件取反问题修复

parent c4b1ef75
......@@ -364,7 +364,6 @@ public class ServiceHGWD001D extends TreeService {
List<HGWD003> dbWd003s = HGWDTools.HgWd003.list(fileIds);
for (HGWD001 dbWd001 : dbWd001s) {
Map leafMap = buildLeaf(parentId, dbWd001.getFileId(), dbWd001.getFileName(), HgWdConstant.LeafType.C);
int count = getChildCount(dbWd001.getFileId(), isManager, isSourceAuth, pageCode);
leafMap.put("projCode", dbWd001.getProjCode());
leafMap.put("projName", dbWd001.getProjName());
......@@ -372,8 +371,8 @@ public class ServiceHGWD001D extends TreeService {
leafMap.put("type", dbWd001.getFileType());
leafMap.put("leafLevel", dbWd001.getLeafLevel());
leafMap.put("count", count);
leafMap.put("filePath",dbWd001.getFilePath());
if ("HGWD002".equals(pageCode)&& count == 0){
leafMap.put("filePath", dbWd001.getFilePath());
if ("HGWD002".equals(pageCode) && count == 0) {
continue;
}
if (!isManager && isSourceAuth) {
......@@ -435,9 +434,10 @@ public class ServiceHGWD001D extends TreeService {
/**
* 获取子级节点数量
* @param fileId 目录ID
* @param isSourceAuth true:需要权限
* @return 节点数量
*/
public int getChildCount(String fileId, boolean isManager, boolean isSourceAuth,String pageCode) {
public int getChildCount(String fileId, boolean isManager, boolean isSourceAuth, String pageCode) {
List<HGWD001> hgwd001List = HgWdUtils.HgWd001.queryChildren(fileId, isManager, isSourceAuth); //查询子级目录
List<String> childIds = Optional.ofNullable(hgwd001List).orElse(new ArrayList<>()).stream()
.map(HGWD001::getFileId).collect(Collectors.toList());
......
......@@ -93,13 +93,13 @@ public class HgWdUtils {
* 查询子节点
*
* @param parentId
* @param isManager
* @param isSpare
* @param isManager true:管理员
* @param isSourceAuth true:需要权限
* @return
*/
public static List<HGWD001> queryChildren(String parentId, boolean isManager, boolean isSpare) {
public static List<HGWD001> queryChildren(String parentId, boolean isManager, boolean isSourceAuth) {
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
if (isManager || isSpare) {
if (isManager || !isSourceAuth) {
return HGWDTools.HgWd001.queryChildren(parentId);
} else {
return HGWDTools.HgWd001.queryChildrenByUser(parentId);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment