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
d6d5554b
Commit
d6d5554b
authored
Nov 10, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改代码
parent
a4a79c73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
51 additions
and
8 deletions
+51
-8
TDBigScreenAnalyseController.java
...le/jxiop/biz/controller/TDBigScreenAnalyseController.java
+16
-5
FanWaringRecordMapper.java
...oot/module/jxiop/biz/tdMapper2/FanWaringRecordMapper.java
+1
-0
FanWarningRecord.xml
.../src/main/resources/mapper/tdengine2/FanWarningRecord.xml
+34
-3
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 @
d6d5554b
...
@@ -277,6 +277,8 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -277,6 +277,8 @@ public class TDBigScreenAnalyseController extends BaseController {
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
StationBasic
stationBasic
=
stationBasicMapper
.
selectById
(
stationId
);
stationId
=
stationBasic
.
getFanGatewayId
();
stationId
=
stationBasic
.
getFanGatewayId
();
}
}
if
(
arae
!=
null
)
{
arae
=
"%"
+
arae
+
"%"
;
}
Integer
count
=
fanWaringRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
,
stationId
,
startDate
,
endDate
);
Integer
count
=
fanWaringRecordMapper
.
getEquipWarningInfoByPageCount
(
arae
,
station
,
stationType
,
warningName
,
stationId
,
startDate
,
endDate
);
// List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, (current - 1) * size, size, warningName, stationId, startDate, endDate);
// List<IdxBizFanWarningRecord> idxBizFanWarningRecordIPage = idxBizFanWarningRecordMapper.getEquipWarningInfoByPage(arae, station, stationType, (current - 1) * size, size, warningName, stationId, startDate, endDate);
List
<
FanWarningRecord
>
idxBizFanWarningRecordIPage
=
fanWaringRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
,
stationId
,
startDate
,
endDate
);
List
<
FanWarningRecord
>
idxBizFanWarningRecordIPage
=
fanWaringRecordMapper
.
getEquipWarningInfoByPage
(
arae
,
station
,
stationType
,
(
current
-
1
)
*
size
,
size
,
warningName
,
stationId
,
startDate
,
endDate
);
...
@@ -291,19 +293,23 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -291,19 +293,23 @@ public class TDBigScreenAnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"各场站设备预警情况(条) "
,
notes
=
"各场站设备预警情况(条) "
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"各场站设备预警情况(条) "
,
notes
=
"各场站设备预警情况(条) "
)
@GetMapping
(
value
=
"/getAllEquipAlarmInfoByStation"
)
@GetMapping
(
value
=
"/getAllEquipAlarmInfoByStation"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoByStation
()
{
public
ResponseModel
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoByStation
(
String
area
)
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
List
<
Map
<
String
,
Object
>>
allEquipAlarmInfo
=
idxBizFanHealthIndexMapper
.
getAllEquipAlarmInfoByStation
();
// List<Map<String, Object>> allEquipAlarmInfo = idxBizFanHealthIndexMapper.getAllEquipAlarmInfoByStation();
if
(
StrUtil
.
isNotEmpty
(
area
)
){
area
=
"%"
+
area
+
"%"
;
}
List
<
Map
<
String
,
Object
>>
allEquipAlarmInfo
=
fanWaringRecordMapper
.
getAllEquipAlarmInfoByStation
(
area
);
HashMap
<
String
,
Integer
>
wxMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
wxMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
zyMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
zyMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
jgMap
=
new
HashMap
<>();
HashMap
<
String
,
Integer
>
jgMap
=
new
HashMap
<>();
LinkedHashSet
<
String
>
list
=
new
LinkedHashSet
<>();
LinkedHashSet
<
String
>
list
=
new
LinkedHashSet
<>();
allEquipAlarmInfo
.
forEach
(
item
->
{
allEquipAlarmInfo
.
forEach
(
item
->
{
if
(
"危险"
.
equals
(
item
.
get
(
"warning
N
ame"
)))
{
if
(
"危险"
.
equals
(
item
.
get
(
"warning
n
ame"
)))
{
wxMap
.
put
(
item
.
get
(
"station"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
wxMap
.
put
(
item
.
get
(
"station"
).
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
(
"station"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
zyMap
.
put
(
item
.
get
(
"station"
).
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
(
"station"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
jgMap
.
put
(
item
.
get
(
"station"
).
toString
(),
Integer
.
parseInt
(
item
.
get
(
"num"
).
toString
()));
}
}
list
.
add
(
item
.
get
(
"station"
).
toString
());
list
.
add
(
item
.
get
(
"station"
).
toString
());
...
@@ -415,6 +421,11 @@ public class TDBigScreenAnalyseController extends BaseController {
...
@@ -415,6 +421,11 @@ public class TDBigScreenAnalyseController extends BaseController {
stationType
=
"光伏"
;
stationType
=
"光伏"
;
}
}
}
}
if
(
areaCode
!=
null
){
areaCode
=
"%"
+
areaCode
+
"%"
;
}
allEquipAlarmInfo
=
fanWaringRecordMapper
.
getAllEquipAlarmInfoAnalysisByArea
(
areaCode
,
stationType
);
allEquipAlarmInfo
=
fanWaringRecordMapper
.
getAllEquipAlarmInfoAnalysisByArea
(
areaCode
,
stationType
);
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
wxList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
List
<
Integer
>
zyList
=
new
ArrayList
<>();
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanWaringRecordMapper.java
View file @
d6d5554b
...
@@ -46,4 +46,5 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
...
@@ -46,4 +46,5 @@ public interface FanWaringRecordMapper extends BaseMapper<FanWarningRecord> {
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysisByArea
(
String
araeCode
,
String
stationType
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoAnalysisByArea
(
String
araeCode
,
String
stationType
);
List
<
Map
<
String
,
Object
>>
getAllEquipAlarmInfoByStation
(
String
area
);
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/resources/mapper/tdengine2/FanWarningRecord.xml
View file @
d6d5554b
...
@@ -294,7 +294,7 @@
...
@@ -294,7 +294,7 @@
<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
like #{arae}
</if>
</if>
<if
test=
"station != '' and station != null"
>
<if
test=
"station != '' and station != null"
>
and a.station = #{station}
and a.station = #{station}
...
@@ -359,7 +359,7 @@
...
@@ -359,7 +359,7 @@
( a.disposotionState = '未处置'
( a.disposotionState = '未处置'
or (a.disposotionState = '已处置' and a.ts > ( now() - 3D - 8h )))
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
like #{arae}
</if>
</if>
<if
test=
"station != '' and station != null"
>
<if
test=
"station != '' and station != null"
>
and a.station = #{station}
and a.station = #{station}
...
@@ -492,9 +492,40 @@
...
@@ -492,9 +492,40 @@
and b.stationType = #{stationType}
and b.stationType = #{stationType}
</if>
</if>
<if
test=
"araeCode != '' and araeCode != null"
>
<if
test=
"araeCode != '' and araeCode != null"
>
and b.arae
=
#{araeCode}
and b.arae
like
#{araeCode}
</if>
</if>
</where>
</where>
order by b.`sort` ASC
order by b.`sort` ASC
</select>
</select>
<select
id=
"getAllEquipAlarmInfoByStation"
resultType=
"map"
>
select * from
( select arae as area,
warning_name as warningname,
count(1) as num,
station
from analysis_data.fan_warning_record a
where (a.disposotion_state = '未处置')
or (a.disposotion_state = '已处置' and a.ts >(now()-3d -8h ))
group by arae,
warning_name,station
union all
select arae as area,
warning_name as warningname,
count(1) as num,
station
from analysis_data.pv_warning_record a
where (a.disposotion_state = '未处置')
or (a.disposotion_state = '已处置' and a.ts >(now()-3d -8h ))
group by arae,
warning_name,station ) b
<where>
<if
test=
"area != null and area != ''"
>
area like #{area}
</if>
</where>
</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