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
43543883
Commit
43543883
authored
Nov 10, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改接口bug
parent
04e10a09
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
17 deletions
+71
-17
IdxBizFanHealthIndexController.java
.../jxiop/biz/controller/IdxBizFanHealthIndexController.java
+68
-16
FanHealthIndexDayMapper.java
...t/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
+3
-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/IdxBizFanHealthIndexController.java
View file @
43543883
...
@@ -346,9 +346,9 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -346,9 +346,9 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"TD 风电场站/设备列表通用接口"
,
notes
=
"TD 风电场站/设备列表通用接口"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"TD 风电场站/设备
左侧
列表通用接口"
,
notes
=
"TD 风电场站/设备列表通用接口"
)
@GetMapping
(
value
=
"/stationHealthIndexTable"
)
@GetMapping
(
value
=
"/stationHealthIndexTable"
)
public
ResponseModel
<
List
<
FanHealthIndexDay
>>
stationHealthIndexTable
(
@RequestParam
(
value
=
"area"
,
required
=
false
)
String
area
,
public
ResponseModel
<
Page
<
FanHealthIndexDay
>>
stationHealthIndexTable
(
@RequestParam
(
value
=
"area"
,
required
=
false
)
String
area
,
@RequestParam
(
value
=
"station"
,
required
=
false
)
String
station
,
@RequestParam
(
value
=
"station"
,
required
=
false
)
String
station
,
@RequestParam
(
value
=
"analysisObjType"
,
required
=
false
)
String
analysisObjType
,
@RequestParam
(
value
=
"analysisObjType"
,
required
=
false
)
String
analysisObjType
,
@RequestParam
(
value
=
"analysisType"
,
required
=
false
)
String
analysisType
,
@RequestParam
(
value
=
"analysisType"
,
required
=
false
)
String
analysisType
,
...
@@ -359,9 +359,14 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -359,9 +359,14 @@ public class IdxBizFanHealthIndexController extends BaseController {
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
@RequestParam
(
value
=
"healthLevel"
,
required
=
false
)
String
healthLevel
,
@RequestParam
(
value
=
"healthLevel"
,
required
=
false
)
String
healthLevel
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
){
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
){
Page
<
FanHealthIndexDay
>
page
=
new
Page
<
FanHealthIndexDay
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
if
(
type
.
equals
(
"0"
)){
if
(
type
.
equals
(
"0"
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
8
);
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
8
);
...
@@ -374,12 +379,52 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -374,12 +379,52 @@ public class IdxBizFanHealthIndexController extends BaseController {
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
startTimeTop
=
formatter
.
format
(
startDate
);
}
}
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,(
current
-
1
)*
size
,
size
);
page
.
setRecords
(
fanHealthIndexDays
);
page
.
setTotal
(
Long
.
valueOf
(
fanHealthIndexDays
.
size
()));
return
ResponseHelper
.
buildResponse
(
page
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"TD 风电场站/设备仪表盘"
,
notes
=
"TD 风电场站/设备仪表盘"
)
@GetMapping
(
value
=
"/HealthIndexValue"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
HealthIndexValue
(
@RequestParam
(
value
=
"area"
,
required
=
false
)
String
area
,
@RequestParam
(
value
=
"station"
,
required
=
false
)
String
station
,
@RequestParam
(
value
=
"analysisObjType"
,
required
=
false
)
String
analysisObjType
,
@RequestParam
(
value
=
"analysisType"
,
required
=
false
)
String
analysisType
,
@RequestParam
(
value
=
"endTimeTop"
,
required
=
false
)
String
endTimeTop
,
@RequestParam
(
value
=
"startTimeTop"
,
required
=
false
)
String
startTimeTop
,
@RequestParam
(
value
=
"indexAddress"
,
required
=
false
)
String
indexAddress
,
@RequestParam
(
value
=
"pointName"
,
required
=
false
)
String
pointName
,
@RequestParam
(
value
=
"equipmentName"
,
required
=
false
)
String
equipmentName
,
@RequestParam
(
value
=
"healthLevel"
,
required
=
false
)
String
healthLevel
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
){
return
ResponseHelper
.
buildResponse
(
fanHealthIndexDays
);
if
(
type
.
equals
(
"0"
)){
Date
startDayTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
date
=
DateUtils
.
dateAddHours
(
startDayTime
,
-
8
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
startTimeTop
=
formatter
.
format
(
date
);
}
else
{
Date
endDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
endTimeTop
),
-
8
);
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
endTimeTop
=
formatter
.
format
(
endDate
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
}
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"value"
,
fanHealthIndexDays
.
get
(
0
).
getValue
());
return
ResponseHelper
.
buildResponse
(
map
);
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询场站下设备状态统计"
,
notes
=
"查询场站下设备状态统计"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询场站下设备状态统计"
,
notes
=
"查询场站下设备状态统计"
)
@GetMapping
(
value
=
"/selectEquipStatusByStation"
)
@GetMapping
(
value
=
"/selectEquipStatusByStation"
)
...
@@ -394,22 +439,27 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -394,22 +439,27 @@ public class IdxBizFanHealthIndexController extends BaseController {
}
}
}
else
{
}
else
{
String
[]
levels
=
{
"安全"
,
"注意"
,
"警告"
,
"危险"
};
List
<
String
>
levels
=
new
ArrayList
<>();
List
<
String
>
level
=
Arrays
.
asList
(
levels
);
levels
.
add
(
"安全"
);
levels
.
add
(
"注意"
);
levels
.
add
(
"警告"
);
levels
.
add
(
"危险"
);
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
for
(
Map
<
String
,
Object
>
map
:
maps
)
{
map
.
put
(
"name"
,
map
.
get
(
"healthLevel"
));
map
.
put
(
"name"
,
map
.
get
(
"healthlevel"
));
level
.
remove
(
map
.
get
(
"healthLevel"
));
String
healthlevel
=
map
.
get
(
"healthlevel"
).
toString
();
levels
.
remove
(
healthlevel
);
}
}
if
(
level
.
size
()>
0
){
if
(
level
s
.
size
()>
0
){
for
(
String
s
:
level
)
{
for
(
String
s
:
level
s
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"name"
,
s
);
map
.
put
(
"name"
,
s
);
map
.
put
(
"value"
,
0
);
map
.
put
(
"value"
,
0
);
map
.
put
(
"sort"
,
HealthLevelSortEnum
.
getCode
(
s
));
map
.
put
(
"sort"
,
HealthLevelSortEnum
.
getCode
(
s
));
maps
.
add
(
map
);
maps
.
add
(
map
);
}
}
maps
=
maps
.
stream
().
sorted
(
Comparator
.
comparing
Int
(
e
->
(
Integer
)
(
e
.
get
(
"sort"
)))).
collect
(
Collectors
.
toList
());
maps
=
maps
.
stream
().
sorted
(
Comparator
.
comparing
Long
(
e
->
Long
.
valueOf
(
e
.
get
(
"sort"
).
toString
(
)))).
collect
(
Collectors
.
toList
());
}
}
}
}
return
ResponseHelper
.
buildResponse
(
maps
);
return
ResponseHelper
.
buildResponse
(
maps
);
...
@@ -417,7 +467,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -417,7 +467,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计td
"
,
notes
=
"预警监测设备级统计td
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警监测设备级统计td
右侧列表"
,
notes
=
"各风机预警待确认数量统计
"
)
@GetMapping
(
value
=
"/selectPointNum"
)
@GetMapping
(
value
=
"/selectPointNum"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBSYSTEM
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectPointNum
(
@RequestParam
(
required
=
false
)
String
STATION
,
@RequestParam
(
required
=
false
)
String
SUBSYSTEM
,
@RequestParam
(
required
=
false
)
String
EQUIPMENTNAME
)
{
List
<
FanWarningRecord
>
idxBizPvWarningRecordList
=
fanWarningRecord
.
warningData
(
STATION
,
EQUIPMENTNAME
,
SUBSYSTEM
);
List
<
FanWarningRecord
>
idxBizPvWarningRecordList
=
fanWarningRecord
.
warningData
(
STATION
,
EQUIPMENTNAME
,
SUBSYSTEM
);
...
@@ -462,7 +512,9 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -462,7 +512,9 @@ public class IdxBizFanHealthIndexController extends BaseController {
@RequestParam
(
value
=
"healthLevel"
,
required
=
false
)
String
healthLevel
,
@RequestParam
(
value
=
"healthLevel"
,
required
=
false
)
String
healthLevel
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
,
@RequestParam
(
value
=
"requiredType"
,
required
=
false
)
String
requiredType
,
@RequestParam
(
value
=
"requiredType"
,
required
=
false
)
String
requiredType
,
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
){
@RequestParam
(
value
=
"subSystem"
,
required
=
false
)
String
subSystem
,
@RequestParam
(
value
=
"current"
,
required
=
false
)
Integer
current
,
@RequestParam
(
value
=
"size"
,
required
=
false
)
Integer
size
){
...
@@ -479,7 +531,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -479,7 +531,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
// Date startDate = DateUtils.dateAddHours(DateUtils.longStr2Date(startTimeTop), -8);
// Date startDate = DateUtils.dateAddHours(DateUtils.longStr2Date(startTimeTop), -8);
// startTimeTop = formatter.format(startDate);
// startTimeTop = formatter.format(startDate);
// }
// }
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
current
,
size
);
return
ResponseHelper
.
buildResponse
(
fanHealthIndexDays
);
return
ResponseHelper
.
buildResponse
(
fanHealthIndexDays
);
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
}
else
if
(
requiredType
.
equals
(
"按小时"
)){
...
@@ -552,7 +604,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
...
@@ -552,7 +604,7 @@ public class IdxBizFanHealthIndexController extends BaseController {
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
Date
startDate
=
DateUtils
.
dateAddHours
(
DateUtils
.
longStr2Date
(
startTimeTop
),
-
8
);
startTimeTop
=
formatter
.
format
(
startDate
);
startTimeTop
=
formatter
.
format
(
startDate
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
);
List
<
FanHealthIndexDay
>
fanHealthIndexDays
=
fanHealthIndexDayMapper
.
selectData
(
healthLevel
,
area
,
equipmentName
,
subSystem
,
analysisType
,
analysisObjType
,
station
,
pointName
,
indexAddress
,
startTimeTop
,
endTimeTop
,
null
,
null
);
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
fanHealthIndexDays
=
fanHealthIndexDays
.
stream
().
sorted
(
Comparator
.
comparing
(
FanHealthIndexDay:
:
getAnalysisTime
)).
collect
(
Collectors
.
toList
());
for
(
FanHealthIndexDay
obj
:
fanHealthIndexDays
)
{
for
(
FanHealthIndexDay
obj
:
fanHealthIndexDays
)
{
...
...
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/tdMapper2/FanHealthIndexDayMapper.java
View file @
43543883
...
@@ -22,8 +22,10 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
...
@@ -22,8 +22,10 @@ public interface FanHealthIndexDayMapper extends BaseMapper<FanHealthIndexDay> {
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='subSystem!= null'>AND sub_system = #{subSystem} </if> "
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"<if test='equipmentName!= null'>AND equipment_name = #{equipmentName} </if>"
+
"order by health_index "
+
"order by health_index "
+
"<if test='current != null and size != null'>limit ${current},${size} </if>"
+
"</script>"
)
"</script>"
)
List
<
FanHealthIndexDay
>
selectData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
);
List
<
FanHealthIndexDay
>
selectData
(
@Param
(
"healthLevel"
)
String
healthLevel
,
@Param
(
"area"
)
String
area
,
@Param
(
"equipmentName"
)
String
equipmentName
,
@Param
(
"subSystem"
)
String
subSystem
,
@Param
(
"analysisType"
)
String
analysisType
,
@Param
(
"analysisObjType"
)
String
analysisObjType
,
@Param
(
"station"
)
String
station
,
@Param
(
"pointName"
)
String
pointName
,
@Param
(
"indexAddress"
)
String
indexAddress
,
@Param
(
"startTimeTop"
)
String
startTimeTop
,
@Param
(
"endTimeTop"
)
String
endTimeTop
,
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
);
@Select
(
"<script>"
+
@Select
(
"<script>"
+
...
...
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