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
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
89 additions
and
97 deletions
+89
-97
AlarmPointEnum.java
...va/com/yeejoin/amos/bank/common/enums/AlarmPointEnum.java
+3
-3
AlarmPointTypeEnum.java
...om/yeejoin/amos/bank/common/enums/AlarmPointTypeEnum.java
+7
-7
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
+5
-5
FireDetectionWebSocketClient.java
...oin/amos/bank/webSocket/FireDetectionWebSocketClient.java
+13
-13
InspectionWebSocketClient.java
...eejoin/amos/bank/webSocket/InspectionWebSocketClient.java
+0
-0
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
+4
-3
View3DController.java
...eejoin/amos/spc/business/controller/View3DController.java
+23
-23
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 {
...
@@ -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,13 +11,13 @@ import java.util.Map;
...
@@ -11,13 +11,13 @@ import java.util.Map;
*
*
*/
*/
public
enum
AlarmPointTypeEnum
{
public
enum
AlarmPointTypeEnum
{
设备
(
"设备"
,
"1"
),
SB
(
"设备"
,
"1"
),
动环
(
"动环"
,
"2"
),
DH
(
"动环"
,
"2"
),
巡检
(
"巡检"
,
"3"
),
XJ
(
"巡检"
,
"3"
),
通道
(
"通道"
,
"4"
),
TD
(
"通道"
,
"4"
),
虚拟设备
(
"虚拟设备"
,
"5"
),
XNSB
(
"虚拟设备"
,
"5"
),
火探
(
"火探"
,
"6"
);
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
...
@@ -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
{
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
);
eqpId
);
if
(
alarmPoint
!=
null
&&
alarmPoint
.
size
()
>
0
)
{
if
(
alarmPoint
!=
null
&&
alarmPoint
.
size
()
>
0
)
{
// 存在报警,判断当前状态是不是合格,合格则删除上次的报警
// 存在报警,判断当前状态是不是合格,合格则删除上次的报警
...
@@ -362,7 +362,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
...
@@ -362,7 +362,7 @@ public class EquipmentListener extends EmqxListener implements InitializingBean
// 增加告警
// 增加告警
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setIsAlarm
(
1
);
// 不合格
alarmPoint1
.
setIsAlarm
(
1
);
// 不合格
alarmPoint1
.
setContent
(
eqpName
+
"-"
+
ipAddress
+
","
+
ALARM_CAUSE
);
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
...
@@ -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
(
alarmPoint
!=
null
&&
alarmPoint
.
size
()
>
0
)
{
//存在报警,判断当前状态是不是合格,合格则删除上次的报警
//存在报警,判断当前状态是不是合格,合格则删除上次的报警
if
(
statusByName
==
0
)
{
if
(
statusByName
==
0
)
{
...
@@ -223,7 +223,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
...
@@ -223,7 +223,7 @@ public class SelfSupportListener extends EmqxListener implements InitializingBea
//增加告警
//增加告警
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
AlarmPoint
alarmPoint1
=
new
AlarmPoint
();
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointId
(
eqpId
);
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint1
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setUpdateDate
(
new
Date
());
alarmPoint1
.
setIsAlarm
(
1
);
//不合格
alarmPoint1
.
setIsAlarm
(
1
);
//不合格
alarmPoint1
.
setContent
(
eqpName
+
"-"
+
ipAddress
+
"-"
+
metricKey
);
alarmPoint1
.
setContent
(
eqpName
+
"-"
+
ipAddress
+
"-"
+
metricKey
);
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/AlarmWebSocketClient.java
View file @
2c115bd8
...
@@ -55,9 +55,9 @@ public class AlarmWebSocketClient extends WebSocketClient {
...
@@ -55,9 +55,9 @@ public class AlarmWebSocketClient extends WebSocketClient {
// @Value("${params.patrol}")
// @Value("${params.patrol}")
// private String address;
// private String address;
private
PatrolRemoteClient
patrolRemoteClient
;
private
PatrolRemoteClient
patrolRemoteClient
;
private
static
ApplicationContext
allpicationContext
;
private
static
ApplicationContext
allpicationContext
;
public
static
void
setAllpicationContext
(
ApplicationContext
context
)
{
public
static
void
setAllpicationContext
(
ApplicationContext
context
)
{
allpicationContext
=
context
;
allpicationContext
=
context
;
}
}
...
@@ -99,7 +99,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
...
@@ -99,7 +99,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
String
curStatus
=
msgJson
.
getString
(
"currentState"
);
String
curStatus
=
msgJson
.
getString
(
"currentState"
);
synchronized
(
this
)
{
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
))
{
if
(
AlarmPointEnum
.
已确认已清除
.
getName
().
equals
(
curStatus
)
||
AlarmPointEnum
.
未确认已清除
.
getName
().
equals
(
curStatus
))
{
alarmPointService
.
deleteItems
(
pointList
);
alarmPointService
.
deleteItems
(
pointList
);
log
.
info
(
"Clear alarm data ...success"
);
log
.
info
(
"Clear alarm data ...success"
);
...
@@ -115,7 +115,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
...
@@ -115,7 +115,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setSourceId
(
msgJson
.
getString
(
"sourceId"
));
alarmPoint
.
setSourceId
(
msgJson
.
getString
(
"sourceId"
));
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
设备
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
SB
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
@@ -162,7 +162,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
...
@@ -162,7 +162,7 @@ public class AlarmWebSocketClient extends WebSocketClient {
iAlarmDao
.
save
(
alarm
);
iAlarmDao
.
save
(
alarm
);
log
.
info
(
"Update alarm records ...success"
);
log
.
info
(
"Update alarm records ...success"
);
}
else
{
}
else
{
// if (alarm == null || AlarmPointEnum.已确认已清除.getName().equals(curStatus)
// if (alarm == null || AlarmPointEnum.已确认已清除.getName().equals(curStatus)
// || AlarmPointEnum.未确认已清除.getName().equals(curStatus)) {
// || AlarmPointEnum.未确认已清除.getName().equals(curStatus)) {
Alarm
alarm
=
new
Alarm
();
Alarm
alarm
=
new
Alarm
();
alarm
.
setSourceId
(
msgJson
.
getString
(
"sourceId"
));
alarm
.
setSourceId
(
msgJson
.
getString
(
"sourceId"
));
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/FireDetectionWebSocketClient.java
View file @
2c115bd8
...
@@ -57,7 +57,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -57,7 +57,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
// @Value("${params.patrol}")
// @Value("${params.patrol}")
// private String address;
// private String address;
private
static
ApplicationContext
allpicationContext
;
private
static
ApplicationContext
allpicationContext
;
private
PatrolRemoteClient
patrolRemoteClient
;
private
PatrolRemoteClient
patrolRemoteClient
;
public
static
void
setAllpicationContext
(
ApplicationContext
context
)
{
public
static
void
setAllpicationContext
(
ApplicationContext
context
)
{
...
@@ -105,7 +105,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -105,7 +105,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
String
affiliatedSystem
=
equipmentAttrs
.
getString
(
"affiliatedSystem"
);
String
affiliatedSystem
=
equipmentAttrs
.
getString
(
"affiliatedSystem"
);
if
(
affiliatedSystem
!=
null
&&
"火探"
.
equals
(
affiliatedSystem
))
{
if
(
affiliatedSystem
!=
null
&&
"火探"
.
equals
(
affiliatedSystem
))
{
log
.
info
(
"Received message:"
+
paramString
);
log
.
info
(
"Received message:"
+
paramString
);
Long
eqpId
=
msgJson
.
getLong
(
"eqpId"
);
Long
eqpId
=
msgJson
.
getLong
(
"eqpId"
);
String
status
=
msgJson
.
getString
(
"status"
);
String
status
=
msgJson
.
getString
(
"status"
);
String
sourceId
=
equipmentAttrs
.
getString
(
"sourceId"
);
String
sourceId
=
equipmentAttrs
.
getString
(
"sourceId"
);
...
@@ -114,23 +114,23 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -114,23 +114,23 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
Integer
level
=
msgJson
.
getInteger
(
"level"
)
!=
null
?
msgJson
.
getInteger
(
"level"
)
:
1
;
Integer
level
=
msgJson
.
getInteger
(
"level"
)
!=
null
?
msgJson
.
getInteger
(
"level"
)
:
1
;
if
(
eqpId
!=
null
&&
status
!=
null
&&
!
""
.
equals
(
status
)
&&
sourceId
!=
null
&&
!
""
.
equals
(
sourceId
))
{
if
(
eqpId
!=
null
&&
status
!=
null
&&
!
""
.
equals
(
status
)
&&
sourceId
!=
null
&&
!
""
.
equals
(
sourceId
))
{
synchronized
(
this
)
{
synchronized
(
this
)
{
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
火探
.
getCode
(),
eqpId
);
List
<
AlarmPoint
>
pointList
=
alarmPointService
.
selectPointTypeAndPointId
(
AlarmPointTypeEnum
.
HT
.
getCode
(),
eqpId
);
if
(!
FireDetectionAlarmType
.
产生
.
getCode
().
equals
(
status
))
{
if
(!
FireDetectionAlarmType
.
产生
.
getCode
().
equals
(
status
))
{
alarmPointService
.
deleteItems
(
pointList
);
alarmPointService
.
deleteItems
(
pointList
);
log
.
info
(
"Clear alarm data ...success"
);
log
.
info
(
"Clear alarm data ...success"
);
// iTopographyService.sendAbnormal(eqpId, 0);
// iTopographyService.sendAbnormal(eqpId, 0);
iTopographyService
.
sendAbnormalByType
(
String
.
valueOf
(
eqpId
),
iTopographyService
.
sendAbnormalByType
(
String
.
valueOf
(
eqpId
),
AbnormalStateEnum
.
N
.
getCode
(),
AbnormalStateEnum
.
N
.
getCode
(),
TopoNodeTypeEnum
.
动环监控
.
getType
(),
TopoNodeTypeEnum
.
动环监控
.
getType
(),
alramContent
);
alramContent
);
}
else
{
}
else
{
if
(
null
==
pointList
||
pointList
.
size
()
==
0
)
{
if
(
null
==
pointList
||
pointList
.
size
()
==
0
)
{
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
火探
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
HT
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setContent
(
alramContent
);
alarmPoint
.
setPointAttrs
(
equipmentAttrsJson
);
alarmPoint
.
setPointAttrs
(
equipmentAttrsJson
);
...
@@ -138,7 +138,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -138,7 +138,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
alarmPoint
.
setCode
(
msgJson
.
getString
(
"orgCode"
));
alarmPoint
.
setCode
(
msgJson
.
getString
(
"orgCode"
));
alarmPointService
.
saveItem
(
alarmPoint
);
alarmPointService
.
saveItem
(
alarmPoint
);
log
.
info
(
"Save alarm data ...success"
);
log
.
info
(
"Save alarm data ...success"
);
//String url = address + "api/msgSubscribe/alarmNotification";
//String url = address + "api/msgSubscribe/alarmNotification";
try
{
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
@@ -151,12 +151,12 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -151,12 +151,12 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
info
(
"手机推送告警信息失败...fail"
+
e
.
getMessage
());
log
.
info
(
"手机推送告警信息失败...fail"
+
e
.
getMessage
());
}
}
}
}
String
alarmLevel
=
AbnormalStateEnum
.
getAbnormalName
(
level
);
String
alarmLevel
=
AbnormalStateEnum
.
getAbnormalName
(
level
);
// AbnormalStateEnum enum1 = AbnormalStateEnum.getEnum(alarmLevel);
// AbnormalStateEnum enum1 = AbnormalStateEnum.getEnum(alarmLevel);
// iTopographyService.sendAbnormal(eqpId, enum1 == null ? 0 : enum1.getCode());
// iTopographyService.sendAbnormal(eqpId, enum1 == null ? 0 : enum1.getCode());
AbnormalStateEnum
enum1
=
AbnormalStateEnum
.
getEnum
(
alarmLevel
);
AbnormalStateEnum
enum1
=
AbnormalStateEnum
.
getEnum
(
alarmLevel
);
iTopographyService
.
sendAbnormalByType
(
String
.
valueOf
(
eqpId
),
enum1
==
null
?
0
:
enum1
.
getCode
(),
iTopographyService
.
sendAbnormalByType
(
String
.
valueOf
(
eqpId
),
enum1
==
null
?
0
:
enum1
.
getCode
(),
TopoNodeTypeEnum
.
动环监控
.
getType
(),
alramContent
);
TopoNodeTypeEnum
.
动环监控
.
getType
(),
alramContent
);
...
@@ -169,7 +169,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -169,7 +169,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
String
url
=
(
String
)
props
.
get
(
"params.remoteWebsocketUrl"
)
+
"/generic/sendMessage"
;
String
url
=
(
String
)
props
.
get
(
"params.remoteWebsocketUrl"
)
+
"/generic/sendMessage"
;
HttpUtil
.
PostJson
(
url
,
JSON
.
toJSONString
(
param
));
HttpUtil
.
PostJson
(
url
,
JSON
.
toJSONString
(
param
));
log
.
info
(
"send websocekt info:"
+
param
);
log
.
info
(
"send websocekt info:"
+
param
);
//告警记录
//告警记录
String
queryColumn
=
eqpId
+
"_"
+
msgJson
.
getString
(
"type"
);
String
queryColumn
=
eqpId
+
"_"
+
msgJson
.
getString
(
"type"
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
...
@@ -189,7 +189,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
...
@@ -189,7 +189,7 @@ public class FireDetectionWebSocketClient extends WebSocketClient {
alarm
.
setAlarmReason
(
alramContent
);
alarm
.
setAlarmReason
(
alramContent
);
alarm
.
setAlarmSourceIp
(
msgJson
.
getString
(
"alarmSourceIp"
));
alarm
.
setAlarmSourceIp
(
msgJson
.
getString
(
"alarmSourceIp"
));
alarm
.
setAlarmSourceName
(
eqpName
);
alarm
.
setAlarmSourceName
(
eqpName
);
alarm
.
setAlarmSourceType
(
AlarmPointTypeEnum
.
火探
.
getName
());
alarm
.
setAlarmSourceType
(
AlarmPointTypeEnum
.
HT
.
getName
());
alarm
.
setCurrentState
(
FireDetectionAlarmType
.
getEnumStatus
(
status
));
alarm
.
setCurrentState
(
FireDetectionAlarmType
.
getEnumStatus
(
status
));
Date
date
=
new
Date
(
msgJson
.
getLong
(
"raiseTime"
));
Date
date
=
new
Date
(
msgJson
.
getLong
(
"raiseTime"
));
alarm
.
setHappenDate
(
df
.
format
(
date
));
alarm
.
setHappenDate
(
df
.
format
(
date
));
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/InspectionWebSocketClient.java
View file @
2c115bd8
This diff is collapsed.
Click to expand it.
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/MonitorAlarmWebSocketClient.java
View file @
2c115bd8
...
@@ -143,22 +143,22 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -143,22 +143,22 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
Map
<
String
,
Object
>
nodeDetailMap
=
iTopographyNodeRepository
.
findNodeDetailBySourceId
(
msgJson
.
getString
(
"sourceId"
));
Map
<
String
,
Object
>
nodeDetailMap
=
iTopographyNodeRepository
.
findNodeDetailBySourceId
(
msgJson
.
getString
(
"sourceId"
));
List
<
JSONObject
>
alarmAttributes
=
(
List
<
JSONObject
>)
msgJson
.
get
(
"capacityAttrList"
);
List
<
JSONObject
>
alarmAttributes
=
(
List
<
JSONObject
>)
msgJson
.
get
(
"capacityAttrList"
);
List
<
Map
<
String
,
String
>>
DHlist
=
new
ArrayList
<>();
synchronized
(
this
)
{
synchronized
(
this
)
{
//
拼接json存入动环详情表
//
1.指标是否有异常
B
oolean
alarmFlagBoolean
=
false
;
b
oolean
alarmFlagBoolean
=
false
;
for
(
JSONObject
a
:
alarmAttributes
)
{
for
(
JSONObject
a
:
alarmAttributes
)
{
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
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
;
alarmFlagBoolean
=
true
;
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
break
;
break
;
}
}
}
}
//组装动环信息JSON
//2.修改动环详情表的信息
List
<
Map
<
String
,
String
>>
DHlist
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
alarmAttributes
.
size
();
i
++)
{
JSONObject
a
=
alarmAttributes
.
get
(
i
);
for
(
JSONObject
a
:
alarmAttributes
)
{
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
Map
<
String
,
String
>
map
=
new
HashMap
();
Map
<
String
,
String
>
map
=
new
HashMap
();
...
@@ -202,8 +202,8 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -202,8 +202,8 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
}
}
//告警记录
//
3.数据插入
告警记录
String
res
=
AlarmPointEnum
.
正常
.
getName
();
String
res
=
AlarmPointEnum
.
NORMAL
.
getName
();
String
alarmTypeCombination
=
""
;
String
alarmTypeCombination
=
""
;
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
...
@@ -211,9 +211,9 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -211,9 +211,9 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
continue
;
continue
;
}
}
String
alarmType
=
(
String
)
atrJson
.
get
(
"displayName"
);
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
;
alarmTypeCombination
=
alarmType
+
alarmTypeCombination
;
res
=
AlarmPointEnum
.
异常
.
getName
();
res
=
AlarmPointEnum
.
ABNORMAL
.
getName
();
}
}
}
}
...
@@ -228,10 +228,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -228,10 +228,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
orgCode
=
authOrgTemp
;
orgCode
=
authOrgTemp
;
}
}
//添加告警记录
if
(!
"运行参数"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)){
if
(!
"运行参数"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)||!
"常电监测"
.
equals
(
cpblName
)){
addRecordAlarm
(
alarmTypeCombination
,
res
,
sourceId
,
orgCode
,
authOrg
,
eqpName
,
cpblName
,
alramContent
);
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
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
selectByQuerySourceId
(
sourceId
);
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
alarmPointService
.
deleteItems
(
pointList
);
alarmPointService
.
deleteItems
(
pointList
);
...
@@ -242,21 +244,15 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -242,21 +244,15 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
}
}
}
else
{
}
else
{
if
(
alarmFlagBoolean
&&
pointList
.
size
()
==
0
)
{
if
(
alarmFlagBoolean
&&
pointList
.
size
()
==
0
)
{
// String alramContent = msgJson.getString("describe");
String
eqpType
=
msgJson
.
getString
(
"eqpType"
);
String
eqpType
=
msgJson
.
getString
(
"eqpType"
);
// String eqpName = msgJson.getString("eqpName");
String
equipmentAttrs
=
msgJson
.
getString
(
"equipmentAttrs"
);
String
equipmentAttrs
=
msgJson
.
getString
(
"equipmentAttrs"
);
// String sourceId = msgJson.getString("sourceId");
String
authOrgs
=
getAuthOrg
(
msgJson
.
getString
(
"authOrg"
));
String
authOrgs
=
getAuthOrg
(
msgJson
.
getString
(
"authOrg"
));
//String orgCode = msgJson.getString("orgCode");
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
AlarmPoint
alarmPoint
=
new
AlarmPoint
();
alarmPoint
.
setCode
(
authOrgs
);
alarmPoint
.
setCode
(
authOrgs
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setSourceId
(
sourceId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
// alarmPoint.setPointType(eqpType);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
DH
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
动环
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
@@ -265,14 +261,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -265,14 +261,12 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarmPointService
.
saveItem
(
alarmPoint
);
alarmPointService
.
saveItem
(
alarmPoint
);
log
.
info
(
"Save alarm data....success"
);
log
.
info
(
"Save alarm data....success"
);
//推送消息巡检app
// 6 .推送消息巡检app
//String url = address + "api/msgSubscribe/alarmNotification";
try
{
try
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"code"
,
msgJson
.
getString
(
"orgCode"
));
map
.
put
(
"code"
,
msgJson
.
getString
(
"orgCode"
));
map
.
put
(
"body"
,
"告警源名称:"
+
eqpName
+
TAB
+
"告警信息"
+
alramContent
);
map
.
put
(
"body"
,
"告警源名称:"
+
eqpName
+
TAB
+
"告警信息"
+
alramContent
);
String
stringJson
=
JSONObject
.
toJSONString
(
map
);
String
stringJson
=
JSONObject
.
toJSONString
(
map
);
//HttpUtil.PostJson(url, stringJson);
CommonResponse
result
=
patrolRemoteClient
.
sendAlarmNotification
(
stringJson
);
CommonResponse
result
=
patrolRemoteClient
.
sendAlarmNotification
(
stringJson
);
log
.
info
(
"手机推送告警信息...success"
);
log
.
info
(
"手机推送告警信息...success"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -289,6 +283,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -289,6 +283,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
if
(
alarmFlagBoolean
){
if
(
alarmFlagBoolean
){
iTopographyService
.
sendAbnormal
(
msgJson
.
getString
(
"sourceId"
),
1
);
iTopographyService
.
sendAbnormal
(
msgJson
.
getString
(
"sourceId"
),
1
);
}
}
//7.给前台发送websocket
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"updateDate"
);
Sort
sort
=
new
Sort
(
Sort
.
Direction
.
DESC
,
"updateDate"
);
List
<
AlarmPoint
>
alarms
=
alarmPointService
.
findAll
(
sort
);
List
<
AlarmPoint
>
alarms
=
alarmPointService
.
findAll
(
sort
);
...
@@ -346,7 +341,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -346,7 +341,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarm
.
setContinueDate
(
subtract
);
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
);
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
}
else
{
}
else
{
alarm
.
setClearDate
(
DateTimeKit
.
now
());
alarm
.
setClearDate
(
DateTimeKit
.
now
());
...
@@ -370,7 +365,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
...
@@ -370,7 +365,7 @@ public class MonitorAlarmWebSocketClient extends WebSocketClient {
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
List
<
Alarm
>
curAlarmRList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
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
);
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
iAlarmDao
.
save
(
alarm
);
iAlarmDao
.
save
(
alarm
);
}
else
{
}
else
{
...
...
AmosBankService/src/main/java/com/yeejoin/amos/bank/webSocket/ShiduAlarmWebSocketClient.java
View file @
2c115bd8
...
@@ -151,7 +151,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -151,7 +151,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
for
(
JSONObject
a
:
alarmAttributes
)
{
for
(
JSONObject
a
:
alarmAttributes
)
{
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
atr
=
(
String
)
a
.
get
(
"name"
);
String
res
=
(
String
)
msgJson
.
get
(
atr
);
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
;
alarmFlagBoolean
=
true
;
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
log
.
info
(
"Moving ring device["
+
eqpId
+
"]"
+
atr
+
"abnormal"
);
break
;
break
;
...
@@ -204,7 +204,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -204,7 +204,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
iTopographyNodeDetailDao
.
save
(
topographyNodeDetail
);
}
}
//告警记录
//告警记录
String
res
=
AlarmPointEnum
.
正常
.
getName
();
String
res
=
AlarmPointEnum
.
NORMAL
.
getName
();
String
alarmTypeCombination
=
""
;
String
alarmTypeCombination
=
""
;
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
for
(
JSONObject
atrJson
:
alarmAttributes
)
{
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
String
atrName
=
(
String
)
atrJson
.
get
(
"name"
);
...
@@ -212,9 +212,9 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -212,9 +212,9 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
continue
;
continue
;
}
}
String
alarmType
=
(
String
)
atrJson
.
get
(
"displayName"
);
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
;
alarmTypeCombination
=
alarmType
+
alarmTypeCombination
;
res
=
AlarmPointEnum
.
异常
.
getName
();
res
=
AlarmPointEnum
.
ABNORMAL
.
getName
();
}
}
}
}
Long
cpblId
=
msgJson
.
getLong
(
"cpblId"
);
Long
cpblId
=
msgJson
.
getLong
(
"cpblId"
);
...
@@ -229,9 +229,9 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -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
);
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
);
List
<
Alarm
>
curAlarmList
=
alarmService
.
selectByQuerySourceId
(
sourceId
);
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
if
(!
alarmFlagBoolean
&&
pointList
.
size
()
>
0
)
{
alarmPointService
.
deleteItems
(
pointList
);
alarmPointService
.
deleteItems
(
pointList
);
...
@@ -256,7 +256,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -256,7 +256,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setPointId
(
eqpId
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
alarmPoint
.
setAuthOrg
(
authOrgs
);
// alarmPoint.setPointType(eqpType);
// alarmPoint.setPointType(eqpType);
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
动环
.
getCode
());
alarmPoint
.
setPointType
(
AlarmPointTypeEnum
.
DH
.
getCode
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setUpdateDate
(
new
Date
());
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setContent
(
eqpName
+
alarmTypeCombination
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
alarmPoint
.
setPointAttrs
(
equipmentAttrs
);
...
@@ -336,7 +336,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -336,7 +336,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarm
.
setContinueDate
(
subtract
);
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
);
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
}
else
{
}
else
{
alarm
.
setClearDate
(
DateTimeKit
.
now
());
alarm
.
setClearDate
(
DateTimeKit
.
now
());
...
@@ -360,7 +360,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
...
@@ -360,7 +360,7 @@ public class ShiduAlarmWebSocketClient extends WebSocketClient {
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setHappenDate
(
DateTimeKit
.
now
());
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
alarm
.
setQueryColumn
(
sourceId
+
"_"
+
cpblName
);
List
<
Alarm
>
curAlarmRList
=
alarmService
.
findByQueryColumn
(
queryColumn
);
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
);
alarm
.
setCurrentState
(
ALARM_ABNORMAL_STATUS
);
iAlarmDao
.
save
(
alarm
);
iAlarmDao
.
save
(
alarm
);
}
else
{
}
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;
...
@@ -3,13 +3,11 @@ package com.yeejoin.amos.spc.business.controller;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.data.domain.Sort
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -21,8 +19,6 @@ import com.yeejoin.amos.op.core.common.query.DaoCriteria;
...
@@ -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.common.response.CommonResponse
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.op.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.spc.business.param.ReginParams
;
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.CommonPageable
;
import
com.yeejoin.amos.spc.core.common.request.CommonRequest
;
import
com.yeejoin.amos.spc.core.common.request.CommonRequest
;
import
com.yeejoin.amos.spc.core.enums.QueryOperatorEnum
;
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;
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.spc.business.controller;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.bank.service.IDynamicRingDataService
;
import
org.apache.log4j.Logger
;
import
org.apache.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
...
@@ -34,7 +35,7 @@ public class SpcRiskSourceController extends BaseController {
...
@@ -34,7 +35,7 @@ public class SpcRiskSourceController extends BaseController {
@Autowired
@Autowired
private
ISpcRiskSourceService
riskSourceService
;
private
ISpcRiskSourceService
riskSourceService
;
/**
/**
* 获取风险源类型
* 获取风险源类型
...
@@ -143,8 +144,8 @@ public class SpcRiskSourceController extends BaseController {
...
@@ -143,8 +144,8 @@ public class SpcRiskSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
riskSourceService
.
getRiskSourceBoDetailById
(
id
));
return
CommonResponseUtil
.
success
(
riskSourceService
.
getRiskSourceBoDetailById
(
id
));
}
}
/**
/**
* 查询风险源信息支持分页,条件查询
* 查询风险源信息支持分页,条件查询
*
*
...
...
AmosBankService/src/main/java/com/yeejoin/amos/spc/business/controller/View3DController.java
View file @
2c115bd8
...
@@ -41,7 +41,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -41,7 +41,7 @@ import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
/**
/**
*
*
* <pre>
* <pre>
* 界面视图Controller
* 界面视图Controller
* </pre>
* </pre>
...
@@ -62,21 +62,21 @@ public class View3DController extends BaseController {
...
@@ -62,21 +62,21 @@ public class View3DController extends BaseController {
@Autowired
@Autowired
private
ISpcRiskSourceService
riskSourceService
;
private
ISpcRiskSourceService
riskSourceService
;
@Autowired
@Autowired
private
ISpcMajorHazardInstallationService
iSpcMajorHazardInstallationService
;
private
ISpcMajorHazardInstallationService
iSpcMajorHazardInstallationService
;
@Autowired
@Autowired
ISpcEquipmentService
iEquipmentService
;
ISpcEquipmentService
iEquipmentService
;
@Autowired
@Autowired
private
IDynamicRingDataService
iDynamicRingDataService
;
private
IDynamicRingDataService
iDynamicRingDataService
;
@Autowired
@Autowired
private
IEquipmentService
iequipmentService
;
private
IEquipmentService
iequipmentService
;
/**
/**
*
*
* <pre>
* <pre>
* 初始化三维视图节点
* 初始化三维视图节点
* </pre>
* </pre>
...
@@ -91,14 +91,14 @@ public class View3DController extends BaseController {
...
@@ -91,14 +91,14 @@ public class View3DController extends BaseController {
@ApiParam
(
value
=
"组织code"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
orgCode
)
{
@ApiParam
(
value
=
"组织code"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
orgCode
)
{
if
(
StringUtil
.
isNotEmpty
(
type
)
&&
StringUtil
.
isNotEmpty
(
orgCode
))
{
if
(
StringUtil
.
isNotEmpty
(
type
)
&&
StringUtil
.
isNotEmpty
(
orgCode
))
{
//动环数据
//动环数据
String
token
=
getToken
();
String
token
=
getToken
();
if
(
type
.
equals
(
"dynamicRingData"
))
{
if
(
type
.
equals
(
"dynamicRingData"
))
{
ArrayList
<
Node3DVoResponse
>
query3dData
=
iDynamicRingDataService
.
query3dData
(
token
,
orgCode
);
ArrayList
<
Node3DVoResponse
>
query3dData
=
iDynamicRingDataService
.
query3dData
(
token
,
orgCode
);
return
CommonResponseUtil
.
success
(
query3dData
);
return
CommonResponseUtil
.
success
(
query3dData
);
}
else
if
(
type
.
equals
(
"impEquipment"
)){
//设备
}
else
if
(
type
.
equals
(
"impEquipment"
)){
//设备
return
CommonResponseUtil
.
success
(
iequipmentService
.
queryEqui3dData
(
orgCode
));
return
CommonResponseUtil
.
success
(
iequipmentService
.
queryEqui3dData
(
orgCode
));
}
}
return
CommonResponseUtil
.
success
(
view3DService
.
findViewDataByType
(
type
,
orgCode
));
return
CommonResponseUtil
.
success
(
view3DService
.
findViewDataByType
(
type
,
orgCode
));
...
@@ -109,7 +109,7 @@ public class View3DController extends BaseController {
...
@@ -109,7 +109,7 @@ public class View3DController extends BaseController {
/**
/**
* 获取风险详情
* 获取风险详情
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -122,10 +122,10 @@ public class View3DController extends BaseController {
...
@@ -122,10 +122,10 @@ public class View3DController extends BaseController {
}
}
return
CommonResponseUtil
.
failure
();
return
CommonResponseUtil
.
failure
();
}
}
/**
/**
* 获取点详情
* 获取点详情
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -142,7 +142,7 @@ public class View3DController extends BaseController {
...
@@ -142,7 +142,7 @@ public class View3DController extends BaseController {
/**
/**
* 获取设备详情
* 获取设备详情
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -159,7 +159,7 @@ public class View3DController extends BaseController {
...
@@ -159,7 +159,7 @@ public class View3DController extends BaseController {
/**
/**
* 获取隐患详情
* 获取隐患详情
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -176,7 +176,7 @@ public class View3DController extends BaseController {
...
@@ -176,7 +176,7 @@ public class View3DController extends BaseController {
/**
/**
* 根据类型查询资源信息
* 根据类型查询资源信息
*
*
* @param type
* @param type
* @param queryRequests
* @param queryRequests
* @param commonPageable
* @param commonPageable
...
@@ -260,10 +260,10 @@ public class View3DController extends BaseController {
...
@@ -260,10 +260,10 @@ public class View3DController extends BaseController {
return
CommonResponseUtil
.
success
(
view3DMapper
.
queryForVideomonitorinfo3d
());
return
CommonResponseUtil
.
success
(
view3DMapper
.
queryForVideomonitorinfo3d
());
}
}
/**
/**
* 巡点查询
* 巡点查询
*
*
* @param id
* @param id
* @return
* @return
*/
*/
...
@@ -271,7 +271,7 @@ public class View3DController extends BaseController {
...
@@ -271,7 +271,7 @@ public class View3DController extends BaseController {
@ApiOperation
(
value
=
"巡点查询"
,
notes
=
"巡点查询"
)
@ApiOperation
(
value
=
"巡点查询"
,
notes
=
"巡点查询"
)
public
CommonResponse
getpointlist
(
public
CommonResponse
getpointlist
(
@ApiParam
(
value
=
"节点类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
floor
,
@RequestParam
(
required
=
false
)
String
code
)
{
@ApiParam
(
value
=
"节点类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
floor
,
@RequestParam
(
required
=
false
)
String
code
)
{
try
{
try
{
return
CommonResponseUtil
.
success
(
view3DMapper
.
getpointlist
(
floor
,
code
));
return
CommonResponseUtil
.
success
(
view3DMapper
.
getpointlist
(
floor
,
code
));
...
@@ -281,23 +281,23 @@ public class View3DController extends BaseController {
...
@@ -281,23 +281,23 @@ public class View3DController extends BaseController {
return
CommonResponseUtil
.
failure
();
return
CommonResponseUtil
.
failure
();
}
}
}
}
@GetMapping
(
value
=
"/updatepoint"
,
produces
=
"application/json;charset=UTF-8"
)
@GetMapping
(
value
=
"/updatepoint"
,
produces
=
"application/json;charset=UTF-8"
)
@ApiOperation
(
value
=
"修改巡点点"
,
notes
=
"修改巡点点"
)
@ApiOperation
(
value
=
"修改巡点点"
,
notes
=
"修改巡点点"
)
public
CommonResponse
updatepoint
(
public
CommonResponse
updatepoint
(
@ApiParam
(
value
=
"节点类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
coordinates
,
@RequestParam
(
required
=
false
)
String
id
)
{
@ApiParam
(
value
=
"节点类型"
,
required
=
false
)
@RequestParam
(
required
=
false
)
String
coordinates
,
@RequestParam
(
required
=
false
)
String
id
)
{
try
{
try
{
view3DMapper
.
updatepoint
(
coordinates
,
id
);
view3DMapper
.
updatepoint
(
coordinates
,
id
);
return
CommonResponseUtil
.
success
();
return
CommonResponseUtil
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
CommonResponseUtil
.
failure
();
return
CommonResponseUtil
.
failure
();
}
}
}
}
}
}
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