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
adfbba97
Commit
adfbba97
authored
Sep 23, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2024-09-23 文档库增加项目过滤
parent
3a2c1556
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
CommonConstant.java
.../java/com/baosight/hggp/core/constant/CommonConstant.java
+2
-0
HGSC101.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC101.xml
+3
-0
ServiceHGWD001D.java
...java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
+7
-4
HGWD001.xml
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
+3
-0
No files found.
src/main/java/com/baosight/hggp/core/constant/CommonConstant.java
View file @
adfbba97
...
@@ -112,6 +112,8 @@ public class CommonConstant {
...
@@ -112,6 +112,8 @@ public class CommonConstant {
public
static
final
String
COMPANY_MANAGE
=
"companyManage"
;
public
static
final
String
COMPANY_MANAGE
=
"companyManage"
;
// ADMIN
// ADMIN
public
static
final
String
ADMIN
=
"ADMIN"
;
public
static
final
String
ADMIN
=
"ADMIN"
;
public
static
final
String
ENAME
=
"ename"
;
}
}
/**
/**
...
...
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC101.xml
View file @
adfbba97
...
@@ -62,6 +62,9 @@
...
@@ -62,6 +62,9 @@
<isNotEmpty
prepend=
" AND "
property=
"projType"
>
<isNotEmpty
prepend=
" AND "
property=
"projType"
>
proj_type = #projType#
proj_type = #projType#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ename"
>
proj_name like concat('%', #ename#, '%') or proj_code like concat('%', #ename#, '%')
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<sql
id=
"customCondition"
>
...
...
src/main/java/com/baosight/hggp/hg/wd/service/ServiceHGWD001D.java
View file @
adfbba97
...
@@ -208,10 +208,11 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -208,10 +208,11 @@ public class ServiceHGWD001D extends TreeService {
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
node
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
NODE
);
String
node
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
NODE
);
String
ename
=
MapUtils
.
getString
(
queryMap
,
CommonConstant
.
Field
.
ENAME
);
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
node
)
||
CommonConstant
.
Field
.
ROOT2
.
equals
(
node
))
{
if
(
CommonConstant
.
Field
.
ROOT
.
equals
(
node
)
||
CommonConstant
.
Field
.
ROOT2
.
equals
(
node
))
{
inInfo
.
addBlock
(
node
).
setRows
(
queryTopNode
(
node
));
inInfo
.
addBlock
(
node
).
setRows
(
queryTopNode
(
node
,
ename
));
}
else
{
}
else
{
inInfo
.
addBlock
(
node
).
setRows
(
queryChildNode
(
node
));
inInfo
.
addBlock
(
node
).
setRows
(
queryChildNode
(
node
,
ename
));
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询节点失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"查询节点失败"
);
...
@@ -224,9 +225,10 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -224,9 +225,10 @@ public class ServiceHGWD001D extends TreeService {
*
*
* @return
* @return
*/
*/
public
List
queryTopNode
(
String
parentId
)
{
public
List
queryTopNode
(
String
parentId
,
String
ename
)
{
List
<
Map
>
results
=
new
ArrayList
();
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
<>();
Map
queryMap
=
new
HashMap
<>();
queryMap
.
put
(
"ename"
,
ename
);
// 非管理员仅查询自己有权限的项目
// 非管理员仅查询自己有权限的项目
String
userId
=
UserSessionUtils
.
getLoginName
();
String
userId
=
UserSessionUtils
.
getLoginName
();
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
if
(!
HgWdUtils
.
HgWd009
.
isManager
(
userId
))
{
...
@@ -257,10 +259,11 @@ public class ServiceHGWD001D extends TreeService {
...
@@ -257,10 +259,11 @@ public class ServiceHGWD001D extends TreeService {
* @param parentId
* @param parentId
* @return
* @return
*/
*/
public
List
queryChildNode
(
String
parentId
)
{
public
List
queryChildNode
(
String
parentId
,
String
ename
)
{
List
<
Map
>
results
=
new
ArrayList
();
List
<
Map
>
results
=
new
ArrayList
();
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"parentId"
,
parentId
);
queryMap
.
put
(
"ename"
,
ename
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
List
<
HGWD001
>
dbWd001s
=
dao
.
query
(
HGWD001
.
QUERY
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
if
(
CollectionUtils
.
isEmpty
(
dbWd001s
))
{
return
results
;
return
results
;
...
...
src/main/java/com/baosight/hggp/hg/wd/sql/HGWD001.xml
View file @
adfbba97
...
@@ -97,6 +97,9 @@
...
@@ -97,6 +97,9 @@
<isNotEmpty
prepend=
" AND "
property=
"releaseDate"
>
<isNotEmpty
prepend=
" AND "
property=
"releaseDate"
>
RELEASE_DATE = #releaseDate#
RELEASE_DATE = #releaseDate#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ename"
>
PROJ_NAME like concat('%', #ename#, '%') or PROJ_CODE like concat('%', #ename#, '%')
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<sql
id=
"customCondition"
>
...
...
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