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
0425e3cd
Commit
0425e3cd
authored
Dec 09, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(大屏):获取本级及子级区域code,将单位code转行政区划
parent
79adfea7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
StCommonServiceImpl.java
...odule/statistcs/biz/service/impl/StCommonServiceImpl.java
+11
-4
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/service/impl/StCommonServiceImpl.java
View file @
0425e3cd
...
@@ -56,6 +56,7 @@ import java.util.concurrent.ConcurrentHashMap;
...
@@ -56,6 +56,7 @@ import java.util.concurrent.ConcurrentHashMap;
import
java.util.function.Function
;
import
java.util.function.Function
;
import
java.util.function.Predicate
;
import
java.util.function.Predicate
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
java.util.stream.Stream
;
import
static
org
.
elasticsearch
.
index
.
query
.
QueryBuilders
.
existsQuery
;
import
static
org
.
elasticsearch
.
index
.
query
.
QueryBuilders
.
existsQuery
;
...
@@ -565,7 +566,11 @@ public class StCommonServiceImpl {
...
@@ -565,7 +566,11 @@ public class StCommonServiceImpl {
* @return 本级及子级区域code
* @return 本级及子级区域code
*/
*/
public
String
getSelfAndChildRegion
(
RegionModel
region
)
{
public
String
getSelfAndChildRegion
(
RegionModel
region
)
{
return
null
;
return
Stream
.
concat
(
Stream
.
of
(
region
.
getRegionCode
()),
region
.
getChildren
()
==
null
?
Stream
.
empty
()
:
region
.
getChildren
().
stream
().
flatMap
(
child
->
Arrays
.
stream
(
getSelfAndChildRegion
(
child
).
split
(
","
)).
map
(
Integer:
:
parseInt
)))
.
map
(
String:
:
valueOf
)
.
collect
(
Collectors
.
joining
(
","
));
}
}
/**
/**
...
@@ -575,8 +580,10 @@ public class StCommonServiceImpl {
...
@@ -575,8 +580,10 @@ public class StCommonServiceImpl {
*/
*/
public
CharSequence
castCompanyCode2RegionCode
(
String
companyCode
)
{
public
CharSequence
castCompanyCode2RegionCode
(
String
companyCode
)
{
String
regionSeq
=
commonMapper
.
selectCompanyRegionSeq
(
companyCode
);
String
regionSeq
=
commonMapper
.
selectCompanyRegionSeq
(
companyCode
);
Optional
<
RegionModel
>
optionalRegionModel
=
regionModels
.
stream
().
filter
(
r
->
String
.
valueOf
(
r
.
getSequenceNbr
()).
equals
(
regionSeq
)).
findFirst
();
RegionModel
region
=
regionModels
.
stream
()
optionalRegionModel
.
orElseThrow
(()->
new
RuntimeException
(
""
));
.
filter
(
r
->
String
.
valueOf
(
r
.
getSequenceNbr
()).
equals
(
regionSeq
))
return
null
;
.
findFirst
()
.
orElseThrow
(()
->
new
RuntimeException
(
"未找到对应区域"
));
return
String
.
valueOf
(
region
.
getRegionCode
());
}
}
}
}
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