아마란스 결재문서 금액 오류 수정 - 과학적 표기법(E) 정규식 누락 보완 #195
@@ -3617,9 +3617,9 @@ public class ApprovalService {
|
|||||||
long num = Math.round(((Number) value).doubleValue());
|
long num = Math.round(((Number) value).doubleValue());
|
||||||
return String.format("%,d", num);
|
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.isEmpty()) return "0";
|
||||||
if(strVal.contains(".")) {
|
if(strVal.contains(".") || strVal.contains("E") || strVal.contains("e")) {
|
||||||
long num = Math.round(Double.parseDouble(strVal));
|
long num = Math.round(Double.parseDouble(strVal));
|
||||||
return String.format("%,d", num);
|
return String.format("%,d", num);
|
||||||
}
|
}
|
||||||
@@ -3641,7 +3641,7 @@ public class ApprovalService {
|
|||||||
if(value instanceof Number) {
|
if(value instanceof Number) {
|
||||||
num = ((Number) value).doubleValue();
|
num = ((Number) value).doubleValue();
|
||||||
} else {
|
} else {
|
||||||
String strVal = value.toString().replaceAll("[^0-9.\\-]", "");
|
String strVal = value.toString().replaceAll("[^0-9.eE\\-]", "");
|
||||||
if(strVal.isEmpty()) return "0.00";
|
if(strVal.isEmpty()) return "0.00";
|
||||||
num = Double.parseDouble(strVal);
|
num = Double.parseDouble(strVal);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user