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
06a2b24f
Commit
06a2b24f
authored
Nov 10, 2023
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 td
parent
57ae2ad8
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
31 deletions
+37
-31
BigScreenAnalyseController.java
...dule/jxiop/biz/controller/BigScreenAnalyseController.java
+1
-1
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+8
-2
FanHealthIndex.xml
...iz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
+2
-2
FanHealthIndexDay.xml
...src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
+1
-1
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+24
-24
PvWarningRecord.xml
...z/src/main/resources/mapper/tdengine2/PvWarningRecord.xml
+1
-1
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 @
06a2b24f
...
...
@@ -45,7 +45,7 @@ import java.util.stream.Collectors;
@RestController
@Api
(
tags
=
"智能分析 - 大屏API"
)
@RequestMapping
(
value
=
"/
b
igScreenAnalyse"
)
@RequestMapping
(
value
=
"/
feiqiB
igScreenAnalyse"
)
public
class
BigScreenAnalyseController
extends
BaseController
{
@Autowired
...
...
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 @
06a2b24f
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
controller
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.text.CharSequenceUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -52,7 +53,7 @@ import static com.yeejoin.amos.boot.biz.common.utils.DateUtils.DATE_TIME_PATTERN
@RestController
@Api
(
tags
=
"智能分析 - 大屏API"
)
@RequestMapping
(
value
=
"/
tdB
igScreenAnalyse"
)
@RequestMapping
(
value
=
"/
b
igScreenAnalyse"
)
public
class
TDBigScreenAnalyseController
extends
BaseController
{
@Autowired
...
...
@@ -131,9 +132,14 @@ public class TDBigScreenAnalyseController extends BaseController {
List
<
Map
<
String
,
String
>>
dateInfoBy15
=
idxBizFanHealthIndexMapper
.
getDateInfoBy15
();
List
<
String
>
valueList
=
new
ArrayList
<>();
String
finalStationCode
=
stationCode
;
List
<
String
>
dateList
=
new
ArrayList
<>();
dateInfoBy15
.
forEach
(
item
->
{
String
healthListInfo
=
fanHealthIndexMapper
.
getInfoByDate
(
areaCode
,
finalStationCode
,
item
.
get
(
"date"
));
valueList
.
add
(
StrUtil
.
isNotEmpty
(
healthListInfo
)
?
healthListInfo
:
"100"
);
String
date
=
item
.
get
(
"date"
);
Date
date1
=
DateUtils
.
dateAddDays
(
DateUtil
.
parse
(
date
,
DateUtils
.
DATE_PATTERN
),
-
1
);
String
format
=
DateUtil
.
format
(
date1
,
DateUtils
.
DATE_PATTERN
);
dateList
.
add
(
format
);
});
...
...
@@ -141,7 +147,7 @@ public class TDBigScreenAnalyseController extends BaseController {
HashMap
<
String
,
Object
>
stringStringHashMap
=
new
HashMap
<>();
stringStringHashMap
.
put
(
"data"
,
valueList
);
arrayList
.
add
(
stringStringHashMap
);
resultMap
.
put
(
"axisData"
,
date
InfoBy15
);
resultMap
.
put
(
"axisData"
,
date
List
);
resultMap
.
put
(
"seriesData"
,
arrayList
);
return
ResponseHelper
.
buildResponse
(
resultMap
);
}
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndex.xml
View file @
06a2b24f
...
...
@@ -343,7 +343,7 @@
<where>
rec_date = concat(#{date}, ' 00:00:00')
<if
test=
"areaCode != null and areaCode != ''"
>
AND area
like concat('%', #{areaCode}, '%
')
AND area
= concat(#{areaCode}, '区域
')
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
...
...
@@ -364,7 +364,7 @@
<where>
rec_date = concat(#{date}, ' 00:00:00')
<if
test=
"areaCode != null and areaCode != ''"
>
AND area
like concat('%', #{areaCode}, '%
')
AND area
= concat(#{areaCode}, '区域
')
AND analysis_obj_type = '片区'
</if>
<if
test=
"stationCode != null and stationCode != ''"
>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanHealthIndexDay.xml
View file @
06a2b24f
...
...
@@ -4,7 +4,7 @@
<select
id=
"getHealthInfoByArea"
resultType=
"java.util.Map"
>
select area as area,
ceil(avg(a.avghealthindex)) as health
i
ndex
ceil(avg(a.avghealthindex)) as health
I
ndex
from (
select avg(health_index) as avghealthindex,
area
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
06a2b24f
...
...
@@ -290,27 +290,27 @@
analysis_data.fan_warning_record
) a
<where>
(a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.
disposotiondate
>( now()- 3d - 8h ))
(a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.
ts
>( now()- 3d - 8h ))
<if
test=
"arae != '' and arae != null"
>
and a.arae
like concat('%', #{arae}, '%
')
and a.arae
= concat(#{area}, '区域
')
</if>
<if
test=
"station != '' and station != null"
>
and a.station = #{station}
</if>
<if
test=
"station
type != '' and stationt
ype != null"
>
and a.stationtype = #{station
t
ype}
<if
test=
"station
Type != '' and stationT
ype != null"
>
and a.stationtype = #{station
T
ype}
</if>
<if
test=
"warning
name != '' and warningn
ame != null"
>
and a.warning
name = #{warningn
ame}
<if
test=
"warning
Name != '' and warningN
ame != null"
>
and a.warning
_name = #{warningN
ame}
</if>
<if
test=
"station
id != '' and stationi
d != null"
>
and a.gateway_id = #{station
i
d}
<if
test=
"station
Id != '' and stationI
d != null"
>
and a.gateway_id = #{station
I
d}
</if>
<if
test=
"start
date != '' and startd
ate != null"
>
and a.recdate >= concat(#{start
d
ate}, ' 00:00:00')
<if
test=
"start
Date != '' and startD
ate != null"
>
and a.recdate >= concat(#{start
D
ate}, ' 00:00:00')
</if>
<if
test=
"end
date != '' and endd
ate != null"
>
and concat(#{end
d
ate}, ' 23:59:59') >= a.recdate
<if
test=
"end
Date != '' and endD
ate != null"
>
and concat(#{end
D
ate}, ' 23:59:59') >= a.recdate
</if>
</where>
order by sort desc, recdate desc
...
...
@@ -352,27 +352,27 @@
analysis_data.fan_warning_record
) a
<where>
a.disposotionstate = '未处置' or (a.disposotionstate = '已处置' and a.
disposotiondate
> ( now() - 3D - 8h ))
a.disposotionstate = '未处置' or (a.disposotionstate = '已处置' and a.
ts
> ( now() - 3D - 8h ))
<if
test=
"arae != '' and arae != null"
>
and a.arae
like concat('%', #{arae}, '%
')
and a.arae
= concat(#{area}, '区域
')
</if>
<if
test=
"station != '' and station != null"
>
and a.station = #{station}
</if>
<if
test=
"station
type != '' and stationt
ype != null"
>
and a.stationtype = #{station
t
ype}
<if
test=
"station
Type != '' and stationT
ype != null"
>
and a.stationtype = #{station
T
ype}
</if>
<if
test=
"warning
name != '' and warningn
ame != null"
>
and a.warning
name = #{warningn
ame}
<if
test=
"warning
Name != '' and warningN
ame != null"
>
and a.warning
_name = #{warningN
ame}
</if>
<if
test=
"station
id != '' and stationi
d != null"
>
and a.gateway_id = #{station
i
d}
<if
test=
"station
Id != '' and stationI
d != null"
>
and a.gateway_id = #{station
I
d}
</if>
<if
test=
"start
date != '' and startd
ate != null"
>
and a.recdate >= concat(#{start
d
ate}, ' 00:00:00')
<if
test=
"start
Date != '' and startD
ate != null"
>
and a.recdate >= concat(#{start
D
ate}, ' 00:00:00')
</if>
<if
test=
"end
date != '' and endd
ate != null"
>
and concat(#{end
d
ate}, ' 23:59:59') >= a.recdate
<if
test=
"end
Date != '' and endD
ate != null"
>
and concat(#{end
D
ate}, ' 23:59:59') >= a.recdate
</if>
</where>
) b
</select>
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/PvWarningRecord.xml
View file @
06a2b24f
...
...
@@ -256,7 +256,7 @@
count(1) as num
from analysis_data.pv_warning_record a
where (a.disposotion_state = '未处置')
or (a.disposotion_state = '已处置' and a.
disposotion_date
>(now()-3d -8h ))
or (a.disposotion_state = '已处置' and a.
ts
>(now()-3d -8h ))
group by arae,
warning_name
...
...
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