Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
haoban3.0
haoban-manage3.0
Commits
7de4e31c
Commit
7de4e31c
authored
Jul 27, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
列表门店去重
parent
abe7c79e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+10
-23
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
7de4e31c
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
hm
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
com.gic.haoban.manage.web.utils.statistics.DateUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.hutool.core.convert.Convert
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
...
...
@@ -43,9 +28,11 @@ import com.gic.haoban.manage.web.qo.hm.HmQrcodeUpdateQO;
import
com.gic.haoban.manage.web.qo.hm.data.HmDetailClerkListQO
;
import
com.gic.haoban.manage.web.qo.hm.data.HmQrcodeListQO
;
import
com.gic.haoban.manage.web.qo.hm.data.HmTrendQO
;
import
com.gic.haoban.manage.web.utils.statistics.DateUtils
;
import
com.gic.haoban.manage.web.vo.hm.HmDetailClerkListVO
;
import
com.gic.haoban.manage.web.vo.hm.HmTrendVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -53,9 +40,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.
util.ArrayList
;
import
java.util.
List
;
import
java.util.
Map
;
import
java.
text.ParseException
;
import
java.util.
*
;
import
java.util.
stream.Collectors
;
/**
* 活码(TabHaobanHmQrcode)表控制层
...
...
@@ -226,11 +213,11 @@ public class HmQrcodeController {
if
(
hmGroupDTO
!=
null
)
{
hmQrcodeListDTO
.
setHmGroupName
(
hmGroupDTO
.
getGroupName
());
}
//
if (CollectionUtils.isNotEmpty(storeDTOList)) {
//
//门店id去重
// storeDTOList = storeDTOList.stream(
)
//
.collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(HmStoreDTO::getStoreId))), ArrayList::new));
//
}
if
(
CollectionUtils
.
isNotEmpty
(
storeDTOList
))
{
//门店id去重
storeDTOList
=
storeDTOList
.
stream
().
filter
(
c
->
StringUtils
.
isNotBlank
(
c
.
getStoreId
())
)
.
collect
(
Collectors
.
collectingAndThen
(
Collectors
.
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
HmStoreDTO:
:
getStoreId
))),
ArrayList:
:
new
));
}
hmQrcodeListDTO
.
setClerkList
(
clerkDTOList
);
hmQrcodeListDTO
.
setStoreList
(
storeDTOList
);
}
...
...
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