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
53bda818
Commit
53bda818
authored
Oct 31, 2023
by
caotao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.风机预警回溯功能开发。
parent
233e5135
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
125 additions
and
1 deletion
+125
-1
AnalyseController.java
...s/boot/module/jxiop/biz/controller/AnalyseController.java
+16
-1
IAlarmInfoDetailService.java
...oot/module/jxiop/biz/service/IAlarmInfoDetailService.java
+8
-0
AlarmInfoDetailServiceImpl.java
...le/jxiop/biz/service/impl/AlarmInfoDetailServiceImpl.java
+101
-0
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 @
53bda818
...
...
@@ -9,6 +9,7 @@ import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanHealthIndex
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanHealthIndexMapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IAlarmInfoDetailService
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.impl.CommonServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -39,6 +40,9 @@ public class AnalyseController extends BaseController {
@Autowired
IdxBizFanHealthIndexMapper
idxBizFanHealthIndexMapper
;
@Autowired
IAlarmInfoDetailService
iAlarmInfoDetailService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"工况测点区间划分-风机"
,
notes
=
"工况测点区间划分-风机"
)
@GetMapping
(
value
=
"/getFanConditionVariablesByTime"
)
...
...
@@ -230,5 +234,16 @@ public class AnalyseController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
commonServiceImpl
.
getInfluxdbDataByConditon
(
stationType
,
pointId
,
startTime
,
endTime
))
;
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"预警详情信息-风机"
,
notes
=
"预警详情信息-风机"
)
@PostMapping
(
value
=
"/getAlramInfoDetailOfFan"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAlramInfoDetailOfFan
(
@RequestParam
(
required
=
true
)
String
id
){
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfFan
(
id
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@ApiOperation
(
httpMethod
=
"post"
,
value
=
"预警详情信息-光伏"
,
notes
=
"预警详情信息-光伏"
)
@PostMapping
(
value
=
"/getAlramInfoDetailOfPv"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getAlramInfoDetailOfPv
(
@RequestParam
(
required
=
true
)
String
id
){
return
ResponseHelper
.
buildResponse
(
iAlarmInfoDetailService
.
getAlramInfoDetailOfPv
(
id
));
}
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/IAlarmInfoDetailService.java
0 → 100644
View file @
53bda818
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
;
import
java.util.Map
;
public
interface
IAlarmInfoDetailService
{
Map
<
String
,
Object
>
getAlramInfoDetailOfFan
(
String
id
);
Map
<
String
,
Object
>
getAlramInfoDetailOfPv
(
String
id
);
}
amos-boot-system-jxiop/amos-boot-module-jxiop-analyse-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/AlarmInfoDetailServiceImpl.java
0 → 100644
View file @
53bda818
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
cn.hutool.core.date.DateUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yeejoin.amos.boot.module.jxiop.biz.entity.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.mapper2.*
;
import
com.yeejoin.amos.boot.module.jxiop.biz.service.IAlarmInfoDetailService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
@Service
public
class
AlarmInfoDetailServiceImpl
implements
IAlarmInfoDetailService
{
@Autowired
IdxBizFanWarningRecordMapper
idxBizFanWarningRecordMapper
;
@Autowired
IdxBizFanHealthIndexMapper
idxBizFanHealthIndexMapper
;
@Autowired
IdxBizFanPointVarCentralValueMapper
idxBizFanPointVarCentralValueMapper
;
@Autowired
IdxBizFanPointProcessVariableClassificationMapper
idxBizFanPointProcessVariableClassificationMapper
;
@Autowired
IdxBizPvWarningRecordMapper
idxBizPvWarningRecordMapper
;
@Override
public
Map
<
String
,
Object
>
getAlramInfoDetailOfFan
(
String
id
)
{
Map
<
String
,
Object
>
result
=
new
HashMap
<>();
IdxBizFanWarningRecord
idxBizFanWarningRecord
=
idxBizFanWarningRecordMapper
.
selectById
(
id
);
//------------预警信息
HashMap
<
String
,
String
>
alarmInfoMap
=
new
HashMap
<>();
//测点名称
alarmInfoMap
.
put
(
"pointName"
,
idxBizFanWarningRecord
.
getPointName
());
//告警周期
alarmInfoMap
.
put
(
"waringPeriod"
,
idxBizFanWarningRecord
.
getWarningPeriod
());
//告警时间
alarmInfoMap
.
put
(
"waringTime"
,
idxBizFanWarningRecord
.
getRecDate
().
toString
());
//预警等级
alarmInfoMap
.
put
(
"waringLevel"
,
idxBizFanWarningRecord
.
getWarningName
());
//预警触发规则
alarmInfoMap
.
put
(
"waringRule"
,
idxBizFanWarningRecord
.
getCONTENT
());
result
.
put
(
"warningInfo"
,
alarmInfoMap
);
// -----------预警趋势
HashMap
<
String
,
List
<
String
>>
alarmTrendMap
=
new
HashMap
<>();
List
<
HashMap
<
String
,
String
>>
alarmAbnormalityList
=
new
ArrayList
<>();
Long
analysisDate
=
idxBizFanWarningRecord
.
getRecDate
().
getTime
()+
1000
*
60
;
List
<
IdxBizFanHealthIndex
>
idxBizFanHealthIndexList
=
idxBizFanHealthIndexMapper
.
selectList
(
new
QueryWrapper
<
IdxBizFanHealthIndex
>()
.
eq
(
"GATEWAY_ID"
,
idxBizFanWarningRecord
.
getGatewayId
())
.
eq
(
"INDEX_ADDRESS"
,
idxBizFanWarningRecord
.
getIndexAddress
())
.
le
(
"ANALYSIS_TIME"
,
DateUtil
.
formatDateTime
(
new
Date
(
analysisDate
)))
.
orderByDesc
(
"ANALYSIS_TIME"
)
.
last
(
"limit 30"
));
List
<
String
>
xDatas
=
new
ArrayList
<>();
List
<
String
>
yDatas
=
new
ArrayList
<>();
for
(
int
i
=
idxBizFanHealthIndexList
.
size
()
-
1
;
i
>
0
;
i
--)
{
HashMap
<
String
,
String
>
alarmAbnormalityItem
=
new
HashMap
<>();
IdxBizFanHealthIndex
idxBizFanHealthIndex
=
idxBizFanHealthIndexList
.
get
(
i
);
xDatas
.
add
(
idxBizFanHealthIndex
.
getANALYSISTIME
());
yDatas
.
add
(
String
.
valueOf
(
idxBizFanHealthIndex
.
getHealthIndex
()));
alarmAbnormalityItem
.
put
(
"time"
,
idxBizFanHealthIndex
.
getANALYSISTIME
());
alarmAbnormalityItem
.
put
(
"abnormal"
,
String
.
valueOf
(
idxBizFanHealthIndex
.
getANOMALY
()));
alarmAbnormalityItem
.
put
(
"healthValue"
,
String
.
valueOf
(
idxBizFanHealthIndex
.
getHealthIndex
()));
alarmAbnormalityList
.
add
(
alarmAbnormalityItem
);
}
alarmTrendMap
.
put
(
"xDatas"
,
xDatas
);
alarmTrendMap
.
put
(
"yDatas"
,
yDatas
);
result
.
put
(
"alarmTrend"
,
alarmTrendMap
);
// 异常度 alarmAbnormality
result
.
put
(
"alarmAbnormalityList"
,
alarmAbnormalityList
.
subList
(
alarmAbnormalityList
.
size
()-
3
,
alarmAbnormalityList
.
size
()));
//----健康指数来源
List
<
IdxBizFanPointVarCentralValue
>
idxBizFanPointVarCentralValueList
=
idxBizFanPointVarCentralValueMapper
.
selectList
(
new
QueryWrapper
<
IdxBizFanPointVarCentralValue
>().
eq
(
"ANALYSIS_POINT_ID"
,
idxBizFanWarningRecord
.
getAnalysisPointId
()));
IdxBizFanPointVarCentralValue
idxBizFanPointVarCentralValue
=
new
IdxBizFanPointVarCentralValue
();
if
(
idxBizFanPointVarCentralValueList
.
size
()<=
0
){
return
result
;
}
idxBizFanPointVarCentralValue
=
idxBizFanPointVarCentralValueList
.
get
(
0
);
//健康指数来源测点信息
HashMap
<
String
,
String
>
healthPointInfoMap
=
new
HashMap
<>();
healthPointInfoMap
.
put
(
"analysisPointName"
,
idxBizFanPointVarCentralValue
.
getAnalysisPointName
());
healthPointInfoMap
.
put
(
"processPoint1Name"
,
idxBizFanPointVarCentralValue
.
getProcessPoint1Name
());
healthPointInfoMap
.
put
(
"processPoint2Name"
,
idxBizFanPointVarCentralValue
.
getProcessPoint2Name
());
healthPointInfoMap
.
put
(
"processPoint3Name"
,
idxBizFanPointVarCentralValue
.
getProcessPoint3Name
());
result
.
put
(
"healthPointInfo"
,
healthPointInfoMap
);
List
<
IdxBizFanPointProcessVariableClassification
>
idxBizFanPointProcessVariableClassificationList
=
idxBizFanPointProcessVariableClassificationMapper
.
selectList
(
new
QueryWrapper
<
IdxBizFanPointProcessVariableClassification
>().
in
(
"SEQUENCE_NBR"
,
Arrays
.
asList
(
idxBizFanPointVarCentralValue
.
getAnalysisPointId
(),
idxBizFanPointVarCentralValue
.
getProcessPoint1Id
(),
idxBizFanPointVarCentralValue
.
getProcessPoint2Id
(),
idxBizFanPointVarCentralValue
.
getProcessPoint3Id
())));
// List<IndicatorData> indicatorDataList =
//当前值
//训练值
//异常度
return
result
;
}
@Override
public
Map
<
String
,
Object
>
getAlramInfoDetailOfPv
(
String
id
)
{
return
null
;
}
}
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