Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-platform-server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
14312720
authored
Oct 10, 2023
by
朱淼
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix bug
parent
7ce4f686
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
4 deletions
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
server-service/src/main/java/com/makeit/vo/platform/space/PlatBedVo.java
server-service/src/main/resources/mappers/PlatBedMapper.xml
server-service/src/main/resources/mappers/PlatRoomMapper.xml
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatSpaceServiceImpl.java
View file @
14312720
...
...
@@ -526,7 +526,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
String
threeKey
=
secondId
+
"-"
+
item
.
getUnit
();
if
(!
childrenIdMap
.
containsKey
(
threeKey
))
{
PlatSpace
platSpace
=
new
PlatSpace
();
platSpace
.
setName
(
item
.
get
Building
());
platSpace
.
setName
(
item
.
get
Unit
());
platSpace
.
setType
(
PlatSpaceEnum
.
TypeEnum
.
UNIT
.
getValue
());
platSpace
.
setOrgId
(
orgId
);
platSpace
.
setParentId
(
secondId
);
...
...
@@ -555,7 +555,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
String
fourKey
=
threeId
+
"-"
+
item
.
getFloor
();
if
(!
childrenIdMap
.
containsKey
(
fourKey
))
{
PlatSpace
platSpace
=
new
PlatSpace
();
platSpace
.
setName
(
item
.
get
Building
());
platSpace
.
setName
(
item
.
get
Floor
());
platSpace
.
setType
(
PlatSpaceEnum
.
TypeEnum
.
FLOOR
.
getValue
());
platSpace
.
setOrgId
(
orgId
);
platSpace
.
setParentId
(
threeId
);
...
...
server-service/src/main/java/com/makeit/vo/platform/space/PlatBedVo.java
View file @
14312720
...
...
@@ -29,4 +29,7 @@ public class PlatBedVo extends BaseBusEntity {
@ApiModelProperty
(
value
=
"绑定设备"
)
private
String
deviceName
;
@ApiModelProperty
(
value
=
"绑定设备id"
)
private
String
deviceId
;
}
server-service/src/main/resources/mappers/PlatBedMapper.xml
View file @
14312720
...
...
@@ -117,7 +117,8 @@
pb.update_by as updateBy,
pb.update_date as updateDate,
pb.sort as sort,
d.name as deviceName
d.name as deviceName,
d.id as deviceId
from plat_bed pb
left join plat_room_bed_device prbd on prbd.bed_id = pb.id and prbd.del_flag = 0
left join plat_device d on d.id = prbd.device_id and d.del_flag = 0
...
...
server-service/src/main/resources/mappers/PlatRoomMapper.xml
View file @
14312720
...
...
@@ -14,7 +14,7 @@
</foreach>
</if>
</where>
UNION
UNION
ALL
SELECT pr.id,pr.`name`,pr.space_id as parentId,'2' as type FROM plat_room pr
LEFT JOIN plat_space p ON p.id = pr.space_id
<where>
...
...
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