禅道bug#1721修复

This commit is contained in:
gaoqr
2026-06-24 16:01:15 +08:00
parent 8800681fa0
commit 69adb2e7da
2 changed files with 36 additions and 2 deletions
@@ -1707,7 +1707,7 @@ public class WebCadOrderImportAsyncFactory {
.name(part.getName())
.material(getEmpty(material))
.model(getEmpty(model))
.spec(getEmpty(spec))
.spec(getPartsSpec(spec))
.brand(getEmpty(brand))
.factory(getEmpty(factory))
.unit(part.getUnit())
@@ -1734,6 +1734,23 @@ public class WebCadOrderImportAsyncFactory {
}
}
/**
* 获取配件规格,cad格式为a|b|c,只取第一段
*
* @param value
* @return
*/
private String getPartsSpec(String value) {
value = StringUtils.defaultString(value);
int idx = value.indexOf('|');
return StringUtils.defaultIfEmpty(
idx >= 0 ? value.substring(0, idx) : value,
EMPTY_STRING
);
}
/**
* 保留三位小数展示
*
@@ -1894,7 +1894,7 @@ public class WebCadOrderImportFactory {
.name(part.getName())
.material(getEmpty(material))
.model(getEmpty(model))
.spec(getEmpty(spec))
.spec(getPartsSpec(spec))
.brand(getEmpty(brand))
.factory(getEmpty(factory))
.unit(part.getUnit())
@@ -1921,6 +1921,23 @@ public class WebCadOrderImportFactory {
}
}
/**
* 获取配件规格,cad格式为a|b|c,只取第一段
*
* @param value
* @return
*/
private String getPartsSpec(String value) {
value = StringUtils.defaultString(value);
int idx = value.indexOf('|');
return StringUtils.defaultIfEmpty(
idx >= 0 ? value.substring(0, idx) : value,
EMPTY_STRING
);
}
/**
* 保留三位小数展示
*