Commit 7de4e31c by 墨竹

列表门店去重

parent abe7c79e
package com.gic.haoban.manage.web.controller.hm; 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 cn.hutool.core.convert.Convert;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.BasePageInfo; import com.gic.api.base.commons.BasePageInfo;
...@@ -43,9 +28,11 @@ import com.gic.haoban.manage.web.qo.hm.HmQrcodeUpdateQO; ...@@ -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.HmDetailClerkListQO;
import com.gic.haoban.manage.web.qo.hm.data.HmQrcodeListQO; 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.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.HmDetailClerkListVO;
import com.gic.haoban.manage.web.vo.hm.HmTrendVO; import com.gic.haoban.manage.web.vo.hm.HmTrendVO;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
...@@ -53,9 +40,9 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -53,9 +40,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList; import java.text.ParseException;
import java.util.List; import java.util.*;
import java.util.Map; import java.util.stream.Collectors;
/** /**
* 活码(TabHaobanHmQrcode)表控制层 * 活码(TabHaobanHmQrcode)表控制层
...@@ -226,11 +213,11 @@ public class HmQrcodeController { ...@@ -226,11 +213,11 @@ public class HmQrcodeController {
if (hmGroupDTO != null) { if (hmGroupDTO != null) {
hmQrcodeListDTO.setHmGroupName(hmGroupDTO.getGroupName()); hmQrcodeListDTO.setHmGroupName(hmGroupDTO.getGroupName());
} }
//if (CollectionUtils.isNotEmpty(storeDTOList)) { if (CollectionUtils.isNotEmpty(storeDTOList)) {
// //门店id去重 //门店id去重
// storeDTOList = storeDTOList.stream() storeDTOList = storeDTOList.stream().filter(c-> StringUtils.isNotBlank(c.getStoreId()))
// .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(HmStoreDTO::getStoreId))), ArrayList::new)); .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(HmStoreDTO::getStoreId))), ArrayList::new));
//} }
hmQrcodeListDTO.setClerkList(clerkDTOList); hmQrcodeListDTO.setClerkList(clerkDTOList);
hmQrcodeListDTO.setStoreList(storeDTOList); hmQrcodeListDTO.setStoreList(storeDTOList);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment