From e95c1065337fe0810532e9bc77478b9ebd34ba1c Mon Sep 17 00:00:00 2001 From: leebeomjun Date: Wed, 20 Sep 2023 16:40:46 +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 --- .../java/cokr/xit/fims/crdn/parsing/Eli.java | 19 ++++++ .../cokr/xit/fims/crdn/parsing/Gasan.java | 19 ++++++ .../cokr/xit/fims/crdn/parsing/HiteCom.java | 65 +++++++++++++++++++ .../java/cokr/xit/fims/crdn/parsing/Knl.java | 3 + .../xit/fims/crdn/parsing/XitRecommend.java | 62 ++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 src/main/java/cokr/xit/fims/crdn/parsing/Eli.java create mode 100644 src/main/java/cokr/xit/fims/crdn/parsing/Gasan.java create mode 100644 src/main/java/cokr/xit/fims/crdn/parsing/HiteCom.java create mode 100644 src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/Eli.java b/src/main/java/cokr/xit/fims/crdn/parsing/Eli.java new file mode 100644 index 00000000..508b36c9 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/parsing/Eli.java @@ -0,0 +1,19 @@ +package cokr.xit.fims.crdn.parsing; + +import java.nio.file.Path; +import java.util.List; +import java.util.stream.Stream; + +import cokr.xit.foundation.data.DataObject; + +public class Eli implements EquipmentEnterprise { + + @Override + public List parsing(Stream fileList) { + + //TODO: + + return null; + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/Gasan.java b/src/main/java/cokr/xit/fims/crdn/parsing/Gasan.java new file mode 100644 index 00000000..23493d40 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/parsing/Gasan.java @@ -0,0 +1,19 @@ +package cokr.xit.fims.crdn.parsing; + +import java.nio.file.Path; +import java.util.List; +import java.util.stream.Stream; + +import cokr.xit.foundation.data.DataObject; + +public class Gasan implements EquipmentEnterprise { + + @Override + public List parsing(Stream fileList) { + + //TODO: + + return null; + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/HiteCom.java b/src/main/java/cokr/xit/fims/crdn/parsing/HiteCom.java new file mode 100644 index 00000000..806e8333 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/parsing/HiteCom.java @@ -0,0 +1,65 @@ +package cokr.xit.fims.crdn.parsing; + +import java.io.File; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Stream; + +import cokr.xit.foundation.data.DataObject; + +public class HiteCom implements EquipmentEnterprise { + + @Override + public List parsing(Stream fileList) { + + List dataObjectList = new ArrayList<>(); + + fileList.forEach(item -> { + DataObject dataObject = new DataObject(); + File file = item.toFile(); + String filePath = file.getPath(); + dataObject.put("FILE_PATH", filePath); + String fileName = file.getName(); + dataObject.put("FILE_NAME", fileName); + + //TODO: + + dataObject.put("text부사이즈", ""); + dataObject.put("장비번호", ""); + dataObject.put("속도", ""); + dataObject.put("차종", ""); + dataObject.put("차로", ""); + dataObject.put("위반날짜", ""); + dataObject.put("위반시간", ""); + dataObject.put("차량번호", ""); + dataObject.put("번호판시작X", ""); + dataObject.put("번호판시작Y", ""); + dataObject.put("번호판크기W", ""); + dataObject.put("번호판크기H", ""); + dataObject.put("번호판유무", ""); + dataObject.put("위반코드", ""); + dataObject.put("위반종류", ""); + dataObject.put("정지선통과시", ""); + dataObject.put("교차로선통과시", ""); + dataObject.put("영상프레임수", ""); + dataObject.put("신호등형태", ""); + dataObject.put("진행형태", ""); + dataObject.put("신호등종류", ""); + dataObject.put("사진매수", ""); + dataObject.put("plate", ""); + dataObject.put("carNo", ""); + dataObject.put("movingImage1", ""); + dataObject.put("movingImage1", ""); + dataObject.put("movingImage1", ""); + dataObject.put("movingImage1", ""); + dataObject.put("movingImage1", ""); + dataObject.put("movingImage1", ""); + + dataObjectList.add(dataObject); + }); + + return dataObjectList; + } + +} diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/Knl.java b/src/main/java/cokr/xit/fims/crdn/parsing/Knl.java index 69f3729e..683e985b 100644 --- a/src/main/java/cokr/xit/fims/crdn/parsing/Knl.java +++ b/src/main/java/cokr/xit/fims/crdn/parsing/Knl.java @@ -10,6 +10,9 @@ public class Knl implements EquipmentEnterprise { @Override public List parsing(Stream fileList) { + + //TODO: + return null; } diff --git a/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java b/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java new file mode 100644 index 00000000..ce78f326 --- /dev/null +++ b/src/main/java/cokr/xit/fims/crdn/parsing/XitRecommend.java @@ -0,0 +1,62 @@ +package cokr.xit.fims.crdn.parsing; + +import java.nio.file.Path; +import java.util.List; +import java.util.stream.Stream; + +import cokr.xit.foundation.data.DataObject; + +public class XitRecommend implements EquipmentEnterprise{ + + @Override + public List parsing(Stream fileList) { + + + //TODO: + + + /* + 1. 연계형식: 파일 연계 + + 20101224121055000_014_001_0.TXT -> 단속정보 메타 파일 + 20101224121055000_014_001_1.JPG -> 이미지파일 1 + 20101224121055000_014_001_2.JPG -> 이미지파일 2 + 20101224121055000_014_001_3.JPG -> 이미지파일 3 + 20101224121055000_014_001_4.JPG -> 이미지파일 4 + 단속정보 메타파일 내용의 인코딩 방식 : Ansi 인코딩 + */ + + + //2. 파일 구조 + //1) 파일 명명 규칙 + // 가. 전체 길이 : 31 + // 나. 파일명 포맷 + // 연월일8 시분초6 마이크로초3 _ 업체코드3 _ 창비코드3 _ n .확장자 + + /* + 2) 메타파일내용 + 가. 단속정보 구분 : 콤마(,) + 나. 고정식 CCTV 의 TXT 파일내용 + - 차량번호,단속동명,단속장소명,법규,어린이보호구역,단속시작시간,단속종료시간 + - 어린이보호구역인 경우 + 예1) 서울11가1111,역삼동,국민은행앞,주정차위반,어린이보호구역,121010,122400 + - 어린이보호구역이 아닌 경우 + 예2) 01가1234,역삼동,국민은행앞,주정차위반,,121010,122400 + + 나. 주행형 CCTV 의 TXT 파일내용 + - 차량번호,단속동명,단속장소명,법규,어린이보호구역,단속시작시간,단속종료시간 + GPSX좌표 + GPSY좌표 + - 어린이보호구역인 경우 + 예1) 서울11가1111,역삼동,국민은행앞,주정차위반,어린이보호구역,121010,122400 + 127.482432 + 37.362931 + - 어린이보호구역이 아닌 경우 + 예2) 01가1234,역삼동,국민은행앞,주정차위반,,121010,122400 + 127.482432 + 37.362931 + */ + return null; + } + +}