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