From 044c17638ba3c1141419924378cb547b73591b42 Mon Sep 17 00:00:00 2001 From: gaoqr <13665037151@163.com> Date: Wed, 25 Jun 2025 11:56:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E7=AE=97=E7=94=A8=E6=9D=BF=E9=87=8F?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../optimizeplan/OptimizePlanServiceImpl.java | 18 ++------- .../resources/mapper/plate/PlateMapper.xml | 37 ++----------------- 2 files changed, 7 insertions(+), 48 deletions(-) diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java index 5fb019a81..21efed468 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/java/com/cf/imes/module/executor/service/optimizeplan/OptimizePlanServiceImpl.java @@ -1,6 +1,7 @@ package com.cf.imes.module.executor.service.optimizeplan; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.PageUtil; @@ -77,6 +78,7 @@ import java.text.SimpleDateFormat; import java.time.LocalDateTime; import java.util.*; import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.DATA_DATA_ERROR; import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.ES_DATA_ERROR; @@ -295,21 +297,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService { AssertUtils.notEmpty(plateDOS,ORDER_PLATE_ERROR); - for (PlateDetailRespVO plateDetailsRespVO : plateDOS) { - StringBuilder name = new StringBuilder(); - if(!plateDetailsRespVO.getProcessGroupLists().isEmpty()) { - for (ProcessGroupList groupNameList : plateDetailsRespVO.getProcessGroupLists()) { - // 去除最后的逗号 - name.append(groupNameList.getGroupName()).append(","); - - } - name = new StringBuilder(name.substring(0, name.length() - 1)); - } - plateDetailsRespVO.setProcessGroupName(name.toString()); - } - - - List orderModelDOS = esUtils.getEsDocumentByScroll(FIELD_ORDER_ID,orderId,1000,ORDER_PLATE_MODEL.getIndex(),OrderModelDO.class); + List orderModelDOS = getOrderModels(ListUtil.of(orderId), goodsDOS.stream().map(GoodsReqVO::getId).collect(Collectors.toList())); AssertUtils.notEmpty(orderModelDOS,ORDER_PLATE_MODEL_DATE_ERROR); diff --git a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml index 0fa136e89..0a2a48761 100644 --- a/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml +++ b/cf-module-prod-executor/cf-module-prod-executor-biz/src/main/resources/mapper/plate/PlateMapper.xml @@ -379,17 +379,10 @@