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
9cc7ffd9
Commit
9cc7ffd9
authored
Apr 15, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
结束保洁修改只限制领取人结束
parent
a88ffbac
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
19 deletions
+31
-19
SStoreController.java
...in/java/share/web/controller/system/SStoreController.java
+9
-11
ISStoreService.java
...em/src/main/java/share/system/service/ISStoreService.java
+1
-0
SCleanRecordsServiceImpl.java
...a/share/system/service/impl/SCleanRecordsServiceImpl.java
+16
-8
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+5
-0
No files found.
share-front/src/main/java/share/web/controller/system/SStoreController.java
View file @
9cc7ffd9
package
share
.
web
.
controller
.
system
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.domain.R
;
import
share.common.
enums.BusinessType
;
import
share.system.domain.S
Consumer
;
import
share.common.
core.page.TableDataInfo
;
import
share.system.domain.S
Store
;
import
share.system.domain.vo.SStoreVo
;
import
share.system.request.SStoreRequest
;
import
share.system.service.ISStoreService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
import
share.system.domain.SStore
;
import
java.util.List
;
/**
* 门店Controller
...
...
@@ -86,4 +79,9 @@ public class SStoreController extends BaseController
public
AjaxResult
storeList
()
{
return
success
(
sStoreService
.
storeList
());
}
@PostMapping
(
"/queryByStoreIds"
)
public
R
<
List
<
SStore
>>
queryByStoreIds
(
@RequestBody
Long
[]
storeIds
)
{
return
R
.
ok
(
sStoreService
.
queryByStoreIds
(
storeIds
));
}
}
share-system/src/main/java/share/system/service/ISStoreService.java
View file @
9cc7ffd9
...
...
@@ -105,4 +105,5 @@ public interface ISStoreService extends IService<SStore>
List
<
SStoreVo
>
convertDosToVosSortByDst
(
List
<
SStore
>
storeList
,
SStoreRequest
request
);
List
<
SStore
>
queryByStoreIds
(
Long
[]
storeIds
);
}
share-system/src/main/java/share/system/service/impl/SCleanRecordsServiceImpl.java
View file @
9cc7ffd9
...
...
@@ -480,14 +480,18 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
throw
new
RuntimeException
(
"当前用户不是店员"
);
}
List
<
Long
>
longs
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
(),
PositionEnum
.
CLEANER
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
longs
))
{
LambdaQueryWrapper
<
SStoreConsumer
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SStoreConsumer:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SStoreConsumer:
:
getPosition
,
PositionEnum
.
CLEANER
.
getCode
(),
PositionEnum
.
ADMIN
.
getCode
());
queryWrapper
.
eq
(
SStoreConsumer:
:
getStoreId
,
storeId
);
List
<
SStoreConsumer
>
storeConsumer
=
storeConsumerMapper
.
selectList
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
storeConsumer
))
{
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
}
LambdaQueryWrapper
<
SCleanRecords
>
q
ueryWrapper
=
new
LambdaQueryWrapper
<>();
q
ueryWrapper
.
eq
(
SCleanRecords:
:
getStoreId
,
storeId
);
q
ueryWrapper
.
eq
(
SCleanRecords:
:
getStatus
,
CleaningStatusEnum
.
UNCLEAN
.
getCode
());
List
<
SCleanRecords
>
sCleanRecords
=
baseMapper
.
selectList
(
q
ueryWrapper
);
LambdaQueryWrapper
<
SCleanRecords
>
sCleanRecordsLambdaQ
ueryWrapper
=
new
LambdaQueryWrapper
<>();
sCleanRecordsLambdaQ
ueryWrapper
.
eq
(
SCleanRecords:
:
getStoreId
,
storeId
);
sCleanRecordsLambdaQ
ueryWrapper
.
eq
(
SCleanRecords:
:
getStatus
,
CleaningStatusEnum
.
UNCLEAN
.
getCode
());
List
<
SCleanRecords
>
sCleanRecords
=
baseMapper
.
selectList
(
sCleanRecordsLambdaQ
ueryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
sCleanRecords
))
{
throw
new
RuntimeException
(
"当前门店没有未保洁的保洁任务"
);
}
...
...
@@ -505,8 +509,12 @@ public class SCleanRecordsServiceImpl extends ServiceImpl<SCleanRecordsMapper,SC
if
(!
user
.
getRoleType
().
equals
(
RoleTypeEnum
.
CLEANER
.
getCode
()))
{
throw
new
RuntimeException
(
"当前用户不是店员"
);
}
List
<
Long
>
longs
=
storeConsumerMapper
.
selectByConsumerId
(
user
.
getId
(),
PositionEnum
.
CLEANER
.
getCode
());
if
(
CollectionUtils
.
isEmpty
(
longs
))
{
LambdaQueryWrapper
<
SStoreConsumer
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
SStoreConsumer:
:
getConsumerId
,
user
.
getId
());
queryWrapper
.
in
(
SStoreConsumer:
:
getPosition
,
PositionEnum
.
CLEANER
.
getCode
(),
PositionEnum
.
ADMIN
.
getCode
());
queryWrapper
.
eq
(
SStoreConsumer:
:
getStoreId
,
sCleanRecords
.
getStoreId
());
List
<
SStoreConsumer
>
storeConsumer
=
storeConsumerMapper
.
selectList
(
queryWrapper
);
if
(
CollectionUtils
.
isEmpty
(
storeConsumer
))
{
throw
new
RuntimeException
(
"当前用户不是保洁人员"
);
}
sCleanRecords
.
setConsumerId
(
user
.
getId
());
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
9cc7ffd9
...
...
@@ -345,6 +345,11 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
return
voList
;
}
@Override
public
List
<
SStore
>
queryByStoreIds
(
Long
[]
storeIds
)
{
return
baseMapper
.
selectBatchIds
(
Arrays
.
asList
(
storeIds
));
}
/**
* 门店DO集合转换VO集合,按距离排序
*
...
...
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