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
2380d89f
Commit
2380d89f
authored
Nov 29, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:应急处置动作统一化调整
parent
309750f6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
61 additions
and
11 deletions
+61
-11
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+0
-3
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+8
-5
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+38
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+2
-0
PlanStepJsonVO.java
...java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
+10
-0
ContingencyInstanceInfoMapper.xml
...ain/resources/db/mapper/ContingencyInstanceInfoMapper.xml
+3
-3
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
2380d89f
...
@@ -4,19 +4,16 @@ import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
...
@@ -4,19 +4,16 @@ import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.util.StringUtil
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.ReginParams
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.config.Permission
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.fas.exception.YeeException
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiParam
;
import
io.swagger.annotations.ApiParam
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
2380d89f
...
@@ -245,10 +245,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -245,10 +245,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
contingencyRo
.
setButtonCode
(
buttonCode
);
contingencyRo
.
setButtonCode
(
buttonCode
);
contingencyRo
.
setButtonState
(
buttonState
);
contingencyRo
.
setButtonState
(
buttonState
);
BeanUtils
.
copyProperties
(
contingencyOriginalData
,
contingencyRo
);
BeanUtils
.
copyProperties
(
contingencyOriginalData
,
contingencyRo
);
// SetpEnum step = SetpEnum.getStepByCode(stepCode);
contingencyRo
.
setStep
(
stepCode
);
contingencyRo
.
setStep
(
stepCode
);
contingencyRo
.
setStepState
(
stepMap
.
get
(
stepKey
));
contingencyRo
.
setStepState
(
stepMap
.
get
(
stepKey
));
// contingencyRo.set
Step(stepCod
e);
// contingencyRo.set
IsMock(tru
e);
log
.
info
(
"stepstate:"
+
contingencyRo
.
getStepState
());
log
.
info
(
"stepstate:"
+
contingencyRo
.
getStepState
());
log
.
info
(
"stepCode:"
+
stepCode
);
log
.
info
(
"stepCode:"
+
stepCode
);
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
equipment
=
impAndFireEquipMapper
.
queryImpEqumtByFireEquipmt
(
Long
.
parseLong
(
contingencyRo
.
getFireEquipmentId
()));
...
@@ -283,6 +282,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -283,6 +282,9 @@ 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
);
// 更新预案执行Json串
planVisual3dService
.
updatePlanStep
(
batchNo
,
stepCode
,
contingencyPlanId
,
buttonCode
);
}
}
}
else
{
}
else
{
throw
new
Exception
(
"数据异常,请联系管理员."
);
throw
new
Exception
(
"数据异常,请联系管理员."
);
...
@@ -370,12 +372,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
...
@@ -370,12 +372,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
contingencyPlanInstance
.
setRunstate
(
true
);
contingencyPlanInstance
.
setRunstate
(
true
);
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\"}"
);
webMqttComponent
.
publish
(
topic
,
"{\"msgType\":\"replayMessage\"}"
);
}
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
if
(
buttonState
.
equals
(
"CONFIRM"
))
{
// 满足移动端确认按钮展示,确认后,多按钮json只保留最后一个按钮
// 满足移动端确认按钮展示,确认后,多按钮json只保留最后一个按钮
planVisual3dService
.
updateStatusById
(
contingencyPlanId
);
planVisual3dService
.
updateStatusById
(
contingencyPlanId
);
}
}
if
(
buttonState
.
equals
(
"CONFIRM_NOT"
))
{
contingencyPlanInstance
.
setRunstate
(
false
);
}
ContingencyPlanInstance
instance
=
repository
.
save
(
contingencyPlanInstance
);
// 异步数据同步之消息发送
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync
(
instance
);
contingencyPlanInstanceDataSync
(
instance
);
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
2380d89f
...
@@ -35,6 +35,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
...
@@ -35,6 +35,7 @@ import com.yeejoin.amos.feign.systemctl.Systemctl;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
com.yeejoin.amos.feign.systemctl.model.MessageModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateFormatUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
...
@@ -393,6 +394,43 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -393,6 +394,43 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
}
}
@Override
@Override
@Transactional
public
void
updatePlanStep
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
)
{
String
json
=
""
;
try
{
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
List
<
PlanStepJsonVO
>
list
=
JSONObject
.
parseArray
(
json
,
PlanStepJsonVO
.
class
);
// 获取当前步骤的数据
List
<
PlanStepJsonVO
>
nowCollect
=
list
.
stream
().
filter
(
x
->
stepCode
.
equals
(
x
.
getStepCode
())).
collect
(
Collectors
.
toList
());
if
(!
CollectionUtils
.
isEmpty
(
nowCollect
))
{
List
<
PlanStepJsonVO
>
collect
=
nowCollect
.
stream
().
peek
(
x
->
{
x
.
setTime
(
DateFormatUtils
.
format
(
new
Date
(),
"HH:mm:ss"
));
x
.
setBatchNo
(
batchNo
);
x
.
setCaseId
(
contingencyPlanId
);
if
(
buttonCode
.
endsWith
(
"_NOT"
))
{
x
.
setCheckYesOrNo
(
"0"
);
}
else
{
x
.
setCheckYesOrNo
(
"1"
);
}
// 通过contingencyPlanId获取buttonJson数据
ContingencyPlanInstance
planInstance
=
iContingencyPlanInstanceRepository
.
getOne
(
contingencyPlanId
);
x
.
setButtonJson
(
planInstance
.
getContent
());
}).
collect
(
Collectors
.
toList
());
List
<
PlanStepJsonVO
>
updateCollect
=
collect
.
stream
().
peek
(
x
->
{
// 更新进度条标志位
x
.
setShowLine
(
Integer
.
parseInt
(
x
.
getStepCode
())
<=
Integer
.
parseInt
(
stepCode
));
}).
collect
(
Collectors
.
toList
());
PlanStepVo
planStepVo
=
new
PlanStepVo
();
planStepVo
.
setBatchNo
(
batchNo
);
planStepVo
.
setPlanStep
(
JSON
.
toJSONString
(
updateCollect
));
updatePlanStep
(
planStepVo
);
}
}
@Override
public
Page
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
,
AgencyUserModel
user
)
{
public
Page
<
ContingencyPlanInstanceVO
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
,
AgencyUserModel
user
)
{
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
// 根据批次号获取预案记录
// 根据批次号获取预案记录
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
2380d89f
...
@@ -90,6 +90,8 @@ public interface IPlanVisual3dService {
...
@@ -90,6 +90,8 @@ public interface IPlanVisual3dService {
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
void
updatePlanStep
(
String
batchNo
,
String
stepCode
,
String
contingencyPlanId
,
String
buttonCode
);
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
Page
<
ContingencyPlanInstanceVO
>
selectDisposalActionPage
(
int
current
,
int
size
,
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
/**
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/vo/PlanStepJsonVO.java
View file @
2380d89f
...
@@ -10,4 +10,14 @@ public class PlanStepJsonVO {
...
@@ -10,4 +10,14 @@ public class PlanStepJsonVO {
private
String
isParallel
;
private
String
isParallel
;
private
String
roleCode
;
private
String
roleCode
;
private
String
buttonCode
;
private
String
buttonCode
;
private
String
batchNo
;
private
String
caseId
;
private
String
buttonJson
;
private
String
time
;
private
boolean
showLine
=
false
;
/**
* 1:是,0:否
*/
private
String
checkYesOrNo
;
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyInstanceInfoMapper.xml
View file @
2380d89f
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
and cpi.record_type = #{type}
and cpi.record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and
cpi.runstate is null
and
(cpi.runstate is null or cpi.runstate = 0)
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
and record_type = #{type}
and record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and
runstate is null
and
(runstate is null or runstate = 0)
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
...
@@ -101,7 +101,7 @@
...
@@ -101,7 +101,7 @@
and cpi.record_type = #{type}
and cpi.record_type = #{type}
</if>
</if>
<if
test=
"status != null and status != ''"
>
<if
test=
"status != null and status != ''"
>
and
cpi.runstate is null
and
(cpi.runstate is null or cpi.runstate = 0)
</if>
</if>
<if
test=
"list != null and list.size() >0"
>
<if
test=
"list != null and list.size() >0"
>
...
...
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