瀏覽代碼

现场调试更改:1.modbus通道加入可用判断 2.调整gis服务获取token地址 3.完善一体打包

wangt 1 年之前
父節點
當前提交
0dbe9f80b2

+ 4 - 0
neim-biz/pom.xml

@@ -134,6 +134,8 @@
                             <!-- 最终项目打包自动生成的package目录 -->
                             <directory>src/main/resources/static</directory>
                             <directory>src/main/resources/js</directory>
+                            <directory>src/main/resources/largeScreenImg</directory>
+                            <directory>src/main/resources/img</directory>
                         </fileset>
                     </filesets>
                 </configuration>
@@ -278,6 +280,8 @@
                                     <includes>
                                         <include>static/</include>
                                         <include>js/</include>
+                                        <include>largeScreenImg/</include>
+                                        <include>img/</include>
                                     </includes>
                                 </resource>
                             </resources>

+ 2 - 0
neim-biz/src/main/java/com/jiayue/biz/domain/TunnelInfo.java

@@ -26,5 +26,7 @@ public class TunnelInfo {
     private String dataFormat;
     //设备编号
     private String equipmentNo;
+    //是否可用
+    private String isAble;
 
 }

+ 6 - 6
neim-biz/src/main/java/com/jiayue/biz/job/ModbusReciveJob.java

@@ -62,8 +62,11 @@ public class ModbusReciveJob {
     public void timingTunnel() {
         List<TunnelInfo> tunnelInfoList = tunnelInfoService.list();
         for (TunnelInfo tunnelInfo : tunnelInfoList) {
-            ModbusTcpMasterBuilder master = start(tunnelInfo);
-            masterMap.put(tunnelInfo.getStationId(), master);
+            //过滤不可用通道
+            if(null != tunnelInfo.getIsAble() && tunnelInfo.getIsAble().equals("0")) {
+                ModbusTcpMasterBuilder master = start(tunnelInfo);
+                masterMap.put(tunnelInfo.getStationId(), master);
+            }
 
         }
     }
@@ -173,7 +176,7 @@ public class ModbusReciveJob {
                             for (Map.Entry<Integer, IModbusDataType> typeEntry : registerData.entrySet()) {
                                 for (Map.Entry<String, Integer> entry : stringStringBuilderMap.entrySet()) {
                                     if (typeEntry.getKey().equals(entry.getValue())) {
-                                        log.info("点位:{}-----数值:{}", typeEntry.getKey(), ((NumericModbusData) typeEntry.getValue()).getValue());
+                                        log.info("塔:{} 点位:{}-----数值:{}",tunnelInfo.getEquipmentNo(), typeEntry.getKey(), ((NumericModbusData) typeEntry.getValue()).getValue());
                                         //点位一致 置换value
                                         pointMap.put(entry.getKey(), ((NumericModbusData) typeEntry.getValue()).getValue());
                                     }
@@ -188,9 +191,6 @@ public class ModbusReciveJob {
                 }
                 wsHeightSet.addAll(wdHeightSet);
 
-                //List<Map<String, Object>> mapList = new CheckDataRecode().checkValue((List<Map<String, Object>>) pointMap, "station");
-
-                //log.info("校验前数据:{} ;;; 校验后数据:{}",JSONUtil.parse(pointMap),JSONUtil.parse(mapList));
                 windTowerDataParentTableService.saveDataForTunnel(pointMap, wsHeightSet, tunnelInfo.getEquipmentNo(), time);
             }catch (Exception e){
                 log.error("modbus 接入测风塔:{} 的数据错误:{}",masterBuilderEntry.getKey() ,e);

+ 5 - 0
neim-biz/src/main/java/com/jiayue/biz/service/impl/AnalysisDataImpl.java

@@ -1193,14 +1193,19 @@ public class AnalysisDataImpl {
     public String assembleWind(String s, HashSet<String> wsHeight, HashSet<String> wdHeight) {
         String str = s;
         if (s.contains("WS")) {
+
             String wsAndType = s.substring(s.indexOf("WS"));
             //层高
             String height = "";
             if (!s.contains("TI")) {
+                if(s.contains("K620Ab")){
+                    wsHeight.add("160A");
+                }
                 String[] strSp = wsAndType.split("_");
                 if (strSp.length > 0) {
                     height = CalculationUtil.getNumberFromString(strSp[1]);
                 }
+
                 wsHeight.add(height);
             }
             //ave/min/max/sta

+ 0 - 5
neim-biz/src/main/java/com/jiayue/biz/service/impl/ProphaseWeatherDataServiceImpl.java

@@ -125,12 +125,7 @@ public class ProphaseWeatherDataServiceImpl extends ServiceImpl<ProphaseWeatherD
      * 待改造
      * @return
      */
-    @Override
-    public List<Map<String, Long>> listAll() {
 
 
-        return new ArrayList<>();
-    }
-
 
 }

+ 2 - 0
neim-system/src/main/java/com/jiayue/framework/config/ResourcesConfig.java

@@ -38,6 +38,8 @@ public class ResourcesConfig implements WebMvcConfigurer {
         /** 前端静态资源配置 */
         registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
         registry.addResourceHandler("/js/**").addResourceLocations("classpath:/js/");
+        registry.addResourceHandler("/largeScreenImg/**").addResourceLocations("classpath:/largeScreenImg/");
+        registry.addResourceHandler("/img/**").addResourceLocations("classpath:/img/");
     }
 
     /**

+ 2 - 1
neim-system/src/main/java/com/jiayue/framework/config/SecurityConfig.java

@@ -101,7 +101,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                         "/profile/**",
                         "/static/**",
                         "/js/**",
-                        "/",
+                        "/largeScreenImg/**",
+                        "/img/**",
                         "/index"
                 ).permitAll()
                 .antMatchers("/swagger-ui.html").anonymous()

+ 1 - 1
neim-ui/src/router/index.js

@@ -251,7 +251,7 @@ Router.prototype.push = function push(location) {
 }
 
 export default new Router({
-  mode: 'history', // 去掉url中的#
+  mode: 'hash', // 去掉url中的#
   scrollBehavior: () => ({ y: 0 }),
   routes: constantRoutes
 })

+ 2 - 2
neim-ui/src/utils/bigemap/3dmap.js

@@ -1,7 +1,7 @@
 //map.js
 // 换成本地的服务器js文件即可
 let script = [
-  'http://127.0.0.1:9000/bigemap-gl.js/v1.1.0/bigemap-gl.js',
+  'http://10.124.241.21:9000/bigemap-gl.js/v1.1.0/bigemap-gl.js',
   // '/js/bigemap-velocity.min.js',
   '/jquery.min.js',
   //如果有更多的JS要引用 ,也一起放到这个数组中
@@ -11,7 +11,7 @@ export default new Promise(resolve => {
   link.rel = "stylesheet";
   link.async = false;
   // 换成本地的服务器css文件即可
-  link.href = "http://127.0.0.1:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css";
+  link.href = "http://10.124.241.21:9000/bigemap-gl.js/v1.1.0/Widgets/widgets.css";
   document.head.appendChild(link);
   let loads = script.map(v => {
     let script = document.createElement("script");

+ 2 - 2
neim-ui/src/utils/bigemap/map.js

@@ -1,7 +1,7 @@
 //map.js
 // 换成本地的服务器js文件即可
 let script = [
-  'http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.js',
+  'http://10.124.241.21:9000/bigemap.js/v2.1.0/bigemap.js',
   // 'http://www.bigemap.com/public/js/tool/BMturf.min.js',
   // '/js/bigemap-velocity.min.js',
   '/js/BMturf.min.js',
@@ -13,7 +13,7 @@ export default new Promise(resolve => {
   link.rel = "stylesheet";
   link.async = false;
   // 换成本地的服务器css文件即可
-  link.href = "http://127.0.0.1:9000/bigemap.js/v2.1.0/bigemap.css";
+  link.href = "http://10.124.241.21:9000/bigemap.js/v2.1.0/bigemap.css";
   document.head.appendChild(link);
   let loads = script.map(v => {
     let script = document.createElement("script");

+ 1 - 1
neim-ui/src/views/largeScreenPage/components/3DbigeMap.vue

@@ -50,7 +50,7 @@ export default {
         // console.log(center, 154);
         // window.bmgl.Config.HTTP_URL ='http://www.bigemap.com:9000';
         //TODO 修改地址和端口的时候要同步修改下面的TODO
-        window.bmgl.Config.HTTP_URL = 'http://127.0.0.1:9000';
+        window.bmgl.Config.HTTP_URL = 'http://10.124.241.21:9000';
         // window.bmgl.Config.HTTP_URL = 'http://localhost:9000';
         let viewer = new bmgl.Viewer('container', {
           // mapId: 'bigemap.zhongkexingtu',

+ 3 - 6
neim-ui/src/views/largeScreenPage/components/bigeHeatMap.vue

@@ -69,10 +69,7 @@ export default {
 
         window.BM.Config.HTTP_URL = process.env.VUE_APP_GIS_API;
         let ip1 = process.env.VUE_APP_GIS_API;
-        let ip2 = 'http://127.0.0.1:9000';
-        // window.BM.Config.HTTP_URL = 'http://localhost:9000';
-        // let ip1 = 'http://localhost:9000';
-        // let ip2 = 'http://localhost:9000';
+        let ip2 = 'http://10.124.241.21:9000';
         let mapid = 'bigemap.re-huafu'
         // window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
         // arcgis-satellite
@@ -87,7 +84,7 @@ export default {
           attributionControl: false,
           preferCanvas: true, //适用于数据量大时 地图反应速度加快
         });
-        var promise = fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        var promise = fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token
@@ -116,7 +113,7 @@ export default {
         )
         window.Bmap = map;
         let heatmapid = 'bigemap.heatMapWs';
-        fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token

+ 3 - 3
neim-ui/src/views/largeScreenPage/components/bigeHeatSunMap.vue

@@ -70,7 +70,7 @@ export default {
 
         window.BM.Config.HTTP_URL = process.env.VUE_APP_GIS_API;
         let ip1 = process.env.VUE_APP_GIS_API;
-        let ip2 = 'http://127.0.0.1:9000';
+        let ip2 = 'http://10.124.241.21:9000';
         // window.BM.Config.HTTP_URL = 'http://localhost:9000';
         // let ip1 = 'http://localhost:9000';
         // let ip2 = 'http://localhost:9000';
@@ -88,7 +88,7 @@ export default {
           attributionControl: false,
           preferCanvas: true, //适用于数据量大时 地图反应速度加快
         });
-        var promise = fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        var promise = fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token
@@ -121,7 +121,7 @@ export default {
         //map.setMaxZoom(12);
         //layer1.addTo(map);
         let heatmapid = 'bigemap.heatMapSun';
-        fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token

+ 2 - 2
neim-ui/src/views/largeScreenPage/components/bigeMap.vue

@@ -64,7 +64,7 @@ export default {
       bigemap.then(() => {
         window.BM.Config.HTTP_URL = process.env.VUE_APP_GIS_API;
         let ip1 = process.env.VUE_APP_GIS_API;
-        let ip2 = 'http://127.0.0.1:9000';
+        let ip2 = 'http://10.124.241.21:9000';
         let mapid = 'bigemap.re-huafu'
         let map = window.BM.map('map', null, {
           center: [30, 104],
@@ -76,7 +76,7 @@ export default {
           attributionControl: false,
           preferCanvas: true, //适用于数据量大时 地图反应速度加快
         });
-        var promise = fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        var promise = fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token

+ 3 - 7
neim-ui/src/views/largeScreenPage/components/zaiXianBigeMap.vue

@@ -64,14 +64,10 @@ export default {
         // window.BM.Config.HTTP_URL = 'http://www.bigemap.com:9000';
 
         window.BM.Config.HTTP_URL = process.env.VUE_APP_GIS_API;
-        let ip1 = 'http://127.0.0.1:9000';
-        let ip2 = 'http://127.0.0.1:9000';
+        let ip1 = 'http://10.124.241.21:9000';
+        let ip2 = 'http://10.124.241.21:9000';
 
-        // window.BM.Config.HTTP_URL = 'http://49.4.78.194:17143';
-        // let ip1 = 'http://49.4.78.194:17143';
-        // let ip2 = 'http://49.4.78.194:17143';
         let mapid = 'bigemap.zaixiantianditu'
-        // window.BM.Config.HTTP_URL = 'http://192.168.1.181:9000';
         // arcgis-satellite
         // amap-satellite
         // zhongkexingtu
@@ -84,7 +80,7 @@ export default {
           attributionControl: false,
           preferCanvas: true, //适用于数据量大时 地图反应速度加快
         });
-        var promise = fetch(`${ip1}/tokens/v1?access_token=none`).then(function (response) {
+        var promise = fetch(`${ip2}/tokens/v1?access_token=none`).then(function (response) {
           return response.json();
         }).then(function (body) {
           return body.token