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
850bab91
Commit
850bab91
authored
May 09, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.返回空对象
parent
c0fe2b26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+6
-6
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
850bab91
...
...
@@ -65,7 +65,7 @@ public class UserSessionUtils extends UserSession {
public
static
String
getAccountCode
()
{
String
loginName
=
getLoginName
();
if
(
loginName
==
null
)
{
return
null
;
return
""
;
}
String
accountCode
=
MapUtils
.
getString
(
ACCOUNT_MAP
,
loginName
);
if
(
accountCode
==
null
)
{
...
...
@@ -84,7 +84,7 @@ public class UserSessionUtils extends UserSession {
public
static
List
<
String
>
getOrgId
()
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
return
orgs
.
stream
().
map
(
item
->
item
.
getOrgId
()).
collect
(
Collectors
.
toList
());
}
...
...
@@ -97,7 +97,7 @@ public class UserSessionUtils extends UserSession {
public
static
List
<
String
>
getFactoryCode
()
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
List
<
String
>
factoryCodes
=
new
ArrayList
<>();
for
(
Org
org
:
orgs
)
{
...
...
@@ -125,7 +125,7 @@ public class UserSessionUtils extends UserSession {
public
static
List
<
Company
>
getRoleCompany
()
{
List
<
UserGroup
>
userGroups
=
HGXSTools
.
XsUserGroup
.
queryByUser
();
if
(
CollectionUtils
.
isEmpty
(
userGroups
))
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
...
...
@@ -142,7 +142,7 @@ public class UserSessionUtils extends UserSession {
public
static
List
<
Dept
>
getDepByCompany
(
String
companyCode
)
{
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
queryByParent
(
companyCode
,
OrgTypeEnum
.
DEPT
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
orgs
))
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
return
orgs
.
stream
().
map
(
item
->
new
Dept
(
item
.
getOrgId
(),
item
.
getOrgCname
())).
collect
(
Collectors
.
toList
());
}
...
...
@@ -156,7 +156,7 @@ public class UserSessionUtils extends UserSession {
// 查询该公司下的所有组织机构
List
<
String
>
orgIds
=
HGXSTools
.
XsOrg
.
queryChildren
(
companyCode
);
if
(
CollectionUtils
.
isEmpty
(
orgIds
))
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
return
HGXSTools
.
XsUser
.
queryByOrg
(
orgIds
);
}
...
...
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