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
942dfb9a
Commit
942dfb9a
authored
Nov 10, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
b2eadd7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
29 deletions
+36
-29
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+5
-5
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+31
-24
No files found.
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 @
942dfb9a
...
@@ -168,11 +168,11 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -168,11 +168,11 @@ public class TDBigScreenAnalyseController extends BaseController {
HashMap
<
String
,
Integer
>
zyMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
zyMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
jgMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
jgMap
=
new
HashMap
<>();
allEquipAlarmInfo
.
forEach
(
item
->
{
allEquipAlarmInfo
.
forEach
(
item
->
{
if
(
"危险"
.
equals
(
item
.
get
(
"warning
N
ame"
)))
{
if
(
"危险"
.
equals
(
item
.
get
(
"warning
n
ame"
)))
{
wxMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
wxMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
}
else
if
(
"注意"
.
equals
(
item
.
get
(
"warning
N
ame"
)))
{
}
else
if
(
"注意"
.
equals
(
item
.
get
(
"warning
n
ame"
)))
{
zyMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
zyMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
}
else
if
(
"警告"
.
equals
(
item
.
get
(
"warning
N
ame"
)))
{
}
else
if
(
"警告"
.
equals
(
item
.
get
(
"warning
n
ame"
)))
{
jgMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
jgMap
.
put
(
item
.
get
(
"area"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
}
}
});
});
...
@@ -405,7 +405,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -405,7 +405,7 @@ public class TDBigScreenAnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"片区设备预警统计分析 - 右下角柱状图 "
,
notes
=
"片区设备预警统计分析 - 右下角柱状图 "
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"片区设备预警统计分析 - 右下角柱状图 "
,
notes
=
"片区设备预警统计分析 - 右下角柱状图 "
)
@GetMapping
(
value
=
"/getAllEquipAlarmInfoAnalysis"
)
@GetMapping
(
value
=
"/getAllEquipAlarmInfoAnalysis"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysis
(
@RequestParam
(
required
=
false
)
String
stationType
,
public
ResponseModel
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysis
(
@RequestParam
(
required
=
false
)
String
stationType
,
@RequestParam
(
required
=
false
)
String
ar
ae
Code
)
{
@RequestParam
(
required
=
false
)
String
ar
ea
Code
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
allEquipAlarmInfo
=
new
ArrayList
<>();
List
<
Map
<
String
,
Object
>>
allEquipAlarmInfo
=
new
ArrayList
<>();
if
(
CharSequenceUtil
.
isNotEmpty
(
stationType
))
{
if
(
CharSequenceUtil
.
isNotEmpty
(
stationType
))
{
...
@@ -415,7 +415,7 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -415,7 +415,7 @@ public class TDBigScreenAnalyseController extends BaseController {
stationType
=
"光伏"
;
stationType
=
"光伏"
;
}
}
}
}
allEquipAlarmInfo
=
fanWaringRecordMapper
.
getAllEquipAlarmInfoAnalysisByArea
(
ar
ae
Code
,
stationType
);
allEquipAlarmInfo
=
fanWaringRecordMapper
.
getAllEquipAlarmInfoAnalysisByArea
(
ar
ea
Code
,
stationType
);
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
List
<
Integer
>
jgList
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
942dfb9a
...
@@ -253,6 +253,7 @@
...
@@ -253,6 +253,7 @@
from
from
(
(
select
select
ts,
rec_date as recDate,
rec_date as recDate,
station as station,
station as station,
equipment_name as equipmentName,
equipment_name as equipmentName,
...
@@ -271,6 +272,7 @@
...
@@ -271,6 +272,7 @@
from
from
analysis_data.pv_warning_record union all
analysis_data.pv_warning_record union all
select
select
ts,
rec_date as recDate,
rec_date as recDate,
station as station,
station as station,
equipment_name as equipmentName,
equipment_name as equipmentName,
...
@@ -290,7 +292,7 @@
...
@@ -290,7 +292,7 @@
analysis_data.fan_warning_record
analysis_data.fan_warning_record
) a
) a
<where>
<where>
(a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.ts >( now()- 3d - 8h
))
( (a.disposotionstate = '未处置') or (a.disposotionstate = '已处置' and a.ts >( now()- 3d - 8h )
))
<if
test=
"arae != '' and arae != null"
>
<if
test=
"arae != '' and arae != null"
>
and a.arae = concat(#{area}, '区域')
and a.arae = concat(#{area}, '区域')
</if>
</if>
...
@@ -326,6 +328,7 @@
...
@@ -326,6 +328,7 @@
(
(
select
select
rec_date as recDate,
rec_date as recDate,
ts,
station as station,
station as station,
equipment_name as equipmentName,
equipment_name as equipmentName,
content as content,
content as content,
...
@@ -339,6 +342,7 @@
...
@@ -339,6 +342,7 @@
analysis_data.pv_warning_record union all
analysis_data.pv_warning_record union all
select
select
rec_date as recFate,
rec_date as recFate,
ts,
station as station,
station as station,
equipment_name as equipmentName,
equipment_name as equipmentName,
content as content,
content as content,
...
@@ -352,28 +356,31 @@
...
@@ -352,28 +356,31 @@
analysis_data.fan_warning_record
analysis_data.fan_warning_record
) a
) a
<where>
<where>
a.disposotionState = '未处置' or (a.disposotionState = '已处置' and a.ts > ( now() - 3D - 8h ))
( a.disposotionState = '未处置'
<if
test=
"arae != '' and arae != null"
>
or (a.disposotionState = '已处置' and a.ts > ( now() - 3D - 8h )))
and a.arae = concat(#{area}, '区域')
<if
test=
"arae != '' and arae != null"
>
</if>
and a.arae = concat(#{area}, '区域')
<if
test=
"station != '' and station != null"
>
</if>
and a.station = #{station}
<if
test=
"station != '' and station != null"
>
</if>
and a.station = #{station}
<if
test=
"stationType != '' and stationType != null"
>
</if>
and a.stationType = #{stationType}
<if
test=
"stationType != '' and stationType != null"
>
</if>
and a.stationType = #{stationType}
<if
test=
"warningName != '' and warningName != null"
>
</if>
and a.warning_name = #{warningName}
<if
test=
"warningName != '' and warningName != null"
>
</if>
and a.warning_name = #{warningName}
<if
test=
"stationId != '' and stationId != null"
>
</if>
and a.gateway_id = #{stationId}
<if
test=
"stationId != '' and stationId != null"
>
</if>
and a.gateway_id = #{stationId}
<if
test=
"startDate != '' and startDate != null"
>
</if>
and a.recDate >= concat(#{startDate}, ' 00:00:00')
<if
test=
"startDate != '' and startDate != null"
>
</if>
and a.recDate >= concat(#{startDate}, ' 00:00:00')
<if
test=
"endDate != '' and endDate != null"
>
</if>
and concat(#{endDate}, ' 23:59:59') >= a.recdate
<if
test=
"endDate != '' and endDate != null"
>
</if>
and concat(#{endDate}, ' 23:59:59') >= a.recdate
</if>
</where>
) b
</where>
) b
</select>
</select>
...
@@ -488,6 +495,6 @@
...
@@ -488,6 +495,6 @@
and b.arae = #{araeCode}
and b.arae = #{araeCode}
</if>
</if>
</where>
</where>
order by b.`sort`
desc
order by b.`sort`
ASC
</select>
</select>
</mapper>
</mapper>
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