Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AmosBankRoot
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
1
Merge Requests
1
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
bank
AmosBankRoot
Commits
2c115bd8
Commit
2c115bd8
authored
Dec 07, 2020
by
吴俊凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
动环枚举修改
parent
5360ac70
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
51 additions
and
59 deletions
+51
-59
AlarmPointEnum.java
...va/com/yeejoin/amos/bank/common/enums/AlarmPointEnum.java
+3
-3
AlarmPointTypeEnum.java
...om/yeejoin/amos/bank/common/enums/AlarmPointTypeEnum.java
+6
-6
EquipmentListener.java
.../java/com/yeejoin/amos/bank/config/EquipmentListener.java
+2
-2
SelfSupportListener.java
...ava/com/yeejoin/amos/bank/config/SelfSupportListener.java
+2
-2
AlarmWebSocketClient.java
...com/yeejoin/amos/bank/webSocket/AlarmWebSocketClient.java
+2
-2
FireDetectionWebSocketClient.java
...oin/amos/bank/webSocket/FireDetectionWebSocketClient.java
+3
-3
InspectionWebSocketClient.java
...eejoin/amos/bank/webSocket/InspectionWebSocketClient.java
+2
-2
MonitorAlarmWebSocketClient.java
...join/amos/bank/webSocket/MonitorAlarmWebSocketClient.java
+20
-25
ShiduAlarmWebSocketClient.java
...eejoin/amos/bank/webSocket/ShiduAlarmWebSocketClient.java
+9
-9
AlarmController.java
...yeejoin/amos/spc/business/controller/AlarmController.java
+1
-5
SpcRiskSourceController.java
...amos/spc/business/controller/SpcRiskSourceController.java
+1
-0
View3DController.java
...eejoin/amos/spc/business/controller/View3DController.java
+0
-0
No files found.
AmosBankCommon/src/main/java/com/yeejoin/amos/bank/common/enums/AlarmPointEnum.java
View file @
2c115bd8
...
...
@@ -15,9 +15,9 @@ public enum AlarmPointEnum {
未确认已清除
(
"未确认已清除"
,
"未确认已清除"
),
已确认未清除
(
"已确认未清除"
,
"已确认未清除"
),
已确认已清除
(
"已确认已清除"
,
"已确认已清除"
),
正常
(
"正常"
,
"正常"
),
异常
(
"异常"
,
"异常"
),
告警
(
"告警"
,
"告警"
),;
NORMAL
(
"正常"
,
"正常"
),
ABNORMAL
(
"异常"
,
"异常"
),
ALARM
(
"告警"
,
"告警"
),;
/**
* 名称,描述
...
...
AmosBankCommon/src/main/java/com/yeejoin/amos/bank/common/enums/AlarmPointTypeEnum.java
View file @
2c115bd8
...
...
@@ -11,12 +11,12 @@ import java.util.Map;
*
*/
public
enum
AlarmPointTypeEnum
{
设备
(
"设备"
,
"1"
),
动环
(
"动环"
,
"2"
),
巡检
(
"巡检"
,
"3"
),
通道
(
"通道"
,
"4"
),
虚拟设备
(
"虚拟设备"
,
"5"
),
火探
(
"火探"
,
"6"
);
SB
(
"设备"
,
"1"
),
DH
(
"动环"
,
"2"
),
XJ
(
"巡检"
,
"3"
),
TD
(
"通道"
,
"4"
),
XNSB
(
"虚拟设备"
,
"5"
),
HT
(
"火探"
,
"6"
);
/**
* 名称,描述
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/EquipmentListener.java
View file @
2c115bd8
...
...
@@ -342,7 +342,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
}
public
void
addAlarmMethod
(
Long
eqpId
,
Integer
statusByName
,
String
eqpName
,
String
ipAddress
,
String
metricKey
,
String
orgCode
,
String
sanwei
,
String
lou
)
throws
IOException
{
List
<
AlarmPoint
>
alarmPoint
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
设备
.
getCode
(),
List
<
AlarmPoint
>
alarmPoint
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
SB
.
getCode
(),
eqpId
);
if
(
alarmPoint
!=
null
&&
alarmPoint
.
size
()
>
0
)
{
// 存在报警,判断当前状态是不是合格,合格则删除上次的报警
...
...
@@ -362,7 +362,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
// 增加告警
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setIsAlarm
(
1
);
// 不合格
alarmPoint1
.
setContent
(
eqpName
+
"-"
+
ipAddress
+
","
+
ALARM_CAUSE
);
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/config/SelfSupportListener.java
View file @
2c115bd8
...
...
@@ -205,7 +205,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
//增加报警
List
<
AlarmPoint
>
alarmPoint
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
设备
.
getCode
(),
eqpId
);
List
<
AlarmPoint
>
alarmPoint
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
SB
.
getCode
(),
eqpId
);
if
(
alarmPoint
!=
null
&&
alarmPoint
.
size
()
>
0
)
{
//存在报警,判断当前状态是不是合格,合格则删除上次的报警
if
(
statusByName
==
0
)
{
...
...
@@ -223,7 +223,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
//增加告警
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setIsAlarm
(
1
);
//不合格
alarmPoint1
.
setContent
(
eqpName
+
"-"
+
ipAddress
+
"-"
+
metricKey
);
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/AlarmWebSocketClient.java
View file @
2c115bd8
...
...
@@ -99,7 +99,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
String
curStatus
=
msgJson
.
getString
(
"currentState"
);
synchronized
(
this
)
{
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
设备
.
getCode
(),
eqpId
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
SB
.
getCode
(),
eqpId
);
if
(
AlarmPointEnum
.
已确认已清除
.
getName
().
equals
(
curStatus
)
||
AlarmPointEnum
.
未确认已清除
.
getName
().
equals
(
curStatus
))
{
alarmPointService
.
deleteItems
(
pointList
);
log
.
info
(
"Clear alarm data ...success"
);
...
...
@@ -115,7 +115,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setSourceId
(
msgJson
.
getString
(
"sourceId"
));
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/FireDetectionWebSocketClient.java
View file @
2c115bd8
...
...
@@ -115,7 +115,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
if
(
eqpId
!=
null
&&
status
!=
null
&&
!
""
.
equals
(
status
)
&&
sourceId
!=
null
&&
!
""
.
equals
(
sourceId
))
{
synchronized
(
this
)
{
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
火探
.
getCode
(),
eqpId
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
HT
.
getCode
(),
eqpId
);
if
(!
FireDetectionAlarmType
.
产生
.
getCode
().
equals
(
status
))
{
alarmPointService
.
deleteItems
(
pointList
);
log
.
info
(
"Clear alarm data ...success"
);
...
...
@@ -130,7 +130,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
火探
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
HT
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setPointAttrs
(
equipmentAttrsJson
);
...
...
@@ -189,7 +189,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
alarm
.
setAlarmReason
(
alramContent
);
alarm
.
setAlarmSourceIp
(
msgJson
.
getString
(
"alarmSourceIp"
));
alarm
.
setAlarmSourceName
(
eqpName
);
alarm
.
setAlarmSourceType
(
AlarmPointTypeEnum
.
火探
.
getName
());
alarm
.
setAlarmSourceType
(
AlarmPointTypeEnum
.
HT
.
getName
());
alarm
.
setCurrentState
(
FireDetectionAlarmType
.
getEnumStatus
(
status
));
Date
date
=
new
Date
(
msgJson
.
getLong
(
"raiseTime"
));
alarm
.
setHappenDate
(
df
.
format
(
date
));
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/InspectionWebSocketClient.java
View file @
2c115bd8
...
...
@@ -216,7 +216,7 @@ public class InspectionWebSocketClient extends WebSocketClient{
log
.
info
(
"["
+
monitorItemName
+
"]自动巡检状态["
+
alarmState
+
"],保存成功...success"
);
saveSpcAlarm
(
autoInspection
,
msgJson
);
//保存告警记录
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmState
))
{
if
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
alarmState
))
{
saveAlarmPoint
(
autoInspection
,
msgJson
,
eqpId
);
String
aisleType
=
autoInspection
.
getAisleType
();
...
...
@@ -352,7 +352,7 @@ public class InspectionWebSocketClient extends WebSocketClient{
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setPointType
(
autoInspection
.
getAisleType
().
equals
(
AutoInspectionTypeEnum
.
NPC
通道
.
getType
())
||
autoInspection
.
getAisleType
().
equals
(
AutoInspectionTypeEnum
.
商业银行通道
.
getType
())
?
AlarmPointTypeEnum
.
通道
.
getCode
()
:
AlarmPointTypeEnum
.
虚拟设备
.
getCode
());
?
AlarmPointTypeEnum
.
TD
.
getCode
()
:
AlarmPointTypeEnum
.
XNSB
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setPointId
(
msgJson
.
getLong
(
"eqpId"
)
!=
null
?
msgJson
.
getLong
(
"eqpId"
)
:
0
);
alarmPoint
.
setContent
(
autoInspection
.
getMonitorItemName
());
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/MonitorAlarmWebSocketClient.java
View file @
2c115bd8
...
...
@@ -143,22 +143,22 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
Map
<
String
,
Object
>
nodeDetailMap
=
iTopographyNodeRepository
.
findNodeDetailBySourceId
(
msgJson
.
getString
(
"sourceId"
));
List
<
JSONObject
>
alarmAttributes
=
(
List
<
JSONObject
>)
msgJson
.
get
(
"capacityAttrList"
);
List
<
Map
<
String
,
String
>>
DHlist
=
new
ArrayList
<>();
synchronized
(
this
)
{
//
拼接json存入动环详情表
B
oolean
alarmFlagBoolean
=
false
;
//
1.指标是否有异常
b
oolean
alarmFlagBoolean
=
false
;
for
(
JSONObject
a
:
alarmAttributes
)
{
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
if
(
res
!=
null
&&(
AlarmPointEnum
.
异常
.
getName
().
equals
(
res
)||
AlarmPointEnum
.
告警
.
getName
().
equals
(
res
)))
{
if
(
res
!=
null
&&(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
res
)||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
res
)))
{
alarmFlagBoolean
=
true
;
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
break
;
}
}
//组装动环信息JSON
List
<
Map
<
String
,
String
>>
DHlist
=
new
ArrayList
<>();
for
(
JSONObject
a
:
alarmAttributes
)
{
//2.修改动环详情表的信息
for
(
int
i
=
0
;
i
<
alarmAttributes
.
size
();
i
++)
{
JSONObject
a
=
alarmAttributes
.
get
(
i
);
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
Map
<
String
,
String
>
map
=
new
HashMap
();
...
...
@@ -202,8 +202,8 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
}
//告警记录
String
res
=
AlarmPointEnum
.
正常
.
getName
();
//
3.数据插入
告警记录
String
res
=
AlarmPointEnum
.
NORMAL
.
getName
();
String
alarmTypeCombination
=
""
;
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
...
...
@@ -211,9 +211,9 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
continue
;
}
String
alarmType
=
(
String
)
atrJson
.
get
(
"displayName"
);
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))||
AlarmPointEnum
.
告警
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))){
if
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))){
alarmTypeCombination
=
alarmType
+
alarmTypeCombination
;
res
=
AlarmPointEnum
.
异常
.
getName
();
res
=
AlarmPointEnum
.
ABNORMAL
.
getName
();
}
}
...
...
@@ -228,10 +228,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
orgCode
=
authOrgTemp
;
}
//添加告警记录
if
(!
"运行参数"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)){
addRecordAlarm
(
alarmTypeCombination
,
res
,
sourceId
,
orgCode
,
authOrg
,
eqpName
,
cpblName
,
alramContent
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
动环
.
getCode
(),
eqpId
,
cpblId
);
//4.对跑马灯显示进行处理
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
DH
.
getCode
(),
eqpId
,
cpblId
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
selectByQuerySourceId
(
sourceId
);
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
alarmPointService
.
deleteItems
(
pointList
);
...
...
@@ -242,21 +244,15 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
}
}
else
{
if
(
alarmFlagBoolean
&&
pointList
.
size
()
==
0
)
{
// String alramContent = msgJson.getString("describe");
String
eqpType
=
msgJson
.
getString
(
"eqpType"
);
// String eqpName = msgJson.getString("eqpName");
String
equipmentAttrs
=
msgJson
.
getString
(
"equipmentAttrs"
);
// String sourceId = msgJson.getString("sourceId");
String
authOrgs
=
getAuthOrg
(
msgJson
.
getString
(
"authOrg"
));
//String orgCode = msgJson.getString("orgCode");
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setCode
(
authOrgs
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
// alarmPoint.setPointType(eqpType);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
动环
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
DH
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
...
@@ -265,14 +261,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarmPointService
.
saveItem
(
alarmPoint
);
log
.
info
(
"Save alarm data....success"
);
//推送消息巡检app
//String url = address + "api/msgSubscribe/alarmNotification";
// 6 .推送消息巡检app
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
msgJson
.
getString
(
"orgCode"
));
map
.
put
(
"body"
,
"告警源名称:"
+
eqpName
+
TAB
+
"告警信息"
+
alramContent
);
String
stringJson
=
JSONObject
.
toJSONString
(
map
);
//HttpUtil.PostJson(url, stringJson);
CommonResponse
result
=
patrolRemoteClient
.
sendAlarmNotification
(
stringJson
);
log
.
info
(
"手机推送告警信息...success"
);
}
catch
(
Exception
e
)
{
...
...
@@ -289,6 +283,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
if
(
alarmFlagBoolean
){
iTopographyService
.
sendAbnormal
(
msgJson
.
getString
(
"sourceId"
),
1
);
}
//7.给前台发送websocket
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"updateDate"
);
List
<
AlarmPoint
>
alarms
=
alarmPointService
.
findAll
(
sort
);
...
...
@@ -346,7 +341,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarm
.
setContinueDate
(
subtract
);
}
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
告警
.
getName
().
equals
(
alarmStatus
))
{
if
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
alarmStatus
))
{
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
}
else
{
alarm
.
setClearDate
(
DateTimeKit
.
now
());
...
...
@@ -370,7 +365,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
List
<
Alarm
>
curAlarmRList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
告警
.
getName
().
equals
(
alarmStatus
))
{
if
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
alarmStatus
))
{
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
iAlarmDao
.
save
(
alarm
);
}
else
{
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/ShiduAlarmWebSocketClient.java
View file @
2c115bd8
...
...
@@ -151,7 +151,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
for
(
JSONObject
a
:
alarmAttributes
)
{
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
if
(
res
!=
null
&&
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
res
)||
AlarmPointEnum
.
告警
.
getName
().
equals
(
res
)))
{
if
(
res
!=
null
&&
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
res
)||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
res
)))
{
alarmFlagBoolean
=
true
;
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
break
;
...
...
@@ -204,7 +204,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
}
//告警记录
String
res
=
AlarmPointEnum
.
正常
.
getName
();
String
res
=
AlarmPointEnum
.
NORMAL
.
getName
();
String
alarmTypeCombination
=
""
;
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
...
...
@@ -212,9 +212,9 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
continue
;
}
String
alarmType
=
(
String
)
atrJson
.
get
(
"displayName"
);
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))||
AlarmPointEnum
.
告警
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))){
if
(
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))||
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
msgJson
.
getString
(
atrName
))){
alarmTypeCombination
=
alarmType
+
alarmTypeCombination
;
res
=
AlarmPointEnum
.
异常
.
getName
();
res
=
AlarmPointEnum
.
ABNORMAL
.
getName
();
}
}
Long
cpblId
=
msgJson
.
getLong
(
"cpblId"
);
...
...
@@ -229,9 +229,9 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
}
//添加告警记录
if
(!
"运行参数"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)||!
"
常电监测
"
.
equals
(
cpblName
)){
if
(!
"运行参数"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)||!
"
市电监测"
.
equals
(
cpblName
)||!
"进行参数
"
.
equals
(
cpblName
)){
addRecordAlarm
(
alarmTypeCombination
,
res
,
sourceId
,
orgCode
,
authOrg
,
eqpName
,
cpblName
,
alramContent
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
动环
.
getCode
(),
eqpId
,
cpblId
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
DH
.
getCode
(),
eqpId
,
cpblId
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
selectByQuerySourceId
(
sourceId
);
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
alarmPointService
.
deleteItems
(
pointList
);
...
...
@@ -256,7 +256,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
// alarmPoint.setPointType(eqpType);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
动环
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
DH
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
...
@@ -336,7 +336,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarm
.
setContinueDate
(
subtract
);
}
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
告警
.
getName
().
equals
(
alarmStatus
))
{
if
(
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
alarmStatus
))
{
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
}
else
{
alarm
.
setClearDate
(
DateTimeKit
.
now
());
...
...
@@ -360,7 +360,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
List
<
Alarm
>
curAlarmRList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
if
(
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
异常
.
getName
().
equals
(
alarmStatus
))
{
if
(
AlarmPointEnum
.
ALARM
.
getName
().
equals
(
alarmStatus
)||
AlarmPointEnum
.
ABNORMAL
.
getName
().
equals
(
alarmStatus
))
{
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
iAlarmDao
.
save
(
alarm
);
}
else
{
...
...
AmosBankService/src/main/java/com/yeejoin/amos/spc/business/controller/AlarmController.java
View file @
2c115bd8
...
...
@@ -3,13 +3,11 @@ package com.yeejoin.amos.spc.business.controller;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.bank.dto.TopographyTreeDTO
;
import
liquibase.pro.packaged.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -21,8 +19,6 @@ import com.yeejoin.amos.op.core.common.query.DaoCriteria;
import
com.yeejoin.amos.op.core.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.spc.business.param.ReginParams
;
//import com.yeejoin.amos.security.common.authorization.Authorization;
import
com.yeejoin.amos.spc.business.service.intfc.ISpcEvaluateModelService
;
import
com.yeejoin.amos.spc.core.common.request.CommonPageable
;
import
com.yeejoin.amos.spc.core.common.request.CommonRequest
;
import
com.yeejoin.amos.spc.core.enums.QueryOperatorEnum
;
...
...
AmosBankService/src/main/java/com/yeejoin/amos/spc/business/controller/SpcRiskSourceController.java
View file @
2c115bd8
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.yeejoin.amos.bank.service.IDynamicRingDataService
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
...
...
AmosBankService/src/main/java/com/yeejoin/amos/spc/business/controller/View3DController.java
View file @
2c115bd8
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