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
fb2aafe4
Commit
fb2aafe4
authored
Sep 21, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分析需求API
parent
ec3b3c7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
18 deletions
+37
-18
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+13
-6
IdxBizFanWarningRecordMapper.java
...odule/jxiop/biz/mapper2/IdxBizFanWarningRecordMapper.java
+4
-2
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+2
-2
IdxBizFanWarningRecordMapper.xml
...resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
+18
-8
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/BigScreenAnalyseController.java
View file @
fb2aafe4
...
...
@@ -172,9 +172,16 @@ public class BigScreenAnalyseController extends BaseController {
@RequestParam
(
value
=
"stationType"
,
required
=
false
)
String
stationType
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
,
@RequestParam
(
value
=
"warningName"
,
required
=
false
)
String
warningName
)
{
Integer
count
=
idxBizFanWarningRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
);
List
<
IdxBizFanWarningRecord
>
idxBizFanWarningRecordIPage
=
idxBizFanWarningRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
);
@RequestParam
(
value
=
"warningName"
,
required
=
false
)
String
warningName
,
@RequestParam
(
value
=
"stationId"
,
required
=
false
)
String
stationId
)
{
if
(
StrUtil
.
isNotEmpty
(
stationId
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
stationId
=
stationBasic
.
getFanGatewayId
();
}
Integer
count
=
idxBizFanWarningRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
,
stationId
);
List
<
IdxBizFanWarningRecord
>
idxBizFanWarningRecordIPage
=
idxBizFanWarningRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
,
stationId
);
Page
<
IdxBizFanWarningRecord
>
idxBizFanWarningRecordPage
=
new
Page
<>(
current
,
size
);
idxBizFanWarningRecordPage
.
setRecords
(
idxBizFanWarningRecordIPage
);
idxBizFanWarningRecordPage
.
setTotal
(
count
);
...
...
@@ -240,10 +247,10 @@ public class BigScreenAnalyseController extends BaseController {
List
<
StationBasic
>
stationBasics
=
stationBasicMapper
.
selectList
(
new
LambdaQueryWrapper
<
StationBasic
>().
eq
(
StationBasic:
:
getAreaName
,
areaCode
));
List
<
StationBasic
>
stationBasics
=
stationBasicMapper
.
selectList
(
new
LambdaQueryWrapper
<
StationBasic
>().
like
(
StationBasic:
:
getAreaName
,
areaCode
));
List
<
String
>
list
=
stationBasics
.
stream
().
map
(
StationBasic:
:
getStationName
).
collect
(
Collectors
.
toList
());
List
<
Object
>
seriesData
=
new
ArrayList
<>();
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
new
BigDecimal
(
"0"
))));
list
.
forEach
(
item
->
seriesData
.
add
(
collect
.
getOrDefault
(
item
,
new
BigDecimal
(
"
10
0"
))));
resultMap
.
put
(
"axisData"
,
list
);
resultMap
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
...
...
@@ -257,7 +264,7 @@ public class BigScreenAnalyseController extends BaseController {
public
ResponseModel
<
Map
<
String
,
Object
>>
assessIndexRadarMap
(
@RequestParam
(
required
=
false
,
value
=
"stationCode"
)
String
stationCode
)
{
if
(
StrUtil
.
isNotEmpty
(
stationCode
))
{
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationCode
);
stationCode
=
stationBasic
.
get
StationName
();
stationCode
=
stationBasic
.
get
BoosterGatewayId
();
}
List
<
Map
<
String
,
Object
>>
list
=
idxBizFanHealthIndexMapper
.
equipWarningRadarMap
(
stationCode
);
HashMap
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanWarningRecordMapper.java
View file @
fb2aafe4
...
...
@@ -19,10 +19,12 @@ public interface IdxBizFanWarningRecordMapper extends BaseMapper<IdxBizFanWarnin
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"warningName"
)
String
warningName
);
@Param
(
"warningName"
)
String
warningName
,
@Param
(
"stationId"
)
String
stationId
);
Integer
getEquipWarningInfoByPageCount
(
@Param
(
"arae"
)
String
arae
,
@Param
(
"station"
)
String
station
,
@Param
(
"stationType"
)
String
stationType
,
@Param
(
"warningName"
)
String
warningName
);
@Param
(
"warningName"
)
String
warningName
,
@Param
(
"stationId"
)
String
stationId
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
fb2aafe4
...
...
@@ -230,7 +230,7 @@
idx_biz_fan_warning_record
<where>
<if
test=
"stationCode != null and stationCode != ''"
>
station
= #{stationCode}
GATEWAY_ID
= #{stationCode}
</if>
</where>
UNION ALL
...
...
@@ -240,7 +240,7 @@
idx_biz_pv_warning_record
<where>
<if
test=
"stationCode != null and stationCode != ''"
>
station
= #{stationCode}
GATEWAY_ID
= #{stationCode}
</if>
</where>
) a
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanWarningRecordMapper.xml
View file @
fb2aafe4
...
...
@@ -16,7 +16,8 @@
WARNING_NAME AS warningName,
DISPOSOTION_STATE AS disposotionState,
ARAE AS arae,
'pv' AS stationType
'pv' AS stationType,
GATEWAY_ID
FROM
idx_biz_pv_warning_record UNION ALL
SELECT
...
...
@@ -27,13 +28,14 @@
WARNING_NAME AS warningName,
DISPOSOTION_STATE AS disposotionState,
ARAE AS arae,
'fan' AS stationType
'fan' AS stationType,
GATEWAY_ID
FROM
idx_biz_fan_warning_record
) a
<where>
<if
test=
"arae != '' and arae != null"
>
AND a.arae
= #{arae}
AND a.arae
like concat('%', #{arae}, '%')
</if>
<if
test=
"station != '' and station != null"
>
AND a.station = #{station}
...
...
@@ -42,7 +44,10 @@
AND a.stationType = #{stationType}
</if>
<if
test=
"warningName != '' and warningName != null"
>
AND a.WARNING_NAME = #{warningName}
AND a.warningName = #{warningName}
</if>
<if
test=
"stationId != '' and stationId != null"
>
AND a.GATEWAY_ID = #{stationId}
</if>
</where>
limit #{current}, #{size}
...
...
@@ -61,7 +66,8 @@
WARNING_NAME AS warningName,
DISPOSOTION_STATE AS disposotionState,
ARAE AS arae,
'pv' AS stationType
'pv' AS stationType,
GATEWAY_ID
FROM
idx_biz_pv_warning_record UNION ALL
SELECT
...
...
@@ -72,13 +78,14 @@
WARNING_NAME AS warningName,
DISPOSOTION_STATE AS disposotionState,
ARAE AS arae,
'fan' AS stationType
'fan' AS stationType,
GATEWAY_ID
FROM
idx_biz_fan_warning_record
) a
<where>
<if
test=
"arae != '' and arae != null"
>
AND a.arae like concat('%', #{ar
eaCod
e}, '%')
AND a.arae like concat('%', #{ar
a
e}, '%')
</if>
<if
test=
"station != '' and station != null"
>
AND a.station = #{station}
...
...
@@ -87,7 +94,10 @@
AND a.stationType = #{stationType}
</if>
<if
test=
"warningName != '' and warningName != null"
>
AND a.WARNING_NAME = #{warningName}
AND a.warningName = #{warningName}
</if>
<if
test=
"stationId != '' and stationId != null"
>
AND a.GATEWAY_ID = #{stationId}
</if>
</where>
</select>
...
...
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