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
9b9dc441
Commit
9b9dc441
authored
Aug 14, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.大屏-气瓶-右屏接口
parent
484eb7e5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
25 deletions
+26
-25
AQZSDPStatisticsMapper.xml
...-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
+4
-4
AQZSDPStatisticsController.java
.../statistcs/biz/controller/AQZSDPStatisticsController.java
+11
-11
AQZSDPStatisticsServiceImpl.java
...atistcs/biz/service/impl/AQZSDPStatisticsServiceImpl.java
+11
-10
No files found.
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-api/src/main/resources/mapper/AQZSDPStatisticsMapper.xml
View file @
9b9dc441
...
...
@@ -38,7 +38,7 @@
and date_le(CAST(problem_time as date),#{dto.endDate})
</if>
AND source_type_code = #{sourceTypeCode}
<if
test=
"null != equ
ipTyp
e"
>
<if
test=
"null != equ
ListCod
e"
>
AND equip_list_code = #{equListCode}
</if>
AND problem_type IN
...
...
@@ -69,8 +69,8 @@
GROUP BY t.problem_type
</select>
<select
id=
"getIssueCountByMonth"
resultType=
"java.util.Map"
>
SELECT
COUNT
( 1
),
SELECT
COUNT(1
),
DATE_FORMAT(problem_time,'%Y-%m') AS time
FROM
tzs_safety_problem_tracing
...
...
@@ -215,7 +215,7 @@
FROM
tzs_safety_problem_tracing
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%'
)
governing_body_org_code LIKE concat ( #{orgCode}, '%')
<if
test=
"null != status"
>
AND problem_status_code = #{status}
</if>
...
...
amos-boot-system-tzs/amos-boot-module-statistics/amos-boot-module-statistics-biz/src/main/java/com/yeejoin/amos/boot/module/statistcs/biz/controller/AQZSDPStatisticsController.java
View file @
9b9dc441
...
...
@@ -123,12 +123,12 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-按月统计近12个月的问题数量趋势"
)
@PostMapping
(
value
=
"/issueCountByMonth"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByMonth
(
@
RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
public
ResponseModel
<
Map
<
String
,
Object
>>
issueCountByMonth
(
@
Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
bindingResult
)
throws
Exception
{
List
<
FieldError
>
fieldErrors
=
bindingResult
.
getFieldErrors
(
);
if
(
!
fieldErrors
.
isEmpty
(
))
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
())
;
}
Map
<
String
,
Object
>
result
=
statisticsService
.
issueCountByMonth
(
regionCode
.
toString
()
);
Map
<
String
,
Object
>
result
=
statisticsService
.
issueCountByMonth
(
dpFilterParamDto
);
return
ResponseHelper
.
buildResponse
(
result
);
}
...
...
@@ -161,7 +161,7 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-中屏-当前区域子区域数据统计"
)
@PostMapping
(
value
=
"/issueChildrenCityCountOld"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueChildrenCityCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
issueChildrenCityCount
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
...
...
@@ -186,12 +186,12 @@ public class AQZSDPStatisticsController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
value
=
"大屏-安全追溯-右屏-当年问题等级分类统计"
)
@PostMapping
(
value
=
"/issueProblemLevelCount"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
issueProblemLevelCount
(
@
RequestBody
Map
<
String
,
Object
>
map
)
{
Object
regionCode
=
map
.
get
(
"cityCode"
);
if
(
ObjectUtils
.
isEmpty
(
regionCode
))
{
regionCode
=
"610000"
;
public
ResponseModel
<
Map
<
String
,
Object
>>
issueProblemLevelCount
(
@
Validated
@RequestBody
DPFilterParamDto
dpFilterParamDto
,
BindingResult
bindingResult
)
throws
Exception
{
List
<
FieldError
>
fieldErrors
=
bindingResult
.
getFieldErrors
(
);
if
(
!
fieldErrors
.
isEmpty
(
))
{
throw
new
BadRequest
(
fieldErrors
.
get
(
0
).
getDefaultMessage
())
;
}
Map
<
String
,
Object
>
result
=
statisticsService
.
issueProblemLevelCount
(
regionCode
.
toString
()
);
Map
<
String
,
Object
>
result
=
statisticsService
.
issueProblemLevelCount
(
dpFilterParamDto
);
return
ResponseHelper
.
buildResponse
(
result
);
}
...
...
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 @
9b9dc441
...
...
@@ -467,7 +467,7 @@ public class AQZSDPStatisticsServiceImpl {
return
resultMap
;
}
public
Map
<
String
,
Object
>
issueCountByMonth
(
String
cityCode
)
{
public
Map
<
String
,
Object
>
issueCountByMonth
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Object
>
legendData
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
2
;
i
++)
{
...
...
@@ -482,7 +482,7 @@ public class AQZSDPStatisticsServiceImpl {
legendData
.
add
(
map
);
}
resultMap
.
put
(
"legendData"
,
legendData
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
()
);
Map
<
String
,
Object
>
allIssueMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
endIssueMap
=
new
HashMap
<>();
if
(
orgCode
!=
null
){
...
...
@@ -634,9 +634,9 @@ public class AQZSDPStatisticsServiceImpl {
return
statisticsMapper
.
issueMonthList
(
orgCode
,
time
);
}
public
Map
<
String
,
Object
>
issueProblemLevelCount
(
String
cityCode
)
{
public
Map
<
String
,
Object
>
issueProblemLevelCount
(
DPFilterParamDto
dpFilterParamDto
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
cityCode
);
String
orgCode
=
stCommonService
.
getAndSetOrgCode
(
dpFilterParamDto
.
getCityCode
()
);
String
time
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy"
));
Map
<
String
,
Long
>
problemLevelNumMap
=
new
LinkedHashMap
<>();
if
(
orgCode
!=
null
){
...
...
@@ -751,16 +751,17 @@ public class AQZSDPStatisticsServiceImpl {
});
}
List
<
Map
<
String
,
Object
>>
resultList
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
allList
.
size
();
i
++
)
{
for
(
Map
<
String
,
Object
>
stringObjectMap
:
allList
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
IssueTypeEnum
.
getNameByCode
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()));
map
.
put
(
"count"
,
allList
.
get
(
i
).
get
(
"count"
));
if
(
null
!=
endIssueDataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
()))
{
map
.
put
(
"rate"
,
new
DecimalFormat
(
"0.00"
).
format
(
Double
.
parseDouble
(
endIssueDataMap
.
get
(
allList
.
get
(
i
).
get
(
"problemTypeCode"
).
toString
())
+
""
)
/
(
Double
.
parseDouble
(
allList
.
get
(
i
).
get
(
"count"
)
+
""
))));
map
.
put
(
"name"
,
IssueTypeEnum
.
getNameByCode
(
stringObjectMap
.
get
(
"problemTypeCode"
).
toString
()));
map
.
put
(
"count"
,
stringObjectMap
.
get
(
"count"
));
if
(
null
!=
endIssueDataMap
.
get
(
stringObjectMap
.
get
(
"problemTypeCode"
).
toString
()))
{
map
.
put
(
"rate"
,
new
DecimalFormat
(
"0.00"
).
format
(
Double
.
parseDouble
(
endIssueDataMap
.
get
(
stringObjectMap
.
get
(
"problemTypeCode"
).
toString
())
+
""
)
/
(
Double
.
parseDouble
(
stringObjectMap
.
get
(
"count"
)
+
""
))));
}
else
{
map
.
put
(
"rate"
,
"0"
);
}
resultList
.
add
(
map
);
}
return
resultList
;
}
...
...
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