Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
e53d2cda
Commit
e53d2cda
authored
Nov 13, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://129.211.46.84:8800/platform/hg-smart
parents
8311c62e
190897f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+4
-4
HgWdUtils.java
src/main/java/com/baosight/hggp/hg/wd/utils/HgWdUtils.java
+4
-4
No files found.
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
e53d2cda
...
...
@@ -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
());
...
...
src/main/java/com/baosight/hggp/hg/wd/utils/HgWdUtils.java
View file @
e53d2cda
...
...
@@ -93,13 +93,13 @@ public class HgWdUtils {
* 查询子节点
*
* @param parentId
* @param isManager
* @param isS
pare
* @param isManager
true:管理员
* @param isS
ourceAuth true:需要权限
* @return
*/
public
static
List
<
HGWD001
>
queryChildren
(
String
parentId
,
boolean
isManager
,
boolean
isS
pare
)
{
public
static
List
<
HGWD001
>
queryChildren
(
String
parentId
,
boolean
isManager
,
boolean
isS
ourceAuth
)
{
// 管理员或者备件制造图查询所有子节点;其余查询当前节点有权限的子节点
if
(
isManager
||
isSpare
)
{
if
(
isManager
||
!
isSourceAuth
)
{
return
HGWDTools
.
HgWd001
.
queryChildren
(
parentId
);
}
else
{
return
HGWDTools
.
HgWd001
.
queryChildrenByUser
(
parentId
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment