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