mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
cad拆单 加工组和部件关联关系分离
This commit is contained in:
+40
-61
@@ -1574,46 +1574,23 @@ public class WebCadOrderImportAsyncFactory {
|
||||
|
||||
orderGroupMap.put(groupMapKey, orderGroupDO);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
} else {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
@@ -1626,32 +1603,33 @@ public class WebCadOrderImportAsyncFactory {
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(partNum)
|
||||
.groupId(0L) // 用于统计加工组下配件的总数
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
} else {
|
||||
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
} else {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
|
||||
// 创建部件的关联关系
|
||||
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
@@ -1663,6 +1641,7 @@ public class WebCadOrderImportAsyncFactory {
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
|
||||
+42
-63
@@ -1761,95 +1761,74 @@ public class WebCadOrderImportFactory {
|
||||
orderGroupMap.put(groupMapKey, orderGroupDO);
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
} else {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PARTS_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.groupId(orderGroupDO.getId())
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.type(OrderItemTypeEnum.PARTS_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(partNum)
|
||||
.groupId(0L) // 用于统计加工组下配件的总数
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
} else {
|
||||
if(CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
} else {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PARTS_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
orderItemDOS.add(orderItemDO);
|
||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||
}
|
||||
|
||||
// 创建部件的关联关系
|
||||
if(CollUtil.isNotEmpty(partComponentIds)) {
|
||||
for (Long partComponentId : partComponentIds) {
|
||||
OrderItemDO orderItemDO = OrderItemDO
|
||||
.builder()
|
||||
.id((Long) snowFlakeGenerator.nextId(null))
|
||||
.orderId(orderId)
|
||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||
.type(OrderItemTypeEnum.PARTS_ITEM.getStatus())
|
||||
.roomId(roomId)
|
||||
.bodyId(bodyId)
|
||||
.partsId(part.getImesPartsId())
|
||||
.packageId(0L)
|
||||
.plateId(0L)
|
||||
.num(part.getNum())
|
||||
.compId(partComponentId)
|
||||
.cadViewId(cadViewId)
|
||||
.organId(organId)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user