mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
未排单管理-创建排单列表查询优化:1、减少前端无用加工组字段;2、恢复sql结果集中的groupId;3、cad拆单order_item支持group_id为空;
This commit is contained in:
+1
-16
@@ -788,21 +788,6 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
|
||||
AssertUtils.notEmpty(plateDetailRespVOS,ORDER_PLATE_ERROR);
|
||||
|
||||
for (PlateDetailRespVO plateDetailsRespVO : plateDetailRespVOS) {
|
||||
StringBuilder name = new StringBuilder();
|
||||
if (CollUtil.isNotEmpty(plateDetailsRespVO.getProcessGroupLists())) {
|
||||
for (ProcessGroupList groupNameList : plateDetailsRespVO.getProcessGroupLists()) {
|
||||
// 去除最后的逗号
|
||||
name.append(groupNameList.getGroupName()).append(",");
|
||||
|
||||
}
|
||||
name = new StringBuilder(name.substring(0, name.length() - 1));
|
||||
}
|
||||
|
||||
plateDetailsRespVO.setProcessGroupName(name.toString());
|
||||
}
|
||||
|
||||
|
||||
// todo 数据结构改后,可以增加排单ID作为筛选,只查为 0 的
|
||||
List<OrderModelDO> orderModelDOS = getOrderModels(orderIds);
|
||||
|
||||
@@ -853,7 +838,7 @@ public class OptimizePlanServiceImpl implements OptimizePlanService {
|
||||
))
|
||||
.source(s -> s
|
||||
.filter(f -> f
|
||||
.includes("holeDetail", "sideHoleDetail", "contourDetail", "sideDetail", "id")
|
||||
.includes("holeDetail", "sideHoleDetail", "contourDetail", "sideDetail", "id", "plateId")
|
||||
)
|
||||
)
|
||||
.trackTotalHits(t -> t.enabled(false));
|
||||
|
||||
+2
-2
@@ -459,7 +459,7 @@
|
||||
|
||||
|
||||
select distinct
|
||||
|
||||
oi.group_id as groupId,
|
||||
og.name as groupName,
|
||||
ogs.goods_id as plateGoodsId,
|
||||
ogs.goods_name as goodsName,
|
||||
@@ -498,7 +498,7 @@
|
||||
|
||||
from order_plate op
|
||||
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_item oi on op.organ_id = oi.organ_id and op.order_id = oi.order_id and op.id = oi.plate_id and oi.plate_id != 0
|
||||
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_plan_item opi on op.organ_id = opi.organ_id and op.order_id = opi.order_id and op.id = opi.plate_id
|
||||
where op.organ_id = #{organId}
|
||||
|
||||
+5
-3
@@ -72,6 +72,7 @@ import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.sql.Types;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -858,7 +859,6 @@ public class WebCadOrderImportAsyncFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.plateId(plateId)
|
||||
.packageId(0L)
|
||||
.partsId(0L)
|
||||
@@ -1496,7 +1496,6 @@ public class WebCadOrderImportAsyncFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
@@ -1513,7 +1512,6 @@ public class WebCadOrderImportAsyncFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
@@ -1839,7 +1837,11 @@ public class WebCadOrderImportAsyncFactory {
|
||||
ps.setLong(4, item.getRoomId());
|
||||
ps.setLong(5, item.getBodyId());
|
||||
ps.setLong(6, item.getPackageId());
|
||||
if (item.getGroupId() != null) {
|
||||
ps.setLong(7, item.getGroupId());
|
||||
} else {
|
||||
ps.setNull(7, Types.BIGINT);
|
||||
}
|
||||
ps.setLong(8, item.getPlateId());
|
||||
ps.setLong(9, item.getPartsId());
|
||||
ps.setDouble(10, item.getNum());
|
||||
|
||||
+5
-3
@@ -62,6 +62,7 @@ import java.math.BigDecimal;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.sql.Types;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@@ -1178,7 +1179,6 @@ public class WebCadOrderImportFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.plateId(plateId)
|
||||
.packageId(0L)
|
||||
.partsId(0L)
|
||||
@@ -1385,7 +1385,6 @@ public class WebCadOrderImportFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
@@ -1402,7 +1401,6 @@ public class WebCadOrderImportFactory {
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(0L)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
@@ -1728,7 +1726,11 @@ public class WebCadOrderImportFactory {
|
||||
ps.setLong(4, item.getRoomId());
|
||||
ps.setLong(5, item.getBodyId());
|
||||
ps.setLong(6, item.getPackageId());
|
||||
if (item.getGroupId() != null) {
|
||||
ps.setLong(7, item.getGroupId());
|
||||
} else {
|
||||
ps.setNull(7, Types.BIGINT);
|
||||
}
|
||||
ps.setLong(8, item.getPlateId());
|
||||
ps.setLong(9, item.getPartsId());
|
||||
ps.setDouble(10, item.getNum());
|
||||
|
||||
Reference in New Issue
Block a user