From 8cfa4c9366a9793f1747b121f227080ad6276926 Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Mon, 25 Sep 2023 13:21:19 +0900 Subject: [PATCH] =?UTF-8?q?=EC=86=8C=EC=8A=A4=20=EC=A0=95=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/fims/crdn/parsing/XitRecommend.java | 17 +++++++++-------- .../xit/fims/crdn/service/bean/CrdnBean.java | 2 +- .../crdn/service/bean/ImportServiceBean.java | 2 +- .../xit/fims/crdn/web/Crdn05Controller.java | 10 +++++----- .../WEB-INF/jsp/fims/crdn/crdn05020-info.jsp | 16 +++++++++------- 5 files changed, 25 insertions(+), 22 deletions(-) diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java b/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java index 695ece43..34003b80 100644 --- a/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java +++ b/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java @@ -38,22 +38,23 @@ public class XitRecommend implements EquipmentEnterprise{ dataObject.put("FILE_NAME", fileName); //TODO: + boolean isMetaData = FilenameUtils.getExtension(fileName).toUpperCase().equals("TXT"); + String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_")); - String[] fileNameSplit = fileName.split(Matcher.quoteReplacement("_")); - + String crdnTiemstamp = fileNameSplit[0]; + dataObject.put("CRDN_YMD", crdnTiemstamp.substring(0, 8)); + dataObject.put("CRDN_HM", crdnTiemstamp.substring(8, 14)); - //dataObject.put("", ); - //dataObject.put("", ); - //dataObject.put("", ); - //dataObject.put("", ); - //dataObject.put("", ); + dataObject.put("ENT_CD", fileNameSplit[1]); + dataObject.put("EQM_CD", fileNameSplit[2]); + dataObject.put("FILE_SN", fileNameSplit[3]); - boolean isMetaData = FilenameUtils.getExtension(fileName).toUpperCase().equals("TXT"); if(isMetaData) { BufferedReader br = null; try { br = new BufferedReader(new InputStreamReader(new FileInputStream(file),Charset.forName("EUC-KR"))); + } catch (FileNotFoundException e) { } diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java index c14b0fbd..b1ca2387 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/CrdnBean.java @@ -353,7 +353,7 @@ public class CrdnBean extends AbstractComponent { public boolean removeEquipmentLinkFile(String entType, String fileName) { boolean saved = false; - if(entType.equals("이노")) { + if(entType.equals("INO")) { try { diff --git a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java index f4e64c7a..cb9f9178 100644 --- a/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java +++ b/src/main/java/cokr/xit/fims/crdn/service/bean/ImportServiceBean.java @@ -86,7 +86,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ List fileInfoList = new ArrayList(); - if(entType.equals("이노")) { + if(entType.equals("INO")) { crdn.setCrdnInptSeCd("11"); crdn.setVltnCd("01"); diff --git a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java index 2a2c18f3..987b7883 100644 --- a/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java +++ b/src/main/java/cokr/xit/fims/crdn/web/Crdn05Controller.java @@ -124,8 +124,8 @@ public class Crdn05Controller extends ApplicationController { String entType = hReq.getParameter("entType"); EquipmentEnterprise enterprise = null; switch(entType){ - case "이노": enterprise = new Ino(); break; - case "knl": enterprise = new Knl(); break; + case "INO": enterprise = new Ino(); break; + case "KNL": enterprise = new Knl(); break; //case "": enterprise = new (); break; //case "": enterprise = new (); break; //case "": enterprise = new (); break; @@ -137,12 +137,12 @@ public class Crdn05Controller extends ApplicationController { String downloadRoot = ""; //ftp나 usb에서 다운받는 파일 경로 - if(entType.equals("이노") || entType.equals("knl")) { + if(entType.equals("INO") || entType.equals("KNL")) { //ftp G클라우드 try { - if(entType.equals("이노")) { + if(entType.equals("INO")) { //RemoteSystemInfo rs = new RemoteSystemInfo(); //rs.setIp("211.119.124.9"); @@ -157,7 +157,7 @@ public class Crdn05Controller extends ApplicationController { downloadRoot = "files"+File.separator+"tempForIno"; } - if(entType.equals("knl")) { + if(entType.equals("KNL")) { diff --git a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp index ba4c0ea8..85c1b8b0 100644 --- a/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp +++ b/src/main/webapp/WEB-INF/jsp/fims/crdn/crdn05020-info.jsp @@ -23,10 +23,11 @@ @@ -143,9 +144,9 @@ -
+
- +
@@ -214,7 +215,7 @@ $(document).ready(function(){ return; } - if($("#entType--${pageName}").val() != "KNL" && $("#entType--${pageName}").val() != "이노"){ + if($("#entType--${pageName}").val() != "KNL" && $("#entType--${pageName}").val() != "INO"){ dialog.alert("해당 과태료 업무와 관련된 장비업체가 아닙니다."); return; } @@ -243,6 +244,7 @@ $(document).ready(function(){ if($("#entType--${pageName}").val() != "가산정보통신" && $("#entType--${pageName}").val() != "엘리소프트" && $("#entType--${pageName}").val() != "하이테콤" + && $("#entType--${pageName}").val() != "XIT" ){ dialog.alert("해당 과태료 업무와 관련된 장비업체가 아닙니다."); return;