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
67649b9a
Commit
67649b9a
authored
Jul 09, 2024
by
江和松
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
1f42711d
63b45660
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
14 deletions
+50
-14
UserSessionUtils.java
...ava/com/baosight/hggp/core/security/UserSessionUtils.java
+13
-10
ServiceHGCB005.java
.../java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
+0
-1
iPlatV7-index.jsp
src/main/resources/META-INF/resources/iPlatV7-index.jsp
+37
-3
No files found.
src/main/java/com/baosight/hggp/core/security/UserSessionUtils.java
View file @
67649b9a
...
...
@@ -153,16 +153,19 @@ public class UserSessionUtils extends UserSession {
}
List
<
String
>
companyCodes
=
userGroups
.
stream
().
map
(
UserGroup:
:
getCompanyCode
)
.
filter
(
StringUtils:
:
isNotBlank
).
collect
(
Collectors
.
toList
());
// 查询组织信息
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
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
(
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
// 将Map转回List
m
->
new
ArrayList
<>(
m
.
values
())
));
if
(
CollectionUtils
.
isNotEmpty
(
companyCodes
))
{
// 查询组织信息
List
<
Org
>
orgs
=
HGXSTools
.
XsOrg
.
list
(
companyCodes
);
Optional
.
ofNullable
(
companyCodes
).
orElse
(
new
ArrayList
<>()).
stream
().
forEach
(
code
->
{
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
(
Collectors
.
toMap
(
Company:
:
getCompanyCode
,
Function
.
identity
(),
(
oldValue
,
newValue
)
->
oldValue
),
// 将Map转回List
m
->
new
ArrayList
<>(
m
.
values
())
));
}
return
new
ArrayList
<
Company
>();
}
/**
...
...
src/main/java/com/baosight/hggp/hg/cb/service/ServiceHGCB005.java
View file @
67649b9a
...
...
@@ -2,7 +2,6 @@ package com.baosight.hggp.hg.cb.service;
import
com.baosight.hggp.core.security.UserSessionUtils
;
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.tools.HGCBTools
;
import
com.baosight.hggp.hg.cw.domain.HGCW001
;
...
...
src/main/resources/META-INF/resources/iPlatV7-index.jsp
View file @
67649b9a
...
...
@@ -12,6 +12,10 @@
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
page
import=
"com.baosight.hggp.hg.xs.tools.HGXSTools"
%
>
<
%@
page
import=
"com.baosight.hggp.hg.xs.domain.Org"
%
>
<
%@
page
import=
"java.util.List"
%
>
<
%@
page
import=
"org.apache.commons.collections.CollectionUtils"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
...
...
@@ -21,8 +25,29 @@
UserSession
.
web2Service
(
request
);
String
userName =
UserSession.getLoginCName();
String
loginName =
UserSession.getLoginName();
List
<
Org
>
orgList =HGXSTools.XsOrg.queryByUser();
String companyName = "";
String orgName = "";
String orgInfo = "";
if(CollectionUtils.isNotEmpty(orgList)){
Org org = orgList.get(0);
companyName = org.getCompanyName();
orgName = org.getOrgCname();
if(StringUtils.isNotBlank(companyName)) {
orgInfo = companyName;
if (!StringUtils.equals(org.getCompanyCode(), org.getOrgEname())
&&
StringUtils.isNotBlank(orgName)) {
orgInfo += "-" + orgName;
}
}
if(StringUtils.isBlank(orgName)){
orgName = companyName;
}
}
request.setAttribute("userName", userName);
request.setAttribute("loginName", loginName);
request.setAttribute("companyName", companyName);
request.setAttribute("orgName", orgName);
request.setAttribute("orgInf", orgInfo);
String efSecurityToken = null;
Boolean SideBarIsMini = PlatApplicationContext.getProperty("SideBarIsMini")==null?false: Boolean.valueOf(PlatApplicationContext.getProperty("SideBarIsMini"));
...
...
@@ -118,6 +143,11 @@
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<c:set
var=
"companyName"
value=
"<%=companyName%>"
/>
<c:set
var=
"orgName"
value=
"<%=orgName%>"
/>
<c:set
var=
"orgInfo"
value=
"<%=orgInfo%>"
/>
<!--[if IE 9]>
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<![endif]-->
...
...
@@ -167,8 +197,8 @@
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iplatui/js/iplat.ui.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<
%
--
<
link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/>
--%
>
<
%
--
<
script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script>
--%
>
<link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/
>
<script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script
>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
</head>
...
...
@@ -317,8 +347,12 @@
<span>
${loginName}
</span>
</li>
<li>
<span
class=
"information"
>
公司:
</span>
<span
class=
"detail-info user-org"
>
${companyName}
</span>
</li>
<li>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"detail-info user-org"
></span>
<span
class=
"detail-info user-org"
>
${orgName}
</span>
</li>
<
%
--
<
li
data-accountset=
"true"
>
<span
class=
"information k-link change-org"
>
公司别:
</span>
...
...
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