diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/AttachedTxtParser.java b/src/main/java/cokr/xit/fims/crdn/parsing/AttachedTxtParser.java index b35cc726..6372ea4b 100644 --- a/src/main/java/cokr/xit/fims/crdn/parsing/AttachedTxtParser.java +++ b/src/main/java/cokr/xit/fims/crdn/parsing/AttachedTxtParser.java @@ -39,7 +39,7 @@ public class AttachedTxtParser extends LayoutParser{ String fileName = file.getName(); dataObject.put("FILE_NAME", fileName); String fileExtension = FilenameUtils.getExtension(fileName); - dataObject.put("EXTENSION", fileExtension); + dataObject.put("FILE_EXTENSION", fileExtension); boolean isMetaData = fileExtension.toUpperCase().equals("TXT"); String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_")); @@ -49,7 +49,7 @@ public class AttachedTxtParser extends LayoutParser{ dataObject.put("CRDN_TM", crdnTiemstamp.substring(8, 14)); dataObject.put("ENT_CD", fileNameSplit[1]); - dataObject.put("EQM_CD", fileNameSplit[2]); + dataObject.put("DEVICE_ID", fileNameSplit[2]); dataObject.put("FILE_SN", fileNameSplit[3]); if(isMetaData) { @@ -61,7 +61,7 @@ public class AttachedTxtParser extends LayoutParser{ String[] lineSplit = line1.split(Matcher.quoteReplacement(",")); dataObject.put("VHRNO", lineSplit[0]); - dataObject.put("CRDN_DONG_NM", lineSplit[1]); + dataObject.put("CRDN_STDG_NM", lineSplit[1]); dataObject.put("CRDN_PLC", lineSplit[2]); dataObject.put("LAW", lineSplit[3]); dataObject.put("SPECIAL_AREA", lineSplit[4]); @@ -84,7 +84,7 @@ public class AttachedTxtParser extends LayoutParser{ } } else { dataObject.put("VHRNO", ""); - dataObject.put("CRDN_DONG_NM", ""); + dataObject.put("CRDN_STDG_NM", ""); dataObject.put("CRDN_PLC", ""); dataObject.put("LAW", ""); dataObject.put("SPECIAL_AREA", ""); diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/OnlyImageParser.java b/src/main/java/cokr/xit/fims/crdn/parsing/OnlyImageParser.java index 4c8e6f0e..af379558 100644 --- a/src/main/java/cokr/xit/fims/crdn/parsing/OnlyImageParser.java +++ b/src/main/java/cokr/xit/fims/crdn/parsing/OnlyImageParser.java @@ -39,16 +39,20 @@ public class OnlyImageParser extends LayoutParser { dataObject.put("FILE_NAME", fileName); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd / HH:mm:ss"); - dataObject.put("TIMESTAMP", sdf.format(new Date(file.lastModified()))); + dataObject.put("FILE_LAST_MODIFIED", sdf.format(new Date(file.lastModified()))); dataObject.put("FILE_SIZE", file.length()+" byte"); String extension = FilenameUtils.getExtension(fileName); - dataObject.put("EXTENSION", extension); + dataObject.put("FILE_EXTENSION", extension); String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_")); dataObject.put("DEVICE_ID", fileNameSplit[0]); - dataObject.put("CRDN_YMD_TM", fileNameSplit[1]); + dataObject.put("CRDN_TIMESTAMP", fileNameSplit[1]); + + dataObject.put("CRDN_YMD", fileNameSplit[1].substring(0,8)); + dataObject.put("CRDN_TM", fileNameSplit[1].substring(8,14)); + dataObject.put("VHRNO", fileNameSplit[2]); dataObject.put("PHOTO_CNT", fileNameSplit[3]); @@ -63,14 +67,14 @@ public class OnlyImageParser extends LayoutParser { dataObject.put("PHOTO_SEQ_NM", photoSeqNm); - dataObject.put("LOCATION_X", fileNameSplit[5]); - dataObject.put("LOCATION_Y", fileNameSplit[6]); + dataObject.put("GPS_X", fileNameSplit[5]); + dataObject.put("GPS_Y", fileNameSplit[6]); String inputSe = fileNameSplit[7]; if(inputSe.equals("S")) inputSe = "정상등록자료"; else if(inputSe.equals("E")) inputSe = "삭제자료"; - dataObject.put("INPUT_SE", inputSe); + dataObject.put("FILE_STATUS", inputSe); dataObject.put("CRDN_PLC", fileNameSplit[8]); dataObject.put("CRDN_ADDRESS", fileNameSplit[9]); dataObject.put("CRDN_STDG_NM", fileNameSplit[10]); diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/SingleFileParser.java b/src/main/java/cokr/xit/fims/crdn/parsing/SingleFileParser.java index 5950aab1..a04a60e5 100644 --- a/src/main/java/cokr/xit/fims/crdn/parsing/SingleFileParser.java +++ b/src/main/java/cokr/xit/fims/crdn/parsing/SingleFileParser.java @@ -52,7 +52,7 @@ public class SingleFileParser extends LayoutParser { } dataObject.put("TEXT_SIZE", CmmnUtil.substringByBytes(fileCn, 0, 7)); - dataObject.put("EQUIPMENT", CmmnUtil.substringByBytes(fileCn, 8, 12)); + dataObject.put("DEVICE_ID", CmmnUtil.substringByBytes(fileCn, 8, 12)); dataObject.put("CAR_VELOCITY", CmmnUtil.substringByBytes(fileCn, 13, 15).replaceAll("^0+", "")); //차량속도 dataObject.put("CAR_TYPE", CmmnUtil.substringByBytes(fileCn, 16, 16)); //차종(미사용) dataObject.put("ROAD_CD", CmmnUtil.substringByBytes(fileCn, 17, 17)); //도로코드(미사용) 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 737e4b7d..298c1e24 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 @@ -100,23 +100,23 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ //1. 연계파일정보를 단속 엔티티로 변환 DataObject bgngData = linkFileInfoList.stream() - .min(Comparator.comparing(item -> new BigInteger(item.string("CRDN_YMD_TM")))) + .min(Comparator.comparing(item -> new BigInteger(item.string("CRDN_TIMESTAMP")))) .orElseThrow(); DataObject endData = linkFileInfoList.stream() - .max(Comparator.comparing(item -> new BigInteger(item.string("CRDN_YMD_TM")))) + .max(Comparator.comparing(item -> new BigInteger(item.string("CRDN_TIMESTAMP")))) .orElseThrow(); - crdn.setCrdnBgngTm(bgngData.string("CRDN_YMD_TM").substring(8)); - crdn.setCrdnEndTm(endData.string("CRDN_YMD_TM").substring(8)); + crdn.setCrdnBgngTm(bgngData.string("CRDN_TM")); + crdn.setCrdnEndTm(endData.string("CRDN_TM")); DataObject linkFileInfo = endData; crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); crdn.setVhrno(linkFileInfo.string("VHRNO")); - crdn.setCrdnYmd(linkFileInfo.string("CRDN_YMD_TM").substring(0,8)); - crdn.setCrdnTm(linkFileInfo.string("CRDN_YMD_TM").substring(8)); - crdn.setGpsX(linkFileInfo.string("LOCATION_X")); - crdn.setGpsY(linkFileInfo.string("LOCATION_Y")); + crdn.setCrdnYmd(linkFileInfo.string("CRDN_YMD")); + crdn.setCrdnTm(linkFileInfo.string("CRDN_TM")); + crdn.setGpsX(linkFileInfo.string("GPS_X")); + crdn.setGpsY(linkFileInfo.string("GPS_Y")); crdn.setCrdnStdgNm(linkFileInfo.string("CRDN_STDG_NM")); crdn.setCrdnPlc(linkFileInfo.string("CRDN_PLC")); @@ -154,7 +154,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ DataObject metaFileInfo = null; for (DataObject linkFileInfo0 : linkFileInfoList) { - if(linkFileInfo0.string("EXTENSION").toUpperCase().equals("TXT")) { + if(linkFileInfo0.string("FILE_EXTENSION").toUpperCase().equals("TXT")) { metaFileInfo = linkFileInfo0; } } @@ -174,14 +174,14 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ } else { crdn.setCrdnSpareaCd("00"); } + crdn.setCrdnStdgNm(metaFileInfo.string("CRDN_STDG_NM")); //metaFileInfo.string("LAW"); - //metaFileInfo.string("EQM_CD"); - //metaFileInfo.string("CRDN_DONG_NM"); + //metaFileInfo.string("DEVICE_ID"); List files = new ArrayList<>(); for (DataObject linkFileInfo0 : linkFileInfoList) { - if(!linkFileInfo0.string("EXTENSION").toUpperCase().equals("TXT")) { + if(!linkFileInfo0.string("FILE_EXTENSION").toUpperCase().equals("TXT")) { files.add(new File(linkFileInfo0.string("FILE_PATH"))); } } @@ -217,7 +217,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ crdn.setMoscX(linkFileInfo.string("MOSC_X")); crdn.setMoscY(linkFileInfo.string("MOSC_Y")); - //linkFileInfo.string("EQUIPMENT"); + //linkFileInfo.string("DEVICE_ID"); //linkFileInfo.string("PLATE_WIDTH"); //linkFileInfo.string("PLATE_HEIGHT"); 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 d1d5a09c..fef8f0de 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 @@ -18,6 +18,19 @@
+ + + + +
+
-
-
- - - - @@ -83,7 +83,7 @@