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
03afd469
Commit
03afd469
authored
Nov 15, 2024
by
麻笑宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全追溯 / 当年主体单位隐患排名(Top10)代码提交
parent
ffb074d8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
17 deletions
+50
-17
ZBGLStatisticsMapper.java
...ot/module/statistics/api/mapper/ZBGLStatisticsMapper.java
+5
-0
ZBGLStatisticsMapper.xml
...cs-api/src/main/resources/mapper/ZBGLStatisticsMapper.xml
+28
-0
DnztdwyhpmServiceImpl.java
...stcs/biz/service/impl/ZBGLImpl/DnztdwyhpmServiceImpl.java
+17
-17
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/ZBGLStatisticsMapper.java
View file @
03afd469
package
com
.
yeejoin
.
amos
.
boot
.
module
.
statistics
.
api
.
mapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -31,4 +32,8 @@ public interface ZBGLStatisticsMapper {
List
<
Map
<
String
,
Long
>>
getAYHLXYHSLPMPageData
(
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
Map
<
String
,
Long
>
getDNZTDWYHPMChartData
(
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
,
@Param
(
"issueTypeList"
)
List
<
String
>
issueTypeList
);
Page
<
Map
<
String
,
Object
>>
getUnitByOrgCode
(
@Param
(
"page"
)
Page
page
,
@Param
(
"dpFilterParamForDetailDto"
)
DPFilterParamForDetailDto
dpFilterParamForDetailDto
);
List
<
Map
<
String
,
Object
>>
getDNZTDWYHPMPageData
(
@Param
(
"unitCodeList"
)
List
<
String
>
unitCodeList
);
}
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/ZBGLStatisticsMapper.xml
View file @
03afd469
...
...
@@ -117,6 +117,34 @@
</foreach>
)
</select>
<select
id=
"getUnitByOrgCode"
resultType=
"java.util.Map"
>
SELECT
principal_unit_code AS principalUnitCode
FROM
tzs_safety_problem_tracing
WHERE
source_type_code = '2'
AND governing_body_org_code LIKE concat ( #{dpFilterParamForDetailDto.orgCode}, '%' )
GROUP BY
principal_unit_code
</select>
<select
id=
"getDNZTDWYHPMPageData"
resultType=
"java.util.Map"
>
SELECT COUNT
( 1 ),
principal_unit_code AS principalUnitCode,
problem_type_code AS problemTypeCode,
principal_unit AS principalUnit
FROM
tzs_safety_problem_tracing
WHERE
principal_unit_code IN
<foreach
collection=
"unitCodeList"
item=
"item"
separator=
","
open=
"("
close=
")"
>
principal_unit_code = #{item}
</foreach>
GROUP BY
principal_unit_code,
problem_type_code
</select>
</mapper>
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/ZBGLImpl/DnztdwyhpmServiceImpl.java
View file @
03afd469
...
...
@@ -92,17 +92,14 @@ public class DnztdwyhpmServiceImpl implements IZBGLService {
DPFilterParamForDetailDto
dpFilterParamForDetailDtoNew
=
new
DPFilterParamForDetailDto
();
dpFilterParamForDetailDtoNew
.
setOrgCode
(
orgCode
);
Map
<
String
,
Object
>
itemResult
=
new
HashMap
<>();
List
<
Map
<
String
,
Long
>>
list
=
zbglStatisticsMapper
.
getAYHLXYHSLPMPageData
(
dpFilterParamForDetailDtoNew
);
Long
sum
=
0L
;
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
sum
=
sum
+
(
Long
)
list
.
get
(
i
).
get
(
"longValue"
);
}
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
if
(
sum
!=
0
&&
(
Long
)
list
.
get
(
i
).
get
(
"longValue"
)
!=
0
){
itemResult
.
put
(
list
.
get
(
i
).
get
(
"fieldValueCode"
)+
""
,
list
.
get
(
i
).
get
(
"longValue"
)+
" / "
+
new
BigDecimal
(
list
.
get
(
i
).
get
(
"longValue"
)+
""
).
divide
(
BigDecimal
.
valueOf
(
sum
),
2
,
RoundingMode
.
HALF_UP
).
multiply
(
BigDecimal
.
valueOf
(
100
)).
stripTrailingZeros
().
toPlainString
()+
"%"
);
}
Page
<
Map
<
String
,
Object
>>
returnPage
=
zbglStatisticsMapper
.
getUnitByOrgCode
(
page
,
dpFilterParamForDetailDtoNew
);
List
<
String
>
unitCodeList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
returnPage
.
getRecords
().
size
();
i
++){
unitCodeList
.
add
(
returnPage
.
getRecords
().
get
(
i
).
get
(
"principalUnitCode"
).
toString
());
}
itemResult
.
put
(
"area"
,
r
.
getRegionName
());
List
<
Map
<
String
,
Object
>>
list
=
zbglStatisticsMapper
.
getDNZTDWYHPMPageData
(
unitCodeList
);
Long
sum
=
0L
;
itemResult
.
put
(
"sequenceNbr"
,
UUID
.
fastUUID
().
toString
());
return
itemResult
;
}).
collect
(
Collectors
.
toList
());
...
...
@@ -113,15 +110,18 @@ public class DnztdwyhpmServiceImpl implements IZBGLService {
@Override
public
List
<
Map
<
String
,
String
>>
getTitle
(
DPFilterParamForDetailDto
dpFilterParamForDetailDto
)
{
List
<
Map
<
String
,
String
>>
list
=
zbglStatisticsMapper
.
getTypeList
(
"ISSUE_TYPE"
);
List
<
Map
<
String
,
String
>>
list
=
IssueTypeEnum
.
getEnumListByMainBody
(
IssueMainBodyEnum
.
COMPANY
.
getCode
());
List
<
Map
<
String
,
String
>>
returnList
=
new
ArrayList
();
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++){
list
.
get
(
i
).
put
(
"dataIndex"
,
list
.
get
(
i
).
get
(
"code"
));
list
.
get
(
i
).
put
(
"title"
,
list
.
get
(
i
).
get
(
"name"
));
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"dataIndex"
,
list
.
get
(
i
).
get
(
"code"
));
map
.
put
(
"title"
,
list
.
get
(
i
).
get
(
"name"
));
list
.
add
(
map
);
}
Map
<
String
,
String
>
map
=
new
HashMap
<>();
map
.
put
(
"dataIndex"
,
"
area
"
);
map
.
put
(
"title"
,
"
区域
"
);
l
ist
.
add
(
0
,
map
);
return
l
ist
;
map
.
put
(
"dataIndex"
,
"
unitName
"
);
map
.
put
(
"title"
,
"
主体信息
"
);
returnL
ist
.
add
(
0
,
map
);
return
returnL
ist
;
}
}
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