Commit 14312720 by 朱淼

fix bug

parent 7ce4f686
...@@ -526,7 +526,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -526,7 +526,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
String threeKey = secondId + "-" + item.getUnit(); String threeKey = secondId + "-" + item.getUnit();
if (!childrenIdMap.containsKey(threeKey)) { if (!childrenIdMap.containsKey(threeKey)) {
PlatSpace platSpace = new PlatSpace(); PlatSpace platSpace = new PlatSpace();
platSpace.setName(item.getBuilding()); platSpace.setName(item.getUnit());
platSpace.setType(PlatSpaceEnum.TypeEnum.UNIT.getValue()); platSpace.setType(PlatSpaceEnum.TypeEnum.UNIT.getValue());
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
platSpace.setParentId(secondId); platSpace.setParentId(secondId);
...@@ -555,7 +555,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace ...@@ -555,7 +555,7 @@ public class PlatSpaceServiceImpl extends ServiceImpl<PlatSpaceMapper, PlatSpace
String fourKey = threeId + "-" + item.getFloor(); String fourKey = threeId + "-" + item.getFloor();
if (!childrenIdMap.containsKey(fourKey)) { if (!childrenIdMap.containsKey(fourKey)) {
PlatSpace platSpace = new PlatSpace(); PlatSpace platSpace = new PlatSpace();
platSpace.setName(item.getBuilding()); platSpace.setName(item.getFloor());
platSpace.setType(PlatSpaceEnum.TypeEnum.FLOOR.getValue()); platSpace.setType(PlatSpaceEnum.TypeEnum.FLOOR.getValue());
platSpace.setOrgId(orgId); platSpace.setOrgId(orgId);
platSpace.setParentId(threeId); platSpace.setParentId(threeId);
......
...@@ -29,4 +29,7 @@ public class PlatBedVo extends BaseBusEntity { ...@@ -29,4 +29,7 @@ public class PlatBedVo extends BaseBusEntity {
@ApiModelProperty(value = "绑定设备") @ApiModelProperty(value = "绑定设备")
private String deviceName; private String deviceName;
@ApiModelProperty(value = "绑定设备id")
private String deviceId;
} }
...@@ -117,7 +117,8 @@ ...@@ -117,7 +117,8 @@
pb.update_by as updateBy, pb.update_by as updateBy,
pb.update_date as updateDate, pb.update_date as updateDate,
pb.sort as sort, pb.sort as sort,
d.name as deviceName d.name as deviceName,
d.id as deviceId
from plat_bed pb 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_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 left join plat_device d on d.id = prbd.device_id and d.del_flag = 0
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</foreach> </foreach>
</if> </if>
</where> </where>
UNION UNION ALL
SELECT pr.id,pr.`name`,pr.space_id as parentId,'2' as type FROM plat_room pr 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 LEFT JOIN plat_space p ON p.id = pr.space_id
<where> <where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment