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
6b903495
Commit
6b903495
authored
Oct 25, 2023
by
wuwenlong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/main'
parents
8ef61f7c
87e934bb
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
2 deletions
+93
-2
SCleanRecordsController.java
.../share/web/controller/system/SCleanRecordsController.java
+9
-0
SConsumptionRecordsController.java
.../web/controller/system/SConsumptionRecordsController.java
+2
-2
SRoomController.java
...ain/java/share/web/controller/system/SRoomController.java
+9
-0
SCleanRecords.java
...stem/src/main/java/share/system/domain/SCleanRecords.java
+24
-0
ISCleanRecordsService.java
...main/java/share/system/service/ISCleanRecordsService.java
+2
-0
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+2
-0
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+25
-0
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+20
-0
No files found.
share-front/src/main/java/share/web/controller/system/SCleanRecordsController.java
View file @
6b903495
...
@@ -111,5 +111,14 @@ public class SCleanRecordsController extends BaseController
...
@@ -111,5 +111,14 @@ public class SCleanRecordsController extends BaseController
return
success
(
sCleanRecordsService
.
getByRoomId
(
roomId
));
return
success
(
sCleanRecordsService
.
getByRoomId
(
roomId
));
}
}
/**
* 查询正在保洁中的保洁记录
*/
@GetMapping
(
value
=
"/getByCleanerId"
)
public
AjaxResult
getByCleanerId
()
{
return
success
(
sCleanRecordsService
.
getByCleanerId
());
}
}
}
share-front/src/main/java/share/web/controller/system/SConsumptionRecordsController.java
View file @
6b903495
...
@@ -28,7 +28,7 @@ import share.common.core.page.TableDataInfo;
...
@@ -28,7 +28,7 @@ import share.common.core.page.TableDataInfo;
* @date 2023-09-27
* @date 2023-09-27
*/
*/
@RestController
@RestController
@RequestMapping
(
"/
system
/records"
)
@RequestMapping
(
"/
front
/records"
)
public
class
SConsumptionRecordsController
extends
BaseController
public
class
SConsumptionRecordsController
extends
BaseController
{
{
@Autowired
@Autowired
...
@@ -37,7 +37,7 @@ public class SConsumptionRecordsController extends BaseController
...
@@ -37,7 +37,7 @@ public class SConsumptionRecordsController extends BaseController
/**
/**
* 查询消费记录列表
* 查询消费记录列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:records:list')"
)
//
@PreAuthorize("@ss.hasPermi('system:records:list')")
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
SConsumptionRecords
sConsumptionRecords
)
public
TableDataInfo
list
(
SConsumptionRecords
sConsumptionRecords
)
{
{
...
...
share-front/src/main/java/share/web/controller/system/SRoomController.java
View file @
6b903495
...
@@ -77,5 +77,14 @@ public class SRoomController extends BaseController {
...
@@ -77,5 +77,14 @@ public class SRoomController extends BaseController {
return
R
.
ok
(
roomStatusService
.
roomStatus
(
storeId
,
roomId
,
day
));
return
R
.
ok
(
roomStatusService
.
roomStatus
(
storeId
,
roomId
,
day
));
}
}
/**
* 专属保洁的开门操作
*/
@ApiOperation
(
value
=
"专属保洁的开门操作"
)
@RequestMapping
(
value
=
"/open/door"
,
method
=
RequestMethod
.
POST
)
public
R
<
String
>
openDoor
(
@RequestBody
Long
id
)
{
return
R
.
ok
(
sRoomService
.
openDoor
(
id
));
}
}
}
share-system/src/main/java/share/system/domain/SCleanRecords.java
View file @
6b903495
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
java.util.Date
;
import
java.util.Date
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -69,6 +71,28 @@ public class SCleanRecords extends BaseEntity
...
@@ -69,6 +71,28 @@ public class SCleanRecords extends BaseEntity
*/
*/
private
String
phone
;
private
String
phone
;
@TableField
(
exist
=
false
)
private
SRoom
sRoom
;
@TableField
(
exist
=
false
)
private
SStore
sStore
;
public
SRoom
getsRoom
()
{
return
sRoom
;
}
public
void
setsRoom
(
SRoom
sRoom
)
{
this
.
sRoom
=
sRoom
;
}
public
SStore
getsStore
()
{
return
sStore
;
}
public
void
setsStore
(
SStore
sStore
)
{
this
.
sStore
=
sStore
;
}
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
...
share-system/src/main/java/share/system/service/ISCleanRecordsService.java
View file @
6b903495
...
@@ -72,4 +72,6 @@ public interface ISCleanRecordsService
...
@@ -72,4 +72,6 @@ public interface ISCleanRecordsService
List
<
SCleanRecords
>
myCleanList
(
SCleanRecords
sCleanRecords
);
List
<
SCleanRecords
>
myCleanList
(
SCleanRecords
sCleanRecords
);
SCleanRecords
getByRoomId
(
Long
roomId
);
SCleanRecords
getByRoomId
(
Long
roomId
);
SCleanRecords
getByCleanerId
();
}
}
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
6b903495
...
@@ -68,4 +68,6 @@ public interface ISRoomService extends IService<SRoom>
...
@@ -68,4 +68,6 @@ public interface ISRoomService extends IService<SRoom>
* @return
* @return
*/
*/
List
<
SRoomVo
>
listByStoreIds
(
List
<
Long
>
storeIds
);
List
<
SRoomVo
>
listByStoreIds
(
List
<
Long
>
storeIds
);
String
openDoor
(
Long
id
);
}
}
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
6b903495
...
@@ -8,9 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -8,9 +8,12 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SRoom
;
import
share.system.domain.SRoom
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.mapper.SCleanRecordsMapper
;
import
share.system.mapper.SCleanRecordsMapper
;
import
share.system.domain.SCleanRecords
;
import
share.system.domain.SCleanRecords
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SRoomMapper
;
import
share.system.mapper.SStoreMapper
;
import
share.system.service.ISCleanRecordsService
;
import
share.system.service.ISCleanRecordsService
;
/**
/**
...
@@ -26,6 +29,10 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
...
@@ -26,6 +29,10 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
private
SCleanRecordsMapper
sCleanRecordsMapper
;
private
SCleanRecordsMapper
sCleanRecordsMapper
;
@Autowired
@Autowired
private
SConsumerMapper
sConsumerMapper
;
private
SConsumerMapper
sConsumerMapper
;
@Autowired
private
SRoomMapper
sRoomMapper
;
@Autowired
private
SStoreMapper
sStoreMapper
;
/**
/**
* 查询保洁记录
* 查询保洁记录
...
@@ -138,6 +145,24 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
...
@@ -138,6 +145,24 @@ public class SCleanRecordsServiceImpl implements ISCleanRecordsService
return
sCleanRecordsMapper
.
selectOne
(
queryWrapper
);
return
sCleanRecordsMapper
.
selectOne
(
queryWrapper
);
}
}
@Override
public
SCleanRecords
getByCleanerId
()
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(!
user
.
getRoleType
().
equals
(
"1"
)){
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
}
LambdaQueryWrapper
<
SCleanRecords
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SCleanRecords:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SCleanRecords:
:
getStatus
,
1
);
SCleanRecords
sCleanRecords
=
sCleanRecordsMapper
.
selectOne
(
queryWrapper
);
if
(
sCleanRecords
==
null
){
throw
new
RuntimeException
(
"当前用户没有保洁任务"
);
}
sCleanRecords
.
setsRoom
(
sRoomMapper
.
selectById
(
sCleanRecords
.
getRoomId
()));
sCleanRecords
.
setsStore
(
sStoreMapper
.
selectById
(
sCleanRecords
.
getStoreId
()));
return
sCleanRecords
;
}
private
void
sendSms
(
Long
storeId
)
{
private
void
sendSms
(
Long
storeId
)
{
List
<
SConsumer
>
list
=
sConsumerMapper
.
selectListByStoreId
(
storeId
);
List
<
SConsumer
>
list
=
sConsumerMapper
.
selectListByStoreId
(
storeId
);
for
(
SConsumer
consumer
:
list
)
{
for
(
SConsumer
consumer
:
list
)
{
...
...
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
6b903495
...
@@ -10,6 +10,8 @@ import org.springframework.beans.BeanUtils;
...
@@ -10,6 +10,8 @@ import org.springframework.beans.BeanUtils;
import
share.common.utils.DateUtils
;
import
share.common.utils.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.domain.vo.SRoomVo
;
import
share.system.mapper.SRoomMapper
;
import
share.system.mapper.SRoomMapper
;
import
share.system.domain.SRoom
;
import
share.system.domain.SRoom
;
...
@@ -137,6 +139,24 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
...
@@ -137,6 +139,24 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
return
convertDoListToVoList
(
roomList
);
return
convertDoListToVoList
(
roomList
);
}
}
@Override
public
String
openDoor
(
Long
id
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(!
user
.
getRoleType
().
equals
(
"1"
)){
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
}
SRoom
room
=
sRoomMapper
.
selectById
(
id
);
if
(
Objects
.
isNull
(
room
)){
throw
new
RuntimeException
(
"房间不存在"
);
}
//TODO 调用开门接口
if
(
true
){
return
"开门成功"
;
}
else
{
return
"开门失败"
;
}
}
private
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
){
private
List
<
SRoomVo
>
convertDoListToVoList
(
List
<
SRoom
>
roomList
){
List
<
SRoomVo
>
voList
=
new
ArrayList
<>();
List
<
SRoomVo
>
voList
=
new
ArrayList
<>();
...
...
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