mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:1、代码规范修复;2、拆单完成内存清理补充;
This commit is contained in:
+35
-18
@@ -640,11 +640,33 @@ public class WebCadOrderImportFactory {
|
|||||||
createBlockUnknownBody(roomId, roomName, bodyName, listBody);
|
createBlockUnknownBody(roomId, roomName, bodyName, listBody);
|
||||||
} else {
|
} else {
|
||||||
// 成倍数量
|
// 成倍数量
|
||||||
|
multiCreateBodyPlate(cadBody, roomId, roomName, roomBodyKey, listBody);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 所有自定义板编号生成完成后更新配置到生产单
|
||||||
|
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
|
||||||
|
// 批量插入板件
|
||||||
|
orderPlateBatchInsertWithinThreshold(plateDOS, true);
|
||||||
|
// 批量插入造型数据
|
||||||
|
orderModelsBatchInsertWithinThreshold(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 成倍创建柜体板件
|
||||||
|
*
|
||||||
|
* @param cadBody
|
||||||
|
* @param roomId
|
||||||
|
* @param roomName
|
||||||
|
* @param roomBodyKey
|
||||||
|
* @param listBody
|
||||||
|
*/
|
||||||
|
private void multiCreateBodyPlate(WebCadDataDoubleRoomTreeReqVO.ChildrenDTO cadBody, Long roomId, String roomName, String roomBodyKey, List<WebCadDataBlockReqVO> listBody) {
|
||||||
Integer bodyMultipleNum = cadBody.getCount();
|
Integer bodyMultipleNum = cadBody.getCount();
|
||||||
for (int i = 0; i < bodyMultipleNum; i++) {
|
for (int i = 0; i < bodyMultipleNum; i++) {
|
||||||
Long bodyId = (Long) snowFlakeGenerator.nextId(null);
|
Long bodyId = (Long) snowFlakeGenerator.nextId(null);
|
||||||
OrderBodyDO orderBodyDO = OrderBodyDO.builder().id(bodyId).orderId(orderId).organId(organId)
|
OrderBodyDO orderBodyDO = OrderBodyDO.builder().id(bodyId).orderId(orderId).organId(organId)
|
||||||
.roomId(roomId).roomName(roomName).name(bodyName).width(0.0).height(0.0)
|
.roomId(roomId).roomName(roomName).name(cadBody.getName()).width(0.0).height(0.0)
|
||||||
.depth(0.0).multiNum(0).plateNum(0).unregularNum(0).filename("无").remark("无").deleted(false).build();
|
.depth(0.0).multiNum(0).plateNum(0).unregularNum(0).filename("无").remark("无").deleted(false).build();
|
||||||
orderBodyDO.setCreator(operatorName);
|
orderBodyDO.setCreator(operatorName);
|
||||||
orderBodyDO.setUpdater(operatorName);
|
orderBodyDO.setUpdater(operatorName);
|
||||||
@@ -672,15 +694,6 @@ public class WebCadOrderImportFactory {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
// 所有自定义板编号生成完成后更新配置到生产单
|
|
||||||
customPlateNoGenerateService.updateCustomPlateNoGenerateConfig(plateNoGenerateConfigVO, orderDO);
|
|
||||||
// 批量插入板件
|
|
||||||
orderPlateBatchInsertWithinThreshold(plateDOS, true);
|
|
||||||
// 批量插入造型数据
|
|
||||||
orderModelsBatchInsertWithinThreshold(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建不需要成倍的房间柜体以及其下的板件
|
* 创建不需要成倍的房间柜体以及其下的板件
|
||||||
@@ -1976,16 +1989,20 @@ public class WebCadOrderImportFactory {
|
|||||||
* 清空所有列表
|
* 清空所有列表
|
||||||
*/
|
*/
|
||||||
private void clearAll() {
|
private void clearAll() {
|
||||||
orderPartsDOS.clear();
|
|
||||||
orderGroupDOS.clear();
|
|
||||||
orderGroupMap.clear();
|
|
||||||
plateDOS.clear();
|
|
||||||
orderItemDOS.clear();
|
|
||||||
orderModelDOS.clear();
|
|
||||||
roomBodyMap.clear();
|
roomBodyMap.clear();
|
||||||
bodyMap.clear();
|
bodyMap.clear();
|
||||||
sealEdgeConfigList.clear();
|
orderGroupMap.clear();
|
||||||
processGroupMap.clear();
|
|
||||||
materialMap.clear();
|
materialMap.clear();
|
||||||
|
existRoomMap.clear();
|
||||||
|
processGroupMap.clear();
|
||||||
|
|
||||||
|
plateDOS.clear();
|
||||||
|
orderItemDOS.clear();
|
||||||
|
orderGroupDOS.clear();
|
||||||
|
orderPartsDOS.clear();
|
||||||
|
orderModelDOS.clear();
|
||||||
|
rawGoodsDOS.clear();
|
||||||
|
goodsDOS.clear();
|
||||||
|
sealEdgeConfigList.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user