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
8919d477
Commit
8919d477
authored
Mar 05, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除房间是否是脏房字段
parent
730b9538
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
28 deletions
+6
-28
RedisTask.java
share-quartz/src/main/java/share/quartz/task/RedisTask.java
+0
-1
SRoom.java
share-system/src/main/java/share/system/domain/SRoom.java
+0
-8
SRoomVo.java
...-system/src/main/java/share/system/domain/vo/SRoomVo.java
+0
-5
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+2
-5
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+4
-3
SRoomMapper.xml
...e-system/src/main/resources/mapper/system/SRoomMapper.xml
+0
-6
No files found.
share-quartz/src/main/java/share/quartz/task/RedisTask.java
View file @
8919d477
...
...
@@ -271,7 +271,6 @@ public class RedisTask {
SRoom
room
=
roomService
.
getById
(
sOrder
.
getRoomId
());
if
(
ObjectUtil
.
isNotEmpty
(
room
))
{
room
.
setStatus
(
RoomStatusEnum
.
FREE
.
getValue
());
room
.
setIsDirtyRoom
(
YesNoEnum
.
yes
.
getIndex
());
room
.
setUpdateTime
(
new
Date
());
roomService
.
updateById
(
room
);
}
...
...
share-system/src/main/java/share/system/domain/SRoom.java
View file @
8919d477
...
...
@@ -3,10 +3,7 @@ package share.system.domain;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
...
...
@@ -84,11 +81,6 @@ public class SRoom extends BaseEntity
@Excel
(
name
=
"其他可能硬件接入参数(备用2)"
)
private
String
params2
;
/**
* 是否脏房
*/
@Excel
(
name
=
"是否脏房(0:否,1:是)"
)
private
Integer
isDirtyRoom
;
/**
* 房间上下架(1-上架,2-下架,3-维护)
...
...
share-system/src/main/java/share/system/domain/vo/SRoomVo.java
View file @
8919d477
...
...
@@ -129,11 +129,6 @@ public class SRoomVo extends BaseEntity
*/
private
Long
recordsUserId
;
/**
* 是否脏房
*/
private
Integer
isDirtyRoom
;
/**
* 订单时间
...
...
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
8919d477
...
...
@@ -337,7 +337,6 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
item
.
setUpdateTime
(
now
);
rooms
.
add
(
new
SRoom
()
{{
setId
(
item
.
getRoomId
());
setIsDirtyRoom
(
YesNoEnum
.
no
.
getIndex
());
}});
});
}
...
...
@@ -359,16 +358,15 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
sRoomList
.
stream
().
forEach
(
room
->
{
//循环房间
//判断当前房间是否是当前门店的房间,并且是未打扫的房间
if
(
item
.
getStoreId
().
equals
(
store
.
getId
())
&&
room
.
getStoreId
().
equals
(
store
.
getId
())
&&
room
.
getIsDirtyRoom
().
equals
(
YesNoEnum
.
no
.
getIndex
()))
{
//
if (item.getStoreId().equals(store.getId()) && room.getStoreId().equals(store.getId()) && room.getIsDirtyRoom().equals(YesNoEnum.no.getIndex())) {
//发送短信
sConsumers
.
stream
().
forEach
(
consumer
->
{
if
(
consumer
.
getId
().
equals
(
item
.
getConsumerId
()))
{
room
.
setIsDirtyRoom
(
YesNoEnum
.
yes
.
getIndex
());
dirtyRoomList
.
add
(
room
);
smsService
.
sendSmsCleanRecords
(
consumer
.
getPhone
(),
store
,
room
);
}
});
}
//
}
});
});
});
...
...
@@ -458,7 +456,6 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
sCleanRecords
.
setEndDate
(
DateUtil
.
date
());
sCleanRecords
.
setStatus
(
CleaningStatusEnum
.
CLEANED
.
getCode
());
SRoom
sRoom
=
new
SRoom
();
sRoom
.
setIsDirtyRoom
(
YesNoEnum
.
no
.
getIndex
());
SCleanRecords
records
=
baseMapper
.
selectSCleanRecordsById
(
sCleanRecords
.
getId
());
if
(
records
==
null
)
{
throw
new
RuntimeException
(
"当前保洁任务不存在!"
);
...
...
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
8919d477
...
...
@@ -1099,6 +1099,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
if
(
isRefund
)
{
// 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
());
//房间断电
deviceOpService
.
openOrCloseDevice
(
sOrder
.
getRoomId
(),
sOrder
.
getConsumerPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
5
);
}
...
...
@@ -1109,6 +1110,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
}
else
{
// 删除redis 缓存信息,防止退款订单自动开始及给用户发送提示短信
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO
.
getValue
()
+
sOrder
.
getOrderNo
());
redisUtil
.
delete
(
ReceiptRdeisEnum
.
ORDER_NO_KEY
.
getValue
()
+
sOrder
.
getOrderNo
());
//修改订单退款状态,退款成功
sOrder
.
setStatus
(
OrderStatusEnum
.
CANCEL
.
getCode
());
sOrder
.
setRefundStatus
(
RefundStatusEnum
.
REFUNDED
.
getCode
());
...
...
@@ -1139,9 +1141,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
throw
new
BaseException
(
"订单更新失败"
);
}
}
//判断房间是否是脏房,脏房新增保洁订单
SRoomVo
sRoomVo
=
roomService
.
selectSRoomById
(
sOrder
.
getRoomId
());
if
(
sRoomVo
.
getIsDirtyRoom
().
equals
(
YesNoEnum
.
yes
.
getIndex
()))
{
//判断订单状态
if
(
sOrder
.
getStatus
().
equals
(
OrderStatusEnum
.
INUSE
.
getCode
())
|
sOrder
.
getStatus
().
equals
(
OrderStatusEnum
.
USED
.
getCode
()))
{
//新增保洁任务
cleanRecordsService
.
addSCleanRecords
(
sOrder
.
getStoreId
(),
sOrder
.
getRoomId
());
}
...
...
share-system/src/main/resources/mapper/system/SRoomMapper.xml
View file @
8919d477
...
...
@@ -15,7 +15,6 @@
<result
property=
"info"
column=
"info"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"price"
column=
"price"
/>
<result
property=
"isDirtyRoom"
column=
"is_dirty_room"
/>
<result
property=
"doorLockCode"
column=
"door_lock_code"
/>
<result
property=
"electricControlCode"
column=
"electric_control_code"
/>
<result
property=
"password"
column=
"password"
/>
...
...
@@ -40,7 +39,6 @@
info,
status,
price,
is_dirty_room,
door_lock_code,
electric_control_code,
password,
...
...
@@ -66,7 +64,6 @@
<if
test=
"info != null and info != ''"
>
and info = #{info}
</if>
<if
test=
"status != null and status != '' or status ==0"
>
and status = #{status}
</if>
<if
test=
"price != null "
>
and price = #{price}
</if>
<if
test=
"isDirtyRoom != null "
>
and is_dirty_room = #{isDirtyRoom}
</if>
<if
test=
"doorLockCode != null and doorLockCode != ''"
>
and door_lock_code = #{doorLockCode}
</if>
<if
test=
"electricControlCode != null and electricControlCode != ''"
>
and electric_control_code = #{electricControlCode}
</if>
<if
test=
"password != null and password != ''"
>
and password = #{password}
</if>
...
...
@@ -97,7 +94,6 @@
<if
test=
"info != null"
>
info,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"price != null"
>
price,
</if>
<if
test=
"isDirtyRoom != null"
>
is_dirty_room,
</if>
<if
test=
"doorLockCode != null"
>
door_lock_code,
</if>
<if
test=
"electricControlCode != null"
>
electric_control_code,
</if>
<if
test=
"password != null"
>
password,
</if>
...
...
@@ -120,7 +116,6 @@
<if
test=
"info != null"
>
#{info},
</if>
<if
test=
"status != null"
>
#{status},
</if>
<if
test=
"price != null"
>
#{price},
</if>
<if
test=
"isDirtyRoom != null"
>
#{isDirtyRoom},
</if>
<if
test=
"doorLockCode != null"
>
#{doorLockCode},
</if>
<if
test=
"electricControlCode != null"
>
#{electricControlCode},
</if>
<if
test=
"password != null"
>
#{password},
</if>
...
...
@@ -147,7 +142,6 @@
<if
test=
"info != null"
>
info = #{info},
</if>
<if
test=
"status != null"
>
status = #{status},
</if>
<if
test=
"price != null"
>
price = #{price},
</if>
<if
test=
"isDirtyRoom != null"
>
is_dirty_room = #{isDirtyRoom},
</if>
<if
test=
"doorLockCode != null"
>
door_lock_code = #{doorLockCode},
</if>
<if
test=
"electricControlCode != null"
>
electric_control_code = #{electricControlCode},
</if>
<if
test=
"password != null"
>
password = #{password},
</if>
...
...
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