Commit a3f45228 by 墨竹

活码列表修改

parent 2b0b86da
...@@ -342,7 +342,7 @@ ...@@ -342,7 +342,7 @@
and a.wx_enterprise_id = #{wxEnterpriseId} and a.wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
<if test="null != hmSelect and '' != hmSelect "> <if test="null != hmSelect and '' != hmSelect ">
and (a.hm_code=#{hmSelect} or a.name like '%${hmSelect}%' or a.creator_name like '%${hmSelect}%' ) and (a.hm_id=#{hmSelect} or a.hm_code=#{hmSelect} or a.name like '%${hmSelect}%' or a.creator_name like '%${hmSelect}%' )
</if> </if>
<if test="null != clerkSelect and '' != clerkSelect"> <if test="null != clerkSelect and '' != clerkSelect">
and ( a.clerk_id = #{clerkSelect} or b.clerk_id = #{clerkSelect} ) and ( a.clerk_id = #{clerkSelect} or b.clerk_id = #{clerkSelect} )
......
...@@ -38,9 +38,8 @@ import org.springframework.web.bind.annotation.RequestMapping; ...@@ -38,9 +38,8 @@ 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.util.*;
import java.util.List; import java.util.stream.Collectors;
import java.util.Map;
/** /**
* 活码(TabHaobanHmQrcode)表控制层 * 活码(TabHaobanHmQrcode)表控制层
...@@ -186,7 +185,7 @@ public class HmQrcodeController { ...@@ -186,7 +185,7 @@ public class HmQrcodeController {
} else if (hmType == 2) { } else if (hmType == 2) {
BasePageInfo basePageInfo = new BasePageInfo(); BasePageInfo basePageInfo = new BasePageInfo();
basePageInfo.setPageNum(1); basePageInfo.setPageNum(1);
basePageInfo.setPageNum(1000); basePageInfo.setPageSize(1000);
Page<HmClerkRelationDTO> hmClerkByHmId = hmQrcodeApiService.getHmClerkByHmId(basePageInfo, hmId); Page<HmClerkRelationDTO> hmClerkByHmId = hmQrcodeApiService.getHmClerkByHmId(basePageInfo, hmId);
List<HmClerkRelationDTO> hmClerkRelationDTOList = hmClerkByHmId.getResult(); List<HmClerkRelationDTO> hmClerkRelationDTOList = hmClerkByHmId.getResult();
if (CollectionUtils.isNotEmpty(hmClerkRelationDTOList)) { if (CollectionUtils.isNotEmpty(hmClerkRelationDTOList)) {
...@@ -211,6 +210,9 @@ public class HmQrcodeController { ...@@ -211,6 +210,9 @@ public class HmQrcodeController {
if (hmGroupDTO != null) { if (hmGroupDTO != null) {
hmQrcodeListDTO.setHmGroupName(hmGroupDTO.getGroupName()); hmQrcodeListDTO.setHmGroupName(hmGroupDTO.getGroupName());
} }
//门店id去重
storeDTOList = storeDTOList.stream()
.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