shjung 3 年之前
父節點
當前提交
baeecb28f3

+ 44 - 24
pom.xml

@@ -16,13 +16,6 @@
 
     <packaging>war</packaging>
 
-    <repositories>
-        <repository>
-            <id>oracle</id>
-            <url>https://maven.jahia.org/maven2</url>
-        </repository>
-    </repositories>
-
     <properties>
         <java.version>1.8</java.version>
         <swagger.version>2.9.2</swagger.version>
@@ -39,10 +32,23 @@
         <maven.compiler.target>1.8</maven.compiler.target>
         <!--main 함수가 있는 class 경로-->
         <start-class>com.its.api.ItsOpServerApplication</start-class>
-        <webapp.lib>C:\DEV\ITS\01.WINDOWS\22.01.YONGIN\JAVA\repository</webapp.lib>
+<!--        <webapp.lib>C:\DEV\ITS\01.WINDOWS\22.01.YONGIN\JAVA\repository</webapp.lib>-->
         <maven.test.skip>true</maven.test.skip>
     </properties>
 
+<!--    <repositories>-->
+<!--        <repository>-->
+<!--            <id>local-repository</id>-->
+<!--&lt;!&ndash;            <url>file://${webapp.lib}/</url>&ndash;&gt;-->
+<!--            <url>file://${basedir}/lib</url>-->
+<!--        </repository>-->
+<!--        <repository>-->
+<!--            <id>oracle</id>-->
+<!--            <name>ORACLE JDBC Repository</name>-->
+<!--            <url>http://repo.spring.io/plugins-release/</url>-->
+<!--        </repository>-->
+<!--    </repositories>-->
+
     <dependencies>
         <dependency>
             <groupId>org.fusesource.jansi</groupId>
@@ -56,6 +62,18 @@
             <optional>true</optional>
         </dependency>
 
+        <dependency>
+            <groupId>com.oracle</groupId>
+            <artifactId>ojdbc7</artifactId>
+            <version>12.1.0.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.tibero</groupId>
+            <artifactId>tibero6-jdbc</artifactId>
+            <version>14</version>
+        </dependency>
+
         <dependency>
             <groupId>commons-io</groupId>
             <artifactId>commons-io</artifactId>
@@ -80,22 +98,6 @@
             <version>${swagger.version}</version>
         </dependency>
 
-        <dependency>
-            <groupId>com.oracle</groupId>
-            <artifactId>ojdbc7</artifactId>
-            <version>12.1.0.2</version>
-            <scope>system</scope>
-            <systemPath>${webapp.lib}/ojdbc7-12.1.0.2.jar</systemPath>
-        </dependency>
-
-        <dependency>
-            <groupId>tibero6</groupId>
-            <artifactId>tibero6-jdbc</artifactId>
-            <version>1.0.0</version>
-            <scope>system</scope>
-            <systemPath>${webapp.lib}/tibero6-jdbc-14.jar</systemPath>
-        </dependency>
-
         <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
@@ -336,6 +338,24 @@
                     <includeSystemScope>true</includeSystemScope>
                 </configuration>
             </plugin>
+
+<!--            <plugin>-->
+<!--                <groupId>org.apache.maven.plugins</groupId>-->
+<!--                <artifactId>maven-war-plugin</artifactId>-->
+<!--                <configuration>-->
+<!--                    <webResources>-->
+<!--                        <resource>-->
+<!--                            <directory>${webapp.lib}/</directory>-->
+<!--                            <targetPath>WEB-INF/lib</targetPath>-->
+<!--                            <includes>-->
+<!--                                <include>**/ojdbc7-12.1.0.2.jar</include>-->
+<!--                                <include>**/tibero6-jdbc-14.jar</include>-->
+<!--                            </includes>-->
+<!--                        </resource>-->
+<!--                    </webResources>-->
+<!--                </configuration>-->
+<!--            </plugin>-->
+
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>

+ 11 - 10
src/main/java/com/its/api/its/model/dto/vms/TbVmsDsplPrstDto.java

@@ -89,6 +89,15 @@ public class TbVmsDsplPrstDto implements Serializable {
     @JsonProperty("miss_stts_yn")
     private String missSttsYn;
 
+    @ApiModelProperty("함체 온도")  // Y NUMBER(3)
+    @JsonProperty("cbox_tmpr")
+    private Integer cboxTmpr;
+
+    @ApiModelProperty("휘도값")  // Y NUMBER(3)
+    @JsonProperty("brgh_val")
+    private Integer brghVal;
+
+
     // 표출메시지 목록
     @ApiModelProperty("VMS 표출메시지 목록")
     @JsonProperty("msgs")
@@ -119,14 +128,6 @@ public class TbVmsDsplPrstDto implements Serializable {
 //    @JsonProperty("hetr_stts_cd")
 //    private String hetrSttsCd;
 //
-//    @ApiModelProperty("함체 온도")  // Y NUMBER(3)
-//    @JsonProperty("cbox_tmpr")
-//    private Integer cboxTmpr;
-//
-//    @ApiModelProperty("휘도값")  // Y NUMBER(3)
-//    @JsonProperty("brgh_val")
-//    private Integer brghVal;
-
 //    @ApiModelProperty("PHASE")  // N NUMBER(2)
 //    @JsonProperty("phase")
 //    private Integer phase;
@@ -248,8 +249,8 @@ public class TbVmsDsplPrstDto implements Serializable {
 //            this.cboxDoorSttsCd = stts.getCboxDoorSttsCd();
 //            this.fanSttsCd = stts.getFanSttsCd();
 //            this.hetrSttsCd = stts.getHetrSttsCd();
-//            this.cboxTmpr = stts.getCboxTmpr();
-//            this.brghVal = stts.getBrghVal();
+            this.cboxTmpr = stts.getCboxTmpr();
+            this.brghVal = stts.getBrghVal();
         }
     }
 

+ 2 - 0
src/main/java/com/its/api/its/model/entity/vms/TbVmsCtlr.java

@@ -339,6 +339,7 @@ public class TbVmsCtlr implements Serializable {
             dto.setCboxDoorSttsCd(this.state.getCboxdoorOpenSttsCd());
             dto.setModlSttsCd(this.state.getCboxfanSttsCd());
             dto.setCboxTmpr(this.state.getCboxTmpr());
+            dto.setBrghVal(this.state.getCboxHmdt());
             dto.setModlStts(this.state.getModlStts());
             dto.setPwerStts(this.state.getPwerStts());
         }
@@ -349,6 +350,7 @@ public class TbVmsCtlr implements Serializable {
             dto.setFanSttsDesc(CodeManager.STTS_UNKNOWN);        // 팬상태
             dto.setHetrSttsDesc(CodeManager.STTS_UNKNOWN);       // 히터상태
             dto.setCboxTmpr(255);
+            dto.setBrghVal(255);
         }
 
         dto.setMissSttsYn(ItsUtils.getMissSttsYn(dto.getUpdtDt()));

+ 10 - 1
src/main/java/com/its/api/webapp/config/WebConfig.java

@@ -2,6 +2,7 @@ package com.its.api.webapp.config;
 
 import org.springframework.context.annotation.Configuration;
 import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
 
 @Configuration
@@ -17,5 +18,13 @@ public class WebConfig implements WebMvcConfigurer {
                 .maxAge(3600)                                   //브라우저 캐시 시간(단위: 초) : "3600" 이면 최소 1시간 안에는 서버로 재요청 되지 않음
         ;
     }
-
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        String separator = System.getProperty("file.separator");
+        String mapDataDir = System.getProperty("user.dir")+separator+"MAPDATA/";
+        registry.addResourceHandler("/MAPDATA/**")
+                .addResourceLocations("file:///" + mapDataDir)
+                //.setCachePeriod(60) // seconds
+        ;
+    }
 }

+ 2 - 8
src/main/resources/application.yml

@@ -24,19 +24,13 @@ server:
       enabled: true
     include-exception: false
     include-stacktrace: never
+  resources:
+    static-locations: file:src/main/resources/static/
 
 spring:
   output:
     ansi:
       enabled: always
-  resources:
-    static-locations: file:src/main/resources/static/
-
-  mvc:
-    #static-path-pattern: /static/**
-    view:
-      prefix: /WEB-INF/jsp/
-      suffix: .jsp
 
   servlet:
     context-path: /

+ 6 - 3
src/main/resources/static/js/vworld/map-config.js

@@ -1,6 +1,9 @@
-const _normalUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Base/{z}/{x}/{y}.png";
-const _satelliteUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Satellite/{z}/{x}/{y}.jpeg";
-const _hybridUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Hybrid/{z}/{x}/{y}.png";
+// const _normalUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Base/{z}/{x}/{y}.png";
+// const _satelliteUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Satellite/{z}/{x}/{y}.jpeg";
+// const _hybridUrl = "http://115.91.94.42:8080/MAPDATA/YONGIN/Hybrid/{z}/{x}/{y}.png";
+const _normalUrl = "/MAPDATA/YONGIN/Base/{z}/{x}/{y}.png";
+const _satelliteUrl = "/MAPDATA/YONGIN/Satellite/{z}/{x}/{y}.jpeg";
+const _hybridUrl = "/MAPDATA/YONGIN/Hybrid/{z}/{x}/{y}.png";
 
 export class TMapConfig {
     constructor() {

+ 0 - 75
src/main/resources/static/js/websocket/websocket with stomp.js

@@ -1,75 +0,0 @@
-const _websocketUrl = "http://localhost:8999";
-//const sockJs = new SockJS("http://" + window.location.hostname + ":8999/ws/register.do");
-//const sockJs = new SockJS("http://" + window.location.hostname + ":8999/ws/register.do", null, { transports: ["websocket", "xhr-streaming", "xhr-polling"] });
-
-export class TWebSocket {
-    constructor(clientType, recvFunc, disconnectFunc, errorFunc, connectFunc) {
-        this.clientType = clientType;
-        this.recvFunc = new Array();
-        this.recvFunc.push(recvFunc);
-        this.disconnectFunc = disconnectFunc;
-        this.errorFunc = errorFunc;
-        this.connectFunc = connectFunc;
-        this.sockJs = null;
-        this.connected = false;
-    }
-
-    connect() {
-        console.log(`${this.clientType}: Websocket try connect`);
-
-        const socket = new SockJS(_websocketUrl + "/ws/connect.do");
-        this.sockJs = Stomp.over(socket);
-        this.sockJs.connect(
-            {}, // headers
-            () => {
-                // connected
-                this.connected = true;
-                console.log(`${this.clientType}: Websocket onConnected`);
-
-                this.sockJs.subscribe(_websocketUrl + "/ws/messages.do", (payload) => {
-                    // received
-                    const recvMessage = JSON.parse(payload.body);
-                    console.log(`${this.clientType}: Websocket onMessageReceived, `, payload);
-                    console.log(`${this.clientType}: Websocket onMessageReceived, `, recvMessage);
-                    this.recvFunc.forEach((func) => {
-                        if (func) {
-                            func(this.clientType, recvMessage);
-                        }
-                    });
-                });
-
-                if (this.connectFunc) {
-                    this.connectFunc();
-                }
-
-                this.sendMessage("clientType", "connected");
-            },
-            (error) => {
-                // errors
-                this.connected = false;
-                console.error(`${this.clientType}: Websocket onError: `, error);
-                this.disconnect();
-                if (this.disconnectFunc) {
-                    this.disconnectFunc();
-                }
-            }
-        );
-    }
-
-    disconnect() {
-        if (this.sockJs) {
-            this.sockJs.disconnect();
-        }
-        this.connected = false;
-        console.log(`${this.clientType}: Websocket disconnect`);
-    }
-
-    sendMessage(ACommand, AMessage) {
-        if (this.sockJs) {
-            const sendMessage = JSON.stringify({ command: ACommand, message: AMessage });
-            this.sockJs.send(_websocketUrl + "/ws/request.do", {}, sendMessage);
-        } else {
-            console.error(`${this.clientType}: Websocket already closed`);
-        }
-    }
-}

二進制
src/main/webapp/WEB-INF/lib/ojdbc7-12.1.0.2.jar


二進制
src/main/webapp/WEB-INF/lib/tibero6-jdbc-1.0.0.jar