mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 13:42:07 +08:00
新增cad拆单支持配件和部件关联
This commit is contained in:
+3
@@ -72,6 +72,9 @@ public class WebCadDataPartsReqVO {
|
|||||||
|
|
||||||
private GroupDataDTO groupData;
|
private GroupDataDTO groupData;
|
||||||
|
|
||||||
|
// 组件id
|
||||||
|
private List<Integer> componentIds;
|
||||||
|
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Data
|
@Data
|
||||||
public static class GroupDataDTO {
|
public static class GroupDataDTO {
|
||||||
|
|||||||
+98
-47
@@ -24,7 +24,6 @@ import com.cf.imes.module.executor.enums.DataTypeEnum;
|
|||||||
import com.cf.imes.module.executor.enums.OrderImportStatusEnum;
|
import com.cf.imes.module.executor.enums.OrderImportStatusEnum;
|
||||||
import com.cf.imes.module.executor.enums.OrderItemTypeEnum;
|
import com.cf.imes.module.executor.enums.OrderItemTypeEnum;
|
||||||
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
import com.cf.imes.module.executor.enums.OrderStatusEnum;
|
||||||
import com.cf.imes.module.infra.api.file.FileApi;
|
|
||||||
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataBlockRemarkVO;
|
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataBlockRemarkVO;
|
||||||
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataBlockReqVO;
|
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataBlockReqVO;
|
||||||
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataComponentGroupReqVO;
|
import com.cf.imes.module.plan.controller.admin.orderimport.webcad.vo.WebCadDataComponentGroupReqVO;
|
||||||
@@ -810,16 +809,6 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
goodsDO.setPlateNum(goodsDO.getPlateNum() + 1);
|
goodsDO.setPlateNum(goodsDO.getPlateNum() + 1);
|
||||||
goodsDO.setArea(goodsDO.getArea() + area);
|
goodsDO.setArea(goodsDO.getArea() + area);
|
||||||
|
|
||||||
// 获取缓存的部件id
|
|
||||||
Integer cadGroupId = block.getComponentId();
|
|
||||||
Long plateComponentId = null;
|
|
||||||
if (ObjectUtil.isNotNull(cadGroupId)) {
|
|
||||||
Long componentId = componentGroupMap.get(cadGroupId);
|
|
||||||
if (ObjectUtil.isNotNull(componentId)) {
|
|
||||||
plateComponentId = componentId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 创建order_plate
|
// 创建order_plate
|
||||||
PlateDO plateDO = PlateDO.builder()
|
PlateDO plateDO = PlateDO.builder()
|
||||||
.id(plateId)
|
.id(plateId)
|
||||||
@@ -900,7 +889,7 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
orderModelsBatchInsertWithinThreshold(false);
|
orderModelsBatchInsertWithinThreshold(false);
|
||||||
|
|
||||||
// 遍历加工组信息,生成对应的加工组和item
|
// 遍历加工组信息,生成对应的加工组和item
|
||||||
analyzeBlockProcessGroup(orderBodyDO, block, plateId, plateComponentId);
|
analyzeBlockProcessGroup(orderBodyDO, block, plateId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -910,10 +899,20 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
* @param block
|
* @param block
|
||||||
* @param plateId
|
* @param plateId
|
||||||
*/
|
*/
|
||||||
private void analyzeBlockProcessGroup(OrderBodyDO orderBodyDO, WebCadDataBlockReqVO block, Long plateId, Long componentId) {
|
private void analyzeBlockProcessGroup(OrderBodyDO orderBodyDO, WebCadDataBlockReqVO block, Long plateId) {
|
||||||
Long bodyId = orderBodyDO.getId();
|
Long bodyId = orderBodyDO.getId();
|
||||||
Long roomId = orderBodyDO.getRoomId();
|
Long roomId = orderBodyDO.getRoomId();
|
||||||
|
|
||||||
|
// 获取缓存的部件id
|
||||||
|
Integer cadGroupId = block.getComponentId();
|
||||||
|
Long plateComponentId = null;
|
||||||
|
if (ObjectUtil.isNotNull(cadGroupId)) {
|
||||||
|
Long componentId = componentGroupMap.get(cadGroupId);
|
||||||
|
if (ObjectUtil.isNotNull(componentId)) {
|
||||||
|
plateComponentId = componentId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<Integer> groupIds = block.getGroupIds();
|
List<Integer> groupIds = block.getGroupIds();
|
||||||
if (CollUtil.isNotEmpty(groupIds)) {
|
if (CollUtil.isNotEmpty(groupIds)) {
|
||||||
// 加工组缓存存在,一个加工组一个orderGroup+orderItem
|
// 加工组缓存存在,一个加工组一个orderGroup+orderItem
|
||||||
@@ -967,7 +966,7 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
.organId(organId)
|
.organId(organId)
|
||||||
.compId(componentId)
|
.compId(plateComponentId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
@@ -986,7 +985,7 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
.organId(organId)
|
.organId(organId)
|
||||||
.compId(componentId)
|
.compId(plateComponentId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
@@ -1552,6 +1551,16 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
// 获取orderPart
|
// 获取orderPart
|
||||||
analyzeOrderPart(part);
|
analyzeOrderPart(part);
|
||||||
|
|
||||||
|
// 获取缓存的部件id
|
||||||
|
List<Integer> cadGroupIds = part.getComponentIds();
|
||||||
|
List<Long> partComponentIds = new ArrayList<>();
|
||||||
|
for (Integer cadGroupId : cadGroupIds) {
|
||||||
|
Long componentId = componentGroupMap.get(cadGroupId);
|
||||||
|
if (ObjectUtil.isNotNull(componentId)) {
|
||||||
|
partComponentIds.add(componentId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 遍历加工组信息,生成对应的orderItem
|
// 遍历加工组信息,生成对应的orderItem
|
||||||
List<Integer> groupIds = part.getGroupIds();
|
List<Integer> groupIds = part.getGroupIds();
|
||||||
if (CollUtil.isNotEmpty(groupIds)) {
|
if (CollUtil.isNotEmpty(groupIds)) {
|
||||||
@@ -1591,23 +1600,44 @@ 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)
|
||||||
.organId(organId)
|
.num(part.getNum())
|
||||||
.build();
|
.compId(partComponentId)
|
||||||
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())
|
||||||
|
.organId(organId)
|
||||||
|
.build();
|
||||||
|
orderItemDOS.add(orderItemDO);
|
||||||
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OrderItemDO orderItemDO = OrderItemDO
|
OrderItemDO orderItemDO = OrderItemDO
|
||||||
.builder()
|
.builder()
|
||||||
@@ -1625,21 +1655,42 @@ public class WebCadOrderImportAsyncFactory {
|
|||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
} else {
|
} else {
|
||||||
OrderItemDO orderItemDO = OrderItemDO
|
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||||
.builder()
|
for (Long partComponentId : partComponentIds) {
|
||||||
.id((Long) snowFlakeGenerator.nextId(null))
|
OrderItemDO orderItemDO = OrderItemDO
|
||||||
.orderId(orderId)
|
.builder()
|
||||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
.id((Long) snowFlakeGenerator.nextId(null))
|
||||||
.roomId(roomId)
|
.orderId(orderId)
|
||||||
.bodyId(bodyId)
|
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||||
.partsId(part.getImesPartsId())
|
.roomId(roomId)
|
||||||
.packageId(0L)
|
.bodyId(bodyId)
|
||||||
.plateId(0L)
|
.partsId(part.getImesPartsId())
|
||||||
.num(part.getNum())
|
.packageId(0L)
|
||||||
.organId(organId)
|
.plateId(0L)
|
||||||
.build();
|
.num(part.getNum())
|
||||||
orderItemDOS.add(orderItemDO);
|
.compId(partComponentId)
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
.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())
|
||||||
|
.organId(organId)
|
||||||
|
.build();
|
||||||
|
orderItemDOS.add(orderItemDO);
|
||||||
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+98
-46
@@ -740,17 +740,6 @@ public class WebCadOrderImportFactory {
|
|||||||
goodsDO.setPlateNum(goodsDO.getPlateNum() + 1);
|
goodsDO.setPlateNum(goodsDO.getPlateNum() + 1);
|
||||||
goodsDO.setArea(goodsDO.getArea() + area);
|
goodsDO.setArea(goodsDO.getArea() + area);
|
||||||
|
|
||||||
// 获取缓存的部件id
|
|
||||||
Integer cadGroupId = block.getComponentId();
|
|
||||||
Long plateComponentId = null;
|
|
||||||
if (ObjectUtil.isNotNull(cadGroupId)) {
|
|
||||||
Long componentId = componentGroupMap.get(cadGroupId);
|
|
||||||
if (ObjectUtil.isNotNull(componentId)) {
|
|
||||||
plateComponentId = componentId;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
String splitHeight = block.getSpliteHeight();
|
String splitHeight = block.getSpliteHeight();
|
||||||
String spliteWidth = block.getSpliteWidth();
|
String spliteWidth = block.getSpliteWidth();
|
||||||
// 创建order_plate
|
// 创建order_plate
|
||||||
@@ -833,7 +822,7 @@ public class WebCadOrderImportFactory {
|
|||||||
orderModelsBatchInsertWithinThreshold(false);
|
orderModelsBatchInsertWithinThreshold(false);
|
||||||
|
|
||||||
// 遍历加工组信息,生成对应的加工组和item
|
// 遍历加工组信息,生成对应的加工组和item
|
||||||
analyzeBlockProcessGroup(orderBodyDO, block, plateId, plateComponentId);
|
analyzeBlockProcessGroup(orderBodyDO, block, plateId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1266,10 +1255,20 @@ public class WebCadOrderImportFactory {
|
|||||||
* @param block
|
* @param block
|
||||||
* @param plateId
|
* @param plateId
|
||||||
*/
|
*/
|
||||||
private void analyzeBlockProcessGroup(OrderBodyDO orderBodyDO, WebCadDataBlockReqVO block, Long plateId, Long componentId) {
|
private void analyzeBlockProcessGroup(OrderBodyDO orderBodyDO, WebCadDataBlockReqVO block, Long plateId) {
|
||||||
Long bodyId = orderBodyDO.getId();
|
Long bodyId = orderBodyDO.getId();
|
||||||
Long roomId = orderBodyDO.getRoomId();
|
Long roomId = orderBodyDO.getRoomId();
|
||||||
|
|
||||||
|
// 获取缓存的部件id
|
||||||
|
Integer cadGroupId = block.getComponentId();
|
||||||
|
Long plateComponentId = null;
|
||||||
|
if (ObjectUtil.isNotNull(cadGroupId)) {
|
||||||
|
Long componentId = componentGroupMap.get(cadGroupId);
|
||||||
|
if (ObjectUtil.isNotNull(componentId)) {
|
||||||
|
plateComponentId = componentId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<Integer> groupIds = block.getGroupIds();
|
List<Integer> groupIds = block.getGroupIds();
|
||||||
if (CollUtil.isNotEmpty(groupIds)) {
|
if (CollUtil.isNotEmpty(groupIds)) {
|
||||||
// 加工组缓存存在,一个加工组一个orderGroup+orderItem
|
// 加工组缓存存在,一个加工组一个orderGroup+orderItem
|
||||||
@@ -1323,7 +1322,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
.organId(organId)
|
.organId(organId)
|
||||||
.compId(componentId)
|
.compId(plateComponentId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
@@ -1342,7 +1341,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.partsId(0L)
|
.partsId(0L)
|
||||||
.num(1.0)
|
.num(1.0)
|
||||||
.organId(organId)
|
.organId(organId)
|
||||||
.compId(componentId)
|
.compId(plateComponentId)
|
||||||
.build();
|
.build();
|
||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
@@ -1480,6 +1479,16 @@ public class WebCadOrderImportFactory {
|
|||||||
// 获取orderPart
|
// 获取orderPart
|
||||||
analyzeOrderPart(part);
|
analyzeOrderPart(part);
|
||||||
|
|
||||||
|
// 获取缓存的部件id
|
||||||
|
List<Integer> cadGroupIds = part.getComponentIds();
|
||||||
|
List<Long> partComponentIds = new ArrayList<>();
|
||||||
|
for (Integer cadGroupId : cadGroupIds) {
|
||||||
|
Long componentId = componentGroupMap.get(cadGroupId);
|
||||||
|
if (ObjectUtil.isNotNull(componentId)) {
|
||||||
|
partComponentIds.add(componentId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 遍历加工组信息,生成对应的orderItem
|
// 遍历加工组信息,生成对应的orderItem
|
||||||
List<Integer> groupIds = part.getGroupIds();
|
List<Integer> groupIds = part.getGroupIds();
|
||||||
if (CollUtil.isNotEmpty(groupIds)) {
|
if (CollUtil.isNotEmpty(groupIds)) {
|
||||||
@@ -1520,22 +1529,44 @@ public class WebCadOrderImportFactory {
|
|||||||
orderGroupMap.put(groupMapKey, orderGroupDO);
|
orderGroupMap.put(groupMapKey, orderGroupDO);
|
||||||
}
|
}
|
||||||
|
|
||||||
OrderItemDO orderItemDO = OrderItemDO
|
if (CollUtil.isNotEmpty(partComponentIds)) {
|
||||||
.builder()
|
for (Long partComponentId : partComponentIds) {
|
||||||
.id((Long) snowFlakeGenerator.nextId(null))
|
OrderItemDO orderItemDO = OrderItemDO
|
||||||
.orderId(orderId)
|
.builder()
|
||||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
.id((Long) snowFlakeGenerator.nextId(null))
|
||||||
.roomId(roomId)
|
.orderId(orderId)
|
||||||
.bodyId(bodyId)
|
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||||
.groupId(orderGroupDO.getId())
|
.roomId(roomId)
|
||||||
.partsId(part.getImesPartsId())
|
.bodyId(bodyId)
|
||||||
.packageId(0L)
|
.groupId(orderGroupDO.getId())
|
||||||
.plateId(0L)
|
.partsId(part.getImesPartsId())
|
||||||
.num(part.getNum())
|
.packageId(0L)
|
||||||
.organId(organId)
|
.plateId(0L)
|
||||||
.build();
|
.num(part.getNum())
|
||||||
orderItemDOS.add(orderItemDO);
|
.compId(partComponentId)
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
.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())
|
||||||
|
.organId(organId)
|
||||||
|
.build();
|
||||||
|
orderItemDOS.add(orderItemDO);
|
||||||
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
OrderItemDO orderItemDO = OrderItemDO
|
OrderItemDO orderItemDO = OrderItemDO
|
||||||
.builder()
|
.builder()
|
||||||
@@ -1553,21 +1584,42 @@ public class WebCadOrderImportFactory {
|
|||||||
orderItemDOS.add(orderItemDO);
|
orderItemDOS.add(orderItemDO);
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
} else {
|
} else {
|
||||||
OrderItemDO orderItemDO = OrderItemDO
|
if(CollUtil.isNotEmpty(partComponentIds)) {
|
||||||
.builder()
|
for (Long partComponentId : partComponentIds) {
|
||||||
.id((Long) snowFlakeGenerator.nextId(null))
|
OrderItemDO orderItemDO = OrderItemDO
|
||||||
.orderId(orderId)
|
.builder()
|
||||||
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
.id((Long) snowFlakeGenerator.nextId(null))
|
||||||
.roomId(roomId)
|
.orderId(orderId)
|
||||||
.bodyId(bodyId)
|
.type(OrderItemTypeEnum.PLATE_ITEM.getStatus())
|
||||||
.partsId(part.getImesPartsId())
|
.roomId(roomId)
|
||||||
.packageId(0L)
|
.bodyId(bodyId)
|
||||||
.plateId(0L)
|
.partsId(part.getImesPartsId())
|
||||||
.num(part.getNum())
|
.packageId(0L)
|
||||||
.organId(organId)
|
.plateId(0L)
|
||||||
.build();
|
.num(part.getNum())
|
||||||
orderItemDOS.add(orderItemDO);
|
.compId(partComponentId)
|
||||||
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
.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())
|
||||||
|
.organId(organId)
|
||||||
|
.build();
|
||||||
|
orderItemDOS.add(orderItemDO);
|
||||||
|
orderItemBatchInsertWithinThreshold(orderItemDOS, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user