cad拆单配件汇总修改为长宽高只对比小数后三位

This commit is contained in:
gaoqr
2026-04-02 14:43:06 +08:00
parent 60b269cf54
commit c3295f66e9
2 changed files with 4 additions and 4 deletions
@@ -1791,12 +1791,12 @@ public class WebCadOrderImportAsyncFactory {
* @return * @return
*/ */
private String scale3(String value) { private String scale3(String value) {
if (StringUtils.isNotEmpty(value)) return value; if (StringUtils.isEmpty(value)) return value;
try { try {
BigDecimal bd = new BigDecimal(value); BigDecimal bd = new BigDecimal(value);
bd = bd.setScale(3, RoundingMode.HALF_UP); bd = bd.setScale(3, RoundingMode.HALF_UP);
return bd.toPlainString(); return bd.toPlainString();
} catch (NumberFormatException e) { } catch (Exception e) {
// 不是数字就原样返回 // 不是数字就原样返回
return value; return value;
} }
@@ -1720,12 +1720,12 @@ public class WebCadOrderImportFactory {
* @return * @return
*/ */
private String scale3(String value) { private String scale3(String value) {
if (StringUtils.isNotEmpty(value)) return value; if (StringUtils.isEmpty(value)) return value;
try { try {
BigDecimal bd = new BigDecimal(value); BigDecimal bd = new BigDecimal(value);
bd = bd.setScale(3, RoundingMode.HALF_UP); bd = bd.setScale(3, RoundingMode.HALF_UP);
return bd.toPlainString(); return bd.toPlainString();
} catch (NumberFormatException e) { } catch (Exception e) {
// 不是数字就原样返回 // 不是数字就原样返回
return value; return value;
} }