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;
...
@@ -7,7 +7,6 @@ import lombok.Data;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
import
java.util.Date
;
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
...
@@ -1622,23 +1622,23 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
Objects
.
isNull
(
sRoomVo
))
{
if
(
Objects
.
isNull
(
sRoomVo
))
{
throw
new
BaseException
(
"房间不存在!"
);
throw
new
BaseException
(
"房间不存在!"
);
}
}
LambdaQueryWrapper
<
Device
>
deviceLambdaQueryWrapper
=
new
LambdaQueryWrapper
<>();
//
LambdaQueryWrapper<Device> deviceLambdaQueryWrapper = new LambdaQueryWrapper<>();
deviceLambdaQueryWrapper
.
eq
(
Device:
:
getRoomId
,
sOrder
.
getRoomId
());
//
deviceLambdaQueryWrapper.eq(Device::getRoomId, sOrder.getRoomId());
deviceLambdaQueryWrapper
.
in
(
Device:
:
getDevType
,
DeviceType
.
DEVICE_CCEE
.
getCode
(),
DeviceType
.
DEVICE_0001
.
getCode
());
//
deviceLambdaQueryWrapper.in(Device::getDevType, DeviceType.DEVICE_CCEE.getCode(), DeviceType.DEVICE_0001.getCode());
List
<
Device
>
deviceList
=
deviceService
.
list
(
deviceLambdaQueryWrapper
);
//
List<Device> deviceList = deviceService.list(deviceLambdaQueryWrapper);
if
(
CollectionUtils
.
isEmpty
(
deviceList
))
{
//
if (CollectionUtils.isEmpty(deviceList)) {
throw
new
BaseException
(
"房间设备缺失!"
);
//
throw new BaseException("房间设备缺失!");
}
//
}
if
(
deviceList
.
stream
().
filter
(
device
->
//
if (deviceList.stream().filter(device ->
device
.
getDevType
().
equals
(
DeviceType
.
DEVICE_CCEE
.
getCode
())
//
device.getDevType().equals(DeviceType.DEVICE_CCEE.getCode())
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
//
).collect(Collectors.toList()).isEmpty()) {
throw
new
BaseException
(
"房间门锁设备不存在!"
);
//
throw new BaseException("房间门锁设备不存在!");
}
//
}
if
(
deviceList
.
stream
().
filter
(
item
->
//
if (deviceList.stream().filter(item ->
item
.
getDevType
().
equals
(
DeviceType
.
DEVICE_0001
.
getCode
())
//
item.getDevType().equals(DeviceType.DEVICE_0001.getCode())
).
collect
(
Collectors
.
toList
()).
isEmpty
())
{
//
).collect(Collectors.toList()).isEmpty()) {
throw
new
BaseException
(
"房间取电设备不存在!"
);
//
throw new BaseException("房间取电设备不存在!");
}
//
}
//当前房间是否有保洁任务
//当前房间是否有保洁任务
LambdaQueryWrapper
<
SCleanRecords
>
recordsQueryWrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
SCleanRecords
>
recordsQueryWrapper
=
new
LambdaQueryWrapper
<>();
recordsQueryWrapper
.
eq
(
SCleanRecords:
:
getRoomId
,
sOrder
.
getRoomId
());
recordsQueryWrapper
.
eq
(
SCleanRecords:
:
getRoomId
,
sOrder
.
getRoomId
());
...
@@ -1688,24 +1688,25 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
...
@@ -1688,24 +1688,25 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
roomService
.
updateById
(
sRoom
);
roomService
.
updateById
(
sRoom
);
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
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
(),
// 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(new Date(), DatePattern.NORM_DATETIME_PATTERN),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
// 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
());
// DatePattern.NORM_DATETIME_PATTERN), "1", 30L, DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
}
else
{
}
deviceOpService
.
openDoor
(
sRoomVo
.
getId
(),
sOrder
.
getConsumerPhone
(),
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
// else {
if
(
ObjectUtil
.
isEmpty
(
sOrder
.
getArrivalTime
()))
{
// 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
),
// deviceOpService.asyncActionExecute(sOrder.getRoomId(), sOrder.getConsumerPhone(), VoiceEnum.OPEN.getCode(),
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
cn
.
hutool
.
core
.
date
.
DateUtil
.
offsetMinute
(
new
Date
(),
1
),
// cn.hutool.core.date.DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN),
DatePattern
.
NORM_DATETIME_PATTERN
),
"1"
,
30L
,
DeviceOpSourceEnum
.
DEVICE_SOURCE_20
.
getCode
());
// cn.hutool.core.date.DateUtil.format(cn.hutool.core.date.DateUtil.offsetMinute(new Date(), 1),
sOrder
.
setArrivalTime
(
new
Date
());
// DatePattern.NORM_DATETIME_PATTERN), "1", 30L, DeviceOpSourceEnum.DEVICE_SOURCE_20.getCode());
baseMapper
.
updateById
(
sOrder
);
// sOrder.setArrivalTime(new Date());
}
// baseMapper.updateById(sOrder);
}
// }
// }
return
"开锁成功"
;
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