단속장비 연계 파일목록에서 단속 건 별로 구분하는 기능 추가

main
이범준 1 year ago
parent 32c458439d
commit 909a44755d

@ -16,4 +16,12 @@ public class Eli implements EquipmentEnterprise {
return null; return null;
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
//TODO:
return false;
}
} }

@ -10,4 +10,6 @@ public interface EquipmentEnterprise {
public List<DataObject> parsing(Stream<Path> fileList); public List<DataObject> parsing(Stream<Path> fileList);
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem);
} }

@ -16,4 +16,12 @@ public class Gasan implements EquipmentEnterprise {
return null; return null;
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
//TODO :
return false;
}
} }

@ -62,4 +62,9 @@ public class HiteCom implements EquipmentEnterprise {
return dataObjectList; return dataObjectList;
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
return true;
}
} }

@ -14,8 +14,12 @@ import org.apache.commons.io.FilenameUtils;
import cokr.xit.foundation.data.DataObject; import cokr.xit.foundation.data.DataObject;
public class Ino implements EquipmentEnterprise { public class Ino implements EquipmentEnterprise {
private DataObject before = new DataObject();
private int tempGroupSeq = 1;
@Override @Override
public List<DataObject> parsing(Stream<Path> fileList) { public List<DataObject> parsing(Stream<Path> fileList) {
@ -49,13 +53,16 @@ public class Ino implements EquipmentEnterprise {
dataObject.put("PHOTO_CNT", fileNameSplit[3]); dataObject.put("PHOTO_CNT", fileNameSplit[3]);
String photoSeq = fileNameSplit[4]; String photoSeq = fileNameSplit[4];
if(photoSeq.equals("1")) photoSeq = "입차사진";
else if(photoSeq.equals("2")) photoSeq = "주차사진";
else if(photoSeq.equals("3")) photoSeq = "위반사진";
else if(photoSeq.equals("4")) photoSeq = "출차사진";
dataObject.put("PHOTO_SEQ", photoSeq); dataObject.put("PHOTO_SEQ", photoSeq);
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);
dataObject.put("LOCATION_X", fileNameSplit[5]); dataObject.put("LOCATION_X", fileNameSplit[5]);
dataObject.put("LOCATION_Y", fileNameSplit[6]); dataObject.put("LOCATION_Y", fileNameSplit[6]);
@ -76,10 +83,52 @@ public class Ino implements EquipmentEnterprise {
dataObject.put("CRDN_CN", crdnCn); dataObject.put("CRDN_CN", crdnCn);
} }
if(!before.isEmpty()) {
boolean isChangeTempGroup = this.isChangeCrackdown(dataObject, before);
if(isChangeTempGroup) {
tempGroupSeq++;
}
}
dataObject.put("TEMP_GROUP_ID", tempGroupSeq);
dataObjectList.add(dataObject); dataObjectList.add(dataObject);
before = dataObject;
}); });
return dataObjectList; return dataObjectList;
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
if(!currentItem.string("DEVICE_ID").equals(beforeItem.string("DEVICE_ID"))) {
return true;
}
if(!currentItem.string("VHRNO").equals(beforeItem.string("VHRNO"))) {
return true;
}
if(currentItem.number("PHOTO_SEQ").intValue() <= beforeItem.number("PHOTO_SEQ").intValue()) {
return true;
}
SimpleDateFormat ymdTm = new SimpleDateFormat("yyyyMMddHHmmss");
try {
Date cDate = ymdTm.parse(currentItem.string("CRDN_YMD_TM"));
Date bDate = ymdTm.parse(beforeItem.string("CRDN_YMD_TM"));
long diff = Math.abs(cDate.getTime() - bDate.getTime());
if(diff >= (1000 * 60 * 60 * 24)) {
return true;
}
} catch (Exception e) {
throw new RuntimeException();
}
return false;
}
} }

@ -16,4 +16,12 @@ public class Knl implements EquipmentEnterprise {
return null; return null;
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
//TODO :
return false;
}
} }

@ -80,4 +80,11 @@ public class XitRecommend implements EquipmentEnterprise{
*/ */
} }
@Override
public boolean isChangeCrackdown(DataObject currentItem, DataObject beforeItem) {
//TODO:
return false;
}
} }

@ -90,6 +90,7 @@
</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;">단속자료</th>
<th style="min-width: 80px;">디바이스ID</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>
@ -112,11 +113,12 @@
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">{TIMESTAMP}</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">{FILE_SIZE}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{TEMP_GROUP_ID}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-center">{DEVICE_ID}</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">{CRDN_YMD_TM}</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_CNT}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_CNT}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{PHOTO_SEQ_NM}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_X}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_X}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_Y}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{LOCATION_Y}</td>
<td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{INPUT_SE}</td> <td onclick="{onclick}" ondblclick="{ondblclick}" class="text-start">{INPUT_SE}</td>
@ -128,7 +130,7 @@
</template> </template>
<template id="crdnNotFound--${pageName}"> <template id="crdnNotFound--${pageName}">
<tr> <tr>
<td valign="top" colspan="16" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td> <td valign="top" colspan="17" class="dataTables_empty text-center">정보를 찾지 못했습니다.</td>
</tr> </tr>
</template> </template>
</table> </table>
@ -141,7 +143,7 @@
<img id="img--${pageName}" src="" style="object-fit:contain;" /> <img id="img--${pageName}" src="" style="object-fit:contain;" />
</div> </div>
<div class="card my-4 px-2" style="width:100px;height:600px;"> <div class="card my-4 px-2" style="width:100px;height:600px;min-width:100px;">
<div class="d-flex my-2" style="flex-flow:column"> <div class="d-flex my-2" style="flex-flow:column">
<button type="button" class="btn btn-primary my-2">부과등록</button> <button type="button" class="btn btn-primary my-2">부과등록</button>
<button type="button" class="btn btn-primary my-2">삭제</button> <button type="button" class="btn btn-primary my-2">삭제</button>

Loading…
Cancel
Save