아마란스 결재문서 금액 오류 수정 - 과학적 표기법(E) 정규식 누락 보완 #195

Merged
hjjeong merged 1 commits from V20260210 into main 2026-04-01 01:49:12 +00:00

View File

@@ -3617,9 +3617,9 @@ public class ApprovalService {
long num = Math.round(((Number) value).doubleValue());
return String.format("%,d", num);
}
String strVal = value.toString().replaceAll("[^0-9.\\-]", "");
String strVal = value.toString().replaceAll("[^0-9.eE\\-]", "");
if(strVal.isEmpty()) return "0";
if(strVal.contains(".")) {
if(strVal.contains(".") || strVal.contains("E") || strVal.contains("e")) {
long num = Math.round(Double.parseDouble(strVal));
return String.format("%,d", num);
}
@@ -3641,7 +3641,7 @@ public class ApprovalService {
if(value instanceof Number) {
num = ((Number) value).doubleValue();
} else {
String strVal = value.toString().replaceAll("[^0-9.\\-]", "");
String strVal = value.toString().replaceAll("[^0-9.eE\\-]", "");
if(strVal.isEmpty()) return "0.00";
num = Double.parseDouble(strVal);
}