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
db959bc2
Commit
db959bc2
authored
Feb 06, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
98a7ca1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
SourcesStatisticsImpl.java
...ejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
+8
-2
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/SourcesStatisticsImpl.java
View file @
db959bc2
...
...
@@ -4,10 +4,12 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.equipmanage.common.enums.SourceTypeEnum
;
import
com.yeejoin.equipmanage.service.ISourceStatistics
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.foundation.context.SpringContextHelper
;
import
java.lang.reflect.Method
;
import
java.util.List
;
import
java.util.Set
;
/**
...
...
@@ -56,16 +58,20 @@ public class SourcesStatisticsImpl implements ISourceStatistics {
}
private
int
sumNumber
(
Set
<
String
>
keys
)
{
return
keys
.
stream
().
filter
(
k
->
redisUtil
.
get
(
k
)
!=
null
).
mapToInt
(
k
->
Integer
.
parseInt
(
redisUtil
.
get
(
k
).
toString
())).
sum
();
// return keys.stream().filter(k -> redisUtil.get(k) != null).mapToInt(k -> Integer.parseInt(redisUtil.get(k).toString())).sum();
return
keys
.
stream
().
mapToInt
(
k
->
redisUtil
.
get
(
k
)
!=
null
?
Integer
.
parseInt
(
redisUtil
.
get
(
k
).
toString
()):
0
).
sum
();
}
private
String
subStringZero
(
String
categoryCode
)
{
String
reverse
=
new
StringBuffer
(
categoryCode
).
reverse
().
toString
();
int
noZero
=
Integer
.
parseInt
(
reverse
);
return
new
StringBuffer
(
String
.
valueOf
(
noZero
)).
reverse
().
toString
();
}
private
String
buildPattenKey
(
String
bizOrgCode
,
String
sourceType
,
String
treeCode
)
{
private
String
buildPattenKey
(
String
bizOrgCode
,
String
sourceType
,
String
treeCode
)
{
return
PREFIX_CATEGORY_COUNT
+
bizOrgCode
+
"*_"
+
sourceType
+
"_"
+
treeCode
+
"*"
;
}
...
...
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