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
c87b0c38
Commit
c87b0c38
authored
Nov 15, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保洁记录
parent
4def0d01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletions
+27
-1
SCleanRecordsController.java
.../share/web/controller/system/SCleanRecordsController.java
+13
-1
ISCleanRecordsService.java
...main/java/share/system/service/ISCleanRecordsService.java
+2
-0
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+12
-0
No files found.
share-front/src/main/java/share/web/controller/system/SCleanRecordsController.java
View file @
c87b0c38
...
@@ -21,6 +21,8 @@ import share.common.core.controller.BaseController;
...
@@ -21,6 +21,8 @@ import share.common.core.controller.BaseController;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.AjaxResult
;
import
share.common.enums.BusinessType
;
import
share.common.enums.BusinessType
;
import
share.system.domain.SCleanRecords
;
import
share.system.domain.SCleanRecords
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
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
;
...
@@ -46,6 +48,8 @@ public class SCleanRecordsController extends BaseController
...
@@ -46,6 +48,8 @@ public class SCleanRecordsController extends BaseController
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SCleanRecords
sCleanRecords
)
public
TableDataInfo
list
(
SCleanRecords
sCleanRecords
)
{
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sCleanRecords
.
setConsumerId
(
user
.
getId
());
startPage
();
startPage
();
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
selectSCleanRecordsList
(
sCleanRecords
);
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
selectSCleanRecordsList
(
sCleanRecords
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -58,6 +62,8 @@ public class SCleanRecordsController extends BaseController
...
@@ -58,6 +62,8 @@ public class SCleanRecordsController extends BaseController
@GetMapping
(
"/unCleanList"
)
@GetMapping
(
"/unCleanList"
)
public
TableDataInfo
unCleanList
(
SCleanRecords
sCleanRecords
)
public
TableDataInfo
unCleanList
(
SCleanRecords
sCleanRecords
)
{
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sCleanRecords
.
setConsumerId
(
user
.
getId
());
startPage
();
startPage
();
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
unCleanList
(
sCleanRecords
);
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
unCleanList
(
sCleanRecords
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -70,6 +76,8 @@ public class SCleanRecordsController extends BaseController
...
@@ -70,6 +76,8 @@ public class SCleanRecordsController extends BaseController
@GetMapping
(
"/myCleanList"
)
@GetMapping
(
"/myCleanList"
)
public
TableDataInfo
myCleanList
(
SCleanRecords
sCleanRecords
)
public
TableDataInfo
myCleanList
(
SCleanRecords
sCleanRecords
)
{
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sCleanRecords
.
setConsumerId
(
user
.
getId
());
startPage
();
startPage
();
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
myCleanList
(
sCleanRecords
);
List
<
SCleanRecords
>
list
=
sCleanRecordsService
.
myCleanList
(
sCleanRecords
);
return
getDataTable
(
list
);
return
getDataTable
(
list
);
...
@@ -93,9 +101,11 @@ public class SCleanRecordsController extends BaseController
...
@@ -93,9 +101,11 @@ public class SCleanRecordsController extends BaseController
@PostMapping
(
value
=
"/startClean"
)
@PostMapping
(
value
=
"/startClean"
)
public
AjaxResult
startClean
(
@RequestBody
SCleanRecords
sCleanRecords
)
public
AjaxResult
startClean
(
@RequestBody
SCleanRecords
sCleanRecords
)
{
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sCleanRecords
.
setConsumerId
(
user
.
getId
());
sCleanRecords
.
setStartDate
(
DateUtil
.
date
());
sCleanRecords
.
setStartDate
(
DateUtil
.
date
());
sCleanRecords
.
setStatus
(
1
);
sCleanRecords
.
setStatus
(
1
);
return
toAjax
(
sCleanRecordsService
.
updateS
CleanRecords
(
sCleanRecords
));
return
toAjax
(
sCleanRecordsService
.
start
CleanRecords
(
sCleanRecords
));
}
}
/**
/**
...
@@ -106,6 +116,8 @@ public class SCleanRecordsController extends BaseController
...
@@ -106,6 +116,8 @@ public class SCleanRecordsController extends BaseController
@PostMapping
(
value
=
"/endClean"
)
@PostMapping
(
value
=
"/endClean"
)
public
AjaxResult
endClean
(
@RequestBody
SCleanRecords
sCleanRecords
)
public
AjaxResult
endClean
(
@RequestBody
SCleanRecords
sCleanRecords
)
{
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
sCleanRecords
.
setConsumerId
(
user
.
getId
());
sCleanRecords
.
setEndDate
(
DateUtil
.
date
());
sCleanRecords
.
setEndDate
(
DateUtil
.
date
());
sCleanRecords
.
setStatus
(
2
);
sCleanRecords
.
setStatus
(
2
);
return
toAjax
(
sCleanRecordsService
.
updateSCleanRecords
(
sCleanRecords
));
return
toAjax
(
sCleanRecordsService
.
updateSCleanRecords
(
sCleanRecords
));
...
...
share-system/src/main/java/share/system/service/ISCleanRecordsService.java
View file @
c87b0c38
...
@@ -80,4 +80,6 @@ public interface ISCleanRecordsService
...
@@ -80,4 +80,6 @@ public interface ISCleanRecordsService
* @return
* @return
*/
*/
boolean
finishCleanRecords
();
boolean
finishCleanRecords
();
int
startCleanRecords
(
SCleanRecords
sCleanRecords
);
}
}
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
c87b0c38
...
@@ -188,6 +188,18 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
...
@@ -188,6 +188,18 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
return
0
<
sCleanRecordsMapper
.
updateBatch
(
list
);
return
0
<
sCleanRecordsMapper
.
updateBatch
(
list
);
}
}
@Override
public
int
startCleanRecords
(
SCleanRecords
sCleanRecords
)
{
LambdaQueryWrapper
<
SCleanRecords
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SCleanRecords:
:
getStatus
,
1
);
queryWrapper
.
eq
(
SCleanRecords:
:
getConsumerId
,
sCleanRecords
.
getConsumerId
());
List
<
SCleanRecords
>
list
=
sCleanRecordsMapper
.
selectList
(
queryWrapper
);
if
(
list
.
size
()
>
0
)
{
throw
new
RuntimeException
(
"当前用户有未结束的保洁任务"
);
}
return
updateSCleanRecords
(
sCleanRecords
);
}
private
void
sendSms
(
Long
storeId
,
SStore
store
,
SRoom
room
)
{
private
void
sendSms
(
Long
storeId
,
SStore
store
,
SRoom
room
)
{
List
<
SConsumer
>
list
=
sConsumerMapper
.
selectListByStoreId
(
storeId
);
List
<
SConsumer
>
list
=
sConsumerMapper
.
selectListByStoreId
(
storeId
);
for
(
SConsumer
consumer
:
list
)
{
for
(
SConsumer
consumer
:
list
)
{
...
...
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