From 09c864030ee20f92e4005ff43113fc7ee1ce6c8d Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 15 Apr 2024 14:39:50 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EB=82=98=ED=81=90=EB=B8=8C=20?= =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/receive/eqpmnt/LayoutParser.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java index 97a65585..ddcfd105 100644 --- a/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java +++ b/src/main/java/cokr/xit/fims/crdn/receive/eqpmnt/LayoutParser.java @@ -12,6 +12,7 @@ import java.util.regex.Matcher; import java.util.stream.Collectors; import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; import cokr.xit.base.code.CommonCode; import cokr.xit.fims.cmmn.CodeConverter; @@ -313,6 +314,16 @@ abstract public class LayoutParser { if(!itemValue.equals("")) { //소수부 0제거 if(itemValue.contains(".")) { + + boolean end = false; + while(!end) { + String removed = StringUtils.removeEnd(itemValue, "0"); + if(removed.equals(itemValue)) { + itemValue = removed; + end = true; + } + } + itemValue = itemValue.replaceAll("0+$", ""); if(itemValue.endsWith(".")){ itemValue = itemValue + "0";