新增webcad生产单导入:orderplate的拆单宽高缺省取开料宽高

This commit is contained in:
gaoqr
2025-03-14 14:43:14 +08:00
parent 1bd78d24f6
commit 5ea85530ea
@@ -524,6 +524,9 @@ public class WebCadOrderImportFactory {
WebCadDataBlockReqVO.InfoDTO blockInfo = block.getInfo(); WebCadDataBlockReqVO.InfoDTO blockInfo = block.getInfo();
String splitHeight = blockInfo.getSpliteHeight();
String spliteWidth = blockInfo.getSpliteWidth();
// 创建order_plate // 创建order_plate
PlateDO plateDO = PlateDO.builder() PlateDO plateDO = PlateDO.builder()
.id(plateId) .id(plateId)
@@ -535,9 +538,9 @@ public class WebCadOrderImportFactory {
.width(BigDecimal.valueOf(block.getWidth())) .width(BigDecimal.valueOf(block.getWidth()))
.height(BigDecimal.valueOf(block.getHeight())) .height(BigDecimal.valueOf(block.getHeight()))
.thickness(BigDecimal.valueOf(block.getThickness())) .thickness(BigDecimal.valueOf(block.getThickness()))
.splitHeight(BigDecimal.valueOf(NumberUtil.parseDouble(blockInfo.getSpliteHeight()))) .splitHeight(BigDecimal.valueOf(NumberUtil.parseDouble(StringUtils.isNotEmpty(splitHeight) ? splitHeight : String.valueOf(block.getKaiLiaoHeight()))))
.splitThickness(BigDecimal.valueOf(NumberUtil.parseDouble(blockInfo.getSpliteThickness()))) .splitThickness(BigDecimal.valueOf(NumberUtil.parseDouble(blockInfo.getSpliteThickness())))
.splitWidth(BigDecimal.valueOf(NumberUtil.parseDouble(blockInfo.getSpliteWidth()))) .splitWidth(BigDecimal.valueOf(NumberUtil.parseDouble(StringUtils.isNotEmpty(spliteWidth) ? spliteWidth : String.valueOf(block.getKaiLiaoWidth()))))
.area(BigDecimal.valueOf(block.getArea())) .area(BigDecimal.valueOf(block.getArea()))
.texture(block.getTexture()) .texture(block.getTexture())
.holeFace(block.getHoleFace()) .holeFace(block.getHoleFace())
@@ -890,6 +893,9 @@ public class WebCadOrderImportFactory {
* @param blockObjectList * @param blockObjectList
*/ */
private void analyzeOrderParts(List<WebCadDataPartsReqVO.BlockObjectListDTO> blockObjectList) { private void analyzeOrderParts(List<WebCadDataPartsReqVO.BlockObjectListDTO> blockObjectList) {
if (CollUtil.isEmpty(blockObjectList)) {
return;
}
// 筛选出组件配件 // 筛选出组件配件
List<WebCadDataPartsReqVO.BlockObjectListDTO> moduleCollect = blockObjectList.stream().filter(p -> PART_CATEGORY_THREE.equals(p.getType())).collect(Collectors.toList()); List<WebCadDataPartsReqVO.BlockObjectListDTO> moduleCollect = blockObjectList.stream().filter(p -> PART_CATEGORY_THREE.equals(p.getType())).collect(Collectors.toList());
// 基于以下属性分组非组件的配件 // 基于以下属性分组非组件的配件