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
85cd05e4
Commit
85cd05e4
authored
Oct 21, 2022
by
高建强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
item:应急处置执行业务完善
parent
6add715e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
101 additions
and
9 deletions
+101
-9
PlanReplyMessageEnum.java
...m/yeejoin/amos/fas/common/enums/PlanReplyMessageEnum.java
+71
-0
ContingencyInstanceImpl.java
...os/fas/business/service/impl/ContingencyInstanceImpl.java
+15
-4
PlanVisual3dServiceImpl.java
...os/fas/business/service/impl/PlanVisual3dServiceImpl.java
+12
-5
application-dev.properties
...utoSysStart/src/main/resources/application-dev.properties
+3
-0
No files found.
YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/common/enums/PlanReplyMessageEnum.java
0 → 100644
View file @
85cd05e4
package
com
.
yeejoin
.
amos
.
fas
.
common
.
enums
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* @author gaojianqiang
*/
public
enum
PlanReplyMessageEnum
{
FIRE_PERSON
(
"文本"
,
"text"
),
OPS_PERSON
(
"图片"
,
"image"
),
REAL_PERSON
(
"视频"
,
"video"
);
/**
* 名称,描述
*/
private
String
name
;
/**
* 编码
*/
private
String
code
;
private
PlanReplyMessageEnum
(
String
name
,
String
code
){
this
.
name
=
name
;
this
.
code
=
code
;
}
public
static
PlanReplyMessageEnum
getEnum
(
String
code
)
{
PlanReplyMessageEnum
checkStatusEnum
=
null
;
for
(
PlanReplyMessageEnum
type:
PlanReplyMessageEnum
.
values
())
{
if
(
type
.
getCode
().
equals
(
code
))
{
checkStatusEnum
=
type
;
break
;
}
}
return
checkStatusEnum
;
}
public
static
List
<
Map
<
String
,
Object
>>
getEnumList
()
{
List
<
Map
<
String
,
Object
>>
nameList
=
new
ArrayList
<>();
for
(
PlanReplyMessageEnum
c:
PlanReplyMessageEnum
.
values
())
{
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
"name"
,
c
.
getName
());
map
.
put
(
"code"
,
c
.
getCode
());
nameList
.
add
(
map
);
}
return
nameList
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
}
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/ContingencyInstanceImpl.java
View file @
85cd05e4
...
...
@@ -14,6 +14,7 @@ import java.util.stream.Collectors;
import
com.yeejoin.amos.component.feign.model.FeignClientResult
;
import
com.yeejoin.amos.fas.business.service.intfc.*
;
import
com.yeejoin.amos.fas.business.vo.PlanStepJsonVO
;
import
com.yeejoin.amos.fas.common.enums.PlanReplyMessageEnum
;
import
com.yeejoin.amos.fas.datasync.bo.ContingencyOriginalDataSyncBo
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
...
...
@@ -126,6 +127,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
@Value
(
"${spring.application.name}"
)
private
String
serviceName
;
@Value
(
"${plan.instance.personImg}"
)
private
String
personImg
;
/* public ContingencyInstanceImpl(IContingencyPlanInstanceRepository repository) {
super(repository);
this.repository = repository;
...
...
@@ -149,7 +153,9 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
*/
public
ContingencyPlanInstance
createInstanceRecord
(
String
instanceNo
,
String
category
,
String
subCategory
,
String
content
,
String
recordType
,
String
icon
)
{
ContingencyPlanInstance
planInstance
=
new
ContingencyPlanInstance
();
if
(
"MESSAGE"
.
equalsIgnoreCase
(
recordType
))
{
planInstance
.
setFileType
(
PlanReplyMessageEnum
.
FIRE_PERSON
.
getCode
());
}
planInstance
.
setContent
(
content
);
planInstance
.
setIcon
(
icon
);
planInstance
.
setRecordType
(
recordType
);
...
...
@@ -470,12 +476,17 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
roleNameList
.
add
(
item
.
getRoleDesc
());
}
});
contingencyPlanInstance
.
setRoleCode
(
String
.
join
(
"
,
"
,
roleCodeList
));
contingencyPlanInstance
.
setRoleName
(
String
.
join
(
"
,
"
,
roleNameList
));
contingencyPlanInstance
.
setRoleCode
(
String
.
join
(
"
-
"
,
roleCodeList
));
contingencyPlanInstance
.
setRoleName
(
String
.
join
(
"
-
"
,
roleNameList
));
contingencyPlanInstance
.
setStartUserId
(
user
.
getUserId
());
contingencyPlanInstance
.
setStartUserName
(
user
.
getRealName
());
Map
<
String
,
String
>
userInfo
=
contingencyPlanInstanceMapper
.
getUserByUserId
(
user
.
getUserId
());
contingencyPlanInstance
.
setPersonImg
(
userInfo
.
get
(
"personImg"
));
String
img
=
userInfo
.
get
(
"personImg"
);
if
(
StringUtils
.
isNotBlank
(
img
))
{
contingencyPlanInstance
.
setPersonImg
(
img
);
}
else
{
contingencyPlanInstance
.
setPersonImg
(
personImg
);
}
return
contingencyPlanInstance
;
}
...
...
YeeAmosFireAutoSysService/src/main/java/com/yeejoin/amos/fas/business/service/impl/PlanVisual3dServiceImpl.java
View file @
85cd05e4
...
...
@@ -23,11 +23,11 @@ import com.yeejoin.amos.fas.business.vo.PlanStepVo;
import
com.yeejoin.amos.fas.business.vo.TreeSubjectVo
;
import
com.yeejoin.amos.fas.core.util.CommonResponse
;
import
com.yeejoin.amos.fas.core.util.CommonResponseUtil
;
import
com.yeejoin.amos.fas.core.util.DateUtil
;
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.eclipse.paho.client.mqttv3.MqttException
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -40,7 +40,6 @@ import org.springframework.util.ObjectUtils;
import
org.typroject.tyboot.component.emq.EmqKeeper
;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.nio.charset.StandardCharsets
;
import
java.util.*
;
import
java.util.stream.Collectors
;
...
...
@@ -106,6 +105,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Value
(
"${station.name}"
)
private
String
stationName
;
@Value
(
"${plan.instance.personImg}"
)
private
String
personImg
;
@Override
public
List
<
TreeSubjectVo
>
getPlanTree
()
{
...
...
@@ -426,14 +428,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
roleNameList
.
add
(
item
.
getRoleDesc
());
}
});
dto
.
setRoleCode
(
String
.
join
(
"
,
"
,
roleCodeList
));
dto
.
setRoleName
(
String
.
join
(
"
,
"
,
roleNameList
));
dto
.
setRoleCode
(
String
.
join
(
"
-
"
,
roleCodeList
));
dto
.
setRoleName
(
String
.
join
(
"
-
"
,
roleNameList
));
dto
.
setStartUserId
(
user
.
getUserId
());
dto
.
setStartUserName
(
user
.
getRealName
());
dto
.
setRecordType
(
"REPLYMESSAGE"
);
dto
.
setCreateDate
(
new
Date
());
Map
<
String
,
String
>
userInfo
=
contingencyPlanInstanceMapper
.
getUserByUserId
(
user
.
getUserId
());
dto
.
setPersonImg
(
userInfo
.
get
(
"personImg"
));
String
img
=
userInfo
.
get
(
"personImg"
);
if
(
StringUtils
.
isNotBlank
(
img
))
{
dto
.
setPersonImg
(
img
);
}
else
{
dto
.
setPersonImg
(
personImg
);
}
dto
.
setContent
(
StringUtil
.
isNotEmpty
(
dto
.
getContent
())
?
dto
.
getContent
()
:
""
);
repository
.
save
(
dto
);
try
{
...
...
YeeAmosFireAutoSysStart/src/main/resources/application-dev.properties
View file @
85cd05e4
...
...
@@ -57,6 +57,9 @@ emqx.password=public
#文件服务器地址
file.downLoad.url
=
http://172.16.11.201:9000/
#应急处置移动端默认头像地址
plan.instance.personImg
=
upload/3dview_icon/头像.png
# 是否使用rocketmq on/off
rocketmq.producer.sysIsUsed
=
off
#rocketmq生产者配置
...
...
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