From 5fb2084f28e5f7935842d1a0acf728a0caf39a81 Mon Sep 17 00:00:00 2001 From: liuzhaotian Date: Wed, 22 May 2024 10:02:27 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=A0=E5=9E=8B=E6=95=B0=E6=8D=AE=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=95=B0=E6=8D=AE=E7=BC=BA=E5=B0=91BUG=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../imes/module/executor/service/plate/PlateServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java index eb664cac4..82e04d930 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/plate/PlateServiceImpl.java @@ -207,7 +207,7 @@ public class PlateServiceImpl implements PlateService { .in(OrderItemDO::getBodyId, bodyIds) .select(OrderItemDO::getBodyId) ); - Set plateIds = list.stream().map(BodyPlateIdDTO::getPlateId).collect(Collectors.toSet()); + List plateIds = list.stream().map(BodyPlateIdDTO::getPlateId).collect(Collectors.toList()); List orderModelDOS = buildRespByPlateIds(plateIds, ORDER_PLATE_MODEL); Map> map = orderModelDOS.stream().collect(Collectors.groupingBy(e -> { return list.stream().filter(f -> Objects.equals(f.getPlateId(), e.getPlateId())).map(BodyPlateIdDTO::getBodyId).findAny().orElse(null); @@ -241,6 +241,7 @@ public class PlateServiceImpl implements PlateService { SearchRequest.Builder builder = new SearchRequest.Builder(); builder.index(index); builder.query(q -> q.terms(b -> b.field("plateId").terms(e->e.value(fieldValues)))); + builder.size(plateIds.size()); try { SearchResponse search = elasticsearchClient.search(builder.build(), OrderModelDO.class); List> hits = search.hits().hits();