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
9471b8b7
authored
Sep 12, 2023
by
lzy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
床位
parent
481ec1ef
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
server-module/src/main/java/com/makeit/module/controller/space/PlatBedController.java
server-service/src/main/java/com/makeit/service/platform/space/PlatBedService.java
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatBedServiceImpl.java
server-module/src/main/java/com/makeit/module/controller/space/PlatBedController.java
View file @
9471b8b7
...
@@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -18,6 +18,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
/**
* @Author:lzy
* @Author:lzy
* @Date:2023/9/6 11:56
* @Date:2023/9/6 11:56
...
@@ -38,6 +40,13 @@ public class PlatBedController {
...
@@ -38,6 +40,13 @@ public class PlatBedController {
return
ApiResponseUtils
.
success
(
data
);
return
ApiResponseUtils
.
success
(
data
);
}
}
@ApiOperation
(
"列表-无权限"
)
@PostMapping
(
"listAuthIgnore"
)
public
ApiResponseEntity
<
List
<
PlatBed
>>
listAuthIgnore
(
@RequestBody
PlatBedQueryDTO
dto
)
{
List
<
PlatBed
>
data
=
platBedService
.
list
(
dto
);
return
ApiResponseUtils
.
success
(
data
);
}
@ApiOperation
(
"详情"
)
@ApiOperation
(
"详情"
)
@PostMapping
(
"view"
)
@PostMapping
(
"view"
)
public
ApiResponseEntity
<
PlatBed
>
view
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
public
ApiResponseEntity
<
PlatBed
>
view
(
@RequestBody
BaseIdDTO
baseIdDTO
)
{
...
...
server-service/src/main/java/com/makeit/service/platform/space/PlatBedService.java
View file @
9471b8b7
...
@@ -57,4 +57,6 @@ public interface PlatBedService extends IService<PlatBed> {
...
@@ -57,4 +57,6 @@ public interface PlatBedService extends IService<PlatBed> {
List
<
PlatBedPanoramaVO
>
selectBySpaceIdAndStatus
(
PlatBedPanoramaDTO
dto
);
List
<
PlatBedPanoramaVO
>
selectBySpaceIdAndStatus
(
PlatBedPanoramaDTO
dto
);
List
<
PlatBedPanoramaVO
>
selectByRoomIdAndStatus
(
PlatBedPanoramaDTO
dto
);
List
<
PlatBedPanoramaVO
>
selectByRoomIdAndStatus
(
PlatBedPanoramaDTO
dto
);
List
<
PlatBed
>
list
(
PlatBedQueryDTO
dto
);
}
}
server-service/src/main/java/com/makeit/service/platform/space/impl/PlatBedServiceImpl.java
View file @
9471b8b7
...
@@ -157,5 +157,22 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
...
@@ -157,5 +157,22 @@ public class PlatBedServiceImpl extends ServiceImpl<PlatBedMapper, PlatBed> impl
return
baseMapper
.
selectByRoomIdAndStatus
(
dto
);
return
baseMapper
.
selectByRoomIdAndStatus
(
dto
);
}
}
@Override
public
List
<
PlatBed
>
list
(
PlatBedQueryDTO
dto
)
{
LambdaQueryWrapper
<
PlatRoomBedDevice
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
PlatRoomBedDevice:
:
getRoomId
,
dto
.
getRoomId
());
queryWrapper
.
select
(
PlatRoomBedDevice:
:
getBedId
);
List
<
PlatRoomBedDevice
>
listDevices
=
platRoomBedDeviceService
.
list
(
queryWrapper
);
List
<
String
>
listBedIds
=
listDevices
.
stream
().
map
(
item
->
item
.
getBedId
()).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
PlatBed
>
queryWrapper1
=
new
LambdaQueryWrapper
<>();
queryWrapper1
.
eq
(
StringUtil
.
isNotEmpty
(
dto
.
getRoomId
()),
PlatBed:
:
getRoomId
,
dto
.
getRoomId
());
queryWrapper1
.
notIn
(!
listBedIds
.
isEmpty
(),
PlatBed:
:
getId
,
listBedIds
);
List
<
PlatBed
>
list
=
list
(
queryWrapper1
);
return
list
;
}
}
}
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