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
3498e484
Commit
3498e484
authored
Nov 14, 2023
by
wujiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加全域指数接口
parent
d3916a30
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
129 additions
and
12 deletions
+129
-12
CommonConstans.java
.../amos/boot/module/jxiop/biz/constants/CommonConstans.java
+6
-0
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+0
-0
IdxBizFanHealthIndexMapper.java
.../module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
+0
-0
FanHealthIndexMapper.java
...boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
+5
-1
IdxBizFanHealthIndexMapper.xml
...n/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
+0
-0
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+118
-11
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/constants/CommonConstans.java
View file @
3498e484
...
...
@@ -129,4 +129,10 @@ public class CommonConstans {
put
(
"按天"
,
DatePattern
.
NORM_DATE_PATTERN
);
}
};
public
static
final
String
ANALYSE_TYPE_MOMENT
=
"按时刻"
;
public
static
final
String
ANALYSE_TYPE_HOUR
=
"按小时"
;
public
static
final
String
ANALYSE_TYPE_DAY
=
"按天"
;
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/TDBigScreenAnalyseController.java
View file @
3498e484
This source diff could not be displayed because it is too large. You can
view the blob
instead.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/mapper2/IdxBizFanHealthIndexMapper.java
View file @
3498e484
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexMapper.java
View file @
3498e484
...
...
@@ -95,5 +95,9 @@ public interface FanHealthIndexMapper extends BaseMapper<FanHealthIndex> {
List
<
Map
<
String
,
Object
>>
getWarningInfoBySubSystemTd
(
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"gatewayId"
)
String
gatewayId
);
String
getInfoByDate
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"date"
)
String
date
);
List
<
Map
<
String
,
Object
>>
getInfoByDate
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
getInfoByHour
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
List
<
Map
<
String
,
Object
>>
getInfoByMoment
(
@Param
(
"areaCode"
)
String
areaCode
,
@Param
(
"stationCode"
)
String
stationCode
,
@Param
(
"list"
)
List
<
String
>
list
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/cluster/IdxBizFanHealthIndexMapper.xml
View file @
3498e484
This diff is collapsed.
Click to expand it.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
3498e484
...
...
@@ -334,14 +334,18 @@
group by point_name
</select>
<select
id=
"getInfoByDate"
resultType=
"java.
lang.String
"
>
select
ceil(avg(b.health_index)) as healthIndex
from
<select
id=
"getInfoByDate"
resultType=
"java.
util.Map
"
>
select
avg(b.health_index) as healthIndex,b.rec_date AS recDate
from
(SELECT
health_index
health_index,
rec_date
FROM
pv_health_index_day
<where>
rec_date = concat(#{date}, ' 00:00:00')
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
...
...
@@ -357,12 +361,15 @@
UNION ALL
(
SELECT
health_index
health_index,
rec_date
FROM
fan_health_index_day
<where>
rec_date = concat(#{date}, ' 00:00:00')
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
...
...
@@ -375,10 +382,110 @@
AND analysis_obj_type = '片区'
</if>
</where>
)) b
)) b GROUP BY b.rec_date
</select>
<select
id=
"getInfoByHour"
resultType=
"java.util.Map"
>
select avg(b.health_index) as healthIndex,b.rec_date AS recDate from
(SELECT
health_index,
rec_date
FROM
pv_health_index_hour
<where>
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND gateway_id = #{stationCode}
AND analysis_obj_type = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND analysis_obj_type = '片区'
</if>
</where>
UNION ALL
(
SELECT
health_index,
rec_date
FROM
fan_health_index_hour
<where>
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND gateway_id = #{stationCode}
AND analysis_obj_type = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND analysis_obj_type = '片区'
</if>
</where>
)) b GROUP BY b.rec_date
</select>
<select
id=
"getInfoByMoment"
resultType=
"java.util.Map"
>
select avg(b.health_index) as healthIndex,b.rec_date AS recDate from
(SELECT
health_index,
rec_date
FROM
pv_health_index_moment
<where>
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND gateway_id = #{stationCode}
AND analysis_obj_type = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND analysis_obj_type = '片区'
</if>
</where>
UNION ALL
(
SELECT
health_index,
rec_date
FROM
fan_health_index_moment
<where>
rec_date IN
<foreach
collection=
"list"
separator=
","
item=
"item"
index=
"index"
open=
"("
close=
")"
>
#{item}
</foreach>
<if
test=
"areaCode != null and areaCode != ''"
>
AND area like #{areaCode}
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
AND gateway_id = #{stationCode}
AND analysis_obj_type = '场站'
</if>
<if
test=
"(stationCode == null or stationCode == '') and (areaCode == null or areaCode == '')"
>
AND analysis_obj_type = '片区'
</if>
</where>
)) b GROUP BY b.rec_date
</select>
<select
id=
"getInfoListByGroupByQgFan"
resultType=
"com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanHealthIndex"
>
...
...
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