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
27afc1e1
Commit
27afc1e1
authored
Aug 14, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏-安全追溯-隐患主体类型统计(近30天)接口调整
parent
3f6a8ead
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
AQZSDPStatisticsMapper.java
.../module/statistics/api/mapper/AQZSDPStatisticsMapper.java
+7
-0
AQZSDPStatisticsMapper.xml
...-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
+1
-1
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+3
-2
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/java/com/yeejoin/amos/boot/module/statistics/api/mapper/AQZSDPStatisticsMapper.java
View file @
27afc1e1
...
...
@@ -15,8 +15,15 @@ public interface AQZSDPStatisticsMapper {
String
getOrgCodeByCompanyCode
(
@Param
(
"cityCode"
)
String
cityCode
);
/**
* 按照问题状态、问题类型分组统计问题数量
* @param orgCode 区域对应orgCode
* @param filterParamDto 过滤日期
* @return List<CountDto>
*/
List
<
CountDto
>
selectByOrgAndMainBody
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"dto"
)
DPFilterParamDto
filterParamDto
);
List
<
Map
<
String
,
Object
>>
selectByOrgAndProblemType
(
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"enumNameList"
)
List
<
String
>
enumNameList
,
@Param
(
"startDate"
)
String
startDate
,
@Param
(
"sourceType"
)
String
sourceType
,
@Param
(
"equipType"
)
String
equipType
);
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
View file @
27afc1e1
...
...
@@ -9,7 +9,7 @@
<select
id=
"selectByOrgAndMainBody"
resultType=
"com.yeejoin.amos.boot.biz.common.dto.CountDto"
>
SELECT
COUNT(1) as longValue,
source_type AS keyStr,
source_type
_code
AS keyStr,
problem_status_code as label
FROM
tzs_safety_problem_tracing
...
...
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 @
27afc1e1
...
...
@@ -332,10 +332,11 @@ public class AQZSDPStatisticsServiceImpl {
return
resultMap
;
}
// 3.y轴数据设置
// 按照问题状态、问题类型分组统计问题数量
List
<
CountDto
>
countDtos
=
statisticsMapper
.
selectByOrgAndMainBody
(
orgCode
,
dpFilterParamDto
);
mainBodyEnums
.
forEach
(
e
->{
Long
allProblemNum
=
countDtos
.
stream
().
filter
(
c
->
c
.
getLabel
().
equals
(
e
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
long
handledProblemNum
=
countDtos
.
stream
().
filter
(
c
->
c
.
getLabel
().
equals
(
e
.
getCode
())
&&
c
.
getKeyStr
().
equals
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
Long
allProblemNum
=
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
equals
(
e
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
long
handledProblemNum
=
countDtos
.
stream
().
filter
(
c
->
c
.
getKeyStr
().
equals
(
e
.
getCode
())
&&
c
.
getLabel
().
equals
(
SafetyProblemStatusEnum
.
HANDLED
.
getCode
())).
mapToLong
(
CountDto:
:
getLongValue
).
sum
();
BigDecimal
all
=
new
BigDecimal
(
allProblemNum
.
toString
());
BigDecimal
handled
=
new
BigDecimal
(
Long
.
toString
(
handledProblemNum
));
String
percent
=
"0"
;
...
...
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