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
9826cd6f
Commit
9826cd6f
authored
Oct 18, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
应急预案相关接口
parent
8aff6e59
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
302 additions
and
4 deletions
+302
-4
ContingencyPlanInstance.java
.../yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
+85
-2
PlanVisual3dController.java
.../amos/fas/business/controller/PlanVisual3dController.java
+24
-0
ContingencyPlanInstanceMapper.java
...as/business/dao/mapper/ContingencyPlanInstanceMapper.java
+20
-0
PrivilegeFeign.java
...a/com/yeejoin/amos/fas/business/feign/PrivilegeFeign.java
+6
-0
JPushTypeEnum.java
...va/com/yeejoin/amos/fas/business/jpush/JPushTypeEnum.java
+2
-1
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+90
-1
IPlanVisual3dService.java
...amos/fas/business/service/intfc/IPlanVisual3dService.java
+13
-0
fas-2.0.1.xml
...utoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
+33
-0
ContingencyPlanInstanceMapper.xml
...ain/resources/db/mapper/ContingencyPlanInstanceMapper.xml
+29
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/ContingencyPlanInstance.java
View file @
9826cd6f
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
package
com
.
yeejoin
.
amos
.
fas
.
dao
.
entity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.hibernate.annotations.GenericGenerator
;
import
org.hibernate.annotations.GenericGenerator
;
import
javax.persistence.*
;
import
javax.persistence.*
;
@Entity
@Entity
@Table
(
name
=
"contingency_plan_instance"
)
@Table
(
name
=
"contingency_plan_instance"
)
public
class
ContingencyPlanInstance
extends
BusinessEntity
{
@TableName
(
"contingency_plan_instance"
)
@Accessors
(
chain
=
true
)
@EqualsAndHashCode
(
callSuper
=
true
)
public
class
ContingencyPlanInstance
extends
BusinessEntity
{
private
static
final
long
serialVersionUID
=
292334653532432432L
;
private
static
final
long
serialVersionUID
=
292334653532432432L
;
...
@@ -23,7 +30,7 @@ public class ContingencyPlanInstance extends BusinessEntity {
...
@@ -23,7 +30,7 @@ public class ContingencyPlanInstance extends BusinessEntity {
protected
String
id
;
protected
String
id
;
@Column
(
name
=
"record_type"
)
@Column
(
name
=
"record_type"
)
private
String
recordType
;
// 记录类型:消息MESSAGE,操作OPERATE
private
String
recordType
;
// 记录类型:消息MESSAGE,操作OPERATE
,回复消息REPLYMESSAGE
@Column
(
name
=
"content"
)
@Column
(
name
=
"content"
)
private
String
content
;
// 记录内容:文本信息或者json数据
private
String
content
;
// 记录内容:文本信息或者json数据
...
@@ -50,6 +57,82 @@ public class ContingencyPlanInstance extends BusinessEntity {
...
@@ -50,6 +57,82 @@ public class ContingencyPlanInstance extends BusinessEntity {
@Column
(
name
=
"runstate"
)
@Column
(
name
=
"runstate"
)
private
Boolean
runstate
;
private
Boolean
runstate
;
@Column
(
name
=
"file_path"
)
private
String
filePath
;
//文件名称
@Column
(
name
=
"file_type"
)
private
String
fileType
;
// 文件类型
@Column
(
name
=
"role_name"
)
private
String
roleName
;
//角色名称
@Column
(
name
=
"role_code"
)
private
String
roleCode
;
//角色编码
@Column
(
name
=
"start_user_name"
)
private
String
startUserName
;
//人员名称
@Column
(
name
=
"start_user_id"
)
private
String
startUserId
;
//人员ID
@Column
(
name
=
"person_img"
)
private
String
personImg
;
public
String
getPersonImg
()
{
return
personImg
;
}
public
void
setPersonImg
(
String
personImg
)
{
this
.
personImg
=
personImg
;
}
public
String
getFilePath
()
{
return
filePath
;
}
public
void
setFilePath
(
String
filePath
)
{
this
.
filePath
=
filePath
;
}
public
String
getFileType
()
{
return
fileType
;
}
public
void
setFileType
(
String
fileType
)
{
this
.
fileType
=
fileType
;
}
public
String
getRoleName
()
{
return
roleName
;
}
public
void
setRoleName
(
String
roleName
)
{
this
.
roleName
=
roleName
;
}
public
String
getRoleCode
()
{
return
roleCode
;
}
public
void
setRoleCode
(
String
roleCode
)
{
this
.
roleCode
=
roleCode
;
}
public
String
getStartUserName
()
{
return
startUserName
;
}
public
void
setStartUserName
(
String
startUserName
)
{
this
.
startUserName
=
startUserName
;
}
public
String
getStartUserId
()
{
return
startUserId
;
}
public
void
setStartUserId
(
String
startUserId
)
{
this
.
startUserId
=
startUserId
;
}
public
Boolean
getRunstate
()
{
public
Boolean
getRunstate
()
{
return
runstate
;
return
runstate
;
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/controller/PlanVisual3dController.java
View file @
9826cd6f
...
@@ -10,8 +10,10 @@ import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
...
@@ -10,8 +10,10 @@ 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.ContingencyInstanceInfo
;
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
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
;
...
@@ -233,4 +235,26 @@ public class PlanVisual3dController extends BaseController {
...
@@ -233,4 +235,26 @@ public class PlanVisual3dController extends BaseController {
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
public
ResponseModel
updateDisposalDetails
(
@RequestBody
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
updateDisposalDetails
(
contingencyInstanceInfo
));
}
}
@Permission
@ApiOperation
(
value
=
"根据批次号获取预案的消息等记录"
,
notes
=
"根据批次号获取预案的消息等记录"
)
@GetMapping
(
value
=
"/plan/getPlaneRecordByNew"
)
public
ResponseModel
getPlaneRecordByNew
(
@RequestParam
Integer
pageNum
,
@RequestParam
Integer
size
,
@RequestParam
(
required
=
false
)
String
batchNo
)
{
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
batchNo
=
planVisual3dService
.
getNewestBatchNo
();
}
if
(!
StringUtil
.
isNotEmpty
(
batchNo
))
{
return
CommonResponseUtil
.
successNew
(
null
);
}
return
CommonResponseUtil
.
successNew
(
planVisual3dService
.
getPlaneRecordByNew
(
pageNum
,
size
,
batchNo
));
}
@Permission
@ApiOperation
(
value
=
"回复消息Api"
,
notes
=
"回复消息Api"
)
@PostMapping
(
value
=
"/plan/replyMessage"
)
public
ResponseModel
replyMessage
(
@RequestBody
ContingencyPlanInstance
dto
)
{
AgencyUserModel
user
=
getUserInfo
();
planVisual3dService
.
replyMessage
(
user
,
dto
);
return
CommonResponseUtil
.
successNew
(
null
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/dao/mapper/ContingencyPlanInstanceMapper.java
0 → 100644
View file @
9826cd6f
package
com
.
yeejoin
.
amos
.
fas
.
business
.
dao
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
public
interface
ContingencyPlanInstanceMapper
extends
BaseMapper
<
ContingencyPlanInstance
>
{
List
<
ContingencyPlanInstance
>
getPlanInstanceListByPage
(
@Param
(
"batchNo"
)
String
batchNo
,
@Param
(
"pageNum"
)
Integer
pageNum
,
@Param
(
"size"
)
Integer
size
);
Integer
getPlanInstanceCount
(
@Param
(
"batchNo"
)
String
batchNo
);
Map
<
String
,
String
>
getUserByUserId
(
@Param
(
"userId"
)
String
userId
);
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/feign/PrivilegeFeign.java
View file @
9826cd6f
...
@@ -26,4 +26,10 @@ public interface PrivilegeFeign {
...
@@ -26,4 +26,10 @@ public interface PrivilegeFeign {
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
);
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
);
@RequestMapping
(
value
=
"/privilege/v1/agencyuser/list/role/{roleIds}"
,
method
=
RequestMethod
.
GET
)
FeignClientResult
getUserByRoleIds
(
@RequestHeader
(
name
=
"appKey"
,
required
=
true
)
String
appKey
,
@RequestHeader
(
name
=
"product"
,
required
=
true
)
String
product
,
@RequestHeader
(
name
=
"token"
,
required
=
true
)
String
token
,
@RequestParam
(
value
=
"roleIds"
,
required
=
true
)
String
roleIds
);
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/jpush/JPushTypeEnum.java
View file @
9826cd6f
...
@@ -9,7 +9,8 @@ public enum JPushTypeEnum {
...
@@ -9,7 +9,8 @@ public enum JPushTypeEnum {
ALL
(
"广播"
,
"1"
),
ALL
(
"广播"
,
"1"
),
TAG
(
"标签"
,
"2"
),
TAG
(
"标签"
,
"2"
),
ALIAS
(
"别名"
,
"3"
);
ALIAS
(
"别名"
,
"3"
),
REPLY_MESSAGE
(
"app预案相关消息"
,
"4"
);
/**
/**
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
9826cd6f
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
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.ContingencyInstanceInfoMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.ContingencyInstanceInfoMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.DictMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
import
com.yeejoin.amos.fas.business.dao.mapper.PlanOperationRecordMapper
;
...
@@ -12,6 +13,9 @@ import com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper;
...
@@ -12,6 +13,9 @@ import com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.dao.repository.*
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.feign.IMaasVisualServer
;
import
com.yeejoin.amos.fas.business.feign.PushFeign
;
import
com.yeejoin.amos.fas.business.jpush.JPushTypeEnum
;
import
com.yeejoin.amos.fas.business.jpush.PushMsgParam
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IDictService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
...
@@ -24,14 +28,20 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
...
@@ -24,14 +28,20 @@ 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.DateUtil
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.fas.dao.entity.*
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.RoleModel
;
import
org.apache.commons.io.IOUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.core.io.Resource
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.io.IOException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -72,6 +82,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -72,6 +82,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
private
ContingencyInstanceInfoMapper
contingencyInstanceInfoMapper
;
private
ContingencyInstanceInfoMapper
contingencyInstanceInfoMapper
;
@Autowired
private
ContingencyPlanInstanceMapper
contingencyPlanInstanceMapper
;
@Value
(
"classpath:/json/plan-step.json"
)
private
Resource
planStepResource
;
@Autowired
private
PushFeign
pushFeign
;
@Autowired
private
IContingencyPlanInstanceRepository
repository
;
@Override
@Override
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
...
@@ -375,4 +398,70 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
...
@@ -375,4 +398,70 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
public
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
public
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
)
{
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
contingencyInstanceInfo
);
return
contingencyInstanceInfoMapper
.
updateDisposalDetails
(
contingencyInstanceInfo
);
}
}
@Override
public
Page
<
ContingencyPlanInstance
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
)
{
Integer
planInstanceCount
=
contingencyPlanInstanceMapper
.
getPlanInstanceCount
(
batchNo
);
// 根据批次号获取预案记录
List
<
ContingencyPlanInstance
>
planInstanceListByPage
=
contingencyPlanInstanceMapper
.
getPlanInstanceListByPage
(
batchNo
,
(
pageNum
-
1
)
*
size
,
size
);
if
(!
CollectionUtils
.
isEmpty
(
planInstanceListByPage
))
{
planInstanceListByPage
.
stream
().
sorted
(
Comparator
.
comparing
(
ContingencyPlanInstance:
:
getCreateDate
)).
collect
(
Collectors
.
toList
());
}
Page
<
ContingencyPlanInstance
>
page
=
new
Page
<>();
page
.
setTotal
(
planInstanceCount
);
page
.
setCurrent
(
pageNum
);
page
.
setSize
(
size
);
page
.
setRecords
(
planInstanceListByPage
);
return
page
;
}
@Override
public
void
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
)
{
String
json
=
""
;
try
{
json
=
IOUtils
.
toString
(
planStepResource
.
getInputStream
(),
String
.
valueOf
(
StandardCharsets
.
UTF_8
));
}
catch
(
IOException
e
)
{
throw
new
RuntimeException
(
"获取预案相关角色信息失败!"
);
}
List
<
Object
>
list
=
JSON
.
parseArray
(
json
);
List
<
Map
<
String
,
String
>>
result
=
new
ArrayList
<
Map
<
String
,
String
>>();
for
(
Object
object
:
list
)
{
Map
<
String
,
String
>
ret
=
(
Map
<
String
,
String
>)
object
;
result
.
add
(
ret
);
}
List
<
String
>
roleCode
=
result
.
stream
().
map
(
t
->
t
.
get
(
"roleCode"
)).
distinct
().
collect
(
Collectors
.
toList
());
List
<
RoleModel
>
roleModelList
=
new
ArrayList
<>();
for
(
Long
key
:
user
.
getOrgRoles
().
keySet
())
{
roleModelList
.
addAll
(
user
.
getOrgRoles
().
get
(
key
));
}
List
<
String
>
roleCodeList
=
new
ArrayList
<>();
List
<
String
>
roleNameList
=
new
ArrayList
<>();
List
<
String
>
realRoleCode
=
roleModelList
.
stream
().
map
(
RoleModel:
:
getRoleName
).
distinct
().
collect
(
Collectors
.
toList
());
realRoleCode
.
forEach
(
item
->
{
if
(
roleCode
.
contains
(
item
))
{
roleCodeList
.
add
(
item
);
}
});
roleModelList
.
forEach
(
item
->
{
if
(!
roleNameList
.
contains
(
item
.
getRoleDesc
())
&&
roleCode
.
contains
(
item
.
getRoleName
()))
{
roleNameList
.
add
(
item
.
getRoleDesc
());
}
});
dto
.
setRoleCode
(
String
.
join
(
","
,
roleCodeList
));
dto
.
setRoleName
(
String
.
join
(
","
,
roleNameList
));
dto
.
setStartUserId
(
user
.
getUserId
());
dto
.
setStartUserId
(
user
.
getRealName
());
dto
.
setRecordType
(
"REPLYMESSAGE"
);
Map
<
String
,
String
>
userInfo
=
contingencyPlanInstanceMapper
.
getUserByUserId
(
user
.
getUserId
());
dto
.
setPersonImg
(
userInfo
.
get
(
"personImg"
));
repository
.
save
(
dto
);
PushMsgParam
pushMsgParam
=
new
PushMsgParam
();
// TODO: 2022/10/18 接收人需从平台获取
pushMsgParam
.
setRecivers
(
Lists
.
newArrayList
(
""
));
pushMsgParam
.
setContent
(
JSONUtil
.
toJson
(
dto
));
pushMsgParam
.
setSubject
(
"REPLYMESSAGE"
);
pushMsgParam
.
setType
(
JPushTypeEnum
.
REPLY_MESSAGE
.
getCode
());
pushFeign
.
sendMessageone
(
pushMsgParam
);
}
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/intfc/IPlanVisual3dService.java
View file @
9826cd6f
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.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
import
com.yeejoin.amos.fas.business.service.model.ToipResponse
;
...
@@ -7,9 +8,12 @@ import com.yeejoin.amos.fas.business.vo.PlanStepVo;
...
@@ -7,9 +8,12 @@ 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.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.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.ContingencyInstanceInfo
;
import
com.yeejoin.amos.fas.dao.entity.PlanRule
;
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
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -84,4 +88,13 @@ public interface IPlanVisual3dService {
...
@@ -84,4 +88,13 @@ public interface IPlanVisual3dService {
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
addDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
Boolean
updateDisposalDetails
(
ContingencyInstanceInfo
contingencyInstanceInfo
);
/**
* 根据批次号获取预案的消息等记录
* @param batchNo
* @return
*/
Page
<
ContingencyPlanInstance
>
getPlaneRecordByNew
(
Integer
pageNum
,
Integer
size
,
String
batchNo
);
void
replyMessage
(
AgencyUserModel
user
,
ContingencyPlanInstance
dto
);
}
}
YeeAmosFireAutoSysStart/src/main/resources/db/changelog/fas-2.0.1.xml
View file @
9826cd6f
...
@@ -755,4 +755,36 @@
...
@@ -755,4 +755,36 @@
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 = '[{"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"}]';
</sql>
</sql>
</changeSet>
</changeSet>
<changeSet
author=
"zs"
id=
"202210181046-01"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"contingency_plan_instance"
columnName=
"file_path"
/>
</not>
</preConditions>
<comment>
扩展字段
</comment>
<sql>
ALTER TABLE `contingency_plan_instance`
ADD COLUMN `file_path` varchar(2000) NULL COMMENT '文件路径' AFTER `runstate`,
ADD COLUMN `file_type` varchar(36) NULL COMMENT 'image、video' AFTER `file_path`,
ADD COLUMN `role_name` varchar(255) NULL COMMENT '角色名称' AFTER `file_type`,
ADD COLUMN `role_code` varchar(255) NULL COMMENT '角色编码' AFTER `role_name`,
ADD COLUMN `start_user_name` varchar(255) NULL AFTER `role_code`,
ADD COLUMN `start_user_id` varchar(255) NULL AFTER `start_user_name`,
ADD COLUMN `person_img` varchar(10) NULL AFTER `start_user_id`;
</sql>
</changeSet>
<changeSet
author=
"zs"
id=
"202210181046-02"
>
<preConditions
onFail=
"MARK_RAN"
>
<not>
<columnExists
tableName=
"cb_org_usr"
columnName=
"gender"
/>
</not>
</preConditions>
<comment>
usr表加性别字段
</comment>
<sql>
ALTER TABLE `cb_org_usr`
ADD COLUMN `gender` varchar(10) DEFAULT NULL;
</sql>
</changeSet>
</databaseChangeLog>
</databaseChangeLog>
\ No newline at end of file
YeeAmosFireAutoSysStart/src/main/resources/db/mapper/ContingencyPlanInstanceMapper.xml
0 → 100644
View file @
9826cd6f
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.fas.business.dao.mapper.ContingencyPlanInstanceMapper"
>
<select
id=
"getPlanInstanceListByPage"
resultType=
"com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance"
>
select * from
contingency_plan_instance
where batch_no = #{batchNo}
AND record_type in ('REPLYMESSAGE', 'MESSAGE')
order by create_date DESC
limit #{pageNum}, #{size}
</select>
<select
id=
"getPlanInstanceCount"
resultType=
"java.lang.Integer"
>
select count(1) from
contingency_plan_instance
where batch_no = #{batchNo}
AND record_type in ('REPLYMESSAGE', 'MESSAGE')
</select>
<select
id=
"getUserByUserId"
resultType=
"java.util.Map"
>
select
ifnull(gender, "") as gender,
ifnull(personImg, "") as personImg
from cb_org_usr where amos_org_id = #{userId} and is_delete = 0 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