소스 정리

main
이범준 1 year ago
parent 56e415581f
commit f15db78964

@ -54,17 +54,19 @@ public class AttachedTxtParser extends LayoutParser{
dataObject.put("LINK_ENT_NM", descriptor.getLinkEnterpriseName());
}
boolean isMetaData = fileExtension.toUpperCase().equals("TXT");
String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_"));
String noExtensionName = FilenameUtils.removeExtension(fileName);
String[] fileNameSplit = noExtensionName.split(Matcher.quoteReplacement(descriptor.getFileNameSeperator()));
String crdnTiemstamp = fileNameSplit[0];
dataObject.put("CRDN_YMD", crdnTiemstamp.substring(0, 8));
dataObject.put("CRDN_TM", crdnTiemstamp.substring(8, 14));
dataObject.put("ENT_CD", fileNameSplit[1]);
dataObject.put("DEVICE_ID", fileNameSplit[2]);
dataObject.put("FILE_SN", fileNameSplit[3]);
dataObject.put("EQPMNT_CD", fileNameSplit[2]);
dataObject.put("FILE_SEQ", fileNameSplit[3]);
boolean isMetaData = fileExtension.toUpperCase().equals("TXT");
if(isMetaData) {
BufferedReader br = null;

@ -51,9 +51,11 @@ public class OnlyImageParser extends LayoutParser {
dataObject.put("LINK_ENT_NM", descriptor.getLinkEnterpriseName());
}
String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_"));
String noExtensionName = FilenameUtils.removeExtension(fileName);
dataObject.put("DEVICE_ID", fileNameSplit[0]);
String[] fileNameSplit = noExtensionName.split(Matcher.quoteReplacement(descriptor.getFileNameSeperator()));
dataObject.put("EQPMNT_CD", fileNameSplit[0]);
dataObject.put("CRDN_TIMESTAMP", fileNameSplit[1]);
dataObject.put("CRDN_YMD", fileNameSplit[1].substring(0,8));
@ -62,15 +64,15 @@ public class OnlyImageParser extends LayoutParser {
dataObject.put("VHRNO", fileNameSplit[2]);
dataObject.put("PHOTO_CNT", fileNameSplit[3]);
String photoSeq = fileNameSplit[4];
dataObject.put("PHOTO_SEQ", photoSeq);
String photoType = fileNameSplit[4];
dataObject.put("PHOTO_TYPE", photoType);
String photoSeqNm = "";
if(photoSeq.equals("1")) photoSeqNm = "입차사진";
else if(photoSeq.equals("2")) photoSeqNm = "주차사진";
else if(photoSeq.equals("3")) photoSeqNm = "위반사진";
else if(photoSeq.equals("4")) photoSeqNm = "출차사진";
dataObject.put("PHOTO_SEQ_NM", photoSeqNm);
if(photoType.equals("1")) photoSeqNm = "입차사진";
else if(photoType.equals("2")) photoSeqNm = "주차사진";
else if(photoType.equals("3")) photoSeqNm = "위반사진";
else if(photoType.equals("4")) photoSeqNm = "출차사진";
dataObject.put("PHOTO_TYPE_NM", photoSeqNm);
dataObject.put("GPS_X", fileNameSplit[5]);
@ -120,7 +122,7 @@ public class OnlyImageParser extends LayoutParser {
return true;
}
if(currentItem.number("PHOTO_SEQ").intValue() <= beforeItem.number("PHOTO_SEQ").intValue()) {
if(currentItem.number("PHOTO_TYPE").intValue() <= beforeItem.number("PHOTO_TYPE").intValue()) {
return true;
}

@ -66,7 +66,7 @@ public class SingleFileParser extends LayoutParser {
}
dataObject.put("TEXT_SIZE", CmmnUtil.substringByBytes(fileCn, 0, 7));
dataObject.put("DEVICE_ID", CmmnUtil.substringByBytes(fileCn, 8, 12));
dataObject.put("EQPMNT_CD", 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)); //도로코드(미사용)

@ -126,7 +126,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
crdn.setCrdnStdgNm(linkFileInfo.string("CRDN_STDG_NM"));
crdn.setCrdnPlc(linkFileInfo.string("CRDN_PLC"));
//linkFileInfo.string("DEVICE_ID");
//linkFileInfo.string("EQPMNT_CD");
//linkFileInfo.string("CRDN_ADDRESS");
List<File> files = new ArrayList<>();
@ -180,7 +180,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
crdn.setCrdnStdgNm(metaFileInfo.string("CRDN_STDG_NM"));
//metaFileInfo.string("LAW");
//metaFileInfo.string("DEVICE_ID");
//metaFileInfo.string("EQPMNT_CD");
List<File> files = new ArrayList<>();
for (DataObject linkFileInfo0 : linkFileInfoList) {
@ -226,7 +226,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
crdn.setMoscX(linkFileInfo.string("MOSC_X"));
crdn.setMoscY(linkFileInfo.string("MOSC_Y"));
//linkFileInfo.string("DEVICE_ID");
//linkFileInfo.string("EQPMNT_CD");
//linkFileInfo.string("PLATE_WIDTH");
//linkFileInfo.string("PLATE_HEIGHT");

@ -71,9 +71,9 @@
<th style="min-width: 80px;">파일상태</th>
<th style="min-width: 80px;">총사진갯수</th>
<th style="min-width: 80px;">파일순번</th>
<th style="min-width: 80px;">디바이스ID</th>
<th style="min-width: 80px;">장비코드</th>
<th style="min-width: 80px;">차량번호</th>
<th style="min-width: 80px;">사진시퀀스명</th>
<th style="min-width: 80px;">사진구분명</th>
<th style="min-width: 80px;">업체코드</th>
<th style="min-width: 80px;">법규</th>
<th style="min-width: 80px;">차량속도</th>
@ -105,10 +105,10 @@
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{FILE_EXTENSION}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{FILE_STATUS}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PHOTO_CNT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SN}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEVICE_ID}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SEQ}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EQPMNT_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_TYPE_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{ENT_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LAW}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CAR_VELOCITY}</td>

Loading…
Cancel
Save