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
63b45660
Commit
63b45660
authored
Jul 09, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取角色公司bugfix;
parent
a6af315d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+6
-3
ServiceHGCB005.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
+0
-1
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
63b45660
...
@@ -153,17 +153,20 @@ public class UserSessionUtils extends UserSession {
...
@@ -153,17 +153,20 @@ public class UserSessionUtils extends UserSession {
}
}
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
if
(
CollectionUtils
.
isNotEmpty
(
companyCodes
))
{
// 查询组织信息
// 查询组织信息
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
orgs
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
COMPANY
.
getCode
()));
orgs
.
addAll
(
HGXSTools
.
XsOrg
.
queryByParent
(
code
,
OrgTypeEnum
.
COMPANY
.
getCode
()));
});
});
return
orgs
.
stream
().
filter
(
o
->
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
COMPANY
.
getCode
())).
map
(
item
->
new
Company
(
item
.
getOrgId
(),
item
.
getOrgCname
())).
collect
(
Collectors
.
collectingAndThen
(
return
orgs
.
stream
().
filter
(
o
->
StringUtils
.
equals
(
o
.
getOrgType
(),
OrgTypeEnum
.
COMPANY
.
getCode
())).
map
(
item
->
new
Company
(
item
.
getOrgId
(),
item
.
getOrgCname
())).
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
// 将Map转回List
// 将Map转回List
m
->
new
ArrayList
<>(
m
.
values
())
m
->
new
ArrayList
<>(
m
.
values
())
));
));
}
}
return
new
ArrayList
<
Company
>();
}
/**
/**
* 获取指定公司的部门列表
* 获取指定公司的部门列表
...
...
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
View file @
63b45660
...
@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.cb.service;
...
@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.cb.service;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB001
;
import
com.baosight.hggp.hg.cb.domain.HGCB002
;
import
com.baosight.hggp.hg.cb.domain.HGCB005
;
import
com.baosight.hggp.hg.cb.domain.HGCB005
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cb.tools.HGCBTools
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
...
...
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