mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 12:52:07 +08:00
禅道bug#1721修复
This commit is contained in:
+18
-1
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保留三位小数展示
|
||||
*
|
||||
|
||||
+18
-1
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保留三位小数展示
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user