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
e4e6fb28
Commit
e4e6fb28
authored
Nov 10, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改sql问题
parent
06a2b24f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
32 deletions
+32
-32
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+32
-32
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
e4e6fb28
...
...
@@ -253,17 +253,17 @@
from
(
select
rec_date as rec
d
ate,
rec_date as rec
D
ate,
station as station,
equipment_name as equipment
n
ame,
equipment_name as equipment
N
ame,
content as content,
warning_name as warning
n
ame,
disposotion_state as disposotion
s
tate,
warning_name as warning
N
ame,
disposotion_state as disposotion
S
tate,
arae as arae,
'pv' as station
t
ype,
'pv' as station
T
ype,
gateway_id,
concat(point_name, '异常') as point
n
ame,
disposotion_date as disposotion
d
ate,
concat(point_name, '异常') as point
N
ame,
disposotion_date as disposotion
D
ate,
(case when warning_name = '注意' then 1
when warning_name = '警告' then 2
when warning_name = '危险' then 3
...
...
@@ -271,17 +271,17 @@
from
analysis_data.pv_warning_record union all
select
rec_date as rec
d
ate,
rec_date as rec
D
ate,
station as station,
equipment_name as equipment
n
ame,
equipment_name as equipment
N
ame,
content as content,
warning_name as warning
n
ame,
disposotion_state as disposotion
s
tate,
warning_name as warning
N
ame,
disposotion_state as disposotion
S
tate,
arae as arae,
'fan' as station
t
ype,
'fan' as station
T
ype,
gateway_id,
concat(point_name, '异常') as point
n
ame,
disposotion_date as disposotion
d
ate,
concat(point_name, '异常') as point
N
ame,
disposotion_date as disposotion
D
ate,
(case when warning_name = '注意' then 1
when warning_name = '警告' then 2
when warning_name = '危险' then 3
...
...
@@ -307,13 +307,13 @@
and a.gateway_id = #{stationId}
</if>
<if
test=
"startDate != '' and startDate != null"
>
and a.rec
d
ate >= concat(#{startDate}, ' 00:00:00')
and a.rec
D
ate >= concat(#{startDate}, ' 00:00:00')
</if>
<if
test=
"endDate != '' and endDate != null"
>
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
</where>
order by sort desc, rec
d
ate desc
order by sort desc, rec
D
ate desc
limit #{current}, #{size}
</select>
...
...
@@ -325,34 +325,34 @@
from
(
select
rec_date as rec
d
ate,
rec_date as rec
D
ate,
station as station,
equipment_name as equipment
n
ame,
equipment_name as equipment
N
ame,
content as content,
warning_name as warning
n
ame,
disposotion_state as disposotion
s
tate,
warning_name as warning
N
ame,
disposotion_state as disposotion
S
tate,
arae as arae,
'pv' as station
t
ype,
'pv' as station
T
ype,
gateway_id,
disposotion_date as disposotion
d
ate
disposotion_date as disposotion
D
ate
from
analysis_data.pv_warning_record union all
select
rec_date as rec
d
ate,
rec_date as rec
F
ate,
station as station,
equipment_name as equipment
n
ame,
equipment_name as equipment
N
ame,
content as content,
warning_name as warning
n
ame,
disposotion_state as disposotion
s
tate,
warning_name as warning
N
ame,
disposotion_state as disposotion
S
tate,
arae as arae,
'fan' as station
t
ype,
'fan' as station
T
ype,
gateway_id,
disposotion_date as disposotion
d
ate
disposotion_date as disposotion
D
ate
from
analysis_data.fan_warning_record
) a
<where>
a.disposotion
state = '未处置' or (a.disposotions
tate = '已处置' and a.ts > ( now() - 3D - 8h ))
a.disposotion
State = '未处置' or (a.disposotionS
tate = '已处置' and a.ts > ( now() - 3D - 8h ))
<if
test=
"arae != '' and arae != null"
>
and a.arae = concat(#{area}, '区域')
</if>
...
...
@@ -360,7 +360,7 @@
and a.station = #{station}
</if>
<if
test=
"stationType != '' and stationType != null"
>
and a.station
t
ype = #{stationType}
and a.station
T
ype = #{stationType}
</if>
<if
test=
"warningName != '' and warningName != null"
>
and a.warning_name = #{warningName}
...
...
@@ -369,7 +369,7 @@
and a.gateway_id = #{stationId}
</if>
<if
test=
"startDate != '' and startDate != null"
>
and a.rec
d
ate >= concat(#{startDate}, ' 00:00:00')
and a.rec
D
ate >= concat(#{startDate}, ' 00:00:00')
</if>
<if
test=
"endDate != '' and endDate != null"
>
and concat(#{endDate}, ' 23:59:59') >= a.recdate
...
...
@@ -482,7 +482,7 @@
)) b
<where>
<if
test=
"stationType != '' and stationType != null"
>
and b.station
t
ype = #{stationType}
and b.station
T
ype = #{stationType}
</if>
<if
test=
"araeCode != '' and araeCode != null"
>
and b.arae = #{araeCode}
...
...
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