Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
9db4fdf4
Commit
9db4fdf4
authored
Jan 31, 2024
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
属地监管部门树修改
parent
141d8925
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
3 deletions
+21
-3
CommonServiceImpl.java
...os/boot/module/jg/biz/service/impl/CommonServiceImpl.java
+21
-3
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/CommonServiceImpl.java
View file @
9db4fdf4
...
@@ -110,6 +110,9 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -110,6 +110,9 @@ public class CommonServiceImpl implements ICommonService {
//管辖机构redis缓存key
//管辖机构redis缓存key
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
private
static
final
String
REGULATOR_UNIT_TREE
=
"REGULATOR_UNIT_TREE"
;
//管辖机构redis缓存key
private
static
final
String
REGULATOR_UNIT_TREE_ALL
=
"REGULATOR_UNIT_TREE_ALL"
;
//行政审批局redis缓存key
//行政审批局redis缓存key
private
static
final
String
ADMINISTRATION_UNIT_TREE
=
"ADMINISTRATION_UNIT_TREE"
;
private
static
final
String
ADMINISTRATION_UNIT_TREE
=
"ADMINISTRATION_UNIT_TREE"
;
...
@@ -285,7 +288,7 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -285,7 +288,7 @@ public class CommonServiceImpl implements ICommonService {
@Override
@Override
public
List
<
LinkedHashMap
>
getCreatTreeByInstallation
()
{
public
List
<
LinkedHashMap
>
getCreatTreeByInstallation
()
{
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
);
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
redisUtils
.
get
(
REGULATOR_UNIT_TREE
_ALL
);
//判断redis是否存在管辖机构树
//判断redis是否存在管辖机构树
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
getCreatTreeByInstallationTree
();
return
!
ObjectUtils
.
isEmpty
(
result
)
?
result
:
getCreatTreeByInstallationTree
();
}
}
...
@@ -294,10 +297,10 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -294,10 +297,10 @@ public class CommonServiceImpl implements ICommonService {
public
List
<
LinkedHashMap
>
getCreatTreeByInstallationTree
()
{
public
List
<
LinkedHashMap
>
getCreatTreeByInstallationTree
()
{
FeignClientResult
tree
=
privilegeFeginService
.
queryAgencyTreeForCache
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
FeignClientResult
tree
=
privilegeFeginService
.
queryAgencyTreeForCache
(
RequestContext
.
getToken
(),
RequestContext
.
getAppKey
(),
RequestContext
.
getProduct
());
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
result
=
(
List
<
LinkedHashMap
>)
tree
.
getResult
();
List
<
LinkedHashMap
>
treeData
=
delete
Tree
Data
(
result
,
REGULATOR_UNIT
);
List
<
LinkedHashMap
>
treeData
=
deleteData
(
result
,
REGULATOR_UNIT
);
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
List
<
LinkedHashMap
>
supervisionTree
=
treeData
.
stream
().
filter
(
e
->
code
.
equals
(
e
.
get
(
"orgCode"
))).
collect
(
Collectors
.
toList
());
List
<
LinkedHashMap
>
resultTree
=
updateNullChildren
(
supervisionTree
);
List
<
LinkedHashMap
>
resultTree
=
updateNullChildren
(
supervisionTree
);
redisUtils
.
set
(
REGULATOR_UNIT_TREE
,
resultTree
);
redisUtils
.
set
(
REGULATOR_UNIT_TREE
_ALL
,
resultTree
);
return
resultTree
;
return
resultTree
;
}
}
...
@@ -377,6 +380,21 @@ public class CommonServiceImpl implements ICommonService {
...
@@ -377,6 +380,21 @@ public class CommonServiceImpl implements ICommonService {
return
result
;
return
result
;
}
}
private
List
<
LinkedHashMap
>
deleteData
(
List
<
LinkedHashMap
>
result
,
String
companyType
)
{
Iterator
it
=
result
.
iterator
();
while
(
it
.
hasNext
())
{
LinkedHashMap
e
=
(
LinkedHashMap
)
it
.
next
();
// 删除非行政审批局
if
(!
e
.
get
(
"companyType"
).
toString
().
contains
(
companyType
))
{
it
.
remove
();
}
if
(!
ObjectUtils
.
isEmpty
(
e
.
get
(
"children"
)))
{
deleteData
((
List
<
LinkedHashMap
>)
e
.
get
(
"children"
),
companyType
);
}
}
return
result
;
}
@Override
@Override
public
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
)
{
public
List
<
Map
<
String
,
Object
>>
getUnitListByType
(
String
type
)
{
...
...
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