[1480]사의 각도 설정을 "각도"로 했을 때 발생하는 문제 - 출력물

This commit is contained in:
ysCha 2026-04-03 09:12:18 +09:00
parent f407079fb2
commit 709b1f1f15

View File

@ -1412,9 +1412,9 @@ public class EstimateService {
String classTypeName = ""; String classTypeName = "";
if ("0".equals(roofVol.getClassType())) { if ("0".equals(roofVol.getClassType())) {
classTypeName = String.format("%.2f", Double.parseDouble(StringUtils.defaultString(roofVol.getSlope(), "0"))) + ""; classTypeName = new BigDecimal(StringUtils.defaultString(roofVol.getSlope(), "0")).stripTrailingZeros().toPlainString() + "";
} else { } else {
classTypeName = String.format("%.2f", Double.parseDouble(StringUtils.defaultString(roofVol.getAngle(), "0"))) + "º"; classTypeName = new BigDecimal(StringUtils.defaultString(roofVol.getAngle(), "0")).stripTrailingZeros().toPlainString() + "º";
} }
roofVol.setClassTypeName(classTypeName); roofVol.setClassTypeName(classTypeName);
@ -1427,9 +1427,9 @@ public class EstimateService {
for (RoofResponse roof : roofList) { for (RoofResponse roof : roofList) {
String roofClassTypeName = ""; String roofClassTypeName = "";
if ("0".equals(roof.getClassType())) { if ("0".equals(roof.getClassType())) {
roofClassTypeName = String.format("%.2f", Double.parseDouble(StringUtils.defaultString(roof.getSlope(), "0"))) + ""; roofClassTypeName = new BigDecimal(StringUtils.defaultString(roof.getSlope(), "0")).stripTrailingZeros().toPlainString() + "";
} else { } else {
roofClassTypeName = String.format("%.2f", Double.parseDouble(StringUtils.defaultString(roof.getAngle(), "0"))) + "º"; roofClassTypeName = new BigDecimal(StringUtils.defaultString(roof.getAngle(), "0")).stripTrailingZeros().toPlainString() + "º";
} }
roof.setClassTypeName(roofClassTypeName); roof.setClassTypeName(roofClassTypeName);
} }