Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
765ff8f8
Commit
765ff8f8
authored
Apr 18, 2019
by
Cheng C Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pom Add analysis_excel_init
parent
6c1997f5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
11 deletions
+24
-11
MenuServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
+16
-9
basic-data-infrastructure.html
...ta/basicDataInfrastructure/basic-data-infrastructure.html
+8
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/MenuServiceImpl.java
View file @
765ff8f8
...
...
@@ -20,9 +20,10 @@ import java.util.List;
import
java.util.stream.Collectors
;
/**
*
*/
@Service
public
class
MenuServiceImpl
extends
BaseService
{
public
class
MenuServiceImpl
extends
BaseService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MenuServiceImpl
.
class
);
...
...
@@ -47,14 +48,17 @@ public class MenuServiceImpl extends BaseService{
}
List
<
MenuDisplayDto
>
menuDisplayDtos
=
new
ArrayList
<>();
List
<
Menu
>
menus
=
findByServiceTypeId
(
moduleId
);
List
<
String
>
mendIds
=
getMenuIds
(
moduleId
,
userId
);
List
<
String
>
mendIds
=
getMenuIds
(
moduleId
,
userId
);
List
<
Menu
>
rootNodes
=
menus
.
stream
().
filter
(
oneMenu
->
!
StringUtils
.
hasText
(
oneMenu
.
getParentId
()))
.
collect
(
Collectors
.
toList
());
for
(
Menu
menu
:
rootNodes
)
{
// 把EF获取的menu转化为Dto形式
MenuDisplayDto
menuDisplayDto
=
rotateMenuToMenuDisplayDto
(
menu
);
getSubMenuDto
(
menuDisplayDto
,
menus
,
mendIds
);
menuDisplayDtos
.
add
(
menuDisplayDto
);
if
(
menuDisplayDto
.
getSubMenus
().
size
()
>
0
)
{
menuDisplayDtos
.
add
(
menuDisplayDto
);
}
}
return
menuDisplayDtos
;
}
...
...
@@ -65,7 +69,7 @@ public class MenuServiceImpl extends BaseService{
return
menuDisplayDto
;
}
;
private
MenuDto
rotateMenuToMenuDto
(
Menu
menu
)
{
MenuDto
menuDto
=
new
MenuDto
();
...
...
@@ -73,13 +77,13 @@ public class MenuServiceImpl extends BaseService{
return
menuDto
;
}
;
private
void
getSubMenuDto
(
MenuDisplayDto
menu
,
List
<
Menu
>
menus
,
List
<
String
>
menuIds
)
{
List
<
MenuDisplayDto
>
subMenuDtos
=
menus
.
stream
()
.
filter
(
oneMenu
->
menu
.
getId
().
equals
(
oneMenu
.
getParentId
())
&&
CommonConstants
.
ACTIVE_STATUS
.
equals
(
oneMenu
.
getIsActive
())
&&
menuIds
.
contains
(
oneMenu
.
getId
()))
&&
menuIds
.
contains
(
oneMenu
.
getId
()))
.
map
(
this
::
rotateMenuToMenuDisplayDto
).
collect
(
Collectors
.
toList
());
menu
.
setSubMenus
(
subMenuDtos
);
for
(
MenuDisplayDto
subMenu
:
subMenuDtos
)
{
...
...
@@ -87,8 +91,8 @@ public class MenuServiceImpl extends BaseService{
}
}
public
List
<
MenuDto
>
getFilterMenus
(
Integer
moduleId
,
String
userId
){
List
<
String
>
menuIds
=
getMenuIds
(
moduleId
,
userId
);
public
List
<
MenuDto
>
getFilterMenus
(
Integer
moduleId
,
String
userId
)
{
List
<
String
>
menuIds
=
getMenuIds
(
moduleId
,
userId
);
logger
.
debug
(
"Start to get menus"
);
if
(
moduleId
==
null
)
{
throw
new
ApplicationException
(
"serviceId for getMenus can't be null"
);
...
...
@@ -105,6 +109,9 @@ public class MenuServiceImpl extends BaseService{
menuDto
.
setSubMenus
(
subMenuDtos
);
iteratorMenu2
(
menus
,
menuDto
,
menuIds
);
}
menuDtos
=
menuDtos
.
stream
().
filter
(
menuDto
->
menuDto
.
getSubMenus
().
size
()
>
0
).
collect
(
Collectors
.
toList
());
return
menuDtos
;
}
...
...
@@ -170,7 +177,7 @@ public class MenuServiceImpl extends BaseService{
.
collect
(
Collectors
.
toList
());
if
(!
subMenus
.
isEmpty
())
{
List
<
MenuDto
>
subMenuDtos
=
subMenus
.
stream
()
.
map
(
this
::
rotateMenuToMenuDto
).
collect
(
Collectors
.
toList
());
.
map
(
this
::
rotateMenuToMenuDto
).
collect
(
Collectors
.
toList
());
menu
.
setSubMenus
(
subMenuDtos
);
for
(
MenuDto
m
:
subMenuDtos
)
{
iteratorMenu
(
menus
,
m
);
...
...
atms-web/src/main/webapp/app/admin/basicData/financialData/basicDataInfrastructure/basic-data-infrastructure.html
View file @
765ff8f8
...
...
@@ -22,10 +22,16 @@
<!--<div ui-view="orangization-structure" ng-show="state.includes('basicData.orangizationStructureManage')"></div>
<div ui-view="business-unit" ng-show="state.includes('basicData.businessUnit')"></div>
<div ui-view="region" ng-show="state.includes('basicData.regionManage')"></div>-->
<div
ui-view=
"enterprise-account"
ng-show=
"state.includes('financialData.enterpriseAccountManage')"
></div>
<!-- <div ui-view="enterprise-account" ng-show="state.includes('financialData.enterpriseAccountManage')"></div>-->
<div
ui-view=
"enterprise-account"
ng-show=
"enterpriseAccountSetShow"
></div>
<!--<div ui-view="word-library" ng-show="state.includes('basicData.wordLibraryManage')"></div>-->
<!--<div ui-view="key-value" ng-show="state.includes('basicData.keyvalueManage')"></div>-->
<div
ui-view=
"customer-list"
ng-show=
"state.includes('financialData.customerListManage')"
></div>
<!-- <div ui-view="customer-list" ng-show="state.includes('financialData.customerListManage')"></div>-->
<div
ui-view=
"customer-list"
ng-show=
"customerListShow"
></div>
<!--<div ui-view="product-manage" ng-show="state.includes('financialData.productManage')"></div>-->
<!--<div ui-view="standardAccountManage" ng-show="state.includes('basicData.standardAccountManage')"></div>-->
</div>
...
...
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