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
1dbdec0b
Commit
1dbdec0b
authored
Apr 23, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试环境开门取消设备
parent
a2665a0f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
35 deletions
+35
-35
OrderComputedPriceRequest.java
.../java/share/system/request/OrderComputedPriceRequest.java
+0
-1
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+35
-34
No files found.
share-system/src/main/java/share/system/request/OrderComputedPriceRequest.java
View file @
1dbdec0b
...
...
@@ -7,7 +7,6 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
1dbdec0b
...
...
@@ -1622,23 +1622,23 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
Objects
.
isNull
(
sRoomVo
))
{
throw
new
BaseException
(
"房间不存在!"
);
}
LambdaQueryWrapper
<
Device
>
deviceLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
deviceLambdaQueryWrapper
.
eq
(
Device:
:
getRoomId
,
sOrder
.
getRoomId
());
deviceLambdaQueryWrapper
.
in
(
Device:
:
getDevType
,
DeviceType
.
DEVICE_CCEE
.
getCode
(),
DeviceType
.
DEVICE_0001
.
getCode
());
List
<
Device
>
deviceList
=
deviceService
.
list
(
deviceLambdaQueryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
throw
new
BaseException
(
"房间设备缺失!"
);
}
if
(
deviceList
.
stream
().
filter
(
device
->
device
.
getDevType
().
equals
(
DeviceType
.
DEVICE_CCEE
.
getCode
())
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
throw
new
BaseException
(
"房间门锁设备不存在!"
);
}
if
(
deviceList
.
stream
().
filter
(
item
->
item
.
getDevType
().
equals
(
DeviceType
.
DEVICE_0001
.
getCode
())
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
throw
new
BaseException
(
"房间取电设备不存在!"
);
}
//
LambdaQueryWrapper<Device> deviceLambdaQueryWrapper = new LambdaQueryWrapper<>();
//
deviceLambdaQueryWrapper.eq(Device::getRoomId, sOrder.getRoomId());
//
deviceLambdaQueryWrapper.in(Device::getDevType, DeviceType.DEVICE_CCEE.getCode(), DeviceType.DEVICE_0001.getCode());
//
List<Device> deviceList = deviceService.list(deviceLambdaQueryWrapper);
//
if (CollectionUtils.isEmpty(deviceList)) {
//
throw new BaseException("房间设备缺失!");
//
}
//
if (deviceList.stream().filter(device ->
//
device.getDevType().equals(DeviceType.DEVICE_CCEE.getCode())
//
).collect(Collectors.toList()).isEmpty()) {
//
throw new BaseException("房间门锁设备不存在!");
//
}
//
if (deviceList.stream().filter(item ->
//
item.getDevType().equals(DeviceType.DEVICE_0001.getCode())
//
).collect(Collectors.toList()).isEmpty()) {
//
throw new BaseException("房间取电设备不存在!");
//
}
//当前房间是否有保洁任务
LambdaQueryWrapper
<
SCleanRecords
>
recordsQueryWrapper
=
new
LambdaQueryWrapper
<>();
recordsQueryWrapper
.
eq
(
SCleanRecords:
:
getRoomId
,
sOrder
.
getRoomId
());
...
...
@@ -1688,24 +1688,25 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
roomService
.
updateById
(
sRoom
);
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
//开门、取电
deviceOpService
.
openDoor
(
sRoomVo
.
getId
(),
sOrder
.
getConsumerPhone
(),
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
//
deviceOpService.openDoor(sRoomVo.getId(), sOrder.getConsumerPhone(),DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
//语音
deviceOpService
.
asyncActionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
OPEN
.
getCode
(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
30L
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
}
else
{
deviceOpService
.
openDoor
(
sRoomVo
.
getId
(),
sOrder
.
getConsumerPhone
(),
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
if
(
ObjectUtil
.
isEmpty
(
sOrder
.
getArrivalTime
()))
{
//语音
deviceOpService
.
asyncActionExecute
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
VoiceEnum
.
OPEN
.
getCode
(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
new
Date
(),
DatePattern
.
NORM_DATETIME_PATTERN
),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
30L
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
sOrder
.
setArrivalTime
(
new
Date
());
baseMapper
.
updateById
(
sOrder
);
}
}
// deviceOpService.asyncActionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.OPEN.getCode(),
// cn.hutool.core.date.DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
// cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.offsetMinute(new Date(), 1),
// DatePattern.NORM_DATETIME_PATTERN), "1", 30L, DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
}
// else {
// deviceOpService.openDoor(sRoomVo.getId(), sOrder.getConsumerPhone(),DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
// if (ObjectUtil.isEmpty(sOrder.getArrivalTime())) {
// //语音
// deviceOpService.asyncActionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.OPEN.getCode(),
// cn.hutool.core.date.DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
// cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.offsetMinute(new Date(), 1),
// DatePattern.NORM_DATETIME_PATTERN), "1", 30L, DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
// sOrder.setArrivalTime(new Date());
// baseMapper.updateById(sOrder);
// }
// }
return
"开锁成功"
;
}
...
...
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