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
3eb57a14
Commit
3eb57a14
authored
Nov 02, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.合并光伏风机告警详情接口增加类型进行区分
parent
7310456f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
41 deletions
+45
-41
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+45
-41
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/controller/AnalyseController.java
View file @
3eb57a14
...
...
@@ -45,7 +45,7 @@ public class AnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-风机"
,
notes
=
"工况测点区间划分-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTime"
)
public
ResponseModel
<
String
>
getFanConditionVariablesByTime
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
...
...
@@ -53,23 +53,25 @@ public class AnalyseController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getFanConditionVariablesByTimeThread
(
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-光伏"
,
notes
=
"工况测点区间划分-光伏"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTime"
)
public
ResponseModel
<
String
>
getPvConditionVariablesByTime
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
currentDayEndTime
,
DateUtils
.
DATE_TIME_PATTERN
);
}
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
))
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
currentDayEndTime
,
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeThread
(
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"相关性分析-风机"
,
notes
=
"相关性分析-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTimeAnalyse"
)
public
ResponseModel
<
String
>
getFanConditionVariablesByTimeAnalyse
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
...
...
@@ -91,10 +93,10 @@ public class AnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"相关性分析 - 光伏 - 新"
,
notes
=
"相关性分析 - 光伏 - 新"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTimeAnalyseNew"
)
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyseNew
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
throws
InterruptedException
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
startTime
=
DateUtils
.
convertDateToString
(
DateUtil
.
beginOfYear
(
new
Date
()),
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
getCurrentDayEndTime
(
new
Date
()),
DateUtils
.
DATE_TIME_PATTERN
);
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyseNew
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
throws
InterruptedException
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
startTime
=
DateUtils
.
convertDateToString
(
DateUtil
.
beginOfYear
(
new
Date
()),
DateUtils
.
DATE_TIME_PATTERN
);
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
getCurrentDayEndTime
(
new
Date
()),
DateUtils
.
DATE_TIME_PATTERN
);
}
commonServiceImpl
.
chuliPv
(
startTime
,
endTime
);
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyseThread
(
startTime
,
endTime
));
...
...
@@ -105,7 +107,7 @@ public class AnalyseController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"相关性分析-风机"
,
notes
=
"相关性分析-风机"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTimeAnalyse"
)
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyse
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
...
...
@@ -113,11 +115,12 @@ public class AnalyseController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getPvConditionVariablesByTimeAnalyseThread
(
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"中心值计算-风机"
,
notes
=
"中心值计算-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTimeAnalyse1"
)
public
ResponseModel
<
String
>
getFanConditionVariablesByTimeAnalyse1
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
...
...
@@ -125,11 +128,12 @@ public class AnalyseController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getFanConditionVariablesByTimeAnalyse1Thread
(
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"中心值计算-光伏"
,
notes
=
"中心值计算-光伏"
)
@GetMapping
(
value
=
"/getPvConditionVariablesByTimeAnalyse1"
)
public
ResponseModel
<
String
>
getPvConditionVariablesByTimeAnalyse1
(
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
if
(
StringUtils
.
isEmpty
(
startTime
)
&&
StringUtils
.
isEmpty
(
endTime
)
)
{
Date
currentDayStartTime
=
DateUtils
.
getCurrentDayStartTime
(
new
Date
());
Date
currentDayEndTime
=
DateUtils
.
getCurrentDayEndTime
(
new
Date
());
startTime
=
DateUtils
.
convertDateToString
(
currentDayStartTime
,
DateUtils
.
DATE_TIME_PATTERN
);
...
...
@@ -172,7 +176,7 @@ public class AnalyseController extends BaseController {
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
8
),
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
...
...
@@ -187,16 +191,16 @@ public class AnalyseController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"获取influxdb数据"
,
notes
=
"获取influxdb数据"
)
@PostMapping
(
value
=
"/getInfluxdbDataByConditon"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getDataByConditon
(
@RequestParam
String
stationType
,
@RequestParam
(
required
=
false
)
String
pointId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
if
(
"FD"
.
equals
(
stationType
)){
public
ResponseModel
<
Map
<
String
,
Object
>>
getDataByConditon
(
@RequestParam
String
stationType
,
@RequestParam
(
required
=
false
)
String
pointId
,
@RequestParam
(
required
=
false
)
String
startTime
,
@RequestParam
(
required
=
false
)
String
endTime
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
if
(
"FD"
.
equals
(
stationType
))
{
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
indexLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getStation
,
map
.
get
(
"STATION"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getEquipmentName
,
map
.
get
(
"EQUIPNAME"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getPointName
,
map
.
get
(
"EQUIPINDEX"
)).
last
(
"limit 1"
);
LambdaQueryWrapper
<
IdxBizFanHealthIndex
>
indexLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getStation
,
map
.
get
(
"STATION"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getEquipmentName
,
map
.
get
(
"EQUIPNAME"
));
indexLambdaQueryWrapper
.
eq
(
IdxBizFanHealthIndex:
:
getPointName
,
map
.
get
(
"EQUIPINDEX"
)).
last
(
"limit 1"
);
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndices
=
idxBizFanHealthIndexMapper
.
selectList
(
indexLambdaQueryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
idxBizFanHealthIndices
)){
if
(
CollectionUtils
.
isNotEmpty
(
idxBizFanHealthIndices
))
{
pointId
=
idxBizFanHealthIndices
.
get
(
0
).
getIndexAddress
();
}
}
...
...
@@ -230,35 +234,35 @@ public class AnalyseController extends BaseController {
if
(
StringUtils
.
isEmpty
(
endTime
))
{
endTime
=
DateUtils
.
convertDateToString
(
DateUtils
.
dateAddHours
(
new
Date
(),
-
8
),
DateUtils
.
DATE_TIME_PATTERN
);
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警详情信息-风机"
,
notes
=
"预警详情信息-风机"
)
@GetMapping
(
value
=
"/getAlramInfoDetailOfFan"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAlramInfoDetailOfFan
(
@RequestParam
(
required
=
true
)
String
id
){
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfFan
(
id
));
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警详情信息-光伏"
,
notes
=
"预警详情信息-光伏"
)
@GetMapping
(
value
=
"/getAlramInfoDetailOfPv"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAlramInfoDetailOfPv
(
@RequestParam
(
required
=
true
)
String
id
){
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfPv
(
id
));
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警详情信息"
,
notes
=
"预警详情信息"
)
@GetMapping
(
value
=
"/getAlramInfoDetail"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAlramInfoDetailOfFan
(
@RequestParam
(
required
=
true
)
String
id
,
@RequestParam
(
required
=
true
)
String
type
)
{
if
(
"FAN"
.
equals
(
type
))
{
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfFan
(
id
));
}
else
{
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfPv
(
id
));
}
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"预警详情信息-光伏"
,
notes
=
"预警详情信息-光伏"
)
@GetMapping
(
value
=
"/queryIndexByArae"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
queryIndexByArae
(
String
ARAE
,
String
ANALYSISTYPE
,
String
startTimeTop
,
String
endTimeTop
)
{
public
ResponseModel
<
Map
<
String
,
Object
>>
queryIndexByArae
(
String
ARAE
,
String
ANALYSISTYPE
,
String
startTimeTop
,
String
endTimeTop
)
{
List
<
Map
<
String
,
Object
>>
maps
=
idxBizFanHealthIndexMapper
.
queryIndexByArae
(
ARAE
,
ANALYSISTYPE
,
startTimeTop
,
endTimeTop
);
List
<
String
>
axisData
=
new
ArrayList
<>();
List
<
String
>
seriesData
=
new
ArrayList
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
for
(
Map
<
String
,
Object
>
obj
:
maps
)
{
axisData
.
add
(
obj
.
get
(
"HEALTHINDEX"
).
toString
())
;
seriesData
.
add
(
obj
.
get
(
"ANALYSISTIME"
).
toString
())
;
axisData
.
add
(
obj
.
get
(
"HEALTHINDEX"
).
toString
())
;
seriesData
.
add
(
obj
.
get
(
"ANALYSISTIME"
).
toString
())
;
}
map
.
put
(
"axisData"
,
axisData
);
map
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
map
);
map
.
put
(
"axisData"
,
axisData
);
map
.
put
(
"seriesData"
,
seriesData
);
return
ResponseHelper
.
buildResponse
(
map
);
}
}
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