mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
计算用板量优化测试
This commit is contained in:
+3
-15
@@ -1,6 +1,7 @@
|
|||||||
package com.cf.imes.module.executor.service.optimizeplan;
|
package com.cf.imes.module.executor.service.optimizeplan;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import cn.hutool.core.text.CharSequenceUtil;
|
import cn.hutool.core.text.CharSequenceUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.PageUtil;
|
import cn.hutool.core.util.PageUtil;
|
||||||
@@ -77,6 +78,7 @@ import java.text.SimpleDateFormat;
|
|||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.atomic.AtomicLong;
|
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.DATA_DATA_ERROR;
|
||||||
import static com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants.ES_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);
|
AssertUtils.notEmpty(plateDOS,ORDER_PLATE_ERROR);
|
||||||
|
|
||||||
for (PlateDetailRespVO plateDetailsRespVO : plateDOS) {
|
List<OrderModelDO> orderModelDOS = getOrderModels(ListUtil.of(orderId), goodsDOS.stream().map(GoodsReqVO::getId).collect(Collectors.toList()));
|
||||||
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<OrderModelDO> orderModelDOS = esUtils.getEsDocumentByScroll(FIELD_ORDER_ID,orderId,1000,ORDER_PLATE_MODEL.getIndex(),OrderModelDO.class);
|
|
||||||
|
|
||||||
AssertUtils.notEmpty(orderModelDOS,ORDER_PLATE_MODEL_DATE_ERROR);
|
AssertUtils.notEmpty(orderModelDOS,ORDER_PLATE_MODEL_DATE_ERROR);
|
||||||
|
|
||||||
|
|||||||
+4
-33
@@ -379,17 +379,10 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="selectPlateListByGoodsIds"
|
<select id="selectPlateListByGoodsIds"
|
||||||
resultMap="PlateDetialMap">
|
resultType="com.cf.imes.module.executor.controller.admin.plan.vo.PlateDetailRespVO">
|
||||||
|
|
||||||
|
|
||||||
select distinct
|
select
|
||||||
|
|
||||||
oi.body_id as bodyId,
|
|
||||||
oi.group_id as groupId,
|
|
||||||
oi.room_id as roomId,
|
|
||||||
og.name as groupName,
|
|
||||||
ob.name as bodyName,
|
|
||||||
ob.room_name as roomName,
|
|
||||||
ogs.goods_id as plateGoodsId,
|
ogs.goods_id as plateGoodsId,
|
||||||
ogs.goods_name as goodsName,
|
ogs.goods_name as goodsName,
|
||||||
ogs.brand as brand,
|
ogs.brand as brand,
|
||||||
@@ -407,7 +400,6 @@
|
|||||||
op.thickness as thickness,
|
op.thickness as thickness,
|
||||||
op.split_width as splitWidth,
|
op.split_width as splitWidth,
|
||||||
op.split_height as splitHeight,
|
op.split_height as splitHeight,
|
||||||
op.split_thickness as splitThickness,
|
|
||||||
op.seal_left as sealLeft,
|
op.seal_left as sealLeft,
|
||||||
op.seal_right as sealRight,
|
op.seal_right as sealRight,
|
||||||
op.seal_up as sealUp,
|
op.seal_up as sealUp,
|
||||||
@@ -415,35 +407,14 @@
|
|||||||
op.area as area,
|
op.area as area,
|
||||||
op.texture as texture,
|
op.texture as texture,
|
||||||
op.hole_face as holeFace,
|
op.hole_face as holeFace,
|
||||||
op.hole_arrange as holeArrange,
|
|
||||||
op.unregular_point_count as unregularPointCount,
|
|
||||||
op.front_hole_count as frontHoleCount,
|
|
||||||
op.back_hole_count as backHoleCount,
|
|
||||||
op.side_hole_count as sideHoleCount,
|
|
||||||
op.front_model_count as frontModelCount,
|
|
||||||
op.back_model_count as backModelCount,
|
|
||||||
op.is_door as isDoor,
|
|
||||||
op.open_door_type as openDoorType,
|
op.open_door_type as openDoorType,
|
||||||
op.offset_x as offsetX,
|
op.offset_x as offsetX,
|
||||||
op.offset_y as offsetY,
|
op.offset_y as offsetY,
|
||||||
op.is_arc_across as isArcAcross,
|
|
||||||
op.module_type_id as moduleTypeId,
|
|
||||||
op.is_special_shaped as isSpecialShaped,
|
op.is_special_shaped as isSpecialShaped,
|
||||||
op.is_sculpt as isSculpt,
|
op.remark as remark
|
||||||
op.is_row_hole as hasHole,
|
|
||||||
op.remark as remark,
|
|
||||||
op.filter_type as filterType,
|
|
||||||
op.is_cancel as isCancel,
|
|
||||||
op.is_row_hole as hasHole,
|
|
||||||
op.is_side_sculpt as isSideSculpt,
|
|
||||||
op.is_2v as is2v,
|
|
||||||
op.is_side_2v as isSide2v
|
|
||||||
|
|
||||||
from order_plate op
|
from order_plate op
|
||||||
left join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
join order_goods ogs on op.organ_id = ogs.organ_id and op.order_id = ogs.order_id and op.goods_id = ogs.id
|
||||||
left join order_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id
|
|
||||||
left join order_group og on oi.organ_id = og.organ_id and oi.order_id = og.order_id and oi.group_id = og.id
|
|
||||||
left join order_body ob on oi.organ_id = ob.organ_id and oi.order_id = ob.order_id and oi.body_id = ob.id
|
|
||||||
|
|
||||||
where op.organ_id = #{organId}
|
where op.organ_id = #{organId}
|
||||||
and op.deleted = false
|
and op.deleted = false
|
||||||
|
|||||||
Reference in New Issue
Block a user