diff --git a/public/application/img/sensor.png b/public/application/img/sensor.png new file mode 100644 index 0000000000000000000000000000000000000000..1fd7e9ce5977bb8ae9a722b4f3afa3ade3857e84 Binary files /dev/null and b/public/application/img/sensor.png differ diff --git a/public/application/index.html b/public/application/index.html index c764e5294d55a676ca1c894c7a6ad59b6e77d9f5..764905b76d8deca1fa5169a91096fe1e470a9f04 100644 --- a/public/application/index.html +++ b/public/application/index.html @@ -39,7 +39,25 @@ Back to main page
+
Utility Network
+
+ + +
+
+ + +
+
Building
- - -
- - + +

-
+ + + @@ -106,9 +116,13 @@ - + + + + + diff --git a/public/application/js/cesium_00_Main.js b/public/application/js/cesium_00_Main.js index f76a03ad8f842f313056bdcd7014c6325334b983..366d081ac40c5a0403eb97da30e1f1488818fd15 100644 --- a/public/application/js/cesium_00_Main.js +++ b/public/application/js/cesium_00_Main.js @@ -413,4 +413,5 @@ $("#util_nw_point").change(function () { utility_Point_Entities[i].label.show = false; } } -}); \ No newline at end of file +}); + diff --git a/public/application/js/cesium_mouse_handling.js b/public/application/js/cesium_mouse_handling.js new file mode 100644 index 0000000000000000000000000000000000000000..83d0fbc499a4e1069e5027ed0b2f40800f66d44b --- /dev/null +++ b/public/application/js/cesium_mouse_handling.js @@ -0,0 +1,219 @@ +const highlighted = { + feature: undefined, + originalColor: new Cesium.Color(), +}; + +// HTML overlay for showing feature name on mouseover +const nameOverlay = document.createElement("div"); +viewer.container.appendChild(nameOverlay); +nameOverlay.className = "backdrop"; +nameOverlay.style.display = "none"; +nameOverlay.style.position = "absolute"; +nameOverlay.style.bottom = "0"; +nameOverlay.style.left = "0"; +nameOverlay.style["pointer-events"] = "none"; +nameOverlay.style.padding = "4px"; +nameOverlay.style.backgroundColor = "#f0f6fb"; +// nameOverlay.style.Color = "white!important"; + +// Information about the currently selected feature +const selected = { + feature: undefined, + originalColor: new Cesium.Color(), +}; + +// An entity object which will hold info about the currently selected feature for infobox display +const selectedEntity = new Cesium.Entity(); + +// Get default left click handler for when a feature is not picked on left click +const clickHandler = viewer.screenSpaceEventHandler.getInputAction( + Cesium.ScreenSpaceEventType.LEFT_CLICK +); + +// Color a feature yellow on hover. +// viewer.screenSpaceEventHandler.setInputAction(function onMouseMove( +// movement +// ) { +// // If a feature was previously highlighted, undo the highlight +// if (Cesium.defined(highlighted.feature)) { +// highlighted.feature.color = highlighted.originalColor; +// highlighted.feature = undefined; +// } +// // Pick a new feature +// const pickedFeature = viewer.scene.pick(movement.endPosition); +// if (!Cesium.defined(pickedFeature)) { +// nameOverlay.style.display = "none"; +// return; +// } +// // A feature was picked, so show it's overlay content +// nameOverlay.style.display = "block"; +// nameOverlay.style.bottom = `${viewer.canvas.clientHeight - movement.endPosition.y}px`; +// nameOverlay.style.left = `${movement.endPosition.x}px`; +// let building_gml_id = pickedFeature.getProperty("gml_id"); +// let building_gml_parent_id = pickedFeature.getProperty("gml_parent_id"); +// nameOverlay.innerHTML = ` +// 3D Building Model
+// GML ID: ${building_gml_id}
+// GML Parent ID: ${building_gml_parent_id} +// `; +// // Highlight the feature if it's not already selected. +// if (pickedFeature !== selected.feature) { +// highlighted.feature = pickedFeature; +// Cesium.Color.clone( +// pickedFeature.color, +// highlighted.originalColor +// ); +// pickedFeature.color = Cesium.Color.YELLOW; +// } +// }, +// Cesium.ScreenSpaceEventType.MOUSE_MOVE); + +// Color a feature on selection and show metadata in the InfoBox. +viewer.screenSpaceEventHandler.setInputAction(function onLeftClick( + movement + ) { + // If a feature was previously selected, undo the highlight + if (Cesium.defined(selected.feature)) { + selected.feature.color = selected.originalColor; + selected.feature = undefined; + $("#attribute-table-area").html("") // refresh the attribute table area + $("#chart_intro").hide() // hide chart title + + } + // Pick a new feature + const pickedFeature = viewer.scene.pick(movement.position); + if (!Cesium.defined(pickedFeature)) { + clickHandler(movement); + return; + } + // Select the feature if it's not already selected + if (selected.feature === pickedFeature) { + return; + } + selected.feature = pickedFeature; + last_picked_3DTiles = pickedFeature; + + //check if it is [3D Tile building] else [Pipe]. + if (!pickedFeature.id) { + var all_selected_property_names = last_picked_3DTiles.getPropertyNames(); + + // Save the selected feature's original color + if (pickedFeature === highlighted.feature) { + Cesium.Color.clone( + highlighted.originalColor, + selected.originalColor + ); + highlighted.feature = undefined; + } else { + Cesium.Color.clone(pickedFeature.color, selected.originalColor); + } + // Highlight newly selected feature + pickedFeature.color = Cesium.Color.LIME; + // Set feature infobox description + const featureName = pickedFeature.getProperty("name"); + selectedEntity.name = featureName; + attribute_text = `` + for (let index = 0; index < all_selected_property_names.length; index++) { + const property_name = all_selected_property_names[index]; + if (pickedFeature.getProperty(property_name) !== null) { + attribute_text += `${property_name}${pickedFeature.getProperty(property_name)}` + } + } + table_attribute_html = ` +
Attribute Table
+ + + ${attribute_text} + +
+ ` + $("#attribute-table-area").html(table_attribute_html) + } else { + + // This case, if users click on the PIPE station + + + // console.log("This is PIPE") + // This case is true when the click feature is PIPE! + var pipe_id = pickedFeature.id.name + var current_pipe_STA_URL = `http://193.196.138.56/iqg4icity_sensor/v1.1/MultiDatastreams(${pipe_sta_map[pipe_id]})/Observations?$orderby=phenomenonTime%20desc` + $("#attribute-table-area").html(` + PIPE: ${pipe_id}
+ STA Multistream ID: ${pipe_sta_map[pipe_id]}
+ STA URL: ${current_pipe_STA_URL} + `) + get_STA_Observation_Value(current_pipe_STA_URL, function (sta_result) { + if (sta_result) { + console.log("STA result return successfully...") + console.log("Drawing Chart...") + var sta_result_time_iso = [] + var sta_result_observation_total_energy = [] + var sta_result_observation_power = [] + var sta_result_observation_vorlauf = [] + var sta_result_observation_ruecklauf = [] + for (let index = 0; index < sta_result.length; index++) { + // example + // [ + // { + // "@iot.id": 451441, + // "phenomenonTime": "2022-07-21T14:30:00.000Z", + // "result": [ + // 129347, Total energy kWh + // 4.6, Power kW + // 73.3, Vorlauf - degree Celsius + // 68.4 Ruecklauf - degree Celsius + // ], + // "resultTime": null, + // "@iot.selfLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)", + // "FeatureOfInterest@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/FeatureOfInterest", + // "MultiDatastream@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/MultiDatastream", + // "Datastream@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/Datastream" + // }, + // ... + // ] + try { + const sta_result_value = sta_result[sta_result.length - index]; + if (sta_result_value) { + // only continue if the *sta_result_value* is defined. + sta_result_time_iso.push(sta_result_value["phenomenonTime"]) + sta_result_observation_total_energy.push(sta_result_value["result"][0]) + sta_result_observation_power.push(sta_result_value["result"][1]) + sta_result_observation_vorlauf.push(sta_result_value["result"][2]) + sta_result_observation_ruecklauf.push(sta_result_value["result"][3]) + // cleaning data to draw chart... + if (index == sta_result.length - 1) { + // last loop + + inputx = sta_result_time_iso + inputy_vor_vs_rueck = [{ + name: "Vorlauf [degree Celsius]", + data: sta_result_observation_vorlauf + }, + { + name: "Ruecklauf [degree Celsius]", + data: sta_result_observation_ruecklauf + } + ] + $("#chart_intro").show() + drawChart(inputx, inputy_vor_vs_rueck, "line", "#chart_area") + + } + } + + } catch (error) { + console.log(`this loop has STA result: ${sta_result[sta_result.length - index]}`) + console.error(error) + } + + } + + + + } else { + console.log("No STA result...") + } + }); + + } + }, + Cesium.ScreenSpaceEventType.LEFT_CLICK); \ No newline at end of file diff --git a/public/application/js/drawchart.js b/public/application/js/drawchart.js new file mode 100644 index 0000000000000000000000000000000000000000..bc34bfbd7c2016f35f7f97990abc5f90d17cf305 --- /dev/null +++ b/public/application/js/drawchart.js @@ -0,0 +1,81 @@ +// chart_type = line, bar +var drawChart = function (data_inputx, data_inputy, chart_type, chart_id) { + if (typeof chart == "object") { + chart.destroy(); + } + var xaxis_type = 'datetime' + var x_tooltip_format = 'dd MMM yy HH:mm' + var options = { + series: data_inputy, + chart: { + type: chart_type, + height: 350, + // foreColor: '#ccc', + foreColor: '#000', + }, + // theme: { + // mode: 'dark', + // }, + background: '#141619', + dataLabels: { + enabled: false, + }, + stroke: { + // curve: 'smooth', + width: 1.5 + }, + responsive: [{ + breakpoint: 480, + options: { + legend: { + position: 'bottom', + // offsetX: -10, + offsetY: 0 + } + } + }], + tooltip: { + theme: 'dark', + // format: 'dd.MM.yy HH:mm', + // datetimeFormatter: { + // year: 'yyyy', + // month: 'MMM yy', + // day: 'dd.MM.yy', + // hour: 'HH:mm dd.MM' + // } + x: { + show: true, + format: x_tooltip_format, + // formatter: undefined, + }, + }, + // grid: { + // borderColor: "#535A6C", + // xaxis: { + // lines: { + // show: true + // } + // } + // }, + xaxis: { + categories: data_inputx, + labels: { + // style: { + // fontSize: '15px', + // fontWeight: 800, + // }, + datetimeFormatter: { + year: 'yyyy', + month: 'MM.yy', + day: "dd.MM.yy", + hour: 'dd.MM.yy HH:mm' + } + }, + type: xaxis_type, + } + }; + + chart = new ApexCharts(document.querySelector(chart_id), options); + chart.render(); + +} \ No newline at end of file diff --git a/public/application/js/pipelo_sta.js b/public/application/js/pipelo_sta.js new file mode 100644 index 0000000000000000000000000000000000000000..e5cca700b2d1fbc35abc473ec9208d9a5ef06d23 --- /dev/null +++ b/public/application/js/pipelo_sta.js @@ -0,0 +1,465 @@ +var pipe_lo = [ + { + "devEUI": "94193A01010005C5", + "address": "Zollhüttengasse 9", + "lat": "49.109733", + "long": "9.733305" + }, + { + "devEUI": "94193A01010005C6", + "address": "Lange Str. 8", + "lat": "49.11223828741425", + "long": "9.732123180270873" + }, + { + "devEUI": "94193A01010005C7", + "address": "Glockengasse 3", + "lat": "49.111454", + "long": "9.733045" + }, + { + "devEUI": "94193A01010005C8", + "address": "Weilertor 14", + "lat": "49.11464640910398", + "long": "9.732766015328936" + }, + { + "devEUI": "94193A01010005C9", + "address": "Bahnhofstr. 6 (1)", + "lat": "49.110157", + "long": "9.734005" + }, + { + "devEUI": "94193A01010005CE", + "address": "Im Weiler 1", + "lat": "49.113261", + "long": "9.732631" + }, + { + "devEUI": "94193A01010005CF", + "address": "Lange Str. 46", + "lat": "49.110256", + "long": "9.732367" + }, + { + "devEUI": "94193A01010005D0", + "address": "Lange Str. 53", + "lat": "49.109968", + "long": "9.732556" + }, + { + "devEUI": "94193A01010005D1", + "address": "Bahnhofstr. 18", + "lat": "49.109125", + "long": "9.733989" + }, + { + "devEUI": "94193A01010005D2", + "address": "Lange Str. 33/1", + "lat": "49.110770825444256", + "long": "9.732588104997308" + }, + { + "devEUI": "94193A01010005D3", + "address": "Lange Str. 55", + "lat": "49.1097670588301", + "long": "9.7326409543048" + }, + { + "devEUI": "94193A01010005D4", + "address": "", + "lat": "49.11063843049948", + "long": "9.735850095748901" + }, + { + "devEUI": "94193A01010005D5", + "address": "Bahnhofstr. 25", + "lat": "49.109054", + "long": "9.735130" + }, + { + "devEUI": "94193A01010005D6", + "address": "Bahnhofstr. 17", + "lat": "49.109744", + "long": "9.734629" + }, + { + "devEUI": "94193A01010005D8", + "address": "Heimbacher Gasse 2", + "lat": "49.113037", + "long": "9.732630" + }, + { + "devEUI": "94193A01010005D9", + "address": "Im Lindach 9", + "lat": "49.108809", + "long": "9.735979" + }, + { + "devEUI": "94193A01010005DB", + "address": "Im Lindach 1", + "lat": "49.110038", + "long": "9.734933" + }, + { + "devEUI": "94193A01010005DD", + "address": "Heimbacher Gasse 6", + "lat": "49.112780", + "long": "9.732079" + }, + { + "devEUI": "94193A01010006C0", + "address": "Bahnhofstr. 21", + "lat": "49.109279", + "long": "9.734970" + }, + { + "devEUI": "94193A01010006C4", + "address": "Lange Str. 29 (1)", + "lat": "49.111098", + "long": "9.732556" + }, + { + "devEUI": "94193A010100073A", + "address": "Hirschgraben 11-13", + "lat": "49.111321", + "long": "9.731331" + }, + { + "devEUI": "94193A010100073D", + "address": "Lange Str. 29 (2)", + "lat": "49.111098", + "long": "9.732653" + }, + { + "devEUI": "94193A0101000745", + "address": " Netzstation Weilerwiese Schiene 2", + "lat": "49.11638970127192", + "long": "9.733147184723265" + }, + { + "devEUI": "94193A0101000746", + "address": "Bahnhofstr. 15", + "lat": "49.110003", + "long": "9.734461" + }, + { + "devEUI": "94193A0101000747", + "address": "Lange Str. 38 (Kirche)", + "lat": "49.11087122198257", + "long": "9.731906956093749" + }, + { + "devEUI": "94193A010100074A", + "address": "Bahnhofstr. 19", + "lat": "49.109518", + "long": "9.734868" + }, + { + "devEUI": "94193A010100074B", + "address": "Lange Str. 48", + "lat": "49.110136", + "long": "9.732347" + }, + { + "devEUI": "94193A010100074D", + "address": " ", + "lat": "49.111594", + "long": "9.734530" + }, + { + "devEUI": "94193A010100074E", + "address": "Lange Str. 2", + "lat": "49.112510", + "long": "9.732079" + }, + { + "devEUI": "94193A010100074F", + "address": "Mauerstr. 6", + "lat": "49.112085", + "long": "9.732937" + }, + { + "devEUI": "94193A0101000751", + "address": "Mauerstr. 21", + "lat": "49.110589", + "long": "9.734021" + }, + { + "devEUI": "94193A0101000755", + "address": "Im Lindach 8 (1)", + "lat": "49.108996", + "long": "9.736708" + }, + { + "devEUI": "94193A0101000759", + "address": "Mauer Str. 21/1 (1)", + "lat": "49.110511", + "long": "9.733797" + }, + { + "devEUI": "94193A010100075B", + "address": "Im Lindach 8 (2)", + "lat": "49.108949", + "long": "9.736767" + }, + { + "devEUI": "94193A010100075F", + "address": "Bahnhofstr. 12", + "lat": "49.109862", + "long": "9.734294" + }, + { + "devEUI": "94193A0101000762", + "address": "Bahnhofstr. 6 (2)", + "lat": "49.110175", + "long": "9.733973" + }, + { + "devEUI": "94193A010200143B", + "address": " Wüstenrot (1)", + "lat": "49.07746426313434", + "long": "9.46300506591797" + }, + { + "devEUI": "94193A0101000764", + "address": "Wüstenrot (2)", + "lat": "49.075665114793", + "long": "9.461975097656252" + }, + { + "devEUI": "94193A0101000765", + "address": "Wüstenrot (3)", + "lat": "49.07341608772624", + "long": "9.461975097656252" + }, + { + "devEUI": "94193A0101000766", + "address": " ", + "lat": "49.111594", + "long": "9.734530" + }, + { + "devEUI": "94193A0101000767", + "address": "Lange Str. 40", + "lat": "49.110510", + "long": "9.732329" + }, + { + "devEUI": "94193A0101000768", + "address": "Netzstation Weilerwiese Schiene 1", + "lat": "49.11639178901025", + "long": "9.732831404220839" + }, + { + "devEUI": "94193A0101000769", + "address": "Wüstenrot (4)", + "lat": "49.0711669588361", + "long": "9.461631774902346" + }, + { + "devEUI": "94193A010100076A", + "address": "Mauerstr. 21/1 (2)", + "lat": "49.110501", + "long": "9.733790" + }, + { + "devEUI": "94193A01010007C5", + "address": "Zollhüttengasse 24", + "lat": "49.109613", + "long": "9.732637" + }, + { + "devEUI": "94193A01010007CA", + "address": "Heimbacher Gasse 21", + "lat": "49.112261", + "long": "9.730727" + }, + { + "devEUI": "94193A01010007CE", + "address": "Gänsberg 1", + "lat": "49.110477", + "long": "9.732133" + }, + { + "devEUI": "94193A01010007CF", + "address": "Wüstenrot (5)", + "lat": "49.068692799449586", + "long": "9.46128845214844" + }, + { + "devEUI": "94193A0101000825", + "address": "Zollhüttengasse 10", + "lat": "49.109926", + "long": "9.733291" + }, + { + "devEUI": "94193A0101000826", + "address": "Lange Str. 44", + "lat": "49.110336978502815", + "long": "9.732188679258906" + }, + { + "devEUI": "94193A0101000827", + "address": "Bahnhofstr. 28", + "lat": "49.108569", + "long": "9.734981" + }, + { + "devEUI": "94193A0101000829", + "address": "Lange Str. 23 ", + "lat": "49.111284821188725", + "long": "9.732502501907454" + }, + { + "devEUI": "94193A010100082A", + "address": "Lange Str. 47", + "lat": "49.110150", + "long": "9.732538" + }, + { + "devEUI": "94193A0101000832", + "address": " ", + "lat": "49.111594", + "long": "9.734530" + }, + { + "devEUI": "94193A01010008A5", + "address": "Testgerät Pliezhausen", + "lat": "49.10410739462646", + "long": "9.745154678821565" + }, + { + "devEUI": "94193A01010008A6", + "address": "Bahnhofstr. 20", + "lat": "49.108880", + "long": "9.733999" + }, + { + "devEUI": "94193A01010008B0", + "address": "Im Lindach 4", + "lat": "49.109789", + "long": "9.735469" + }, + { + "devEUI": "94193A01010008D6", + "address": "Heimbacher Gasse 14", + "lat": "49.112798", + "long": "9.731505" + }, + { + "devEUI": "94193A01010008FD", + "address": "Lange Str. 41", + "lat": "49.110417", + "long": "9.732562" + }, + { + "devEUI": "94193A0101000911", + "address": "Im Weiler 26", + "lat": "49.113834", + "long": "9.731827" + }, + { + "devEUI": "94193A0101000919", + "address": "Katharinenstr. 8", + "lat": "49.111807", + "long": "9.731235" + }, + { + "devEUI": "94193A010100091B", + "address": "Mauerstr. 21/1 (3)", + "lat": "49.110487", + "long": "9.733796" + }, + { + "devEUI": "94193A010100091F", + "address": "Im Weiler 6", + "lat": "49.113438", + "long": "9.732733" + }, + { + "devEUI": "94193A010100092D", + "address": "Lange Str. 4", + "lat": "49.112398", + "long": "9.732138" + }, + { + "devEUI": "94193A0101000930", + "address": "Kirchgasse 9 (1)", + "lat": "49.111041485727355", + "long": "9.732805959216694" + }, + { + "devEUI": "94193A0101000931", + "address": "Kirchgasse 9 (2)", + "lat": "49.111011", + "long": "9.732798" + }, + { + "devEUI": "94193A0101000932", + "address": "Heimbacher Gasse 5-7", + "lat": "49.112517", + "long": "9.731945" + }, + { + "devEUI": "94193A010100093A", + "address": "Lange Str. 10", + "lat": "49.112191", + "long": "9.732165" + }, + { + "devEUI": "94193A010100093F", + "address": "Katharinenstr. 12", + "lat": "49.111471", + "long": "9.731516" + }, + { + "devEUI": "94193A010100094B", + "address": "Katharinenstr. 14", + "lat": "49.111347", + "long": "9.731643" + }, + { + "devEUI": "94193A0101000957", + "address": "Wüstenrot (6)", + "lat": "49.06576863405361", + "long": "9.46128845214844" + }, + { + "devEUI": "94193A0101000A0D", + "address": "Bahnhofstr. 14", + "lat": "49.109725", + "long": "9.734180" + } +] + + +// draw Pipe Location + +var pipe_lo_entities= []; + +for (let i = 0; i < pipe_lo.length; i++) { + var name_devEUI = pipe_lo[i]["devEUI"]; + var pipe_lon = pipe_lo[i]["long"]; + var pipe_lat = pipe_lo[i]["lat"]; + + const url = Cesium.buildModuleUrl("Assets/Textures/maki/grocery.png"); + + pipe_lo_entities[i] = viewer.entities.add({ + name: name_devEUI, + position: Cesium.Cartesian3.fromDegrees(pipe_lon,pipe_lat), + description: "PIPE Station: " + name_devEUI, + billboard: { + // image: pinBuilder.fromText('Sensor', Cesium.Color.BLUE.withAlpha(0.9), 48).toDataURL(), + // MakiIcon List: https://github.com/mapbox/maki/tree/main/icons + // https://sandcastle.cesium.com/index.html?src=GeoJSON%20simplestyle.html + // image: pinBuilder.fromMakiIconId("hospital", Cesium.Color.RED, 48).toDataURL(), + image: pinBuilder.fromUrl(url, Cesium.Color.GREEN, 48).toDataURL(), + verticalOrigin: Cesium.VerticalOrigin.BOTTOM, + heightReference: "CLAMP_TO_GROUND", + show: true, + disableDepthTestDistance: 999999 + } + }); +} + diff --git a/public/application/js/staconnector.js b/public/application/js/staconnector.js new file mode 100644 index 0000000000000000000000000000000000000000..cca0ef076c9cc4718c1a002e171dac9ef5672569 --- /dev/null +++ b/public/application/js/staconnector.js @@ -0,0 +1,188 @@ +// var STA_IQG_URL = "http://193.196.138.56/iqg4icity_sensor/v1.1/MultiDatastreams(1)/Observations?$orderby=phenomenonTime%20desc" + +function get_STA_Observation_Value(STA_URL , cb) { + var settings = { + "url": STA_URL, + "method": "GET", + }; + + $.ajax(settings).done(function (response) { + console.log(response); + try { + var result_value = response["value"] + // example + // [ + // { + // "@iot.id": 451441, + // "phenomenonTime": "2022-07-21T14:30:00.000Z", + // "result": [ + // 129347, + // 4.6, + // 73.3, + // 68.4 + // ], + // "resultTime": null, + // "@iot.selfLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)", + // "FeatureOfInterest@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/FeatureOfInterest", + // "MultiDatastream@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/MultiDatastream", + // "Datastream@iot.navigationLink": "http://193.196.138.56/iqg4icity_sensor/v1.1/Observations(451441)/Datastream" + // }, + // ... + // ] + cb(response["value"]) + } catch (error) { + console.error(error) + cb(null) + } + }); +} + + +var pipe_sta_map = { + "94193A01010005C5": 1, + "94193A01010005C6": 2, + "94193A01010005C7": 3, + "94193A01010005C8": 4, + "94193A01010005C9": 5, + "94193A01010005CE": 6, + "94193A01010005CF": 7, + "94193A01010005D0": 8, + "94193A01010005D1": 9, + "94193A01010005D2": 10, + "94193A01010005D3": 11, + "94193A01010005D4": 12, + "94193A01010005D5": 13, + "94193A01010005D6": 14, + "94193A01010005D8": 15, + "94193A01010005D9": 16, + "94193A01010005DB": 17, + "94193A01010005DD": 18, + "94193A01010006C0": 19, + "94193A01010006C4": 20, + "94193A010100073A": 21, + "94193A010100073D": 22, + "94193A0101000745": 23, + "94193A0101000746": 24, + "94193A0101000747": 25, + "94193A010100074A": 26, + "94193A010100074B": 27, + "94193A010100074D": 28, + "94193A010100074E": 29, + "94193A010100074F": 30, + "94193A0101000751": 31, + "94193A0101000755": 32, + "94193A0101000759": 33, + "94193A010100075B": 34, + "94193A010100075F": 35, + "94193A0101000762": 36, + "94193A010200143B": 37, + "94193A0101000764": 38, + "94193A0101000765": 39, + "94193A0101000766": 40, + "94193A0101000767": 41, + "94193A0101000768": 42, + "94193A0101000769": 43, + "94193A010100076A": 44, + "94193A01010007C5": 45, + "94193A01010007CA": 46, + "94193A01010007CE": 47, + "94193A01010007CF": 48, + "94193A0101000825": 49, + "94193A0101000826": 50, + "94193A0101000827": 51, + "94193A0101000829": 52, + "94193A010100082A": 53, + "94193A0101000832": 54, + "94193A01010008A5": 55, + "94193A01010008A6": 56, + "94193A01010008B0": 57, + "94193A01010008D6": 58, + "94193A01010008FD": 59, + "94193A0101000911": 60, + "94193A0101000919": 61, + "94193A010100091B": 62, + "94193A010100091F": 63, + "94193A010100092D": 64, + "94193A0101000930": 65, + "94193A0101000931": 66, + "94193A0101000932": 67, + "94193A010100093A": 68, + "94193A010100093F": 69, + "94193A010100094B": 70, + "94193A0101000957": 71, + "94193A0101000A0D": 72, +} +var reverse_mapping = { + 1: "94193A01010005C5", + 2: "94193A01010005C6", + 3: "94193A01010005C7", + 4: "94193A01010005C8", + 5: "94193A01010005C9", + 6: "94193A01010005CE", + 7: "94193A01010005CF", + 8: "94193A01010005D0", + 9: "94193A01010005D1", + 10: "94193A01010005D2", + 11: "94193A01010005D3", + 12: "94193A01010005D4", + 13: "94193A01010005D5", + 14: "94193A01010005D6", + 15: "94193A01010005D8", + 16: "94193A01010005D9", + 17: "94193A01010005DB", + 18: "94193A01010005DD", + 19: "94193A01010006C0", + 20: "94193A01010006C4", + 21: "94193A010100073A", + 22: "94193A010100073D", + 23: "94193A0101000745", + 24: "94193A0101000746", + 25: "94193A0101000747", + 26: "94193A010100074A", + 27: "94193A010100074B", + 28: "94193A010100074D", + 29: "94193A010100074E", + 30: "94193A010100074F", + 31: "94193A0101000751", + 32: "94193A0101000755", + 33: "94193A0101000759", + 34: "94193A010100075B", + 35: "94193A010100075F", + 36: "94193A0101000762", + 37: "94193A010200143B", + 38: "94193A0101000764", + 39: "94193A0101000765", + 40: "94193A0101000766", + 41: "94193A0101000767", + 42: "94193A0101000768", + 43: "94193A0101000769", + 44: "94193A010100076A", + 45: "94193A01010007C5", + 46: "94193A01010007CA", + 47: "94193A01010007CE", + 48: "94193A01010007CF", + 49: "94193A0101000825", + 50: "94193A0101000826", + 51: "94193A0101000827", + 52: "94193A0101000829", + 53: "94193A010100082A", + 54: "94193A0101000832", + 55: "94193A01010008A5", + 56: "94193A01010008A6", + 57: "94193A01010008B0", + 58: "94193A01010008D6", + 59: "94193A01010008FD", + 60: "94193A0101000911", + 61: "94193A0101000919", + 62: "94193A010100091B", + 63: "94193A010100091F", + 64: "94193A010100092D", + 65: "94193A0101000930", + 66: "94193A0101000931", + 67: "94193A0101000932", + 68: "94193A010100093A", + 69: "94193A010100093F", + 70: "94193A010100094B", + 71: "94193A0101000957", + 72: "94193A0101000A0D", +} \ No newline at end of file diff --git a/public/application/js/staconnector.xlsx b/public/application/js/staconnector.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..bdc2f2fef1fe1dc05a56f740f1a827bf02e14c72 Binary files /dev/null and b/public/application/js/staconnector.xlsx differ