mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:新增逻辑cad拆单板件自定义编号配置未开启使用cad板编号
This commit is contained in:
+30
-4
@@ -655,7 +655,7 @@ public class WebCadOrderImportFactory {
|
|||||||
.backModelCount(block.getBackModelCount())
|
.backModelCount(block.getBackModelCount())
|
||||||
.offsetX(BigDecimal.valueOf(block.getOffsetX()))
|
.offsetX(BigDecimal.valueOf(block.getOffsetX()))
|
||||||
.offsetY(BigDecimal.valueOf(block.getOffsetY()))
|
.offsetY(BigDecimal.valueOf(block.getOffsetY()))
|
||||||
.isArcAcross(block.getIsArcBase())
|
.isArcAcross(getDefaultFalse(block.getIsArcBase()))
|
||||||
.moduleTypeId(0L)
|
.moduleTypeId(0L)
|
||||||
.isOptimized(false)
|
.isOptimized(false)
|
||||||
.isCutted(0)
|
.isCutted(0)
|
||||||
@@ -675,7 +675,7 @@ public class WebCadOrderImportFactory {
|
|||||||
plateDO.setUpdateTime(now);
|
plateDO.setUpdateTime(now);
|
||||||
|
|
||||||
// 生成自定义板编号
|
// 生成自定义板编号
|
||||||
generateCustomPlateNo(plateDO);
|
generateCustomPlateNo(plateDO, block.getCustBlockNo());
|
||||||
|
|
||||||
WebCadDataBlockReqVO.BoadrData boardData = block.getBoardData();
|
WebCadDataBlockReqVO.BoadrData boardData = block.getBoardData();
|
||||||
boardData.setInfo(blockInfo);
|
boardData.setInfo(blockInfo);
|
||||||
@@ -737,14 +737,20 @@ public class WebCadOrderImportFactory {
|
|||||||
* 生成自定义板编号
|
* 生成自定义板编号
|
||||||
*
|
*
|
||||||
* @param plateDO
|
* @param plateDO
|
||||||
|
* @param cadCustBlockNo cad板号
|
||||||
*/
|
*/
|
||||||
private void generateCustomPlateNo(PlateDO plateDO) {
|
private void generateCustomPlateNo(PlateDO plateDO, Integer cadCustBlockNo) {
|
||||||
if (!isFirstPlate) {
|
if (!isFirstPlate) {
|
||||||
isFirstPlate = true;
|
isFirstPlate = true;
|
||||||
}
|
}
|
||||||
// 配置不为空时,生成自定义板编号
|
// 配置不为空时,生成自定义板编号
|
||||||
if (ObjectUtil.isNotNull(plateNoGenerateConfigVO)) {
|
if (ObjectUtil.isNotNull(plateNoGenerateConfigVO)) {
|
||||||
customPlateNoGenerateService.generateCustomPlateNo(orderId, plateDO, plateNoGenerateConfigVO, isFirstPlate);
|
customPlateNoGenerateService.generateCustomPlateNo(orderId, plateDO, plateNoGenerateConfigVO, isFirstPlate);
|
||||||
|
} else {
|
||||||
|
// 配置为空的时候,使用cad的板编号
|
||||||
|
if (ObjectUtil.isNotNull(cadCustBlockNo)) {
|
||||||
|
plateDO.setCustomPlateNo(String.valueOf(cadCustBlockNo));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1212,7 +1218,27 @@ public class WebCadOrderImportFactory {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private String getEmpty(String value) {
|
private String getEmpty(String value) {
|
||||||
return StringUtils.isNotEmpty(value) ? value : EMPTY_STRING;
|
return StringUtils.defaultIfEmpty(value, EMPTY_STRING);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* value为空返回0.0
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private double getZeroDouble(Double value) {
|
||||||
|
return ObjectUtil.defaultIfNull(value, 0.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* value为空返回false
|
||||||
|
*
|
||||||
|
* @param value
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Boolean getDefaultFalse(Boolean value) {
|
||||||
|
return ObjectUtil.defaultIfNull(value, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user