Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
Overview
Overview
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
pseer
gxpt_ht
Commits
b0c44123
Commit
b0c44123
authored
Mar 28, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保洁房间显示增加后面的预约订单
parent
412e8cf5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
SRoomVo.java
...-system/src/main/java/share/system/domain/vo/SRoomVo.java
+3
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+13
-2
No files found.
share-system/src/main/java/share/system/domain/vo/SRoomVo.java
View file @
b0c44123
...
...
@@ -9,6 +9,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.system.domain.Device
;
import
share.system.domain.SOrder
;
import
share.system.domain.SPack
;
import
java.math.BigDecimal
;
...
...
@@ -108,6 +109,8 @@ public class SRoomVo extends BaseEntity
private
List
<
Device
>
deviceList
;
private
List
<
SOrder
>
orderList
;
/**
* 美团点评店铺id
*/
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
b0c44123
...
...
@@ -490,7 +490,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
LambdaQueryWrapper
<
SOrder
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
in
(
SOrder:
:
getStoreId
,
storeIdList
);
wrapper
.
in
(
SOrder:
:
getRoomId
,
roomIdList
);
wrapper
.
eq
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
INUSE
.
getCode
());
wrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getUnfinishOrderStatus
());
//正序
wrapper
.
orderByAsc
(
SOrder:
:
getEndDate
);
List
<
SOrder
>
list
=
orderService
.
list
(
wrapper
);
...
...
@@ -512,8 +512,19 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
if
(
CollectionUtils
.
isNotEmpty
(
list
))
{
List
<
SOrder
>
orderList
=
list
.
stream
().
filter
(
order
->
order
.
getRoomId
().
compareTo
(
room
.
getId
())
==
0
&&
order
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCode
())
//预约开始时间是今天的
&&
DateUtil
.
isSameDay
(
order
.
getPreStartDate
(),
DateUtil
.
date
())
).
collect
(
Collectors
.
toList
());
//按照预约开始时间排序
orderList
.
sort
(
Comparator
.
comparing
(
SOrder:
:
getPreStartDate
));
//只取3条
orderList
=
orderList
.
stream
().
limit
(
3
).
collect
(
Collectors
.
toList
());
room
.
setOrderList
(
orderList
);
list
.
forEach
(
order
->
{
if
(
order
.
getRoomId
().
compareTo
(
room
.
getId
())
==
0
)
{
if
(
order
.
getRoomId
().
compareTo
(
room
.
getId
())
==
0
&&
order
.
getStatus
().
equals
(
OrderStatusEnum
.
INUSE
.
getCode
())
)
{
room
.
setRecordsTime
(
order
.
getEndDate
());
}
});
...
...
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