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
279c77bd
Commit
279c77bd
authored
Jan 06, 2024
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finish clean bugfix;
order time check bugfix;
parent
fa5a34ab
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
11 deletions
+16
-11
OrderStatusEnum.java
...mon/src/main/java/share/common/enums/OrderStatusEnum.java
+6
-0
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+8
-6
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+1
-4
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+1
-1
No files found.
share-common/src/main/java/share/common/enums/OrderStatusEnum.java
View file @
279c77bd
...
@@ -30,7 +30,13 @@ public enum OrderStatusEnum {
...
@@ -30,7 +30,13 @@ public enum OrderStatusEnum {
}
}
return
null
;
return
null
;
}
}
public
static
Integer
[]
getValidOrderStatus
(){
return
new
Integer
[]{
UNUSED
.
code
,
INUSE
.
code
,
USED
.
code
};
}
public
static
Integer
[]
getUnfinishOrderStatus
(){
return
new
Integer
[]{
UNUSED
.
code
,
INUSE
.
code
};
}
public
Integer
getCode
(){
public
Integer
getCode
(){
return
code
;
return
code
;
...
...
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
279c77bd
...
@@ -208,8 +208,10 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
...
@@ -208,8 +208,10 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
//获取List的房间集合
//获取List的房间集合
List
<
Long
>
roomIds
=
list
.
stream
().
map
(
SCleanRecords:
:
getRoomId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
roomIds
=
list
.
stream
().
map
(
SCleanRecords:
:
getRoomId
).
collect
(
Collectors
.
toList
());
LambdaQueryWrapper
<
SOrder
>
sOrderLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
sOrderLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
sOrderLambdaQueryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
sOrderLambdaQueryWrapper
.
in
(
SOrder:
:
getRoomId
,
roomIds
);
sOrderLambdaQueryWrapper
.
in
(
SOrder:
:
getRoomId
,
roomIds
);
sOrderLambdaQueryWrapper
.
eq
(
SOrder:
:
getOrderType
,
OrderTypeEnum
.
RESERVER
.
getCode
());
sOrderLambdaQueryWrapper
.
eq
(
SOrder:
:
getOrderType
,
OrderTypeEnum
.
RESERVER
.
getCode
());
sOrderLambdaQueryWrapper
.
notIn
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
getRefundedStatus
());
sOrderLambdaQueryWrapper
.
between
(
SOrder:
:
getPreStartDate
,
now
,
DateUtil
.
offsetMinute
(
now
,
CLEANING
));
sOrderLambdaQueryWrapper
.
between
(
SOrder:
:
getPreStartDate
,
now
,
DateUtil
.
offsetMinute
(
now
,
CLEANING
));
List
<
SOrder
>
orderList
=
orderService
.
list
(
sOrderLambdaQueryWrapper
);
List
<
SOrder
>
orderList
=
orderService
.
list
(
sOrderLambdaQueryWrapper
);
...
@@ -223,12 +225,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
...
@@ -223,12 +225,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
sCleanRecords
.
setStartDate
(
now
);
sCleanRecords
.
setStartDate
(
now
);
sCleanRecords
.
setEndDate
(
now
);
sCleanRecords
.
setEndDate
(
now
);
sCleanRecords
.
setUpdateTime
(
now
);
sCleanRecords
.
setUpdateTime
(
now
);
List
<
Long
>
unusedOrderRoomIds
=
Optional
.
ofNullable
(
orderList
).
//
List<Long> unusedOrderRoomIds = Optional.ofNullable(orderList).
orElse
(
new
ArrayList
<>()).
stream
().
filter
(
order
->
order
.
getStatus
().
equals
(
OrderStatusEnum
.
UNUSED
.
getCode
()))
//
orElse(new ArrayList<>()).stream().filter(order -> order.getStatus().equals(OrderStatusEnum.UNUSED.getCode()))
.
map
(
SOrder:
:
getRoomId
).
collect
(
Collectors
.
toList
());
//
.map(SOrder::getRoomId).collect(Collectors.toList());
if
(
unusedOrderRoomIds
.
contains
(
sCleanRecords
.
getRoomId
()))
{
//
if (unusedOrderRoomIds.contains(sCleanRecords.getRoomId())) {
deviceOpService
.
openOrCloseDevice
(
sCleanRecords
.
getRoomId
(),
phone
,
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
FIVE
);
//
deviceOpService.openOrCloseDevice(sCleanRecords.getRoomId(), phone, OpTypeEnum.CUT_ELECTRIC.getCode(), true, FIVE);
}
//
}
}
}
return
0
<
baseMapper
.
updateBatch
(
list
);
return
0
<
baseMapper
.
updateBatch
(
list
);
}
}
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
279c77bd
...
@@ -419,10 +419,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -419,10 +419,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
private
void
checkOrderDate
(
CreateOrderRequest
request
)
{
private
void
checkOrderDate
(
CreateOrderRequest
request
)
{
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
notIn
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
getRefundedStatus
());
queryWrapper
.
notIn
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
getRefundedStatus
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
new
ArrayList
<
Integer
>(){{
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getValidOrderStatus
());
add
(
OrderStatusEnum
.
UNUSED
.
getCode
());
add
(
OrderStatusEnum
.
INUSE
.
getCode
());
}});
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
YesNoEnum
.
yes
.
getIndex
());
queryWrapper
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
());
queryWrapper
.
eq
(
SOrder:
:
getStoreId
,
request
.
getStoreId
());
queryWrapper
.
eq
(
SOrder:
:
getRoomId
,
request
.
getRoomId
());
queryWrapper
.
eq
(
SOrder:
:
getRoomId
,
request
.
getRoomId
());
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
279c77bd
...
@@ -119,7 +119,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
...
@@ -119,7 +119,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
//判断门店下是否有已支付.待使用,使用中订单
//判断门店下是否有已支付.待使用,使用中订单
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SOrder
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SOrder:
:
getStoreId
,
sStore
.
getId
());
queryWrapper
.
eq
(
SOrder:
:
getStoreId
,
sStore
.
getId
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
UNUSED
.
getCode
(),
OrderStatusEnum
.
INUSE
.
getCode
());
queryWrapper
.
in
(
SOrder:
:
getStatus
,
OrderStatusEnum
.
getUnfinishOrderStatus
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
PayStatusEnum
.
PAID
.
getCode
());
queryWrapper
.
eq
(
SOrder:
:
getPayStatus
,
PayStatusEnum
.
PAID
.
getCode
());
queryWrapper
.
eq
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
UNREFUND
.
getCode
());
queryWrapper
.
eq
(
SOrder:
:
getRefundStatus
,
RefundStatusEnum
.
UNREFUND
.
getCode
());
...
...
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