Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
41d649a9
Commit
41d649a9
authored
Jan 26, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.组织机构叶子节点延伸
parent
49bca2e0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
2 deletions
+13
-2
ServiceXSOG0800.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0800.java
+6
-2
ServiceXSOG0801.java
...com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
+4
-0
XSOG0801.xml
src/main/java/com/baosight/xservices/xs/og/sql/XSOG0801.xml
+3
-0
No files found.
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0800.java
View file @
41d649a9
...
...
@@ -11,6 +11,7 @@ import com.baosight.iplat4j.ef.ui.tree.TreeService;
import
com.baosight.xservices.xs.service.ServiceXSTreeNode
;
import
com.baosight.xservices.xs.util.LoginUserDetails
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.util.CollectionUtils
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
...
...
@@ -65,11 +66,14 @@ public class ServiceXSOG0800 extends TreeService {
}
List
result
=
(
List
)
parentOrgMap
.
get
(
parentLabel
);
if
(
CollectionUtils
.
isEmpty
(
result
)){
return
result
;
}
for
(
int
i
=
0
;
i
<
result
.
size
();
++
i
)
{
orgId
=
(
String
)((
Map
)
result
.
get
(
i
)).
get
(
"label"
);
String
hasChild
=
parentOrgMap
.
get
(
orgId
)
!=
null
?
"2"
:
"1"
;
((
Map
)
result
.
get
(
i
)).
put
(
"leaf"
,
hasChild
);
// ((Map)result.get(i)).put("leaf", hasChild);
((
Map
)
result
.
get
(
i
)).
put
(
"leaf"
,
"0"
);
}
return
result
;
...
...
src/main/java/com/baosight/xservices/xs/og/service/ServiceXSOG0801.java
View file @
41d649a9
...
...
@@ -91,6 +91,10 @@ public class ServiceXSOG0801 extends ServiceBase {
hashMap
.
put
(
"orgEname"
,
inInfo
.
get
(
"inqu_status-0-orgEname"
));
hashMap
.
put
(
"loginName"
,
inInfo
.
get
(
"inqu_status-0-loginName"
));
hashMap
.
put
(
"userName"
,
inInfo
.
get
(
"inqu_status-0-userName"
));
// 非管理员仅查询所属企业用户 added by songx at 2024-01-16
if
(!
LoginUserDetails
.
isUserAdmin
(
UserSessionUtils
.
getLoginName
()))
{
hashMap
.
put
(
"companyCode"
,
UserSessionUtils
.
getCompanyCode
());
}
List
<
Map
<
String
,
Object
>>
totalUser
=
this
.
dao
.
query
(
"XSOG0801.queryUserByOrgIdBack"
,
hashMap
);
List
<
Map
<
String
,
Object
>>
userList
=
new
ArrayList
();
List
<
String
>
userIdList
=
new
ArrayList
();
...
...
src/main/java/com/baosight/xservices/xs/og/sql/XSOG0801.xml
View file @
41d649a9
...
...
@@ -142,6 +142,9 @@
INNER JOIN ${platSchema}.xs_user xu ON t2.USER_ID = xu.USER_ID
WHERE
xu.LOGIN_NAME != 'admin'
<isNotEmpty
prepend=
"AND"
property=
"companyCode"
>
t1.COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
"AND"
property=
"orgCname"
>
t1.ORG_CNAME LIKE ('%$orgCname$%')
</isNotEmpty>
...
...
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