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
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
40 additions
and
7 deletions
+40
-7
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
+0
-0
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 {
private
String
instedParams
(
String
content
,
ContingencyRo
contingencyRo
)
{
Map
<
String
,
String
>
strengthMap
=
this
.
getStrengthMap
(
contingencyRo
);
for
(
String
key
:
strengthMap
.
keySet
())
content
=
content
.
replaceAll
(
"\\$\\{"
+
key
+
"}"
,
strengthMap
.
get
(
key
));
//
for (String key : strengthMap.keySet())
//
content = content.replaceAll("\\$\\{" + key + "}", strengthMap.get(key));
Field
[]
fields
=
contingencyRo
.
getClass
().
getDeclaredFields
();
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 {
@Label
(
"参数map"
)
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 {
@GetMapping
(
value
=
"/plan/getPlaneRecord"
)
public
ResponseModel
getPlaneRecord
(
@RequestParam
(
"batchNo"
)
String
batchNo
)
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
get
Newe
stBatchNo
();
batchNo
=
planVisual3dService
.
get
La
stBatchNo
();
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/PlanOperationRecordMapper.java
View file @
dc2f8f48
...
...
@@ -36,5 +36,11 @@ public interface PlanOperationRecordMapper {
*/
String
getNewestBatchNo
();
/**
* 获取batchNo
* @return
*/
String
getLastBatchNo
();
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{
/**
* 是否模拟数据
*/
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 {
deviceData
.
setMonitor
(
equipment
.
getName
());
deviceData
.
setId
(
String
.
valueOf
(
equipmentSpecific
.
getId
()));
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
());
//更新模型状态
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
@Override
public
Object
automaticExecute
(
String
equipmentId
,
String
equipCode
,
String
equipSpeCode
,
String
type
,
String
indexKeys
,
String
value
)
{
Map
<
String
,
Object
>
map
=
null
;
if
(
StringUtils
.
isBlank
(
equipCode
)){
return
false
;
}
if
(
StringUtils
.
isBlank
(
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 {
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
getProduct
());
try
{
alarmContingency
(
batchNo
,
equipmentSpecific
,
equipment
,
recordId
);
alarmContingency
(
batchNo
,
equipmentSpecific
,
equipment
,
recordId
,
deviceData
.
getIsMock
()
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
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
.
setBatchNo
(
batchNo
);
contingencyRo
.
setEquipmentId
(
String
.
valueOf
(
equipment
.
getId
()));
...
...
@@ -548,6 +548,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo
.
setEquipmentCode
(
equipment
.
getCode
());
contingencyRo
.
setEquipmentOrgCode
(
equipment
.
getOrgCode
());
contingencyRo
.
getParams
().
put
(
"equipmentId"
,
equipment
.
getId
());
contingencyRo
.
setIsMock
(
isMock
);
//查询重点设备关联视频点位
Map
<
String
,
Object
>
cameraInfo
=
impAndFireEquipMapper
.
queryCamera
(
String
.
valueOf
(
equipment
.
getId
()));
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 {
}
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,11 +55,18 @@ public interface IPlanVisual3dService {
void
deleteTextPlanFile
(
Long
id
);
/**
* 查最新的批次号
* 查最新
在执行
的批次号
* @return
*/
String
getNewestBatchNo
();
/**
* 查最新的批次号
* @return
*/
String
getLastBatchNo
();
/**
* 根据批次号获取预案步骤
* @param batchNo 批次号
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
dc2f8f48
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/PlanOperationRecordMapper.xml
View file @
dc2f8f48
...
...
@@ -128,4 +128,8 @@
<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>
<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>
\ 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