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
4af7829f
Commit
4af7829f
authored
Aug 05, 2024
by
刘林
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…
Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents
0ab1e6f9
5befd66f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+15
-10
CylinderDPStatisticsServiceImpl.java
...tcs/biz/service/impl/CylinderDPStatisticsServiceImpl.java
+6
-3
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/AQZSDPStatisticsServiceImpl.java
View file @
4af7829f
...
@@ -636,9 +636,11 @@ public class AQZSDPStatisticsServiceImpl {
...
@@ -636,9 +636,11 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
issueMonthList
(
String
cityCode
)
{
public
List
<
Map
<
String
,
Object
>>
issueMonthList
(
String
cityCode
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
if
(
orgCode
==
null
){
return
new
ArrayList
<>(
0
);
}
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM"
));
List
<
Map
<
String
,
Object
>>
list
=
statisticsMapper
.
issueMonthList
(
orgCode
,
time
);
return
statisticsMapper
.
issueMonthList
(
orgCode
,
time
);
return
list
;
}
}
public
Map
<
String
,
Object
>
issueProblemLevelCount
(
String
cityCode
)
{
public
Map
<
String
,
Object
>
issueProblemLevelCount
(
String
cityCode
)
{
...
@@ -748,19 +750,22 @@ public class AQZSDPStatisticsServiceImpl {
...
@@ -748,19 +750,22 @@ public class AQZSDPStatisticsServiceImpl {
public
List
<
Map
<
String
,
Object
>>
issueCountTopByProblemType
(
String
cityCode
)
{
public
List
<
Map
<
String
,
Object
>>
issueCountTopByProblemType
(
String
cityCode
)
{
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
List
<
Map
<
String
,
Object
>>
allList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
null
);
List
<
Map
<
String
,
Object
>>
allList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
endList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
"1"
);
Map
<
String
,
Object
>
endIssueDataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
endIssuedataMap
=
new
HashMap
<>();
if
(
orgCode
!=
null
){
endList
.
forEach
(
t
->
{
allList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
null
);
endIssuedataMap
.
put
(
t
.
get
(
"problemTypeCode"
).
toString
(),
t
.
get
(
"count"
));
List
<
Map
<
String
,
Object
>>
endList
=
statisticsMapper
.
issueCountTopByProblemType
(
orgCode
,
"1"
);
});
endList
.
forEach
(
t
->
{
endIssueDataMap
.
put
(
t
.
get
(
"problemTypeCode"
).
toString
(),
t
.
get
(
"count"
));
});
}
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
IssueTypeEnum
.
getNameByCode
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()));
map
.
put
(
"name"
,
IssueTypeEnum
.
getNameByCode
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()));
map
.
put
(
"count"
,
allList
.
get
(
i
).
get
(
"count"
));
map
.
put
(
"count"
,
allList
.
get
(
i
).
get
(
"count"
));
if
(
null
!=
endIssue
d
ataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()))
{
if
(
null
!=
endIssue
D
ataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()))
{
map
.
put
(
"rate"
,
new
DecimalFormat
(
"0.00"
).
format
(
Double
.
parseDouble
(
endIssue
d
ataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
())
+
""
)
/
(
Double
.
parseDouble
(
allList
.
get
(
i
).
get
(
"count"
)
+
""
))));
map
.
put
(
"rate"
,
new
DecimalFormat
(
"0.00"
).
format
(
Double
.
parseDouble
(
endIssue
D
ataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
())
+
""
)
/
(
Double
.
parseDouble
(
allList
.
get
(
i
).
get
(
"count"
)
+
""
))));
}
}
resultList
.
add
(
map
);
resultList
.
add
(
map
);
}
}
...
...
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/CylinderDPStatisticsServiceImpl.java
View file @
4af7829f
...
@@ -103,7 +103,7 @@ public class CylinderDPStatisticsServiceImpl {
...
@@ -103,7 +103,7 @@ public class CylinderDPStatisticsServiceImpl {
// 这里只是打印出聚合的名称和桶的数量,你需要根据自己的需求来处理这些数据
// 这里只是打印出聚合的名称和桶的数量,你需要根据自己的需求来处理这些数据
Terms
terms
=
searchResponse
.
getAggregations
().
get
(
"USE_UNIT_CREDIT_CODE"
);
Terms
terms
=
searchResponse
.
getAggregations
().
get
(
"USE_UNIT_CREDIT_CODE"
);
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
dataList
=
new
ArrayList
<>();
List
<
String
>
keys
=
new
ArrayLis
t
<>();
Set
<
String
>
keys
=
new
HashSe
t
<>();
for
(
Terms
.
Bucket
bucket
:
terms
.
getBuckets
())
{
for
(
Terms
.
Bucket
bucket
:
terms
.
getBuckets
())
{
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
Map
<
String
,
Object
>
item
=
new
HashMap
<>();
item
.
put
(
"count"
,
bucket
.
getDocCount
());
item
.
put
(
"count"
,
bucket
.
getDocCount
());
...
@@ -111,7 +111,10 @@ public class CylinderDPStatisticsServiceImpl {
...
@@ -111,7 +111,10 @@ public class CylinderDPStatisticsServiceImpl {
dataList
.
add
(
item
);
dataList
.
add
(
item
);
keys
.
add
(
bucket
.
getKeyAsString
());
keys
.
add
(
bucket
.
getKeyAsString
());
}
}
Map
<
String
,
TzBaseEnterpriseInfo
>
useCodeEntryMap
=
getStringTzBaseEnterpriseInfoDtoMap
(
keys
);
Map
<
String
,
TzBaseEnterpriseInfo
>
useCodeEntryMap
=
new
HashMap
<>();
if
(
keys
.
size
()
>
0
){
useCodeEntryMap
=
getStringTzBaseEnterpriseInfoDtoMap
(
keys
);
}
for
(
Map
<
String
,
Object
>
item
:
dataList
)
{
for
(
Map
<
String
,
Object
>
item
:
dataList
)
{
Object
key
=
item
.
get
(
"key"
);
Object
key
=
item
.
get
(
"key"
);
if
(
useCodeEntryMap
.
containsKey
(
key
))
{
if
(
useCodeEntryMap
.
containsKey
(
key
))
{
...
@@ -124,7 +127,7 @@ public class CylinderDPStatisticsServiceImpl {
...
@@ -124,7 +127,7 @@ public class CylinderDPStatisticsServiceImpl {
return
dataList
;
return
dataList
;
}
}
private
Map
<
String
,
TzBaseEnterpriseInfo
>
getStringTzBaseEnterpriseInfoDtoMap
(
Lis
t
<
String
>
keys
)
{
private
Map
<
String
,
TzBaseEnterpriseInfo
>
getStringTzBaseEnterpriseInfoDtoMap
(
Se
t
<
String
>
keys
)
{
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
TzBaseEnterpriseInfo
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
in
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
keys
);
queryWrapper
.
in
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
keys
);
queryWrapper
.
select
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
TzBaseEnterpriseInfo:
:
getProvince
,
TzBaseEnterpriseInfo:
:
getCity
,
TzBaseEnterpriseInfo:
:
getDistrict
,
TzBaseEnterpriseInfo:
:
getUseUnit
);
queryWrapper
.
select
(
TzBaseEnterpriseInfo:
:
getUseUnitCode
,
TzBaseEnterpriseInfo:
:
getProvince
,
TzBaseEnterpriseInfo:
:
getCity
,
TzBaseEnterpriseInfo:
:
getDistrict
,
TzBaseEnterpriseInfo:
:
getUseUnit
);
...
...
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