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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
7 deletions
+43
-7
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
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,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 @
67649b9a
...
@@ -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
;
...
...
src/main/resources/META-INF/resources/iPlatV7-index.jsp
View file @
67649b9a
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.web.threadlocal.UserSession"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.core.service.soa.XLocalManager"
%
>
<
%@
page
import=
"com.baosight.iplat4j.ed.service.PlatApplicationDynamicContext"
%
>
<
%@
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
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
...
@@ -21,8 +25,29 @@
...
@@ -21,8 +25,29 @@
UserSession
.
web2Service
(
request
);
UserSession
.
web2Service
(
request
);
String
userName =
UserSession.getLoginCName();
String
userName =
UserSession.getLoginCName();
String
loginName =
UserSession.getLoginName();
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("userName", userName);
request.setAttribute("loginName", loginName);
request.setAttribute("loginName", loginName);
request.setAttribute("companyName", companyName);
request.setAttribute("orgName", orgName);
request.setAttribute("orgInf", orgInfo);
String efSecurityToken = null;
String efSecurityToken = null;
Boolean SideBarIsMini = PlatApplicationContext.getProperty("SideBarIsMini")==null?false: Boolean.valueOf(PlatApplicationContext.getProperty("SideBarIsMini"));
Boolean SideBarIsMini = PlatApplicationContext.getProperty("SideBarIsMini")==null?false: Boolean.valueOf(PlatApplicationContext.getProperty("SideBarIsMini"));
...
@@ -118,6 +143,11 @@
...
@@ -118,6 +143,11 @@
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"loadingIcon"
value=
"<%=loadingIcon%>"
scope=
"session"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"SideBarIsMini"
value=
"<%=SideBarIsMini%>"
/>
<c:set
var=
"loginName"
value=
"<%=loginName%>"
/>
<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]>
<!--[if IE 9]>
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<html class="ie9 no-focus" xmlns="http://www.w3.org/1999/xhtml">
<![endif]-->
<![endif]-->
...
@@ -167,8 +197,8 @@
...
@@ -167,8 +197,8 @@
<script
src=
"${iPlatStaticURL}/iplatui/assets/js/iplat.ui.bootstrap.min.js"
></script>
<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}/iplatui/js/iplat.ui.min.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<script
src=
"${iPlatStaticURL}/iPlatV7-index.js"
></script>
<
%
--
<
link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/>
--%
>
<link
href=
"${iPlatStaticURL}/Layx/layx.css"
rel=
"stylesheet"
type=
"text/css"
/
>
<
%
--
<
script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script>
--%
>
<script
src=
"${iPlatStaticURL}/Layx/layx.js"
type=
"text/javascript"
></script
>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
<
%
--
<
script
src=
"${iPlatStaticURL}/EM/NT/websocket.js"
></script>
--%>
</head>
</head>
...
@@ -317,8 +347,12 @@
...
@@ -317,8 +347,12 @@
<span>
${loginName}
</span>
<span>
${loginName}
</span>
</li>
</li>
<li>
<li>
<span
class=
"information"
>
公司:
</span>
<span
class=
"detail-info user-org"
>
${companyName}
</span>
</li>
<li>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"information"
>
组织机构:
</span>
<span
class=
"detail-info user-org"
></span>
<span
class=
"detail-info user-org"
>
${orgName}
</span>
</li>
</li>
<
%
--
<
li
data-accountset=
"true"
>
<
%
--
<
li
data-accountset=
"true"
>
<span
class=
"information k-link change-org"
>
公司别:
</span>
<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