Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
YeeAmosFireAutoSysRoot
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
station
YeeAmosFireAutoSysRoot
Commits
74f891e6
Commit
74f891e6
authored
Mar 23, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
结决冲突
parents
aa936af5
8a673af9
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
201 additions
and
172 deletions
+201
-172
pom.xml
YeeAmosFireAutoSysCommon/pom.xml
+1
-1
pom.xml
YeeAmosFireAutoSysService/pom.xml
+2
-2
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+30
-35
WebMqttComponent.java
...yeejoin/amos/fas/business/action/mq/WebMqttComponent.java
+54
-6
WebMqttSubscribe.java
...yeejoin/amos/fas/business/action/mq/WebMqttSubscribe.java
+2
-2
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+0
-14
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+35
-58
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+2
-5
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+25
-27
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+7
-2
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+0
-8
ToipResponse.java
...yeejoin/amos/fas/business/service/model/ToipResponse.java
+2
-5
EquipmentSpecificForRiskVo.java
...join/amos/fas/business/vo/EquipmentSpecificForRiskVo.java
+3
-0
PlanStepJsonVO.java
...java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
+10
-1
pom.xml
YeeAmosFireAutoSysStart/pom.xml
+2
-2
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+2
-1
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+20
-0
dbTemplate_equipment_specific.xml
...ain/resources/db/mapper/dbTemplate_equipment_specific.xml
+2
-1
pom.xml
pom.xml
+2
-2
No files found.
YeeAmosFireAutoSysCommon/pom.xml
View file @
74f891e6
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
</parent>
</parent>
<!-- <dependencies>
<!-- <dependencies>
...
...
YeeAmosFireAutoSysService/pom.xml
View file @
74f891e6
...
@@ -14,14 +14,14 @@
...
@@ -14,14 +14,14 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
</parent>
</parent>
<dependencies>
<dependencies>
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<artifactId>
YeeAmosFireAutoSysCommon
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
74f891e6
...
@@ -138,12 +138,6 @@ public class ContingencyAction implements CustomerAction {
...
@@ -138,12 +138,6 @@ public class ContingencyAction implements CustomerAction {
@Value
(
"${maparea.action.is-area}"
)
@Value
(
"${maparea.action.is-area}"
)
private
String
isArea
;
private
String
isArea
;
// @Value("${plan.default.roleCode}")
// private String defaultRoleCode;
@Value
(
"${plan.web.isUpdatePlanStep}"
)
private
Boolean
isUpdatePlanStep
;
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
private
static
Map
<
String
,
String
>
OPERATE_RECORD_ID
=
new
HashMap
<>();
private
static
Map
<
String
,
ContingencyPlanInstance
>
OPERATE_CONTINGENCYPLAN_INSTANCE
=
new
HashMap
<>();
private
static
Map
<
String
,
ContingencyPlanInstance
>
OPERATE_CONTINGENCYPLAN_INSTANCE
=
new
HashMap
<>();
...
@@ -455,7 +449,6 @@ public class ContingencyAction implements CustomerAction {
...
@@ -455,7 +449,6 @@ public class ContingencyAction implements CustomerAction {
SafteyPlanResult
result
=
new
SafteyPlanResult
();
SafteyPlanResult
result
=
new
SafteyPlanResult
();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
// String contingencyPlanId = getContingencyPlanId(contingencyRo.getBatchNo(), actionName, icon, tips, buttonJson);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
tempmap1
.
put
(
"actionName"
,
actionName
);
tempmap1
.
put
(
"actionName"
,
actionName
);
...
@@ -466,14 +459,13 @@ public class ContingencyAction implements CustomerAction {
...
@@ -466,14 +459,13 @@ public class ContingencyAction implements CustomerAction {
result
.
add
(
tempmap1
);
result
.
add
(
tempmap1
);
this
.
sendcmd
(
"optionarea"
,
paramObj
,
result
);
this
.
sendcmd
(
"optionarea"
,
paramObj
,
result
);
if
(!
isUpdatePlanStep
)
{
// 默认调用当前动作
try
{
try
{
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
buttonJson
,
ButtonJsonVO
.
class
);
ButtonJsonVO
buttonJsonVO
=
JSONObject
.
parseObject
(
buttonJson
,
ButtonJsonVO
.
class
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
Map
<
String
,
Object
>
map
=
buttonJsonVO
.
getOperate
().
get
(
buttonJsonVO
.
getOperate
().
size
()
-
1
);
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
iContingencyInstance
.
fire
(
batchNo
,
buttonJsonVO
.
getStepCode
(),
buttonJson
,
contingencyPlanId
,
map
.
get
(
"code"
).
toString
(),
"CANCEL_0"
,
"A"
,
"false"
,
"false"
,
RequestContext
.
getToken
(),
RequestContext
.
getProduct
(),
RequestContext
.
getAppKey
(),
null
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"optionarea 加入队列失败-->"
+
e
.
getMessage
());
log
.
error
(
"optionarea 加入队列失败-->"
+
e
.
getMessage
());
}
}
}
MessageVO
messageVO
=
new
MessageVO
();
MessageVO
messageVO
=
new
MessageVO
();
...
@@ -488,25 +480,25 @@ public class ContingencyAction implements CustomerAction {
...
@@ -488,25 +480,25 @@ public class ContingencyAction implements CustomerAction {
}
}
}
}
private
boolean
sendButton
(
String
batchNo
,
String
contingencyPlanId
,
String
equipmentId
,
String
actionName
,
String
buttonJson
)
{
//
private boolean sendButton(String batchNo, String contingencyPlanId, String equipmentId, String actionName, String buttonJson) {
ObjectMapper
objectMapper
=
new
ObjectMapper
();
//
ObjectMapper objectMapper = new ObjectMapper();
try
{
//
try {
Map
button
=
objectMapper
.
readValue
(
buttonJson
,
Map
.
class
);
//
Map button = objectMapper.readValue(buttonJson, Map.class);
Map
operateInstance
=
(
Map
)
((
List
)
button
.
get
(
"operate"
)).
get
(
0
);
//
Map operateInstance = (Map) ((List) button.get("operate")).get(0);
ContingencyDeviceStatus
contingencyDeviceStatus
=
new
ContingencyDeviceStatus
();
//
ContingencyDeviceStatus contingencyDeviceStatus = new ContingencyDeviceStatus();
contingencyDeviceStatus
.
setActionName
(
actionName
);
//
contingencyDeviceStatus.setActionName(actionName);
contingencyDeviceStatus
.
setButtonCode
(
String
.
valueOf
(
operateInstance
.
get
(
"code"
)));
//
contingencyDeviceStatus.setButtonCode(String.valueOf(operateInstance.get("code")));
contingencyDeviceStatus
.
setConfirm
(
"CONFIRM"
);
//
contingencyDeviceStatus.setConfirm("CONFIRM");
contingencyDeviceStatus
.
setContingencyPlanId
(
contingencyPlanId
);
//
contingencyDeviceStatus.setContingencyPlanId(contingencyPlanId);
contingencyDeviceStatus
.
setEquipmentId
(
equipmentId
);
//
contingencyDeviceStatus.setEquipmentId(equipmentId);
contingencyDeviceStatus
.
setStepCode
(
String
.
valueOf
(
button
.
get
(
"stepCode"
)));
//
contingencyDeviceStatus.setStepCode(String.valueOf(button.get("stepCode")));
contingencyDeviceStatus
.
setStepState
(
String
.
valueOf
(
operateInstance
.
get
(
"stepState"
)));
//
contingencyDeviceStatus.setStepState(String.valueOf(operateInstance.get("stepState")));
riskSourceService
.
queryContingencyDeviceStatus
(
contingencyDeviceStatus
);
//
riskSourceService.queryContingencyDeviceStatus(contingencyDeviceStatus);
}
catch
(
IOException
e
)
{
//
} catch (IOException e) {
e
.
printStackTrace
();
//
e.printStackTrace();
}
//
}
return
false
;
//
return false;
}
//
}
/**
/**
...
@@ -855,6 +847,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -855,6 +847,7 @@ public class ContingencyAction implements CustomerAction {
public
void
autoExecuteActionV2
(
@MethodParam
(
paramLabel
=
"步骤编码"
)
String
stepCode
,
@MethodParam
(
paramLabel
=
"按钮编码"
)
String
buttonCode
,
@MethodParam
(
paramLabel
=
"按钮状态"
)
String
confirm
,
@MethodParam
(
paramLabel
=
"步骤状态"
)
String
stepState
,
@MethodParam
(
paramLabel
=
"动作名称"
)
String
actionName
,
@MethodParam
(
paramLabel
=
"图标"
)
String
icon
,
@MethodParam
(
paramLabel
=
"提示信息"
)
String
tips
,
@MethodParam
(
paramLabel
=
"按钮json字符串"
)
String
buttonJson
,
@MethodParam
(
paramLabel
=
"预案对象"
)
Object
paramObj
)
{
public
void
autoExecuteActionV2
(
@MethodParam
(
paramLabel
=
"步骤编码"
)
String
stepCode
,
@MethodParam
(
paramLabel
=
"按钮编码"
)
String
buttonCode
,
@MethodParam
(
paramLabel
=
"按钮状态"
)
String
confirm
,
@MethodParam
(
paramLabel
=
"步骤状态"
)
String
stepState
,
@MethodParam
(
paramLabel
=
"动作名称"
)
String
actionName
,
@MethodParam
(
paramLabel
=
"图标"
)
String
icon
,
@MethodParam
(
paramLabel
=
"提示信息"
)
String
tips
,
@MethodParam
(
paramLabel
=
"按钮json字符串"
)
String
buttonJson
,
@MethodParam
(
paramLabel
=
"预案对象"
)
Object
paramObj
)
{
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
String
batchNo
=
contingencyRo
.
getBatchNo
();
String
batchNo
=
contingencyRo
.
getBatchNo
();
long
startTime
=
System
.
currentTimeMillis
();
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
if
(!
findByBatchNoAndStatus
(
batchNo
))
{
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
ContingencyPlanInstance
contingencyPlanInstance
=
getContingencyPlan
(
contingencyRo
.
getBatchNo
(),
actionName
,
icon
,
tips
,
buttonJson
);
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
String
contingencyPlanId
=
contingencyPlanInstance
.
getId
();
...
@@ -866,6 +859,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -866,6 +859,8 @@ public class ContingencyAction implements CustomerAction {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
long
endTime
=
System
.
currentTimeMillis
();
log
.
warn
(
"自动执行动作V2耗时+++++++++++++++++++++++++++++++++"
+
(
endTime
-
startTime
)
/
1000
+
"秒"
+
", 当前步骤编号: "
+
stepCode
);
}
}
public
void
sendcmd
(
String
msgType
,
SafteyPlanResult
result
)
{
public
void
sendcmd
(
String
msgType
,
SafteyPlanResult
result
)
{
...
@@ -916,8 +911,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -916,8 +911,8 @@ public class ContingencyAction implements CustomerAction {
this
.
sendweb
(
"recordarea"
,
contingencyRo
,
result
);
this
.
sendweb
(
"recordarea"
,
contingencyRo
,
result
);
updateNumberPlan
(
batchNo
);
updateNumberPlan
(
batchNo
);
// 应急处置中断,初始化planStep,json数据;更新预案结束时间
// 应急处置中断,初始化planStep,json数据;更新预案结束时间
// planRuleService.updatePlanRuleByBatchNo(batchNo);
planStepService
.
initPlanStep
();
planStepService
.
initPlanStep
();
// 更新预案结束时间
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/mq/WebMqttComponent.java
View file @
74f891e6
...
@@ -6,18 +6,66 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -6,18 +6,66 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
javax.annotation.PostConstruct
;
import
java.util.concurrent.BlockingQueue
;
import
java.util.concurrent.ExecutorService
;
import
java.util.concurrent.Executors
;
import
java.util.concurrent.LinkedBlockingQueue
;
@Component
@Component
public
class
WebMqttComponent
{
public
class
WebMqttComponent
{
@Autowired
@Autowired
private
EmqKeeper
emqKeeper
;
private
EmqKeeper
emqKeeper
;
BlockingQueue
<
Message
>
queue
=
new
LinkedBlockingQueue
<
Message
>();
ExecutorService
service
=
null
;
@PostConstruct
public
void
init
()
{
service
=
Executors
.
newSingleThreadExecutor
();
service
.
execute
(
new
Runnable
()
{
@Override
public
void
run
()
{
while
(
true
)
{
try
{
Message
msg
=
queue
.
take
();
emqKeeper
.
getMqttClient
().
publish
(
msg
.
getTopic
(),
msg
.
getJsonStr
().
getBytes
(),
0
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
}
});
}
public
void
publish
(
String
topic
,
String
jsonStr
)
{
public
void
publish
(
String
topic
,
String
jsonStr
)
{
try
{
Message
msg
=
new
Message
(
topic
,
jsonStr
);
this
.
emqKeeper
.
getMqttClient
().
publish
(
topic
,
jsonStr
.
getBytes
(),
2
,
false
);
queue
.
add
(
msg
);
}
catch
(
MqttPersistenceException
e
)
{
}
e
.
printStackTrace
();
}
catch
(
MqttException
e
)
{
class
Message
{
e
.
printStackTrace
();
private
String
topic
;
private
String
jsonStr
;
public
Message
(
String
topic
,
String
jsonStr
)
{
this
.
topic
=
topic
;
this
.
jsonStr
=
jsonStr
;
}
public
String
getTopic
()
{
return
topic
;
}
public
void
setTopic
(
String
topic
)
{
this
.
topic
=
topic
;
}
public
String
getJsonStr
()
{
return
jsonStr
;
}
public
void
setJsonStr
(
String
jsonStr
)
{
this
.
jsonStr
=
jsonStr
;
}
}
}
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/mq/WebMqttSubscribe.java
View file @
74f891e6
...
@@ -31,10 +31,10 @@ import org.springframework.messaging.MessageHandler;
...
@@ -31,10 +31,10 @@ import org.springframework.messaging.MessageHandler;
@IntegrationComponentScan
@IntegrationComponentScan
public
class
WebMqttSubscribe
{
public
class
WebMqttSubscribe
{
@Value
(
"${emqx.user-name}"
)
@Value
(
"${emqx.
client-
user-name}"
)
private
String
userName
;
private
String
userName
;
@Value
(
"${emqx.password}"
)
@Value
(
"${emqx.
client-
password}"
)
private
String
password
;
private
String
password
;
@Value
(
"${emqx.broker}"
)
@Value
(
"${emqx.broker}"
)
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
74f891e6
...
@@ -167,7 +167,6 @@ public class PlanVisual3dController extends BaseController {
...
@@ -167,7 +167,6 @@ public class PlanVisual3dController extends BaseController {
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updatePlanStep
(
planStepVo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updatePlanStep
(
planStepVo
));
}
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的记录"
,
notes
=
"根据R批次号获取预案的记录"
)
@ApiOperation
(
value
=
"根据批次号获取预案的记录"
,
notes
=
"根据R批次号获取预案的记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
,
@RequestParam
(
required
=
false
)
Boolean
isNewest
)
{
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
,
@RequestParam
(
required
=
false
)
Boolean
isNewest
)
{
...
@@ -185,19 +184,6 @@ public class PlanVisual3dController extends BaseController {
...
@@ -185,19 +184,6 @@ public class PlanVisual3dController extends BaseController {
}
}
@Permission
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案状态"
,
notes
=
"根据批次号获取预案状态"
)
@GetMapping
(
value
=
"/plan/getPlaneIfDataMock"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
if
(
StringUtils
.
isBlank
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getLastBatchNo
();
}
if
(
StringUtils
.
isBlank
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
judgeIfPlanDataMock
(
batchNo
));
}
@Permission
@ApiOperation
(
value
=
"预案智能辅助"
,
notes
=
"预案智能辅助"
)
@ApiOperation
(
value
=
"预案智能辅助"
,
notes
=
"预案智能辅助"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordOne"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordOne"
)
public
ResponseModel
getPlaneRecordOne
()
{
public
ResponseModel
getPlaneRecordOne
()
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
74f891e6
...
@@ -159,21 +159,21 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -159,21 +159,21 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
ContingencyPlanInstance
contingencyPlanInstance
=
contingencyInstance
.
updateExtendColumn
(
planInstance
);
ContingencyPlanInstance
contingencyPlanInstance
=
contingencyInstance
.
updateExtendColumn
(
planInstance
);
ContingencyPlanInstance
instance
=
this
.
repository
.
save
(
contingencyPlanInstance
);
ContingencyPlanInstance
instance
=
this
.
repository
.
save
(
contingencyPlanInstance
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync
(
instance
);
//
contingencyPlanInstanceDataSync(instance);
return
instance
;
return
instance
;
}
}
private
void
contingencyPlanInstanceDataSync
(
ContingencyPlanInstance
instance
)
{
//
private void contingencyPlanInstanceDataSync(ContingencyPlanInstance instance) {
if
(
dataSyncSwitch
)
{
//
if (dataSyncSwitch) {
try
{
//
try {
dataSyncService
.
asyncInvoke
(()
->
{
//
dataSyncService.asyncInvoke(() -> {
dataSyncService
.
syncCreatedContingencyPlanInstance
(
instance
);
//
dataSyncService.syncCreatedContingencyPlanInstance(instance);
});
//
});
}
catch
(
Exception
e
)
{
//
} catch (Exception e) {
log
.
info
(
"数据同步之消息发送. [method='{}']"
,
"createInstanceRecord==>syncCreatedContingencyPlanInstance"
,
e
);
//
log.info("数据同步之消息发送. [method='{}']", "createInstanceRecord==>syncCreatedContingencyPlanInstance", e);
}
//
}
}
//
}
}
//
}
/**
/**
...
@@ -224,8 +224,8 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -224,8 +224,8 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
batchNo
batchNo
);
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
暂时屏蔽 原数字化1.0 同步数据
contingencyOriginalDataDataSync
(
batchNo
,
update
);
//
contingencyOriginalDataDataSync(batchNo, update);
//使用原始数据触发规则
//使用原始数据触发规则
if
(
"CONFIRM"
.
equals
(
buttonState
)
if
(
"CONFIRM"
.
equals
(
buttonState
)
...
@@ -254,24 +254,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -254,24 +254,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
log
.
info
(
"stepCode:"
+
stepCode
);
log
.
info
(
"stepCode:"
+
stepCode
);
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
if
(
equipment
!=
null
)
{
if
(
equipment
!=
null
)
{
// 获取重点设备胚胎指标
// 获取遥信指标
List
<
Map
>
points
=
fireEquipPointMapper
.
getPointsByEquipmentIdAndType
(
equipment
.
getId
(),
"SWITCH"
);
HashMap
<
String
,
Integer
>
telesignallingMap
=
new
HashMap
<>();
for
(
Map
map
:
points
)
{
telesignallingMap
.
put
(
map
.
get
(
"code"
)
+
""
,
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"value"
))
||
"false"
.
equals
(
map
.
get
(
"value"
).
toString
()))
?
0
:
1
);
}
contingencyRo
.
setTelesignallingMap
(
telesignallingMap
);
//获取遥测指标
points
=
fireEquipPointMapper
.
getPointsByEquipmentIdAndType
(
equipment
.
getId
(),
"ANALOGUE"
);
HashMap
<
String
,
Double
>
telemetryMap
=
new
HashMap
<>();
for
(
Map
map
:
points
)
{
telemetryMap
.
put
(
map
.
get
(
"code"
)
+
""
,
Double
.
valueOf
(
ObjectUtils
.
isEmpty
(
map
.
get
(
"value"
))
?
"0"
:
map
.
get
(
"value"
).
toString
()));
}
contingencyRo
.
setTelemetryMap
(
telemetryMap
);
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
Map
<
String
,
Object
>
params
=
contingencyRo
.
getParams
();
Map
<
String
,
Object
>
params
=
contingencyRo
.
getParams
();
params
.
put
(
"appKey"
,
RequestContext
.
getAppKey
());
params
.
put
(
"appKey"
,
RequestContext
.
getAppKey
());
params
.
put
(
"product"
,
RequestContext
.
getProduct
());
params
.
put
(
"product"
,
RequestContext
.
getProduct
());
...
@@ -284,19 +267,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -284,19 +267,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
ruleTrigger
.
publish
(
contingencyRo
,
"换流站消防专项预案/"
+
plan
.
get
(
0
),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
ruleTrigger
.
publish
(
contingencyRo
,
"换流站消防专项预案/"
+
plan
.
get
(
0
),
ArrayUtils
.
toArray
(
equipment
.
getName
()));
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
publisherPlanLog
(
stepCode
,
buttonCode
,
batchNo
);
// 更新记录之后发送消息刷新
// String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
// System.out.println("=========================> 刷新聊天记录 refreshRecord ");
//
// webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
}
}
}
else
{
}
else
{
throw
new
Exception
(
"数据异常,请联系管理员."
);
throw
new
Exception
(
"数据异常,请联系管理员."
);
}
}
return
Optional
.
ofNullable
(
equipment
);
return
Optional
.
ofNullable
(
equipment
);
}
}
// 异步数据同步之消息发送 暂时屏蔽 原数字化1.0 同步数据
private
void
contingencyOriginalDataDataSync
(
String
batchNo
,
int
update
)
{
private
void
contingencyOriginalDataDataSync
(
String
batchNo
,
int
update
)
{
if
(
update
>
0
&&
dataSyncSwitch
)
{
if
(
update
>
0
&&
dataSyncSwitch
)
{
try
{
try
{
...
@@ -373,24 +350,29 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -373,24 +350,29 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
if
(
buttonState
.
equals
(
"CONFIRM"
))
{
if
(
buttonState
.
equals
(
"CONFIRM"
))
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"operateConfirmMessage\"}"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"contingency"
,
new
ContingencyRo
());
map
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
map
.
put
(
"msgType"
,
"operateConfirmMessage"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
map
));
}
}
if
(
buttonState
.
equals
(
"CANCEL_0"
))
{
if
(
buttonState
.
equals
(
"CANCEL_0"
))
{
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
System
.
out
.
println
(
"=========================> 规则触发 初始化动作 initOperate "
);
System
.
out
.
println
(
"=========================> 规则触发 初始化动作 initOperate "
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"initOperate\"}"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"contingency"
,
new
ContingencyRo
());
map
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
map
.
put
(
"msgType"
,
"initOperate"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
map
));
}
}
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync
(
instance
);
//
contingencyPlanInstanceDataSync(instance);
if
(
"CONFIRM"
.
equals
(
buttonState
)
&&
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
)))
{
if
(
"CONFIRM"
.
equals
(
buttonState
)
&&
(
"FIRE_CANCEL"
.
equals
(
code
)
||
"END_EMERGENCY"
.
equals
(
code
)))
{
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
redisTemplate
.
delete
(
RiskSourceServiceImpl
.
cacheKeyForCanBeRunning
());
// 应急处置中断,初始化planStep,json数据
// 应急处置中断,初始化planStep,json数据
planStepService
.
initPlanStep
();
planStepService
.
initPlanStep
();
// 应急处置中断,更新预案信息表结束时间
// 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
contingencyInstanceInfoService
.
updateEndTimeById
(
batchNo
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
System
.
out
.
println
(
"=========================> 规则触发 预案动作结束 "
);
}
}
}
}
}
}
...
@@ -426,7 +408,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -426,7 +408,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
contingencyPlanInstance
.
setContent
(
operateJson
);
contingencyPlanInstance
.
setContent
(
operateJson
);
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync
(
instance
);
//
contingencyPlanInstanceDataSync(instance);
}
}
}
}
...
@@ -435,7 +417,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -435,7 +417,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
public
void
updateStep
(
String
step
,
String
batchNo
)
{
public
void
updateStep
(
String
step
,
String
batchNo
)
{
int
update
=
iContingencyOriginalDataDao
.
updateByButtonStep
(
step
,
batchNo
);
int
update
=
iContingencyOriginalDataDao
.
updateByButtonStep
(
step
,
batchNo
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyOriginalDataDataSync
(
batchNo
,
update
);
//
contingencyOriginalDataDataSync(batchNo, update);
}
}
@Override
@Override
...
@@ -447,26 +429,21 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -447,26 +429,21 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
map
.
put
(
"confirm"
,
buttonState
);
map
.
put
(
"confirm"
,
buttonState
);
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"contingencyPlanId"
,
contingencyPlanId
);
map
.
put
(
"stepState"
,
stepStateOnbutton
);
map
.
put
(
"stepState"
,
stepStateOnbutton
);
// 是否执行
map
.
put
(
"isExecute"
,
isExecute
);
map
.
put
(
"isExecute"
,
isExecute
);
// 是否自动执行
map
.
put
(
"isAuto"
,
isAuto
);
map
.
put
(
"isAuto"
,
isAuto
);
if
(
startUserName
!=
null
)
{
if
(
startUserName
!=
null
)
{
map
.
put
(
"startUserName"
,
startUserName
);
map
.
put
(
"startUserName"
,
startUserName
);
}
}
map
.
put
(
"buttonJson"
,
buttonJson
);
map
.
put
(
"buttonJson"
,
buttonJson
);
map
.
put
(
"appKey"
,
RequestContext
.
getAppKey
());
map
.
put
(
"token"
,
RequestContext
.
getToken
());
map
.
put
(
"product"
,
RequestContext
.
getProduct
());
if
(
StringUtils
.
isBlank
(
token
)
||
StringUtils
.
isBlank
(
product
))
{
Toke
serverToken
=
remoteSecurityService
.
getServerToken
();
map
.
put
(
"token"
,
serverToken
.
getToke
());
map
.
put
(
"product"
,
serverToken
.
getProduct
());
map
.
put
(
"appKey"
,
serverToken
.
getAppKey
());
}
else
{
map
.
put
(
"token"
,
token
);
map
.
put
(
"product"
,
product
);
map
.
put
(
"appKey"
,
appKey
);
}
fireQueue
.
addLast
(
map
);
fireQueue
.
addLast
(
map
);
//应急指挥给总部推送消息
//应急指挥给总部推送消息
sendPlanAlarm
(
batchNo
,
buttonCode
);
//
sendPlanAlarm(batchNo, buttonCode);
return
Optional
.
empty
();
return
Optional
.
empty
();
}
}
...
@@ -574,6 +551,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -574,6 +551,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setAppKey
(
appKey
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setProduct
(
product
);
RequestContext
.
setToken
(
token
);
RequestContext
.
setToken
(
token
);
// 更新redis中预案步骤数据
planVisual3dService
.
updatePlanStepToRedis
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
isExecute
,
isAuto
);
planVisual3dService
.
updatePlanStepToRedis
(
batchNo
,
stepCode
,
buttonJson
,
contingencyPlanId
,
buttonCode
,
isExecute
,
isAuto
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
,
user
);
setButtonExecuted
(
batchNo
,
contingencyPlanId
,
buttonCode
,
confirm
,
user
);
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
fire
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
,
confirm
,
stepState
);
...
@@ -587,7 +565,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -587,7 +565,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
result
.
put
(
"msgType"
,
"refreshRecord"
);
result
.
put
(
"msgType"
,
"refreshRecord"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
result
));
// webMqttComponent.publish(topic, "{\"msgType\":\"refreshRecord\"}");
fireQueue
.
removeFirst
();
fireQueue
.
removeFirst
();
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
74f891e6
...
@@ -236,11 +236,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -236,11 +236,8 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
instanceInfo
.
setId
(
batchNo
);
instanceInfo
.
setId
(
batchNo
);
instanceInfo
.
setName
(
detail
.
getPlanName
());
instanceInfo
.
setName
(
detail
.
getPlanName
());
instanceInfo
.
setOrgCode
(
detail
.
getOrgCode
());
instanceInfo
.
setOrgCode
(
detail
.
getOrgCode
());
instanceInfo
.
setPosition
(
equipmentSpecific
.
getPosition
());
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
getMessageByRiskId
(
equipmentSpecific
.
getId
());
if
(
warehouseStructure
!=
null
)
{
instanceInfo
.
setPosition
(
warehouseStructure
.
getName
());
}
contingencyInstanceInfoService
.
addDisposalDetails
(
instanceInfo
);
contingencyInstanceInfoService
.
addDisposalDetails
(
instanceInfo
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
planOperationRecordDataSync
(
record
);
planOperationRecordDataSync
(
record
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
74f891e6
...
@@ -552,41 +552,39 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -552,41 +552,39 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
getParams
().
put
(
"equipmentId"
,
equipment
.
getId
());
contingencyRo
.
getParams
().
put
(
"equipmentId"
,
equipment
.
getId
());
contingencyRo
.
setIsMock
(
isMock
);
contingencyRo
.
setIsMock
(
isMock
);
WarehouseStructure
warehouseStructure
=
warehouseStructureMapper
.
getMessageById
(
equipmentSpecific
.
getWarehouseStructureId
());
contingencyRo
.
setPosition
(
equipmentSpecific
.
getPosition
());
if
(
warehouseStructure
!=
null
)
{
contingencyRo
.
setPosition
(
warehouseStructure
.
getName
());
}
//查询重点设备关联视频点位
//查询重点设备关联视频点位
Map
<
String
,
Object
>
cameraInfo
=
impAndFireEquipMapper
.
queryCamera
(
String
.
valueOf
(
equipment
.
getId
()));
//
Map<String, Object> cameraInfo = impAndFireEquipMapper.queryCamera(String.valueOf(equipment.getId()));
if
(
cameraInfo
!=
null
&&
!
cameraInfo
.
isEmpty
())
{
//
if (cameraInfo != null && !cameraInfo.isEmpty()) {
contingencyRo
.
setCameraCodes
(
String
.
valueOf
(
cameraInfo
.
get
(
"codes"
)));
//
contingencyRo.setCameraCodes(String.valueOf(cameraInfo.get("codes")));
contingencyRo
.
setCameraIds
(
String
.
valueOf
(
cameraInfo
.
get
(
"ids"
)));
//
contingencyRo.setCameraIds(String.valueOf(cameraInfo.get("ids")));
}
//
}
//查询重点设备关联消防炮
//查询重点设备关联消防炮
Map
fireMonitorInfo
=
equipmentSpecificMapper
.
queryFireMonitor
(
String
.
valueOf
(
equipment
.
getId
()),
fireMonitor
);
//
Map fireMonitorInfo = equipmentSpecificMapper.queryFireMonitor(String.valueOf(equipment.getId()), fireMonitor);
// if (fireMonitorInfo != null && !fireMonitorInfo.isEmpty()) {
// if (fireMonitorInfo != null && !fireMonitorInfo.isEmpty()) {
// contingencyRo.setFireMonitorCodes(String.valueOf(fireMonitorInfo.get("codes")));
// contingencyRo.setFireMonitorCodes(String.valueOf(fireMonitorInfo.get("codes")));
// contingencyRo.setFireMonitorIds(String.valueOf(fireMonitorInfo.get("ids")));
// contingencyRo.setFireMonitorIds(String.valueOf(fireMonitorInfo.get("ids")));
// }
// }
List
<
PreplanPicture
>
pictures
=
iPreplanPictureDao
.
findByEquipmentId
(
Long
.
valueOf
(
equipment
.
getId
()));
//
List<PreplanPicture> pictures = iPreplanPictureDao.findByEquipmentId(Long.valueOf(equipment.getId()));
if
(!
CollectionUtils
.
isEmpty
(
pictures
))
{
//
if (!CollectionUtils.isEmpty(pictures)) {
for
(
PreplanPicture
picture
:
pictures
)
{
//
for (PreplanPicture picture : pictures) {
if
(
1
==
picture
.
getType
())
{
//
if (1 == picture.getType()) {
contingencyRo
.
setPicture1
(
picture
.
getPicture
());
//
contingencyRo.setPicture1(picture.getPicture());
}
//
}
if
(
2
==
picture
.
getType
())
{
//
if (2 == picture.getType()) {
contingencyRo
.
setPicture2
(
picture
.
getPicture
());
//
contingencyRo.setPicture2(picture.getPicture());
}
//
}
if
(
3
==
picture
.
getType
())
{
//
if (3 == picture.getType()) {
contingencyRo
.
setPicture3
(
picture
.
getPicture
());
//
contingencyRo.setPicture3(picture.getPicture());
}
//
}
if
(
4
==
picture
.
getType
())
{
//
if (4 == picture.getType()) {
contingencyRo
.
setPicture4
(
picture
.
getPicture
());
//
contingencyRo.setPicture4(picture.getPicture());
}
//
}
}
//
}
}
//
}
// 获取遥信指标,暂不处理 code = 设备编码iot_code-指标项name_key
// 获取遥信指标,暂不处理 code = 设备编码iot_code-指标项name_key
// List<Map> points = fireEquipPointMapper.getPointsByEquipmentIdAndType(equipment.getId(), "SWITCH");//物联属性指标 and 为true或false
// List<Map> points = fireEquipPointMapper.getPointsByEquipmentIdAndType(equipment.getId(), "SWITCH");//物联属性指标 and 为true或false
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
74f891e6
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -6,6 +6,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.config.InnerInvokException
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.action.model.ContingencyRo
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.action.mq.WebMqttComponent
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.constants.FasConstant
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
import
com.yeejoin.amos.fas.business.dao.mapper.*
;
...
@@ -280,6 +281,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -280,6 +281,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
if
(!
ObjectUtils
.
isEmpty
(
infoVO
.
getPosition
()))
{
if
(!
ObjectUtils
.
isEmpty
(
infoVO
.
getPosition
()))
{
contingencyOriginalData
.
setPosition
(
infoVO
.
getPosition
());
contingencyOriginalData
.
setPosition
(
infoVO
.
getPosition
());
}
}
toipResponse
.
setMockData
(
judgeIfPlanDataMock
(
batchNo
));
toipResponse
.
setMsgType
(
"recordarea"
);
toipResponse
.
setMsgType
(
"recordarea"
);
toipResponse
.
setMsgContext
(
msgContext
);
toipResponse
.
setMsgContext
(
msgContext
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
toipResponse
.
setContingency
(
contingencyOriginalData
);
...
@@ -287,7 +289,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -287,7 +289,6 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
return
toipResponse
;
return
toipResponse
;
}
}
@Override
public
boolean
judgeIfPlanDataMock
(
String
batchNo
)
{
public
boolean
judgeIfPlanDataMock
(
String
batchNo
)
{
PlanOperationRecord
planOperationRecord
=
planOperationRecordDao
.
findByBatchNo
(
batchNo
);
PlanOperationRecord
planOperationRecord
=
planOperationRecordDao
.
findByBatchNo
(
batchNo
);
if
(
planOperationRecord
==
null
)
{
if
(
planOperationRecord
==
null
)
{
...
@@ -487,7 +488,11 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -487,7 +488,11 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
dto
.
setContent
(
StringUtil
.
isNotEmpty
(
dto
.
getContent
())
?
dto
.
getContent
()
:
""
);
dto
.
setContent
(
StringUtil
.
isNotEmpty
(
dto
.
getContent
())
?
dto
.
getContent
()
:
""
);
repository
.
save
(
dto
);
repository
.
save
(
dto
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
String
topic
=
String
.
format
(
"/%s/%s/%s"
,
serviceName
,
stationName
,
"plan"
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"replayMessage\"}"
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"contingency"
,
new
ContingencyRo
());
map
.
put
(
"msgContext"
,
Collections
.
EMPTY_MAP
);
map
.
put
(
"msgType"
,
"replayMessage"
);
webMqttComponent
.
publish
(
topic
,
JSON
.
toJSONString
(
map
));
return
dto
;
return
dto
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
74f891e6
...
@@ -74,14 +74,6 @@ public interface IPlanVisual3dService {
...
@@ -74,14 +74,6 @@ public interface IPlanVisual3dService {
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
);
ToipResponse
getPlaneRecordByBatchNo
(
String
batchNo
);
/**
/**
* 根据批次号获取预案状态
*
* @param batchNo 批次号
* @return 预案记录
*/
boolean
judgeIfPlanDataMock
(
String
batchNo
);
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
*
*
* @param batchNo 批次号
* @param batchNo 批次号
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/model/ToipResponse.java
View file @
74f891e6
...
@@ -30,11 +30,6 @@ public class ToipResponse implements Serializable
...
@@ -30,11 +30,6 @@ public class ToipResponse implements Serializable
* </pre>
* </pre>
*/
*/
private
static
final
long
serialVersionUID
=
-
7035041461377884452L
;
private
static
final
long
serialVersionUID
=
-
7035041461377884452L
;
/**
*
*/
/**
/**
* 界面域
* 界面域
...
@@ -56,6 +51,8 @@ public class ToipResponse implements Serializable
...
@@ -56,6 +51,8 @@ public class ToipResponse implements Serializable
* marker
* marker
*/
*/
private
Object
contingency
;
private
Object
contingency
;
private
boolean
mockData
;
public
String
toJsonStr
()
{
public
String
toJsonStr
()
{
return
JSON
.
toJSONString
(
this
,
SerializerFeature
.
WriteMapNullValue
,
SerializerFeature
.
DisableCircularReferenceDetect
,
SerializerFeature
.
SkipTransientField
);
return
JSON
.
toJSONString
(
this
,
SerializerFeature
.
WriteMapNullValue
,
SerializerFeature
.
DisableCircularReferenceDetect
,
SerializerFeature
.
SkipTransientField
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/EquipmentSpecificForRiskVo.java
View file @
74f891e6
...
@@ -62,4 +62,7 @@ public class EquipmentSpecificForRiskVo {
...
@@ -62,4 +62,7 @@ public class EquipmentSpecificForRiskVo {
@ApiModelProperty
(
value
=
"设备类型编码"
)
@ApiModelProperty
(
value
=
"设备类型编码"
)
private
String
equipmentCode
=
""
;
private
String
equipmentCode
=
""
;
@ApiModelProperty
(
value
=
"位置"
)
private
String
position
=
""
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
View file @
74f891e6
...
@@ -9,6 +9,10 @@ public class PlanStepJsonVO {
...
@@ -9,6 +9,10 @@ public class PlanStepJsonVO {
private
String
stepCode
;
private
String
stepCode
;
private
String
stepName
;
private
String
stepName
;
private
String
stepStatus
;
private
String
stepStatus
;
/**
* 是否并行,用于卡片展示;1:是,0:否
*/
private
String
isParallel
;
private
String
isParallel
;
private
String
roleCode
;
private
String
roleCode
;
private
String
buttonCode
;
private
String
buttonCode
;
...
@@ -17,7 +21,12 @@ public class PlanStepJsonVO {
...
@@ -17,7 +21,12 @@ public class PlanStepJsonVO {
private
String
caseId
;
private
String
caseId
;
private
String
buttonJson
;
private
String
buttonJson
;
private
String
time
=
""
;
private
String
time
=
""
;
/**
* 进度条标识
*/
private
boolean
showLine
=
false
;
private
boolean
showLine
=
false
;
/**
/**
* 1:是,0:否
* 1:是,0:否
*/
*/
...
@@ -44,7 +53,7 @@ public class PlanStepJsonVO {
...
@@ -44,7 +53,7 @@ public class PlanStepJsonVO {
private
String
outAndOr
;
private
String
outAndOr
;
/**
/**
* 1自动,0非自动
*
是否自动执行;
1自动,0非自动
*/
*/
private
Integer
isAuto
;
private
Integer
isAuto
;
}
}
YeeAmosFireAutoSysStart/pom.xml
View file @
74f891e6
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<parent>
<parent>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
</parent>
</parent>
<dependencies>
<dependencies>
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<artifactId>
YeeAmosFireAutoSysService
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
74f891e6
...
@@ -22,6 +22,7 @@ eureka.client.fetch-registry = true
...
@@ -22,6 +22,7 @@ eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled
=
false
eureka.client.healthcheck.enabled
=
false
eureka.client.fetchRegistry
=
true
eureka.client.fetchRegistry
=
true
eureka.instance.prefer-ip-address
=
true
eureka.instance.prefer-ip-address
=
true
#eureka.instance.ip-address = 172.16.11.201
#redis
#redis
spring.redis.database
=
1
spring.redis.database
=
1
...
@@ -76,7 +77,7 @@ rocketmq.producer.groupName2=groupName2
...
@@ -76,7 +77,7 @@ rocketmq.producer.groupName2=groupName2
rocketmq.producer.namesrvAddr2
=
172.16.3.135:9876
rocketmq.producer.namesrvAddr2
=
172.16.3.135:9876
#\u89C4\u5219ip\u914D\u7F6E\uFF0C\u7528\u4E8E\u591A\u7F51\u5361\u53CAdocker\u955C\u50CF\u542F\u52A8\u65F6\u6DFB\u52A0
#\u89C4\u5219ip\u914D\u7F6E\uFF0C\u7528\u4E8E\u591A\u7F51\u5361\u53CAdocker\u955C\u50CF\u542F\u52A8\u65F6\u6DFB\u52A0
#rule.definition.local-ip=172.16.
11.20
1
#rule.definition.local-ip=172.16.
3.5
1
rocket-plan-topic
=
topic_fire_emergency_plan
rocket-plan-topic
=
topic_fire_emergency_plan
rocket-equip-alarm-topic
=
topic_fire_equip_alarm
rocket-equip-alarm-topic
=
topic_fire_equip_alarm
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
74f891e6
...
@@ -824,4 +824,23 @@
...
@@ -824,4 +824,23 @@
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='应急预案执行节点报文';
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='应急预案执行节点报文';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"20230316-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<indexExists
indexName=
"idx_batch_no"
/>
</not>
</preConditions>
<comment>
预案索引优化
</comment>
<sql>
ALTER TABLE `contingency_plan_instance`
ADD INDEX `idx_batch_no`(`batch_no`) USING BTREE;
ALTER TABLE `c_plan_operation_record`
ADD INDEX `idx_batch_no`(`batch_no`) USING BTREE;
ALTER TABLE `contingency_original_data`
DROP INDEX `INDEX_BATCH_NO`,
ADD INDEX `INDEX_BATCH_NO`(`batch_No`) USING BTREE;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_equipment_specific.xml
View file @
74f891e6
...
@@ -221,7 +221,8 @@
...
@@ -221,7 +221,8 @@
wes.org_code as orgCode,
wes.org_code as orgCode,
wes.equipment_code as equipmentCode,
wes.equipment_code as equipmentCode,
wes.warehouse_structure_id,
wes.warehouse_structure_id,
IF(substr(wes.equipment_code ,1,4) = '9204','true','false') as push3D
IF(substr(wes.equipment_code ,1,4) = '9204','true','false') as push3D,
wes.position
from
from
wl_equipment_specific wes
wl_equipment_specific wes
left join
left join
...
...
pom.xml
View file @
74f891e6
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
com.yeejoin.amos
</groupId>
<groupId>
com.yeejoin.amos
</groupId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<artifactId>
YeeAmosFireAutoSysRoot
</artifactId>
<version>
3.7.0.
4
</version>
<version>
3.7.0.
6
</version>
<packaging>
pom
</packaging>
<packaging>
pom
</packaging>
<name>
YeeAmosFireAutoSysRoot
</name>
<name>
YeeAmosFireAutoSysRoot
</name>
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<dependency>
<dependency>
<groupId>
com.yeejoin
</groupId>
<groupId>
com.yeejoin
</groupId>
<artifactId>
amos-component-rule
</artifactId>
<artifactId>
amos-component-rule
</artifactId>
<version>
1.
7.8
-SNAPSHOT
</version>
<version>
1.
8.5
-SNAPSHOT
</version>
</dependency>
</dependency>
<dependency>
<dependency>
...
...
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