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 @@