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
31d9250f
Commit
31d9250f
authored
Oct 30, 2023
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更改保洁负责的门店
parent
47e0d8f5
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
62 additions
and
11 deletions
+62
-11
SStoreController.java
...in/java/share/web/controller/system/SStoreController.java
+2
-2
WebConfig.java
...-front/src/main/java/share/web/core/config/WebConfig.java
+3
-1
SStore.java
share-system/src/main/java/share/system/domain/SStore.java
+15
-0
SRoomVo.java
...-system/src/main/java/share/system/domain/vo/SRoomVo.java
+1
-0
ISRoomService.java
...tem/src/main/java/share/system/service/ISRoomService.java
+13
-0
ISStoreService.java
...em/src/main/java/share/system/service/ISStoreService.java
+1
-1
SRoomServiceImpl.java
...main/java/share/system/service/impl/SRoomServiceImpl.java
+16
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+11
-7
No files found.
share-front/src/main/java/share/web/controller/system/SStoreController.java
View file @
31d9250f
...
@@ -51,7 +51,7 @@ public class SStoreController extends BaseController
...
@@ -51,7 +51,7 @@ public class SStoreController extends BaseController
/**
/**
* 获取门店详细信息
* 获取门店详细信息
*/
*/
@GetMapping
(
value
=
"/{id}"
)
@GetMapping
(
value
=
"/
info/
{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
{
return
success
(
sStoreService
.
selectSStoreById
(
id
));
return
success
(
sStoreService
.
selectSStoreById
(
id
));
...
@@ -73,7 +73,7 @@ public class SStoreController extends BaseController
...
@@ -73,7 +73,7 @@ public class SStoreController extends BaseController
*/
*/
@ApiOperation
(
value
=
"保洁负责的门店"
)
@ApiOperation
(
value
=
"保洁负责的门店"
)
@RequestMapping
(
value
=
"/listVoByCleaner"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/listVoByCleaner"
,
method
=
RequestMethod
.
GET
)
public
R
<
List
<
SStore
Vo
>>
listVoByCleaner
()
public
R
<
List
<
SStore
>>
listVoByCleaner
()
{
{
return
R
.
ok
(
sStoreService
.
listVoByCleaner
());
return
R
.
ok
(
sStoreService
.
listVoByCleaner
());
}
}
...
...
share-front/src/main/java/share/web/core/config/WebConfig.java
View file @
31d9250f
...
@@ -65,7 +65,9 @@ public class WebConfig implements WebMvcConfigurer {
...
@@ -65,7 +65,9 @@ public class WebConfig implements WebMvcConfigurer {
"/front/login/sendCode"
,
"/front/login/sendCode"
,
"/front/login/login/mobile"
,
"/front/login/login/mobile"
,
"/front/login/login"
,
"/front/login/login"
,
"/front/store/**"
,
"/front/store/list"
,
"/front/store/listVo"
,
"/front/store//info/*"
,
"/front/room/**"
,
"/front/room/**"
,
"**"
"**"
).
addPathPatterns
(
"/**"
);
).
addPathPatterns
(
"/**"
);
...
...
share-system/src/main/java/share/system/domain/SStore.java
View file @
31d9250f
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
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
;
import
share.common.annotation.Excel
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
share.system.domain.vo.SRoomVo
;
import
java.util.List
;
/**
/**
* 门店对象 s_store
* 门店对象 s_store
...
@@ -67,6 +71,17 @@ public class SStore extends BaseEntity
...
@@ -67,6 +71,17 @@ public class SStore extends BaseEntity
@Excel
(
name
=
"门店类型 1:标准店 2: 形象店 3:旗舰店"
)
@Excel
(
name
=
"门店类型 1:标准店 2: 形象店 3:旗舰店"
)
private
String
storeType
;
private
String
storeType
;
@TableField
(
exist
=
false
)
private
List
<
SRoom
>
roolList
;
public
List
<
SRoom
>
getRoolList
()
{
return
roolList
;
}
public
void
setRoolList
(
List
<
SRoom
>
roolList
)
{
this
.
roolList
=
roolList
;
}
public
void
setId
(
Long
id
)
public
void
setId
(
Long
id
)
{
{
this
.
id
=
id
;
this
.
id
=
id
;
...
...
share-system/src/main/java/share/system/domain/vo/SRoomVo.java
View file @
31d9250f
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Data
;
import
lombok.Data
;
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
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
share.common.core.domain.BaseEntity
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
...
...
share-system/src/main/java/share/system/service/ISRoomService.java
View file @
31d9250f
...
@@ -69,5 +69,18 @@ public interface ISRoomService extends IService<SRoom>
...
@@ -69,5 +69,18 @@ public interface ISRoomService extends IService<SRoom>
*/
*/
List
<
SRoomVo
>
listByStoreIds
(
List
<
Long
>
storeIds
);
List
<
SRoomVo
>
listByStoreIds
(
List
<
Long
>
storeIds
);
List
<
SRoom
>
selectSroomListByIds
(
List
<
Long
>
storeIds
);
/**
* 通过门店ID列表查询所有房间
*
* @param storeId
* @return
*/
List
<
SRoom
>
selectSroomListByStroeId
(
Long
storeId
);
String
openDoor
(
Long
id
);
String
openDoor
(
Long
id
);
}
}
share-system/src/main/java/share/system/service/ISStoreService.java
View file @
31d9250f
...
@@ -94,5 +94,5 @@ public interface ISStoreService extends IService<SStore>
...
@@ -94,5 +94,5 @@ public interface ISStoreService extends IService<SStore>
int
insertStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
);
int
insertStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
);
List
<
SStore
Vo
>
listVoByCleaner
();
List
<
SStore
>
listVoByCleaner
();
}
}
share-system/src/main/java/share/system/service/impl/SRoomServiceImpl.java
View file @
31d9250f
...
@@ -141,6 +141,22 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
...
@@ -141,6 +141,22 @@ public class SRoomServiceImpl extends ServiceImpl<SRoomMapper,SRoom> implements
}
}
@Override
@Override
public
List
<
SRoom
>
selectSroomListByIds
(
List
<
Long
>
storeIds
)
{
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SRoom:
:
getStoreId
,
storeIds
);
List
<
SRoom
>
roomList
=
sRoomMapper
.
selectList
(
queryWrapper
);
return
roomList
;
}
@Override
public
List
<
SRoom
>
selectSroomListByStroeId
(
Long
storeId
)
{
LambdaQueryWrapper
<
SRoom
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SRoom:
:
getStoreId
,
storeId
);
List
<
SRoom
>
roomList
=
sRoomMapper
.
selectList
(
queryWrapper
);
return
roomList
;
}
@Override
public
String
openDoor
(
Long
id
)
{
public
String
openDoor
(
Long
id
)
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
31d9250f
...
@@ -252,21 +252,25 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
...
@@ -252,21 +252,25 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
}
}
@Override
@Override
public
List
<
SStore
Vo
>
listVoByCleaner
()
{
public
List
<
SStore
>
listVoByCleaner
()
{
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
SConsumer
user
=
FrontTokenComponent
.
getWxSConsumerEntry
();
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
throw
new
BaseException
(
"当前用户不是保洁人员!"
);
throw
new
BaseException
(
"当前用户不是保洁人员!"
);
}
}
//查询保洁人员所属门店
//查询保洁人员所属门店
List
<
String
>
storeIdList
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
());
List
<
String
>
storeIdList
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
());
//查询门店信息
//List<String> 转 List<Long>
List
<
SStore
>
storeList
=
sStoreMapper
.
selectBatchIds
(
storeIdList
);
List
<
Long
>
idList
=
storeIdList
.
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
// 查询门店信息
List
<
SStore
>
storeList
=
new
ArrayList
<>();
idList
.
forEach
(
item
->
{
storeList
.
add
(
sStoreMapper
.
selectById
(
item
));
});
//转换VO
//转换VO
List
<
SStoreVo
>
sStoreVos
=
convertDosToVos
(
storeList
);
storeList
.
forEach
(
item
->
{
sStoreVos
.
forEach
(
item
->
{
item
.
setRoolList
(
sRoomService
.
selectSroomListByStroeId
(
item
.
getId
()));
item
.
setRoomVoList
(
sRoomService
.
listByStoreIds
(
Collections
.
singletonList
(
item
.
getId
())));
});
});
return
s
StoreVos
;
return
s
toreList
;
}
}
private
List
<
Map
>
convertOptionList
(
List
<
SStore
>
storeList
)
{
private
List
<
Map
>
convertOptionList
(
List
<
SStore
>
storeList
)
{
...
...
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