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
c4b43c74
Commit
c4b43c74
authored
Nov 28, 2022
by
高建强
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_plan' into dev_upgrade
# Conflicts: # YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
parents
2e1441a5
95688d2d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
108 additions
and
132 deletions
+108
-132
ContingencyAction.java
...m/yeejoin/amos/fas/business/action/ContingencyAction.java
+26
-86
RiskSourceController.java
...in/amos/fas/business/controller/RiskSourceController.java
+26
-4
ContingencyPlanInstanceMapper.java
...as/business/dao/mapper/ContingencyPlanInstanceMapper.java
+8
-0
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+8
-2
RiskSourceServiceImpl.java
...amos/fas/business/service/impl/RiskSourceServiceImpl.java
+16
-0
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+17
-37
IRiskSourceService.java
...n/amos/fas/business/service/intfc/IRiskSourceService.java
+2
-0
application.properties
...ireAutoSysStart/src/main/resources/application.properties
+2
-0
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+2
-2
ContingencyPlanInstanceMapper.xml
...ain/resources/db/mapper/ContingencyPlanInstanceMapper.xml
+0
-0
dbTemplate_impt_equip.xml
...rt/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
+1
-1
No files found.
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/action/ContingencyAction.java
View file @
c4b43c74
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
action
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yeejoin.amos.component.rule.MethodParam
;
import
com.yeejoin.amos.component.rule.MethodParam
;
...
@@ -29,8 +27,6 @@ import com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl;
...
@@ -29,8 +27,6 @@ import com.yeejoin.amos.fas.business.service.impl.RuleRunigSnapshotServiceImpl;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.util.CacheFactory
;
import
com.yeejoin.amos.fas.business.util.CacheMap
;
import
com.yeejoin.amos.fas.business.util.JSONUtil
;
import
com.yeejoin.amos.fas.business.util.JSONUtil
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
import
com.yeejoin.amos.fas.business.vo.Toke
;
...
@@ -38,7 +34,6 @@ import com.yeejoin.amos.fas.common.enums.ContingencyPlanStatusEnum;
...
@@ -38,7 +34,6 @@ import com.yeejoin.amos.fas.common.enums.ContingencyPlanStatusEnum;
import
com.yeejoin.amos.fas.common.enums.PlanRecordStatusEnum
;
import
com.yeejoin.amos.fas.common.enums.PlanRecordStatusEnum
;
import
com.yeejoin.amos.fas.core.enums.NumberEnum
;
import
com.yeejoin.amos.fas.core.enums.NumberEnum
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.Equipment
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
import
com.yeejoin.amos.fas.dao.entity.PlanDetail
;
...
@@ -53,8 +48,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -53,8 +48,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.support.TransactionSynchronization
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
...
@@ -179,52 +173,6 @@ public class ContingencyAction implements CustomerAction {
...
@@ -179,52 +173,6 @@ public class ContingencyAction implements CustomerAction {
*/
*/
/**
/**
* 预案文件中值为和数据字典中的对应关系
* 消防
* F1 消防队长 fireLeader
* F2..F6 队员 firePerson 规则配置中队员1...6:firePerson1...firePerson6
* FD .... 司机 fireDriver 规则配置中司机 1..6:fireDriver1...fireDriver6
* 运维
* S1 值班长 dutyLeader
* S2 副值班长 deputyDutyLeader
* B1..B6 值班员 dutyCivilian 规则配置中值班员1...6:dutyCivilian1...dutyCivilian6
* A1...A6 副值班员 deputyDutyCivilian 规则配置中副值班员1...6:deputyDutyCivilian1...deputyDutyCivilian6
*/
public
Map
<
String
,
String
>
getStrengthMap
(
ContingencyRo
contingencyRo
)
{
String
batchNo
=
contingencyRo
.
getBatchNo
();
String
orgCode
=
contingencyRo
.
getEquipmentOrgCode
();
Map
<
String
,
String
>
returnMap
=
stringStringMap
.
get
(
contingencyRo
.
getBatchNo
());
if
(
CollectionUtils
.
isEmpty
(
returnMap
))
{
stringStringMap
=
new
HashMap
<>();
returnMap
=
new
HashMap
<>();
Toke
toke
=
remoteSecurityService
.
getServerToken
();
RequestContext
.
setToken
(
toke
.
getToke
());
RequestContext
.
setProduct
(
toke
.
product
);
RequestContext
.
setAppKey
(
toke
.
appKey
);
ResponseModel
responseModel
=
jcsFeign
.
dutyPersonList
();
if
(
"SUCCESS"
.
equals
(
responseModel
.
getDevMessage
()))
{
String
JSONStr
=
JSON
.
toJSONString
(
responseModel
.
getResult
());
JSONArray
dataList
=
JSONObject
.
parseArray
(
JSONStr
);
if
(!
ObjectUtils
.
isEmpty
(
dataList
))
{
Map
<
String
,
String
>
finalReturnMap
=
returnMap
;
dataList
.
forEach
(
x
->
{
Map
<
String
,
Object
>
resultMap
=
new
HashMap
<>();
JSONObject
obj
=
(
JSONObject
)
x
;
finalReturnMap
.
put
(
obj
.
getString
(
"postTypeName"
),
obj
.
getString
(
"userName"
));
});
}
}
stringStringMap
.
put
(
batchNo
,
returnMap
);
}
log
.
info
(
String
.
format
(
"returnMap:【 %s 】"
,
returnMap
));
return
returnMap
;
}
/**
* @param stepCode 当前步骤编号
* @param stepCode 当前步骤编号
* @param stepName 当前步骤名称
* @param stepName 当前步骤名称
* @param nextStepCode 下一步编号
* @param nextStepCode 下一步编号
...
@@ -365,6 +313,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -365,6 +313,7 @@ public class ContingencyAction implements CustomerAction {
* @param paramObj 预案对象
* @param paramObj 预案对象
*/
*/
@RuleMethod
(
methodLabel
=
"执行记录"
,
project
=
"换流站消防专项预案"
)
@RuleMethod
(
methodLabel
=
"执行记录"
,
project
=
"换流站消防专项预案"
)
@Transactional
public
void
messageRecord
(
@MethodParam
(
paramLabel
=
"消息内容"
)
String
content
,
@MethodParam
(
paramLabel
=
"对象"
)
Object
paramObj
)
{
public
void
messageRecord
(
@MethodParam
(
paramLabel
=
"消息内容"
)
String
content
,
@MethodParam
(
paramLabel
=
"对象"
)
Object
paramObj
)
{
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
ContingencyRo
contingencyRo
=
(
ContingencyRo
)
paramObj
;
String
batchNo
=
contingencyRo
.
getBatchNo
();
String
batchNo
=
contingencyRo
.
getBatchNo
();
...
@@ -384,36 +333,30 @@ public class ContingencyAction implements CustomerAction {
...
@@ -384,36 +333,30 @@ public class ContingencyAction implements CustomerAction {
content
=
instedParams
(
content
,
contingencyRo
);
content
=
instedParams
(
content
,
contingencyRo
);
iContingencyInstance
.
createInstanceRecord
(
contingencyRo
.
getBatchNo
(),
""
,
"DEFAULT"
,
content
,
"MESSAGE"
,
""
);
iContingencyInstance
.
createInstanceRecord
(
contingencyRo
.
getBatchNo
(),
""
,
"DEFAULT"
,
content
,
"MESSAGE"
,
""
);
TransactionSynchronizationManager
.
registerSynchronization
(
new
TransactionSynchronization
()
{
SafteyPlanResult
result
=
new
SafteyPlanResult
();
@Override
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
public
void
afterCommit
()
{
try
{
// 事物提交后业务逻辑
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
SafteyPlanResult
result
=
new
SafteyPlanResult
();
List
<
ContingencyPlanInstance
>
list
=
iContingencyInstance
.
queryForTimeLine
(
contingencyRo
.
getBatchNo
(),
"MESSAGE"
);
Map
<
String
,
Object
>
tempmap1
=
new
HashMap
<>();
ArrayList
records
=
new
ArrayList
<>();
try
{
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
SimpleDateFormat
sdf1
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
list
.
forEach
(
action
->
{
List
<
ContingencyPlanInstance
>
list
=
iContingencyInstance
.
queryForTimeLine
(
contingencyRo
.
getBatchNo
(),
"MESSAGE"
);
HashMap
map
=
new
HashMap
();
ArrayList
records
=
new
ArrayList
<>();
map
.
put
(
"time"
,
sdf1
.
format
(
action
.
getCreateDate
().
getTime
()));
if
(!
ObjectUtils
.
isEmpty
(
list
))
{
map
.
put
(
"stepName"
,
action
.
getContent
());
list
.
forEach
(
action
->
{
records
.
add
(
map
);
HashMap
map
=
new
HashMap
();
});
map
.
put
(
"time"
,
sdf1
.
format
(
action
.
getCreateDate
().
getTime
()));
map
.
put
(
"stepName"
,
action
.
getContent
());
records
.
add
(
map
);
});
}
tempmap1
.
put
(
"content"
,
records
);
tempmap1
.
put
(
"status"
,
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
result
.
add
(
tempmap1
);
System
.
out
.
println
(
"--------------------messageRecord----------------------"
+
result
);
sendcmd
(
"recordarea"
,
paramObj
,
result
);
sendweb
(
"recordarea"
,
paramObj
,
result
);
}
}
});
tempmap1
.
put
(
"content"
,
records
);
tempmap1
.
put
(
"status"
,
PlanRecordStatusEnum
.
OPERATION
.
getCode
());
}
catch
(
Exception
e
)
{
// TODO Auto-generated catch block
e
.
printStackTrace
();
}
result
.
add
(
tempmap1
);
System
.
out
.
printf
(
"=========recordarea=====396====%s=========%s=========%n"
,
JSONObject
.
toJSONString
(
paramObj
),
JSONObject
.
toJSONString
(
result
));
sendcmd
(
"recordarea"
,
paramObj
,
result
);
sendweb
(
"recordarea"
,
paramObj
,
result
);
}
}
}
}
...
@@ -459,10 +402,6 @@ public class ContingencyAction implements CustomerAction {
...
@@ -459,10 +402,6 @@ 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
);
for
(
String
key
:
strengthMap
.
keySet
())
content
=
content
.
replaceAll
(
"\\$\\{"
+
key
+
"}"
,
strengthMap
.
get
(
key
));
Field
[]
fields
=
contingencyRo
.
getClass
().
getDeclaredFields
();
Field
[]
fields
=
contingencyRo
.
getClass
().
getDeclaredFields
();
Method
getMethod
=
null
;
Method
getMethod
=
null
;
try
{
try
{
...
@@ -997,6 +936,7 @@ public class ContingencyAction implements CustomerAction {
...
@@ -997,6 +936,7 @@ public class ContingencyAction implements CustomerAction {
/**
/**
* 通过batchNo获取预案的状态
* 通过batchNo获取预案的状态
*
* @param batchNo
* @param batchNo
* @return
* @return
*/
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/RiskSourceController.java
View file @
c4b43c74
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
...
@@ -6,6 +6,7 @@ import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
import
com.yeejoin.amos.fas.business.bo.DangerResultBo
;
import
com.yeejoin.amos.fas.business.bo.DangerResultBo
;
import
com.yeejoin.amos.fas.business.bo.PlanFlagBo
;
import
com.yeejoin.amos.fas.business.bo.PlanFlagBo
;
import
com.yeejoin.amos.fas.business.bo.RiskSourceSynBo
;
import
com.yeejoin.amos.fas.business.bo.RiskSourceSynBo
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.AlarmParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.param.FmeaBindParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
import
com.yeejoin.amos.fas.business.service.intfc.IRiskFactorService
;
...
@@ -16,10 +17,7 @@ import com.yeejoin.amos.fas.config.Permission;
...
@@ -16,10 +17,7 @@ import com.yeejoin.amos.fas.config.Permission;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.enums.ReserveEnum
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.*
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil2
;
import
com.yeejoin.amos.fas.core.util.ResponseModel
;
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
;
...
@@ -48,6 +46,9 @@ public class RiskSourceController extends BaseController {
...
@@ -48,6 +46,9 @@ public class RiskSourceController extends BaseController {
@Autowired
@Autowired
IRiskSourceService
riskSourceService
;
IRiskSourceService
riskSourceService
;
@Autowired
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
@Permission
@Permission
//@Authorization(ingore = true)
//@Authorization(ingore = true)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询风险点子项"
,
notes
=
"查询风险点子项"
)
...
@@ -719,6 +720,27 @@ public class RiskSourceController extends BaseController {
...
@@ -719,6 +720,27 @@ public class RiskSourceController extends BaseController {
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryContingencyWater
());
return
CommonResponseUtil
.
success
(
riskSourceService
.
queryContingencyWater
());
}
}
@ApiOperation
(
value
=
"概览水源信息"
)
@GetMapping
(
"/getWaterInfo"
)
@Permission
public
CommonResponse
getWaterInfo
(
CommonPageable
commonPageable
)
{
if
(
commonPageable
.
getPageNumber
()
==
0
)
{
commonPageable
.
setPageNumber
(
1
);
}
ReginParams
reginParams
=
getSelectedOrgInfo
();
String
orgCode
=
getOrgCode
(
reginParams
);
String
bizOrgCode
=
null
;
if
(
StringUtil
.
isNotEmpty
(
orgCode
))
{
bizOrgCode
=
contingencyPlanInstanceMapper
.
getBizOrgCode
(
orgCode
);
if
(!
StringUtil
.
isNotEmpty
(
bizOrgCode
))
{
return
CommonResponseUtil
.
success
(
null
);
}
}
else
{
return
CommonResponseUtil
.
success
(
null
);
}
return
CommonResponseUtil
.
success
(
riskSourceService
.
getWaterInfo
(
commonPageable
,
bizOrgCode
));
}
/**
/**
* 获取危险因素树二级节点
* 获取危险因素树二级节点
*
*
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyPlanInstanceMapper.java
View file @
c4b43c74
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -33,4 +34,11 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
...
@@ -33,4 +34,11 @@ public interface ContingencyPlanInstanceMapper extends BaseMapper<ContingencyPla
* @return
* @return
*/
*/
Boolean
updateMessageById
(
@Param
(
"dto"
)
ContingencyPlanInstance
contingencyPlanInstance
);
Boolean
updateMessageById
(
@Param
(
"dto"
)
ContingencyPlanInstance
contingencyPlanInstance
);
String
getBizOrgCode
(
@Param
(
"amosOrgCode"
)
String
amosOrgCode
);
List
<
Map
<
String
,
Object
>>
getWaterInfo
(
@Param
(
"current"
)
Integer
current
,
@Param
(
"size"
)
Integer
size
,
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
long
countWater
(
@Param
(
"bizOrgCode"
)
String
bizOrgCode
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
c4b43c74
...
@@ -120,6 +120,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -120,6 +120,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Value
(
"${plan.instance.playImg}"
)
@Value
(
"${plan.instance.playImg}"
)
private
String
playImg
;
private
String
playImg
;
@Value
(
"${aurora.push.switch}"
)
private
Boolean
auroraPushSwitch
;
@Override
@Override
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
...
@@ -518,10 +521,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -518,10 +521,13 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Override
@Override
public
void
sendMessage
(
String
buttonCode
,
MessageVO
messageVO
)
{
public
void
sendMessage
(
String
buttonCode
,
MessageVO
messageVO
)
{
List
<
String
>
userIds
=
getUserIds
(
buttonCode
);
// 添加极光推送开关
if
(!
CollectionUtils
.
isEmpty
(
userIds
))
{
if
(
auroraPushSwitch
)
{
List
<
String
>
userIds
=
getUserIds
(
buttonCode
);
if
(!
CollectionUtils
.
isEmpty
(
userIds
))
{
messageVO
.
setRecivers
(
userIds
);
messageVO
.
setRecivers
(
userIds
);
sendMessage
(
messageVO
);
sendMessage
(
messageVO
);
}
}
}
}
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/RiskSourceServiceImpl.java
View file @
c4b43c74
...
@@ -193,6 +193,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -193,6 +193,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Autowired
@Autowired
private
WebMqttComponent
webMqttComponent
;
private
WebMqttComponent
webMqttComponent
;
@Autowired
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Override
@Override
public
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
{
public
RiskSource
editRiskSource
(
HashMap
<
String
,
Object
>
map
)
throws
Exception
{
RiskSource
riskSource
=
(
RiskSource
)
map
.
get
(
"param"
);
RiskSource
riskSource
=
(
RiskSource
)
map
.
get
(
"param"
);
...
@@ -2010,6 +2013,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
...
@@ -2010,6 +2013,19 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return
riskSource
;
return
riskSource
;
}
}
@Autowired
private
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
@Override
public
Page
<
Map
<
String
,
Object
>>
getWaterInfo
(
CommonPageable
commonPageable
,
String
bizOrgCode
)
{
List
<
Map
<
String
,
Object
>>
content
=
Lists
.
newArrayList
();
long
total
=
contingencyPlanInstanceMapper
.
countWater
(
bizOrgCode
);
if
(
total
<=
0
)
{
return
new
PageImpl
<>(
content
,
commonPageable
,
total
);
}
Integer
start
=
(
commonPageable
.
getPageNumber
()
-
1
)
*
commonPageable
.
getPageSize
();
content
=
contingencyPlanInstanceMapper
.
getWaterInfo
(
start
,
commonPageable
.
getPageSize
(),
bizOrgCode
);
return
new
PageImpl
<>(
content
,
commonPageable
,
total
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
c4b43c74
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
package
com
.
yeejoin
.
amos
.
fas
.
business
.
service
.
intfc
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.ContingencyPlanInstanceVO
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.business.vo.MessageVO
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.PlanStepVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.core.common.request.CommonPageable
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.fas.dao.entity.TextPlan
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
java.util.List
;
import
java.util.List
;
...
@@ -34,7 +26,8 @@ public interface IPlanVisual3dService {
...
@@ -34,7 +26,8 @@ public interface IPlanVisual3dService {
/**
/**
* 上传文字预案
* 上传文字预案
* @param appId 预案ID
*
* @param appId 预案ID
* @param pathNameMap 文字预案文件路径:文件名称map
* @param pathNameMap 文字预案文件路径:文件名称map
*/
*/
void
uploadTextPlan
(
String
appId
,
Map
<
String
,
String
>
pathNameMap
);
void
uploadTextPlan
(
String
appId
,
Map
<
String
,
String
>
pathNameMap
);
...
@@ -49,22 +42,24 @@ public interface IPlanVisual3dService {
...
@@ -49,22 +42,24 @@ public interface IPlanVisual3dService {
CommonResponse
getResourceListByType
(
String
type
);
CommonResponse
getResourceListByType
(
String
type
);
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceById
(
String
type
,
Long
id
);
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
Map
<
String
,
Object
>>
getResourceTypeList
();
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
);
List
<
TreeSubjectVo
>
getTextPlanBySubjectId
(
String
appId
);
void
deleteTextPlanFile
(
Long
id
);
void
deleteTextPlanFile
(
Long
id
);
/**
/**
* 查最新的批次号
* 查最新的批次号
*
* @return
* @return
*/
*/
String
getNewestBatchNo
();
String
getNewestBatchNo
();
/**
/**
* 根据批次号获取预案步骤
* 根据批次号获取预案步骤
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案步骤
* @return 预案步骤
*/
*/
...
@@ -72,6 +67,7 @@ public interface IPlanVisual3dService {
...
@@ -72,6 +67,7 @@ public interface IPlanVisual3dService {
/**
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案记录
* @return 预案记录
*/
*/
...
@@ -79,6 +75,7 @@ public interface IPlanVisual3dService {
...
@@ -79,6 +75,7 @@ public interface IPlanVisual3dService {
/**
/**
* 根据批次号获取预案记录
* 根据批次号获取预案记录
*
* @param batchNo 批次号
* @param batchNo 批次号
* @return 预案记录
* @return 预案记录
*/
*/
...
@@ -86,10 +83,11 @@ public interface IPlanVisual3dService {
...
@@ -86,10 +83,11 @@ public interface IPlanVisual3dService {
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
PlanStepVo
updatePlanStep
(
PlanStepVo
planStepVo
);
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
);
/**
/**
* 根据批次号获取预案的消息等记录
* 根据批次号获取预案的消息等记录
*
* @param batchNo
* @param batchNo
* @return
* @return
*/
*/
...
@@ -97,30 +95,11 @@ public interface IPlanVisual3dService {
...
@@ -97,30 +95,11 @@ public interface IPlanVisual3dService {
ContingencyPlanInstance
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
ContingencyPlanInstance
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
List
<
ContingencyPlanInstanceVO
>
selectDisposalActionList
(
String
batchNo
,
List
<
RoleModel
>
roleModelList
,
int
dataType
);
// /**
// * 极光推送
// * @param json 消息体
// * @param buttonCode 按钮编码
// */
// void sendMessage(String json, String buttonCode);
//
// /**
// * 极光推送
// * @param buttonCode 按钮编码
// */
// void sendMessage(String buttonCode);
//
// /**
// * 极光推送
// * @param buttonCode 按钮编码
// * @param pushMsgParam 消息体
// */
// void sendMessage(String buttonCode, PushMsgParam pushMsgParam);
/**
/**
* 消息推送
* 极光推送消息
*
* @param buttonCode
* @param buttonCode
* @param messageVO
* @param messageVO
*/
*/
...
@@ -129,6 +108,7 @@ public interface IPlanVisual3dService {
...
@@ -129,6 +108,7 @@ public interface IPlanVisual3dService {
/**
/**
* 修改动作执行状态
* 修改动作执行状态
*
* @param id
* @param id
* @return
* @return
*/
*/
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IRiskSourceService.java
View file @
c4b43c74
...
@@ -220,4 +220,6 @@ public interface IRiskSourceService {
...
@@ -220,4 +220,6 @@ public interface IRiskSourceService {
void
processProtalDataFromDanger
(
DangerResultBo
dangerResultBo
)
throws
Exception
;
void
processProtalDataFromDanger
(
DangerResultBo
dangerResultBo
)
throws
Exception
;
RiskSource
updateAreaSyn
(
String
code
,
String
compCode
,
RiskSourceSynBo
synBo
);
RiskSource
updateAreaSyn
(
String
code
,
String
compCode
,
RiskSourceSynBo
synBo
);
Page
<
Map
<
String
,
Object
>>
getWaterInfo
(
CommonPageable
commonPageable
,
String
bizOrgCode
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/application.properties
View file @
c4b43c74
...
@@ -62,6 +62,8 @@ number.plan.projectName=换流站消防专项预案
...
@@ -62,6 +62,8 @@ number.plan.projectName=换流站消防专项预案
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
#站端名称使用全拼 与三维iotree 消息用到了,暂时统一设置为yinan
station.name
=
yinan
station.name
=
yinan
#极光推送开关
aurora.push.switch
=
false
param.safetyIndexChange.cron
=
0 0 2 * * ?
param.safetyIndexChange.cron
=
0 0 2 * * ?
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
c4b43c74
...
@@ -746,13 +746,13 @@
...
@@ -746,13 +746,13 @@
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
ALTER TABLE `toip_rm_snapshot` MODIFY COLUMN `method_param` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '方法参数' AFTER `equipment_id`;
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"gaojianqiang"
id=
"202210
17
-01"
>
<changeSet
author=
"gaojianqiang"
id=
"202210
28
-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<preConditions
onFail=
"MARK_RAN"
>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
<columnExists
tableName=
"c_plan_rule"
columnName=
"plan_step"
/>
</preConditions>
</preConditions>
<comment>
修改属性字段值 plan_step
</comment>
<comment>
修改属性字段值 plan_step
</comment>
<sql>
<sql>
UPDATE c_plan_rule SET plan_step = '[{"
stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {
"stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
UPDATE c_plan_rule SET plan_step = '[{"
roleCode": "Digital_Responsing_Plan_A", "stepCode": "0", "stepName": "确认灾情", "buttonCode": "FIRE_CONFIRM", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "1", "stepName": "停运换流阀", "buttonCode": "STOP_COMMUTATION", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "2", "stepName": "拨打报警电话", "buttonCode": "CALL_PHONE", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "3", "stepName": "确认油枕排油系统已开启", "buttonCode": "DRAIN_OIL_CONFIRM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "4", "stepName": "确认水喷雾系统已开启", "buttonCode": "OPEN_WATERSYSTEM", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "5", "stepName": "断开上级电源", "buttonCode": "OFF_POWER", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "6", "stepName": "停运阀厅空调系统", "buttonCode": "STOP_AIRCON", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_A", "stepCode": "7", "stepName": "一键开启消防炮", "buttonCode": "MONITOR_START", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "8", "stepName": "驻站消防队指挥权交接", "buttonCode": "HANDOVER_COMMAND", "isParallel": "1", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "9", "stepName": "确认本体排油已开启", "buttonCode": "OWNER_DRAIN_OIL", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "10", "stepName": "启动阀厅应急预案", "buttonCode": "START_VALVE_HALL_CONTINGENCY", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "11", "stepName": "电缆沟封堵", "buttonCode": "PLUG_CABLETRENCH", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "12", "stepName": "政府消防队指挥权交接", "buttonCode": "HANDOVER_FIGTHHING", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B", "stepCode": "13", "stepName": "确认明火扑灭", "buttonCode": "FIRE_EXTINCT", "isParallel": "0", "stepStatus": "0"}, {"roleCode": "Digital_Responsing_Plan_B",
"stepCode": "14", "stepName": "应急处置结束", "buttonCode": "END_EMERGENCY", "isParallel": "1", "stepStatus": "0"}]';
</sql>
</sql>
</changeSet>
</changeSet>
...
...
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyPlanInstanceMapper.xml
View file @
c4b43c74
This diff is collapsed.
Click to expand it.
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/dbTemplate_impt_equip.xml
View file @
c4b43c74
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"name !=null and name != ''"
>
and (eq.name like concat(concat("%",#{name}),"%") or eq.code like concat(concat("%",#{name}),"%"))
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
<if
test=
"id != null and id != ''"
>
and eq.id = #{id}
</if>
</trim>
</trim>
order by eq.id
order by eq.id
desc
<choose>
<choose>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize==-1"
></when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
<when
test=
"pageSize!=-1"
>
limit #{offset},#{pageSize}
</when>
...
...
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