mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-14 21:52:07 +08:00
新增webcad生产单导入:cad拆单封边条宽度对应适配double类型
This commit is contained in:
+3
-3
@@ -1157,7 +1157,7 @@ public class WebCadOrderImportFactory {
|
|||||||
private void sealEdgeWidthMatch(WebCadDataPartsReqVO.BlockObjectListDTO part) {
|
private void sealEdgeWidthMatch(WebCadDataPartsReqVO.BlockObjectListDTO part) {
|
||||||
// 从spec中解析宽度、厚度
|
// 从spec中解析宽度、厚度
|
||||||
String spec = part.getSpec();
|
String spec = part.getSpec();
|
||||||
Integer widthFromSpec = getWidthFromSpec(spec);
|
Double widthFromSpec = getWidthFromSpec(spec);
|
||||||
part.setThickness(getThicknessFromSpec(spec));
|
part.setThickness(getThicknessFromSpec(spec));
|
||||||
if (ObjectUtil.isNull(widthFromSpec)) {
|
if (ObjectUtil.isNull(widthFromSpec)) {
|
||||||
return;
|
return;
|
||||||
@@ -1174,14 +1174,14 @@ public class WebCadOrderImportFactory {
|
|||||||
/**
|
/**
|
||||||
* 从规格中获取宽度,例:1mm-18mm
|
* 从规格中获取宽度,例:1mm-18mm
|
||||||
*/
|
*/
|
||||||
private Integer getWidthFromSpec(String spec) {
|
private Double getWidthFromSpec(String spec) {
|
||||||
if (StringUtils.isNotEmpty(spec)) {
|
if (StringUtils.isNotEmpty(spec)) {
|
||||||
String[] specSplit = spec.split("-");
|
String[] specSplit = spec.split("-");
|
||||||
if (specSplit.length >= 2) {
|
if (specSplit.length >= 2) {
|
||||||
String widthInSpec = specSplit[1];
|
String widthInSpec = specSplit[1];
|
||||||
String[] widthSplit = widthInSpec.split("mm");
|
String[] widthSplit = widthInSpec.split("mm");
|
||||||
if (widthSplit.length == 1) {
|
if (widthSplit.length == 1) {
|
||||||
return Integer.parseInt(widthSplit[0]);
|
return NumberUtil.parseDouble(widthSplit[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user