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
e3121473
Commit
e3121473
authored
Dec 28, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保洁结束任务时断电
parent
c6249b21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletions
+26
-1
SCleanRecordsController.java
.../share/web/controller/system/SCleanRecordsController.java
+2
-1
ISCleanRecordsService.java
...main/java/share/system/service/ISCleanRecordsService.java
+6
-0
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+18
-0
No files found.
share-front/src/main/java/share/web/controller/system/SCleanRecordsController.java
View file @
e3121473
...
@@ -24,6 +24,7 @@ import share.common.enums.CleaningStatusEnum;
...
@@ -24,6 +24,7 @@ import share.common.enums.CleaningStatusEnum;
import
share.system.domain.SCleanRecords
;
import
share.system.domain.SCleanRecords
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.service.DeviceOpService
;
import
share.system.service.ISCleanRecordsService
;
import
share.system.service.ISCleanRecordsService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.common.core.page.TableDataInfo
;
...
@@ -122,7 +123,7 @@ public class SCleanRecordsController extends BaseController
...
@@ -122,7 +123,7 @@ public class SCleanRecordsController extends BaseController
sCleanRecords
.
setConsumerId
(
user
.
getId
());
sCleanRecords
.
setConsumerId
(
user
.
getId
());
sCleanRecords
.
setEndDate
(
DateUtil
.
date
());
sCleanRecords
.
setEndDate
(
DateUtil
.
date
());
sCleanRecords
.
setStatus
(
CleaningStatusEnum
.
CLEANED
.
getCode
());
sCleanRecords
.
setStatus
(
CleaningStatusEnum
.
CLEANED
.
getCode
());
return
toAjax
(
sCleanRecordsService
.
updateS
CleanRecords
(
sCleanRecords
));
return
toAjax
(
sCleanRecordsService
.
end
CleanRecords
(
sCleanRecords
));
}
}
/**
/**
...
...
share-system/src/main/java/share/system/service/ISCleanRecordsService.java
View file @
e3121473
...
@@ -87,4 +87,10 @@ public interface ISCleanRecordsService extends IService<SCleanRecords>
...
@@ -87,4 +87,10 @@ public interface ISCleanRecordsService extends IService<SCleanRecords>
List
<
SCleanRecords
>
unCleanedListByRoomIds
(
List
<
Long
>
roomIds
);
List
<
SCleanRecords
>
unCleanedListByRoomIds
(
List
<
Long
>
roomIds
);
/**
* 结束保洁
* @param sCleanRecords
* @return
*/
int
endCleanRecords
(
SCleanRecords
sCleanRecords
);
}
}
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
e3121473
...
@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateUtil;
...
@@ -7,6 +7,7 @@ import cn.hutool.core.date.DateUtil;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
share.common.enums.CleaningStatusEnum
;
import
share.common.enums.CleaningStatusEnum
;
import
share.common.enums.OpTypeEnum
;
import
share.common.enums.RoleTypeEnum
;
import
share.common.enums.RoleTypeEnum
;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -20,6 +21,7 @@ import share.system.domain.SCleanRecords;
...
@@ -20,6 +21,7 @@ import share.system.domain.SCleanRecords;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SRoomMapper
;
import
share.system.mapper.SRoomMapper
;
import
share.system.mapper.SStoreMapper
;
import
share.system.mapper.SStoreMapper
;
import
share.system.service.DeviceOpService
;
import
share.system.service.ISCleanRecordsService
;
import
share.system.service.ISCleanRecordsService
;
import
share.system.service.SmsService
;
import
share.system.service.SmsService
;
...
@@ -40,6 +42,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
...
@@ -40,6 +42,8 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
private
SStoreMapper
sStoreMapper
;
private
SStoreMapper
sStoreMapper
;
@Autowired
@Autowired
private
SmsService
smsService
;
private
SmsService
smsService
;
@Autowired
private
DeviceOpService
deviceOpService
;
/**
/**
* 查询保洁记录
* 查询保洁记录
...
@@ -228,6 +232,20 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
...
@@ -228,6 +232,20 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
return
list
(
queryWrapper
);
return
list
(
queryWrapper
);
}
}
@Override
public
int
endCleanRecords
(
SCleanRecords
sCleanRecords
)
{
SCleanRecords
records
=
baseMapper
.
selectSCleanRecordsById
(
sCleanRecords
.
getId
());
if
(
records
==
null
)
{
throw
new
RuntimeException
(
"当前保洁任务不存在!"
);
}
int
index
=
updateSCleanRecords
(
sCleanRecords
);
if
(
index
>
0
)
{
// 断电
deviceOpService
.
openOrCloseDevice
(
records
.
getRoomId
(),
records
.
getPhone
(),
OpTypeEnum
.
CUT_ELECTRIC
.
getCode
(),
true
,
5
);
}
return
index
;
}
private
void
sendSms
(
Long
storeId
,
SStore
store
,
SRoom
room
)
{
private
void
sendSms
(
Long
storeId
,
SStore
store
,
SRoom
room
)
{
sConsumerMapper
.
selectListByStoreId
(
storeId
).
stream
().
forEach
(
item
->
{
sConsumerMapper
.
selectListByStoreId
(
storeId
).
stream
().
forEach
(
item
->
{
// 循环发送短信提示门店保洁打扫卫生
// 循环发送短信提示门店保洁打扫卫生
...
...
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