Przeglądaj źródła

update 2025-09-16

junggilpark 1 miesiąc temu
rodzic
commit
e38f6f52ad

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

@@ -129,8 +129,8 @@ spring:
   datasource:
     hikari:
       driver-class-name: oracle.jdbc.OracleDriver
-#      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1522:HANTE19C
-      jdbc-url: jdbc:oracle:thin:@192.168.20.99:1522:HANTE19C
+      jdbc-url: jdbc:oracle:thin:@115.91.94.42:1522:HANTE19C
+#      jdbc-url: jdbc:oracle:thin:@192.168.20.99:1522:HANTE19C
       username: ptatms
       password: ptatms
   jpa:

+ 0 - 1
src/main/resources/static/application/op/09.cros/01.system/02.camera-monitoring/camera-monitoring.js

@@ -133,7 +133,6 @@ function recvCameraData(jsonData, data){
             box.empty();
             const obj = map.get(ii);
             if (obj) {
-                console.debug(map.get(ii));
                 const cctvInfo = {
                     ID : obj.cmra_id,
                     NAME : obj.istl_lctn,

+ 1 - 1
src/main/resources/static/application/op/09.cros/01.system/03.analysis-monitoring/analysis-monitoring.html

@@ -10,7 +10,7 @@
     <link rel="stylesheet" href="/libs/video-7.10.2/video-7.10.2.css"> -->
     <script src="./analysis-monitoring.js" type="module"></script>
     <link rel="stylesheet" href="./analysis-monitoring.css">
-    <script src="/libs/include-web-rtc.js"></script>
+<!--    <script src="/libs/include-web-rtc.js"></script>-->
     <title>분석 교통량 모니터링</title>
 </head>
 <body class="dx-viewport">

+ 35 - 6
src/main/resources/static/application/op/09.cros/01.system/03.analysis-monitoring/analysis-monitoring.js

@@ -9,6 +9,7 @@ const _videoMap  = new Map();
 const _drctMap   = new Map();
 const _cameraUri = '/api/scrs/tb_sc_ixr_cmra_mngm';
 let lange        = 0;
+const _iceServerMap = new Map();
 
 const _tfvlSeries   = [{
     data : [{
@@ -233,9 +234,6 @@ function drawChart(id, type, xAxis, series, tooltip, name, unit){
             },
             tickInterval: 100,
         },
-        tooltip: {
-            shared: true,
-        },
         legend: {
             layout: 'vertical',
             align: 'right',
@@ -271,6 +269,7 @@ function drawChart(id, type, xAxis, series, tooltip, name, unit){
             enabled: false
         },
         tooltip: {
+            shared: true,
             formatter: function () {
                 return tooltip(this, name, unit);
             }
@@ -303,6 +302,13 @@ function getTooltip(obj, name, unit){
  * 필요 데이터 호출
  */
 function fetchBaseData() {
+    getDataAsync('/api/database/strm_ice_svr',(rec)=>{
+       if (rec && rec.length) {
+            rec.forEach((obj)=>{
+               _iceServerMap.set(obj.svr_ip, obj);
+            })
+        }
+    })
     getDataAsync(_codeUrl + '/DRCT', recvCdData);
     getDataAsync(_ixrUri, recvListData);
 }
@@ -346,11 +352,34 @@ function recvListData(jsonData){
  * @param {*} data 교차로 데이터
  */
 function listDblClick(data){
+    const videoBox = $('.video-box');
     if (data) {
         $('.list-title').text(' - ' + data.desc);
-        $('.video-box').empty();
-        $('.video-box').append($('<video id="video" autoplay playsinline muted></video>'))
-        webRtcConnector(data, $('.video-box'), 'video', false);
+        videoBox.empty();
+        videoBox.append($('<video id="video" autoplay playsinline muted></video>'))
+        // webRtcConnector(data, $('.video-box'), 'video', false);
+         const localIceInfo = _iceServerMap.get(data.rtc_svr_ip);
+        if (localIceInfo) {
+            const {svr_prot, svr_ip, svr_port, svr_pswd, svr_id} = localIceInfo;
+            const iceServer = svr_prot + ":" + svr_ip + ":" + svr_port;
+            const cctvInfo = {
+                ID : data.cmra_id,
+                NAME : data.istl_lctn,
+                local_ice_id : svr_id,
+                local_ice_pswd : svr_pswd,
+                local_ice_svr : iceServer,
+                rtc_id : data.rtc_id,
+                rtc_svr_ip : data.rtc_svr_ip,
+                rtc_svr_port : data. rtc_svr_port
+            }
+            const infoStr = encodeURIComponent(JSON.stringify(cctvInfo));
+            videoBox.empty();
+            videoBox.append($(`<div id="video" style="width:100%; height:100%;">
+                            <iframe width="100%" height="100%" src="/application/op/99.common/video.html?info=${infoStr}"></iframe>
+                      </div>`));
+        }
+
+
         let now = new Date();
         let fromDt = getSendDate(now).substring(0,8) + '000000';
         let toDt = getSendDate(now).substring(0,8) + '235959';