From 9cd8f1af54c30f2ebf92578f405a058444de2631 Mon Sep 17 00:00:00 2001 From: leebj Date: Mon, 11 Nov 2024 08:52:21 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=9C=EA=B8=80=20=EA=B4=80=EB=A0=A8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=ED=81=B4=EB=9E=98=EC=8A=A4=20=ED=8C=A8?= =?UTF-8?q?=ED=82=A4=EC=A7=80=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/mngt/service/bean/MsgServiceBean.java | 12 +++++------- .../cokr/xit/fims/rent/web/Rent04Controller.java | 5 +++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/cokr/xit/fims/mngt/service/bean/MsgServiceBean.java b/src/main/java/cokr/xit/fims/mngt/service/bean/MsgServiceBean.java index e4af98a7..51dfa656 100644 --- a/src/main/java/cokr/xit/fims/mngt/service/bean/MsgServiceBean.java +++ b/src/main/java/cokr/xit/fims/mngt/service/bean/MsgServiceBean.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.regex.Pattern; import javax.annotation.Resource; import javax.sql.DataSource; @@ -13,8 +12,8 @@ import org.apache.ibatis.mapping.VendorDatabaseIdProvider; import org.egovframe.rte.fdl.string.EgovStringUtil; import org.springframework.stereotype.Service; -import cokr.xit.fims.cmmn.CmmnUtil; -import cokr.xit.fims.cmmn.Hangul; +import cokr.xit.applib.AppCmmnUtil; +import cokr.xit.applib.Hangul; import cokr.xit.fims.mngt.MsgEntity; import cokr.xit.fims.mngt.MsgQuery; import cokr.xit.fims.mngt.service.MsgService; @@ -59,7 +58,7 @@ public class MsgServiceBean extends AbstractServiceBean implements MsgService { failList.add(msgEntity); continue; } - if(!CmmnUtil.isTelno(msgEntity.getCallback())) { + if(!AppCmmnUtil.isTelno(msgEntity.getCallback())) { isSuccess = false; msgEntity.setFailRsn("발신 가능한 전화번호 형식이 아님"); failList.add(msgEntity); @@ -72,7 +71,7 @@ public class MsgServiceBean extends AbstractServiceBean implements MsgService { failList.add(msgEntity); continue; } - if(!CmmnUtil.isReceivePhone(msgEntity.getPhone())) { + if(!AppCmmnUtil.isReceivePhone(msgEntity.getPhone())) { isSuccess = false; msgEntity.setFailRsn("수신 가능한 전화번호 형식이 아님"); failList.add(msgEntity); @@ -80,8 +79,7 @@ public class MsgServiceBean extends AbstractServiceBean implements MsgService { } //발송예약일시 검증 if(!ifEmpty(msgEntity.getResDate(), ()->"").equals("")) { - String regex_dt = "^\\d{4}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])([0-1][0-9]|2[0-3])([0-5][0-9])([0-5][0-9])$"; - if(!Pattern.matches(regex_dt, msgEntity.getResDate())) { + if(!AppCmmnUtil.isDateTimeDigitPattern(msgEntity.getResDate())) { isSuccess = false; msgEntity.setFailRsn("발송예약일시가 연월일시분초 형식이 아님"); failList.add(msgEntity); diff --git a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java index e27c467e..a6de48bc 100644 --- a/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java +++ b/src/main/java/cokr/xit/fims/rent/web/Rent04Controller.java @@ -24,6 +24,7 @@ import org.springframework.web.servlet.ModelAndView; import com.fasterxml.jackson.core.type.TypeReference; +import cokr.xit.applib.AppCmmnUtil; import cokr.xit.base.docs.xls.CellDef; import cokr.xit.base.docs.xls.XLSWriter; import cokr.xit.base.web.ApplicationController; @@ -197,8 +198,8 @@ public class Rent04Controller extends ApplicationController { String vhrnoColumn = resultRow.string("D"); - boolean crdnDtCheck = CmmnUtil.isDateTimePattern(crdnDtColumn); - String extractVhrno = CmmnUtil.extractCarNumber(vhrnoColumn); + boolean crdnDtCheck = AppCmmnUtil.isDateTimePattern(crdnDtColumn); + String extractVhrno = AppCmmnUtil.extractCarNumber(vhrnoColumn); String crdnDt = ""; boolean useable = false; //엑셀의 차량번호,단속일시 셀 사용 가능 여부