Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
267ad873
Commit
267ad873
authored
May 23, 2023
by
maoying
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加画布初始化接口
parent
0966861c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
0 deletions
+95
-0
SceneContentVo.java
.../yeejoin/equipmanage/common/entity/vo/SceneContentVo.java
+24
-0
IFireFightingSystemService.java
...ejoin/equipmanage/service/IFireFightingSystemService.java
+7
-0
FireFightingSystemServiceImpl.java
...uipmanage/service/impl/FireFightingSystemServiceImpl.java
+64
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-equip-api/src/main/java/com/yeejoin/equipmanage/common/entity/vo/SceneContentVo.java
0 → 100644
View file @
267ad873
package
com
.
yeejoin
.
equipmanage
.
common
.
entity
.
vo
;
import
java.util.List
;
import
java.util.Map
;
import
lombok.Data
;
/**
* 画布实例
*/
@Data
public
class
SceneContentVo
{
private
String
layout
;
private
Map
<
String
,
Object
>
boardStyle
;
private
Map
<
String
,
Object
>
dataConfig
;
private
Map
<
String
,
Object
>
boardConfig
;
private
List
<
PointTreeVo
>
children
;
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/IFireFightingSystemService.java
View file @
267ad873
...
...
@@ -309,5 +309,12 @@ public interface IFireFightingSystemService extends IService<FireFightingSystemE
Map
<
String
,
Object
>
getStationConnectStatus
();
List
<
Map
<
String
,
Object
>>
getStationStatusStatistics
();
/**
* 重置画布
*
* @param resourceDTO 参数
*/
void
resetMorphic
();
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/FireFightingSystemServiceImpl.java
View file @
267ad873
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.equipmanage.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.Wrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
...
@@ -140,6 +141,12 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Autowired
private
JCSRemoteService
jcsRemoteService
;
@Autowired
private
EquipmentSpecificMapper
equipmentSpecificMapper
;
@Autowired
private
VideoMapper
videoMapper
;
@Value
(
"${systemctl.sync.switch}"
)
private
Boolean
syncSwitch
;
...
...
@@ -2343,4 +2350,61 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
return
fireFightingSystemMapper
.
getStationStatusStatistics
();
}
@Override
public
void
resetMorphic
()
{
try
{
QueryWrapper
<
SourceScene
>
wrapper
=
new
QueryWrapper
();
List
<
SourceScene
>
sourceScenes
=
sourceSceneMapper
.
selectList
(
wrapper
);
if
(
ObjectUtils
.
isEmpty
(
sourceScenes
)){
sourceScenes
.
forEach
(
sourceScene
->{
ResourceDTO
resourceDTO
=
Morphic
.
morphicSubjectClient
.
seleteOne
(
sourceScene
.
getSceneId
()).
getResult
();
String
content
=
resourceDTO
.
getContent
();
SceneContentVo
parse
=
(
SceneContentVo
)
JSON
.
parse
(
content
);
List
<
PointTreeVo
>
pointList
=
(
List
<
PointTreeVo
>)
parse
.
getChildren
();
if
(!
ObjectUtils
.
isEmpty
(
pointList
)){
List
<
PointTreeVo
>
newPointList
=
new
ArrayList
<>();
String
pointInScene
=
""
;
String
videoInScene
=
""
;
for
(
PointTreeVo
action:
pointList
){
if
(
"equipment"
.
equals
(
action
.
getKey
())){
EquipmentSpecific
equipmentSpecific
=
equipmentSpecificMapper
.
selectById
(
action
.
getSequenceNbr
());
if
(
ObjectUtils
.
isEmpty
(
equipmentSpecific
)){
continue
;
}
action
.
setIotCode
(
equipmentSpecific
.
getIotCode
());
action
.
setDisplayName
(
equipmentSpecific
.
getName
());
action
.
setEquipSyetemId
(
equipmentSpecific
.
getSystemId
());
newPointList
.
add
(
action
);
pointInScene
=
""
.
equals
(
pointInScene
)
?
action
.
getSequenceNbr
().
toString
()
:
pointInScene
+
","
+
action
.
getSequenceNbr
();
}
else
{
Video
video
=
videoMapper
.
selectById
(
action
.
getSequenceNbr
());
if
(
ObjectUtils
.
isEmpty
(
video
)){
continue
;
}
action
.
setIotCode
(
video
.
getCode
());
action
.
setDisplayName
(
video
.
getName
());
newPointList
.
add
(
action
);
videoInScene
=
""
.
equals
(
videoInScene
)
?
action
.
getSequenceNbr
().
toString
()
:
videoInScene
+
","
+
action
.
getSequenceNbr
();
}
}
parse
.
setChildren
(
newPointList
);
resourceDTO
.
setContent
(
content
);
FeignUtil
.
remoteCall
(()
->
Morphic
.
morphicSubjectClient
.
update
(
resourceDTO
));
sourceScene
.
setPointInScene
(
pointInScene
);
sourceScene
.
setVideoInScene
(
videoInScene
);
iSourceSceneService
.
saveOrUpdate
(
sourceScene
);
}
});
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
throw
new
BadRequest
(
"保存画布失败"
);
}
}
}
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