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
cea9aa4a
Commit
cea9aa4a
authored
Nov 24, 2023
by
wuwenlong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order info roomImage\roomType\roomTypeName missing value bugfix;
store list packs missing value bugfix;
parent
019f40c5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
47 deletions
+37
-47
SOrderController.java
...in/java/share/web/controller/system/SOrderController.java
+1
-1
IRoomPackService.java
.../src/main/java/share/system/service/IRoomPackService.java
+2
-0
PackServiceImpl.java
.../main/java/share/system/service/impl/PackServiceImpl.java
+2
-1
RoomPackServiceImpl.java
...n/java/share/system/service/impl/RoomPackServiceImpl.java
+14
-0
SOrderServiceImpl.java
...ain/java/share/system/service/impl/SOrderServiceImpl.java
+2
-0
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+16
-45
No files found.
share-front/src/main/java/share/web/controller/system/SOrderController.java
View file @
cea9aa4a
...
...
@@ -67,7 +67,7 @@ public class SOrderController extends BaseController
*/
@GetMapping
(
value
=
"/orderNo"
)
public
AjaxResult
queryByOrderNo
(
@RequestParam
(
"orderNo"
)
String
orderNo
)
{
return
success
(
sOrderService
.
selectSOrderByOrder
No
(
orderNo
));
return
success
(
sOrderService
.
queryOrderInfoBy
No
(
orderNo
));
}
@ApiOperation
(
value
=
"查询当前用户可用订单(待使用&使用中)"
)
...
...
share-system/src/main/java/share/system/service/IRoomPackService.java
View file @
cea9aa4a
...
...
@@ -65,4 +65,6 @@ public interface IRoomPackService extends IService<SRoomPack> {
int
deleteRoomPackByRoomId
(
Long
id
);
List
<
SRoomPack
>
selectRoomPackByPackId
(
Long
id
);
List
<
SRoomPack
>
listByRoomIds
(
List
<
Long
>
roomIds
);
}
share-system/src/main/java/share/system/service/impl/PackServiceImpl.java
View file @
cea9aa4a
package
share
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -93,7 +94,7 @@ public class PackServiceImpl extends ServiceImpl<PackMapper, SPack> implements I
@Override
public
List
<
SPack
>
selectPackListByIds
(
List
<
Long
>
packIds
)
{
if
(
packIds
==
null
||
packIds
.
size
()
==
0
)
{
return
n
ull
;
return
n
ew
ArrayList
<>()
;
}
LambdaQueryWrapper
<
SPack
>
queryWrapper
=
new
LambdaQueryWrapper
();
queryWrapper
.
in
(
SPack:
:
getId
,
packIds
);
...
...
share-system/src/main/java/share/system/service/impl/RoomPackServiceImpl.java
View file @
cea9aa4a
package
share
.
system
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.List
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -115,4 +116,17 @@ public class RoomPackServiceImpl extends ServiceImpl<RoomPackMapper, SRoomPack>
});
return
sRoomPackList
;
}
@Override
public
List
<
SRoomPack
>
listByRoomIds
(
List
<
Long
>
roomIds
)
{
LambdaQueryWrapper
<
SRoomPack
>
roomPackQueryWrapper
=
new
LambdaQueryWrapper
();
if
(
roomIds
.
size
()
>
0
)
{
roomPackQueryWrapper
.
in
(
SRoomPack:
:
getRoomId
,
roomIds
);
List
<
SRoomPack
>
roomPacks
=
roomPackMapper
.
selectList
(
roomPackQueryWrapper
);
return
roomPacks
;
}
else
{
return
new
ArrayList
<
SRoomPack
>();
}
}
}
share-system/src/main/java/share/system/service/impl/SOrderServiceImpl.java
View file @
cea9aa4a
...
...
@@ -545,6 +545,8 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
vo
.
setAddress
(
store
.
getAddress
());
vo
.
setRoomImages
(
room
.
getImages
());
vo
.
setRoomName
(
room
.
getName
());
vo
.
setRoomType
(
room
.
getRoomType
());
vo
.
setRoomTypeName
(
RoomType
.
getNameByCode
(
room
.
getRoomType
()));
vo
.
setLongitude
(
store
.
getLongitude
());
vo
.
setLatitude
(
store
.
getLatitude
());
vo
.
setManager
(
store
.
getManager
());
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
cea9aa4a
...
...
@@ -28,10 +28,7 @@ import share.system.domain.vo.SRoomVo;
import
share.system.domain.vo.SStoreVo
;
import
share.system.mapper.*
;
import
share.system.request.SStoreRequest
;
import
share.system.service.IPackService
;
import
share.system.service.ISRoomService
;
import
share.system.service.ISStoreService
;
import
share.system.service.QPService
;
import
share.system.service.*
;
/**
* 门店Service业务层处理
...
...
@@ -42,17 +39,15 @@ import share.system.service.QPService;
@Service
public
class
SStoreServiceImpl
extends
ServiceImpl
<
SStoreMapper
,
SStore
>
implements
ISStoreService
{
@Autowired
private
SStoreConsumerMapper
storeConsumerMapper
;
@Autowired
private
ISRoomService
sRoomService
;
@Autowired
private
RoomPackMapper
roomPackMapper
;
@Autowired
private
IPackService
packService
;
@Autowired
private
QPService
qpService
;
@Autowired
private
SCleanRecordsMapper
sCleanRecordsMapper
;
@Autowired
private
IRoomPackService
roomPackService
;
/**
* 查询门店
...
...
@@ -229,59 +224,35 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
if
(
CollectionUtils
.
isNotEmpty
(
voList
))
{
List
<
Long
>
storeIds
=
voList
.
stream
().
map
(
SStoreVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
SRoomVo
>
roomVoList
=
sRoomService
.
listByStoreIds
(
storeIds
);
List
<
Long
>
roomIds
=
new
ArrayList
<>();
roomVoList
.
stream
().
forEach
(
sRoomVo
->
{
roomIds
.
add
(
sRoomVo
.
getId
());
});
List
<
Long
>
packIds
=
new
ArrayList
<>();
LambdaQueryWrapper
<
SRoomPack
>
roomPackQueryWrapper
=
new
LambdaQueryWrapper
();
if
(
roomIds
.
size
()
>
0
)
{
roomPackQueryWrapper
.
in
(
SRoomPack:
:
getRoomId
,
roomIds
);
}
else
{
roomIds
.
add
(
0L
);
roomPackQueryWrapper
.
in
(
SRoomPack:
:
getRoomId
,
roomIds
);
}
List
<
SRoomPack
>
roomPacks
=
roomPackMapper
.
selectList
(
roomPackQueryWrapper
);
roomPacks
.
stream
().
forEach
(
sRoomPack
->
{
packIds
.
add
(
sRoomPack
.
getPackId
());
});
List
<
SPack
>
packs
=
packService
.
selectPackListByIds
(
packIds
);
Map
<
Long
,
SPack
>
map
=
new
HashMap
<>();
if
(
packs
!=
null
)
{
packs
.
stream
().
forEach
(
sPack
->
{
map
.
put
(
sPack
.
getId
(),
sPack
);
});
}
List
<
Long
>
roomIds
=
roomVoList
.
stream
().
map
(
SRoomVo:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
SRoomPack
>
roomPacks
=
roomPackService
.
listByRoomIds
(
roomIds
);
List
<
Long
>
packIds
=
roomPacks
.
stream
().
map
(
SRoomPack:
:
getPackId
).
collect
(
Collectors
.
toList
());
List
<
SPack
>
packs
=
packService
.
listByIds
(
packIds
);
Map
<
Long
,
SPack
>
packMap
=
Optional
.
ofNullable
(
packs
).
orElse
(
new
ArrayList
<>()).
stream
().
collect
(
Collectors
.
toMap
(
SPack:
:
getId
,
o
->
o
,(
k1
,
k2
)->
k1
));
roomVoList
.
stream
().
forEach
(
sRoomVo
->
{
List
<
SPack
>
sPacks
=
new
ArrayList
<>();
roomPacks
.
stream
().
forEach
(
sRoomPack
->
{
if
(
Long
.
compare
(
sRoomVo
.
getId
(),
sRoomPack
.
getRoomId
())
==
0
)
{
sPacks
.
add
(
m
ap
.
get
(
sRoomPack
.
getPackId
()));
if
(
sRoomVo
.
getId
().
compareTo
(
sRoomPack
.
getRoomId
())
==
0
)
{
sPacks
.
add
(
packM
ap
.
get
(
sRoomPack
.
getPackId
()));
}
});
sRoomVo
.
setPackList
(
sPacks
);
});
Map
<
Long
,
List
<
SRoomVo
>>
roomVoListMap
=
Optional
.
ofNullable
(
roomVoList
).
orElse
(
new
ArrayList
<>()).
stream
().
collect
(
Collectors
.
groupingBy
(
SRoomVo:
:
getStoreId
));
voList
.
stream
().
forEach
(
storeVo
->
{
storeVo
.
setRoomVoList
(
roomVoList
.
stream
().
filter
(
roomVo
->
{
// List<Long> roomId = roomPackMapper.selectPackListByRoomId(roomVo.getId());
// roomVo.setPackList(packService.selectPackListByIds(roomId));
if
(
Long
.
compare
(
roomVo
.
getStoreId
(),
storeVo
.
getId
())
==
0
)
{
return
true
;
}
return
false
;
}).
collect
(
Collectors
.
toList
()));
storeVo
.
setRoomVoList
(
roomVoListMap
.
get
(
storeVo
.
getId
()));
});
}
}
@Override
public
int
deleteStoreConsumer
(
SStoreConsumer
storeConsumer
)
{
return
storeConsumer
Mapper
.
deleteInfo
(
storeConsumer
);
return
base
Mapper
.
deleteInfo
(
storeConsumer
);
}
@Override
public
int
deleteStoreConsumers
(
Long
storeId
,
Long
[]
consumerIds
)
{
return
storeConsumer
Mapper
.
deleteInfos
(
storeId
,
consumerIds
);
return
base
Mapper
.
deleteInfos
(
storeId
,
consumerIds
);
}
@Override
...
...
@@ -294,7 +265,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
sc
.
setConsumerId
(
consumerId
);
list
.
add
(
sc
);
}
return
storeConsumer
Mapper
.
batchSStoreConsumer
(
list
);
return
base
Mapper
.
batchSStoreConsumer
(
list
);
}
@Override
...
...
@@ -304,7 +275,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
throw
new
BaseException
(
"当前用户不是保洁人员!"
);
}
//查询保洁人员所属门店
List
<
String
>
storeIdList
=
storeConsumer
Mapper
.
selectByConsumerId
(
user
.
getId
());
List
<
String
>
storeIdList
=
base
Mapper
.
selectByConsumerId
(
user
.
getId
());
//List<String> 转 List<Long>
List
<
Long
>
idList
=
storeIdList
.
stream
().
map
(
Long:
:
parseLong
).
collect
(
Collectors
.
toList
());
// 查询门店信息
...
...
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