소스 정리

main
이범준 1 year ago
parent a9eb6d2346
commit 926064798a

@ -39,7 +39,7 @@ public class AttachedTxtParser extends LayoutParser{
String fileName = file.getName(); String fileName = file.getName();
dataObject.put("FILE_NAME", fileName); dataObject.put("FILE_NAME", fileName);
String fileExtension = FilenameUtils.getExtension(fileName); String fileExtension = FilenameUtils.getExtension(fileName);
dataObject.put("EXTENSION", fileExtension); dataObject.put("FILE_EXTENSION", fileExtension);
boolean isMetaData = fileExtension.toUpperCase().equals("TXT"); boolean isMetaData = fileExtension.toUpperCase().equals("TXT");
String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_")); 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("CRDN_TM", crdnTiemstamp.substring(8, 14));
dataObject.put("ENT_CD", fileNameSplit[1]); dataObject.put("ENT_CD", fileNameSplit[1]);
dataObject.put("EQM_CD", fileNameSplit[2]); dataObject.put("DEVICE_ID", fileNameSplit[2]);
dataObject.put("FILE_SN", fileNameSplit[3]); dataObject.put("FILE_SN", fileNameSplit[3]);
if(isMetaData) { if(isMetaData) {
@ -61,7 +61,7 @@ public class AttachedTxtParser extends LayoutParser{
String[] lineSplit = line1.split(Matcher.quoteReplacement(",")); String[] lineSplit = line1.split(Matcher.quoteReplacement(","));
dataObject.put("VHRNO", lineSplit[0]); 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("CRDN_PLC", lineSplit[2]);
dataObject.put("LAW", lineSplit[3]); dataObject.put("LAW", lineSplit[3]);
dataObject.put("SPECIAL_AREA", lineSplit[4]); dataObject.put("SPECIAL_AREA", lineSplit[4]);
@ -84,7 +84,7 @@ public class AttachedTxtParser extends LayoutParser{
} }
} else { } else {
dataObject.put("VHRNO", ""); dataObject.put("VHRNO", "");
dataObject.put("CRDN_DONG_NM", ""); dataObject.put("CRDN_STDG_NM", "");
dataObject.put("CRDN_PLC", ""); dataObject.put("CRDN_PLC", "");
dataObject.put("LAW", ""); dataObject.put("LAW", "");
dataObject.put("SPECIAL_AREA", ""); dataObject.put("SPECIAL_AREA", "");

@ -39,16 +39,20 @@ public class OnlyImageParser extends LayoutParser {
dataObject.put("FILE_NAME", fileName); dataObject.put("FILE_NAME", fileName);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd / HH:mm:ss"); 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"); dataObject.put("FILE_SIZE", file.length()+" byte");
String extension = FilenameUtils.getExtension(fileName); String extension = FilenameUtils.getExtension(fileName);
dataObject.put("EXTENSION", extension); dataObject.put("FILE_EXTENSION", extension);
String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_")); String[] fileNameSplit = FilenameUtils.removeExtension(fileName).split(Matcher.quoteReplacement("_"));
dataObject.put("DEVICE_ID", fileNameSplit[0]); 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("VHRNO", fileNameSplit[2]);
dataObject.put("PHOTO_CNT", fileNameSplit[3]); dataObject.put("PHOTO_CNT", fileNameSplit[3]);
@ -63,14 +67,14 @@ public class OnlyImageParser extends LayoutParser {
dataObject.put("PHOTO_SEQ_NM", photoSeqNm); dataObject.put("PHOTO_SEQ_NM", photoSeqNm);
dataObject.put("LOCATION_X", fileNameSplit[5]); dataObject.put("GPS_X", fileNameSplit[5]);
dataObject.put("LOCATION_Y", fileNameSplit[6]); dataObject.put("GPS_Y", fileNameSplit[6]);
String inputSe = fileNameSplit[7]; String inputSe = fileNameSplit[7];
if(inputSe.equals("S")) inputSe = "정상등록자료"; if(inputSe.equals("S")) inputSe = "정상등록자료";
else if(inputSe.equals("E")) 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_PLC", fileNameSplit[8]);
dataObject.put("CRDN_ADDRESS", fileNameSplit[9]); dataObject.put("CRDN_ADDRESS", fileNameSplit[9]);
dataObject.put("CRDN_STDG_NM", fileNameSplit[10]); dataObject.put("CRDN_STDG_NM", fileNameSplit[10]);

@ -52,7 +52,7 @@ public class SingleFileParser extends LayoutParser {
} }
dataObject.put("TEXT_SIZE", CmmnUtil.substringByBytes(fileCn, 0, 7)); 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_VELOCITY", CmmnUtil.substringByBytes(fileCn, 13, 15).replaceAll("^0+", "")); //차량속도
dataObject.put("CAR_TYPE", CmmnUtil.substringByBytes(fileCn, 16, 16)); //차종(미사용) dataObject.put("CAR_TYPE", CmmnUtil.substringByBytes(fileCn, 16, 16)); //차종(미사용)
dataObject.put("ROAD_CD", CmmnUtil.substringByBytes(fileCn, 17, 17)); //도로코드(미사용) dataObject.put("ROAD_CD", CmmnUtil.substringByBytes(fileCn, 17, 17)); //도로코드(미사용)

@ -100,23 +100,23 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
//1. 연계파일정보를 단속 엔티티로 변환 //1. 연계파일정보를 단속 엔티티로 변환
DataObject bgngData = linkFileInfoList.stream() 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(); .orElseThrow();
DataObject endData = linkFileInfoList.stream() 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(); .orElseThrow();
crdn.setCrdnBgngTm(bgngData.string("CRDN_YMD_TM").substring(8)); crdn.setCrdnBgngTm(bgngData.string("CRDN_TM"));
crdn.setCrdnEndTm(endData.string("CRDN_YMD_TM").substring(8)); crdn.setCrdnEndTm(endData.string("CRDN_TM"));
DataObject linkFileInfo = endData; DataObject linkFileInfo = endData;
crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser()); crdn.setSggCd(globalStngMapper.selectSggCdForCurrentUser());
crdn.setVhrno(linkFileInfo.string("VHRNO")); crdn.setVhrno(linkFileInfo.string("VHRNO"));
crdn.setCrdnYmd(linkFileInfo.string("CRDN_YMD_TM").substring(0,8)); crdn.setCrdnYmd(linkFileInfo.string("CRDN_YMD"));
crdn.setCrdnTm(linkFileInfo.string("CRDN_YMD_TM").substring(8)); crdn.setCrdnTm(linkFileInfo.string("CRDN_TM"));
crdn.setGpsX(linkFileInfo.string("LOCATION_X")); crdn.setGpsX(linkFileInfo.string("GPS_X"));
crdn.setGpsY(linkFileInfo.string("LOCATION_Y")); crdn.setGpsY(linkFileInfo.string("GPS_Y"));
crdn.setCrdnStdgNm(linkFileInfo.string("CRDN_STDG_NM")); crdn.setCrdnStdgNm(linkFileInfo.string("CRDN_STDG_NM"));
crdn.setCrdnPlc(linkFileInfo.string("CRDN_PLC")); crdn.setCrdnPlc(linkFileInfo.string("CRDN_PLC"));
@ -154,7 +154,7 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
DataObject metaFileInfo = null; DataObject metaFileInfo = null;
for (DataObject linkFileInfo0 : linkFileInfoList) { for (DataObject linkFileInfo0 : linkFileInfoList) {
if(linkFileInfo0.string("EXTENSION").toUpperCase().equals("TXT")) { if(linkFileInfo0.string("FILE_EXTENSION").toUpperCase().equals("TXT")) {
metaFileInfo = linkFileInfo0; metaFileInfo = linkFileInfo0;
} }
} }
@ -174,14 +174,14 @@ public class ImportServiceBean extends AbstractServiceBean implements ImportServ
} else { } else {
crdn.setCrdnSpareaCd("00"); crdn.setCrdnSpareaCd("00");
} }
crdn.setCrdnStdgNm(metaFileInfo.string("CRDN_STDG_NM"));
//metaFileInfo.string("LAW"); //metaFileInfo.string("LAW");
//metaFileInfo.string("EQM_CD"); //metaFileInfo.string("DEVICE_ID");
//metaFileInfo.string("CRDN_DONG_NM");
List<File> files = new ArrayList<>(); List<File> files = new ArrayList<>();
for (DataObject linkFileInfo0 : linkFileInfoList) { 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"))); 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.setMoscX(linkFileInfo.string("MOSC_X"));
crdn.setMoscY(linkFileInfo.string("MOSC_Y")); crdn.setMoscY(linkFileInfo.string("MOSC_Y"));
//linkFileInfo.string("EQUIPMENT"); //linkFileInfo.string("DEVICE_ID");
//linkFileInfo.string("PLATE_WIDTH"); //linkFileInfo.string("PLATE_WIDTH");
//linkFileInfo.string("PLATE_HEIGHT"); //linkFileInfo.string("PLATE_HEIGHT");

@ -18,6 +18,19 @@
</select> </select>
</div> </div>
<div class="col-md-4"> <div class="col-md-4">
<c:if test="${taskSeCd == 'PVS' or taskSeCd == 'BPV'}">
<label for="equipmentType--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장비 구분</label>
<select id="equipmentType--${pageName}" name="equipmentType" class="form-select">
<option value="">선택</option>
<option value="고정형">고정형</option>
<option value="주행형">주행형</option>
<option value="버스장착형">버스장착형</option>
<option value="MOBILE">모바일(스마트폰)</option>
</select>
</c:if>
</div>
<div class="col-md-4 d-flex align-items-center flex-nowrap">
<label for="entType--${pageName}" <label for="entType--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장비업체</label> class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장비업체</label>
<select id="entType--${pageName}" name="entType" class="form-select"> <select id="entType--${pageName}" name="entType" class="form-select">
@ -36,19 +49,6 @@
<option value="unknown">unknown</option> <option value="unknown">unknown</option>
</c:if> </c:if>
</select> </select>
</div>
<div class="col-md-4 d-flex align-items-center flex-nowrap">
<c:if test="${taskSeCd == 'PVS' or taskSeCd == 'BPV'}">
<label for="equipmentType--${pageName}"
class="w-px-120 bg-lighter pe-2 col-form-label text-sm-end">장비 구분</label>
<select id="equipmentType--${pageName}" name="equipmentType" class="form-select">
<option value="">선택</option>
<option value="고정형">고정형</option>
<option value="주행형">주행형</option>
<option value="버스장착형">버스장착형</option>
<option value="MOBILE">모바일(스마트폰)</option>
</select>
</c:if>
<span class="d-flex justify-content-end float-end ms-auto me-4"> <span class="d-flex justify-content-end float-end ms-auto me-4">
<button type="button" id="btnSearch--${pageName}" class="btn btn-primary">조회</button> <button type="button" id="btnSearch--${pageName}" class="btn btn-primary">조회</button>
</span> </span>
@ -83,7 +83,7 @@
<div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer"> <div id="DataTables_Table_0_wrapper--${pageName}" class="dataTables_wrapper dt-bootstrap5 no-footer">
<div id="table-responsive--${pageName}" class="table-responsive" <div id="table-responsive--${pageName}" class="table-responsive"
style="overflow-x: scroll;height:560px;overflow-y: scroll;"> style="overflow-x: scroll;height:560px;overflow-y: scroll;">
<span class="ino" hidden> <span>
<table <table
class="datatables-ajax table table-bordered dataTable no-footer"> class="datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead"> <thead class="sticky-thead">
@ -94,131 +94,31 @@
파일명 <i class='bx bx-expand'></i> 파일명 <i class='bx bx-expand'></i>
</th> </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;">디바이스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;">위치좌표x</th>
<th style="min-width: 80px;">위치좌표y</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>
</tr> <th style="min-width: 80px;">파일상태</th>
</thead> <th style="min-width: 80px;">총사진갯수</th>
<tbody></tbody>
<template class="found">
<tr data-key="{FILE_NAME}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}"
title="{FILE_NAME}"
class="text-start text-truncate max-w-th">{FILE_NAME}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TIMESTAMP}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SIZE}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEVICE_ID}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_YMD_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PHOTO_CNT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{LOCATION_X}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{LOCATION_Y}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{INPUT_SE}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_ADDRESS}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_STDG_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{EXTENSION}</td>
</tr>
</template>
<template class="notFound">
<tr>
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</span>
<span class="xit" hidden>
<table
class="datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr>
<th style="min-width: 80px;">단속자료</th>
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#">
파일명 <i class='bx bx-expand'></i>
</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>
<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> <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;">위치좌표x</th>
<th style="min-width: 80px;">위치좌표y</th>
</tr>
</thead>
<tbody></tbody>
<template class="found">
<tr data-key="{FILE_NAME}">
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}"
title="{FILE_NAME}"
class="text-start text-truncate max-w-th">{FILE_NAME}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EXTENSION}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{ENT_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EQM_CD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SN}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{VHRNO}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_DONG_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LAW}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{SPECIAL_AREA}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_BGNG_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_END_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_X}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_Y}</td>
</tr>
</template>
<template class="notFound">
<tr>
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr>
</template>
</table>
</span>
<span class="hitecom" hidden>
<table
class="datatables-ajax table table-bordered dataTable no-footer">
<thead class="sticky-thead">
<tr>
<th style="min-width: 80px;">단속자료</th>
<th style="min-width: 80px;" title="더블클릭시 축소/확대 됩니다."
class="downsize" ondblclick="fnDownsizeToggle(this);" href="#">
파일명 <i class='bx bx-expand'></i>
</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;">번호판위치x</th> <th style="min-width: 80px;">번호판위치x</th>
<th style="min-width: 80px;">번호판위치y</th> <th style="min-width: 80px;">번호판위치y</th>
<th style="min-width: 80px;">번호판width</th> <th style="min-width: 80px;">번호판width</th>
<th style="min-width: 80px;">번호판height</th> <th style="min-width: 80px;">번호판height</th>
<th style="min-width: 80px;">위치좌표x</th> <th style="min-width: 80px;">위치좌표x</th>
<th style="min-width: 80px;">위치좌표y</th> <th style="min-width: 80px;">위치좌표y</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>
<th style="min-width: 80px;">단속법정동</th>
<th style="min-width: 80px;">단속장소(주소)</th>
</tr> </tr>
</thead> </thead>
<tbody></tbody> <tbody></tbody>
@ -228,23 +128,37 @@
<td onclick="{onclick}" ondblclick="{ondblclick}" <td onclick="{onclick}" ondblclick="{ondblclick}"
title="{FILE_NAME}" title="{FILE_NAME}"
class="text-start text-truncate max-w-th">{FILE_NAME}</td> class="text-start text-truncate max-w-th">{FILE_NAME}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{EQUIPMENT}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_LAST_MODIFIED}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CAR_VELOCITY}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{FILE_SIZE}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_YMD}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{FILE_EXTENSION}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_TM}</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-start">{VHRNO}</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-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>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_X}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_X}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_Y}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{MOSC_Y}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_WIDTH}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_WIDTH}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_HEIGHT}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PLATE_HEIGHT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_X}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_X}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_Y}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{GPS_Y}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-end">{PHOTO_CNT}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_YMD}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_BGNG_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{CRDN_END_TM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{SPECIAL_AREA}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_PLC}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_STDG_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{CRDN_ADDRESS}</td>
</tr> </tr>
</template> </template>
<template class="notFound"> <template class="notFound">
<tr> <tr>
<td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> <td valign="top" colspan="99" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
</table> </table>
@ -288,7 +202,6 @@ $(document).ready(function(){
keymapper : info => info ? info.FILE_NAME : "", keymapper : info => info ? info.FILE_NAME : "",
dataGetter : obj => obj["List"], dataGetter : obj => obj["List"],
formats: { formats: {
CRDN_YMD_TM : datetimeFormat,
CRDN_YMD : dateFormat, CRDN_YMD : dateFormat,
CRDN_TM : timeFormat, CRDN_TM : timeFormat,
CRDN_BGNG_TM : timeFormat, CRDN_BGNG_TM : timeFormat,
@ -320,7 +233,7 @@ $(document).ready(function(){
var dataKey = item.data.FILE_NAME; var dataKey = item.data.FILE_NAME;
if($P.entType != ""){ if($P.entType != ""){
$("#table-responsive--${pageName}").find("."+$P.entType).find("tbody").setCurrentRow(dataKey); $("#table-responsive--${pageName}").find("tbody").setCurrentRow(dataKey);
} }
if(item.data.ENT_TYPE == "hitecom"){ if(item.data.ENT_TYPE == "hitecom"){
@ -347,29 +260,9 @@ $(document).ready(function(){
/************************************************************************** /**************************************************************************
* pageObject.function * pageObject.function
**************************************************************************/ **************************************************************************/
$P.validate = () => {
if($("#entType--${pageName}").val() == ""){
dialog.alert("장비업체를 선택하세요.");
return false;
}
if($("#entType--${pageName}").val() == "unkown"
|| $("#entType--${pageName}").val() == "knl"
|| $("#entType--${pageName}").val() == "gasan"
|| $("#entType--${pageName}").val() == "elisoft"
){
dialog.alert("해당 업체 연계는 현재 준비중입니다.");
return false;
}
return true;
}
//ftp체크 //ftp체크
$P.checkFTP = () => { $P.checkFTP = () => {
if(!$P.validate()){
return;
}
ajax.post({ ajax.post({
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/importFileFromServer.do"), url : wctx.url("/${taskSeCd}/crdn/crdn05/020/importFileFromServer.do"),
@ -391,9 +284,6 @@ $(document).ready(function(){
//로컬파일업로드 //로컬파일업로드
$P.uploadLocalFile = () => { $P.uploadLocalFile = () => {
if(!$P.validate()){
return;
}
if($("#localFile--${pageName}").val() == ""){ if($("#localFile--${pageName}").val() == ""){
dialog.alert("파일이 없습니다."); dialog.alert("파일이 없습니다.");
@ -428,9 +318,6 @@ $(document).ready(function(){
$P.equipmentType = $("#equipmentType--${pageName}").val(); $P.equipmentType = $("#equipmentType--${pageName}").val();
$("#table-responsive--${pageName}").find("span").attr("hidden","hidden");
$("#table-responsive--${pageName}").find("."+$P.entType).removeAttr("hidden");
ajax.post({ ajax.post({
url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"), url : wctx.url("/${taskSeCd}/crdn/crdn05/020/list.do"),
data : { data : {
@ -449,17 +336,17 @@ $(document).ready(function(){
if(entType != ""){ if(entType != ""){
var parsedInfoList = $P.parsedInfoControl.dataset; var parsedInfoList = $P.parsedInfoControl.dataset;
var empty = parsedInfoList.empty; var empty = parsedInfoList.empty;
var notFound = [$("#table-responsive--${pageName}").find("."+entType).find("template.notFound")[0].innerHTML]; var notFound = [$("#table-responsive--${pageName}").find("template.notFound")[0].innerHTML];
var found = $("#table-responsive--${pageName}").find("."+entType).find("template.found")[0].innerHTML; var found = $("#table-responsive--${pageName}").find("template.found")[0].innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('" + dataItem.getValue("FILE_NAME") + "');"); .replace(/{onclick}/gi, "pageObject['${pageName}'].clickParsedInfoList('" + dataItem.getValue("FILE_NAME") + "');");
var trs = empty ? notFound : parsedInfoList.inStrings(found,replacer); var trs = empty ? notFound : parsedInfoList.inStrings(found,replacer);
$("#table-responsive--${pageName}").find("."+entType).find("tbody").html(trs.join()); $("#table-responsive--${pageName}").find("tbody").html(trs.join());
if(!empty){ if(!empty){
fnDownsizeCheck($("#table-responsive--${pageName}").find("."+entType).find("table")[0]); fnDownsizeCheck($("#table-responsive--${pageName}").find("table")[0]);
} }
} }
} }
@ -578,7 +465,7 @@ $(document).ready(function(){
$P.removeTableRow = (removedFileName) => { $P.removeTableRow = (removedFileName) => {
if($P.entType != ""){ if($P.entType != ""){
var fileListTable = $("#table-responsive--${pageName}").find("."+$P.entType).find("table")[0]; var fileListTable = $("#table-responsive--${pageName}").find("table")[0];
var targetArr = []; var targetArr = [];
if(Array.isArray(removedFileName)){ if(Array.isArray(removedFileName)){

Loading…
Cancel
Save