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
dc2f8f48
Commit
dc2f8f48
authored
Nov 29, 2022
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预案添加模拟数据标识
parent
6dcf3211
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
41 additions
and
8 deletions
+41
-8
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+2
-2
ContingencyRo.java
...yeejoin/amos/fas/business/action/model/ContingencyRo.java
+4
-0
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+1
-1
PlanOperationRecordMapper.java
...os/fas/business/dao/mapper/PlanOperationRecordMapper.java
+6
-0
AlarmParam.java
.../java/com/yeejoin/amos/fas/business/param/AlarmParam.java
+1
-1
ContingencyPlanServiceImpl.java
...fas/business/service/impl/ContingencyPlanServiceImpl.java
+1
-0
EquipmentFireEquipmentServiceImpl.java
...iness/service/impl/EquipmentFireEquipmentServiceImpl.java
+4
-0
HandlerMqttMessageImpl.java
...mos/fas/business/service/impl/HandlerMqttMessageImpl.java
+3
-2
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+5
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+8
-1
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+1
-1
PlanOperationRecordMapper.xml
...rc/main/resources/db/mapper/PlanOperationRecordMapper.xml
+5
-0
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
dc2f8f48
...
@@ -417,8 +417,8 @@ public class ContingencyAction implements CustomerAction {
...
@@ -417,8 +417,8 @@ public class ContingencyAction implements CustomerAction {
private
String
instedParams
(
String
content
,
ContingencyRo
contingencyRo
)
{
private
String
instedParams
(
String
content
,
ContingencyRo
contingencyRo
)
{
Map
<
String
,
String
>
strengthMap
=
this
.
getStrengthMap
(
contingencyRo
);
Map
<
String
,
String
>
strengthMap
=
this
.
getStrengthMap
(
contingencyRo
);
for
(
String
key
:
strengthMap
.
keySet
())
//
for (String key : strengthMap.keySet())
content
=
content
.
replaceAll
(
"\\$\\{"
+
key
+
"}"
,
strengthMap
.
get
(
key
));
//
content = content.replaceAll("\\$\\{" + key + "}", strengthMap.get(key));
Field
[]
fields
=
contingencyRo
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
contingencyRo
.
getClass
().
getDeclaredFields
();
Method
getMethod
=
null
;
Method
getMethod
=
null
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/model/ContingencyRo.java
View file @
dc2f8f48
...
@@ -98,4 +98,8 @@ public class ContingencyRo implements Serializable {
...
@@ -98,4 +98,8 @@ public class ContingencyRo implements Serializable {
@Label
(
"参数map"
)
@Label
(
"参数map"
)
private
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
private
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
@Label
(
"是否模拟数据"
)
private
Boolean
isMock
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
dc2f8f48
...
@@ -181,7 +181,7 @@ public class PlanVisual3dController extends BaseController {
...
@@ -181,7 +181,7 @@ public class PlanVisual3dController extends BaseController {
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
get
Newe
stBatchNo
();
batchNo
=
planVisual3dService
.
get
La
stBatchNo
();
}
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
return
CommonResponseUtil
.
successNew
(
null
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanOperationRecordMapper.java
View file @
dc2f8f48
...
@@ -35,6 +35,12 @@ public interface PlanOperationRecordMapper {
...
@@ -35,6 +35,12 @@ public interface PlanOperationRecordMapper {
* @return
* @return
*/
*/
String
getNewestBatchNo
();
String
getNewestBatchNo
();
/**
* 获取batchNo
* @return
*/
String
getLastBatchNo
();
PlanRule
getPlanRuleByBatchNo
(
String
batchNo
);
PlanRule
getPlanRuleByBatchNo
(
String
batchNo
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/param/AlarmParam.java
View file @
dc2f8f48
...
@@ -22,7 +22,7 @@ public class AlarmParam extends BasicsRo{
...
@@ -22,7 +22,7 @@ public class AlarmParam extends BasicsRo{
/**
/**
* 是否模拟数据
* 是否模拟数据
*/
*/
private
Boolean
isMock
=
false
;
private
Boolean
isMock
;
/**
/**
* 数据库原状态
* 数据库原状态
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyPlanServiceImpl.java
View file @
dc2f8f48
...
@@ -194,6 +194,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
...
@@ -194,6 +194,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
deviceData
.
setMonitor
(
equipment
.
getName
());
deviceData
.
setMonitor
(
equipment
.
getName
());
deviceData
.
setId
(
String
.
valueOf
(
equipmentSpecific
.
getId
()));
deviceData
.
setId
(
String
.
valueOf
(
equipmentSpecific
.
getId
()));
deviceData
.
setCode
(
equipmentSpecific
.
getCode
());
deviceData
.
setCode
(
equipmentSpecific
.
getCode
());
deviceData
.
setIsMock
((
vo
.
getStatus
()==
4
||
"4"
.
equals
(
vo
.
getStatus
()))?
true
:
false
);
String
batchNo
=
equipmentHandlerService
.
executeDynamicPlan
(
deviceData
,
equipment
,
equipmentSpecific
,
toke
,
operationRecord
.
getId
());
String
batchNo
=
equipmentHandlerService
.
executeDynamicPlan
(
deviceData
,
equipment
,
equipmentSpecific
,
toke
,
operationRecord
.
getId
());
//更新模型状态
//更新模型状态
PlanDetail
planDetail
=
PlanDetailOp
.
get
();
PlanDetail
planDetail
=
PlanDetailOp
.
get
();
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/EquipmentFireEquipmentServiceImpl.java
View file @
dc2f8f48
...
@@ -61,6 +61,10 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
...
@@ -61,6 +61,10 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
@Override
@Override
public
Object
automaticExecute
(
String
equipmentId
,
String
equipCode
,
String
equipSpeCode
,
String
type
,
String
indexKeys
,
String
value
)
{
public
Object
automaticExecute
(
String
equipmentId
,
String
equipCode
,
String
equipSpeCode
,
String
type
,
String
indexKeys
,
String
value
)
{
Map
<
String
,
Object
>
map
=
null
;
Map
<
String
,
Object
>
map
=
null
;
if
(
StringUtils
.
isBlank
(
equipCode
)){
return
false
;
}
if
(
StringUtils
.
isBlank
(
type
))
{
if
(
StringUtils
.
isBlank
(
type
))
{
type
=
TYPE
;
type
=
TYPE
;
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/HandlerMqttMessageImpl.java
View file @
dc2f8f48
...
@@ -525,14 +525,14 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -525,14 +525,14 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
try
{
try
{
alarmContingency
(
batchNo
,
equipmentSpecific
,
equipment
,
recordId
);
alarmContingency
(
batchNo
,
equipmentSpecific
,
equipment
,
recordId
,
deviceData
.
getIsMock
()
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
return
batchNo
;
return
batchNo
;
}
}
public
void
alarmContingency
(
String
batchNo
,
EquipmentSpecificForRiskVo
equipmentSpecific
,
Equipment
equipment
,
Long
recordId
)
throws
Exception
{
public
void
alarmContingency
(
String
batchNo
,
EquipmentSpecificForRiskVo
equipmentSpecific
,
Equipment
equipment
,
Long
recordId
,
Boolean
isMock
)
throws
Exception
{
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
ContingencyRo
contingencyRo
=
new
ContingencyRo
();
contingencyRo
.
setBatchNo
(
batchNo
);
contingencyRo
.
setBatchNo
(
batchNo
);
contingencyRo
.
setEquipmentId
(
String
.
valueOf
(
equipment
.
getId
()));
contingencyRo
.
setEquipmentId
(
String
.
valueOf
(
equipment
.
getId
()));
...
@@ -548,6 +548,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
...
@@ -548,6 +548,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
getParams
().
put
(
"equipmentId"
,
equipment
.
getId
());
contingencyRo
.
getParams
().
put
(
"equipmentId"
,
equipment
.
getId
());
contingencyRo
.
setIsMock
(
isMock
);
//查询重点设备关联视频点位
//查询重点设备关联视频点位
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
())
{
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
dc2f8f48
...
@@ -520,4 +520,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -520,4 +520,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
return
contingencyInstanceInfoMapper
.
selectDisposalActionList
(
type
,
status
,
roles
,
disposalId
);
return
contingencyInstanceInfoMapper
.
selectDisposalActionList
(
type
,
status
,
roles
,
disposalId
);
}
}
@Override
public
String
getLastBatchNo
()
{
return
planOperationRecordMapper
.
getLastBatchNo
();
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
dc2f8f48
...
@@ -55,10 +55,17 @@ public interface IPlanVisual3dService {
...
@@ -55,10 +55,17 @@ public interface IPlanVisual3dService {
void
deleteTextPlanFile
(
Long
id
);
void
deleteTextPlanFile
(
Long
id
);
/**
/**
* 查最新的批次号
* 查最新
在执行
的批次号
* @return
* @return
*/
*/
String
getNewestBatchNo
();
String
getNewestBatchNo
();
/**
* 查最新的批次号
* @return
*/
String
getLastBatchNo
();
/**
/**
* 根据批次号获取预案步骤
* 根据批次号获取预案步骤
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
dc2f8f48
...
@@ -81,7 +81,7 @@ rocketmq.producer.groupName2=groupName2
...
@@ -81,7 +81,7 @@ rocketmq.producer.groupName2=groupName2
rocketmq.producer.namesrvAddr2
=
172.16.3.135:9876
rocketmq.producer.namesrvAddr2
=
172.16.3.135:9876
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
#规则ip配置,用于多网卡及docker镜像启动时添加
#规则ip配置,用于多网卡及docker镜像启动时添加
#rule.definition.local-ip=172.16.11.201
#rule.definition.local-ip=172.16.11.201
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
dc2f8f48
...
@@ -128,4 +128,8 @@
...
@@ -128,4 +128,8 @@
<select
id=
"getNewestBatchNo"
resultType=
"java.lang.String"
>
<select
id=
"getNewestBatchNo"
resultType=
"java.lang.String"
>
select batch_no as batchNo from c_plan_operation_record where status = 0 and is_delete = 0 order by create_date desc limit 1
select batch_no as batchNo from c_plan_operation_record where status = 0 and is_delete = 0 order by create_date desc limit 1
</select>
</select>
<select
id=
"getLastBatchNo"
resultType=
"java.lang.String"
>
select batch_no as batchNo from c_plan_operation_record where is_delete = 0 order by create_date desc limit 1
</select>
</mapper>
</mapper>
\ No newline at end of file
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