Ver código fonte

调整测风塔数据展示页面

xusl 1 ano atrás
pai
commit
a8ff3ccad5

+ 9 - 570
ipp-ap/src/const/crud/windtowerstatusdata.js

@@ -27,7 +27,11 @@ export const tableOption = {
     , {
       "type": "input",
       "label": "时间",
-      "prop": "time"
+      "prop": "time",
+      formatter: (row, column, cellValue, index) => {
+        const date = new Date(cellValue);
+        return date.toLocaleString(); // 转换为本地时间并显示
+      }
     }
     , {
       "type": "input",
@@ -36,628 +40,63 @@ export const tableOption = {
     }
     , {
       "type": "input",
-      "label": "温度最大值(℃)",
-      "prop": "tmax"
-    }
-    , {
-      "type": "input",
-      "label": "温度最小值(℃)",
-      "prop": "tmin"
-    }
-    , {
-      "type": "input",
-      "label": "温度平均值(℃)",
-      "prop": "tave"
-    }
-    , {
-      "type": "input",
-      "label": "温度标准差(℃)",
-      "prop": "tsta"
-    }
-    , {
-      "type": "input",
-      "label": "湿度瞬时值(%)",
+      "label": "湿度瞬时值(%RH)",
       "prop": "rhInst"
     }
     , {
       "type": "input",
-      "label": "湿度最大值(%)",
-      "prop": "rhMax"
-    }
-    , {
-      "type": "input",
-      "label": "湿度最小值(%)",
-      "prop": "rhMin"
-    }
-    , {
-      "type": "input",
-      "label": "湿度平均值(%)",
-      "prop": "rhAve"
-    }
-    , {
-      "type": "input",
-      "label": "湿度标准差(%)",
-      "prop": "rhSta"
-    }
-    , {
-      "type": "input",
-      "label": "气压瞬时值(KPa)",
+      "label": "气压瞬时值(hPa)",
       "prop": "paInst"
     }
     , {
       "type": "input",
-      "label": "气压最大值(KPa)",
-      "prop": "paMax"
-    }
-    , {
-      "type": "input",
-      "label": "气压最小值(KPa)",
-      "prop": "paMin"
-    }
-    , {
-      "type": "input",
-      "label": "气压平均值(KPa)",
-      "prop": "paAve"
-    }
-    , {
-      "type": "input",
-      "label": "气压标准差(KPa)",
-      "prop": "paSta"
-    }
-    , {
-      "type": "input",
       "label": "10米风速瞬时值(m/s)",
       "prop": "wsInst10"
     }
     , {
       "type": "input",
-      "label": "10米风速最大值(m/s)",
-      "prop": "wsMax10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风速最小值(m/s)",
-      "prop": "wsMin10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风速平均值(m/s)",
-      "prop": "wsAve10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风速标准差(m/s)",
-      "prop": "wsSta10"
-    }
-    , {
-      "type": "input",
       "label": "10米风向瞬时值(°)",
       "prop": "wdInst10"
     }
     , {
       "type": "input",
-      "label": "10米风向最大值(°)",
-      "prop": "wdMax10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风向最小值(°)",
-      "prop": "wdMin10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风向平均值(°)",
-      "prop": "wdAve10"
-    }
-    , {
-      "type": "input",
-      "label": "10米风向标准差(°)",
-      "prop": "wdSta10"
-    }
-    , {
-      "type": "input",
       "label": "30米风速瞬时值(m/s)",
       "prop": "wsInst30"
     }
     , {
       "type": "input",
-      "label": "30米风速最大值(m/s)",
-      "prop": "wsMax30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风速最小值(m/s)",
-      "prop": "wsMin30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风速平均值(m/s)",
-      "prop": "wsAve30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风速标准差(m/s)",
-      "prop": "wsSta30"
-    }
-    , {
-      "type": "input",
       "label": "30米风向瞬时值(°)",
       "prop": "wdInst30"
     }
     , {
       "type": "input",
-      "label": "30米风向最大值(°)",
-      "prop": "wdMax30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风向最小值(°)",
-      "prop": "wdMin30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风向平均值(°)",
-      "prop": "wdAve30"
-    }
-    , {
-      "type": "input",
-      "label": "30米风向标准差(°)",
-      "prop": "wdSta30"
-    }
-    , {
-      "type": "input",
       "label": "50米风速瞬时值(m/s)",
       "prop": "wsInst50"
     }
     , {
       "type": "input",
-      "label": "50米风速最大值(m/s)",
-      "prop": "wsMax50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风速最小值(m/s)",
-      "prop": "wsMin50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风速平均值(m/s)",
-      "prop": "wsAve50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风速标准差(m/s)",
-      "prop": "wsSta50"
-    }
-    , {
-      "type": "input",
       "label": "50米风向瞬时值(°)",
       "prop": "wdInst50"
     }
     , {
       "type": "input",
-      "label": "50米风向最大值(°)",
-      "prop": "wdMax50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风向最小值(°)",
-      "prop": "wdMin50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风向平均值(°)",
-      "prop": "wdAve50"
-    }
-    , {
-      "type": "input",
-      "label": "50米风向标准差(°)",
-      "prop": "wdSta50"
-    }
-    , {
-      "type": "input",
-      "label": "60米风速瞬时值(m/s)",
-      "prop": "wsInst60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风速最大值(m/s)",
-      "prop": "wsMax60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风速最小值(m/s)",
-      "prop": "wsMin60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风速平均值(m/s)",
-      "prop": "wsAve60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风速标准差(m/s)",
-      "prop": "wsSta60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风向瞬时值(°)",
-      "prop": "wdInst60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风向最大值(°)",
-      "prop": "wdMax60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风向最小值(°)",
-      "prop": "wdMin60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风向平均值(°)",
-      "prop": "wdAve60"
-    }
-    , {
-      "type": "input",
-      "label": "60米风向标准差(°)",
-      "prop": "wdSta60"
-    }
-    , {
-      "type": "input",
       "label": "70米风速瞬时值(m/s)",
       "prop": "wsInst70"
     }
     , {
       "type": "input",
-      "label": "70米风速最大值(m/s)",
-      "prop": "wsMax70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风速最小值(m/s)",
-      "prop": "wsMin70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风速平均值(m/s)",
-      "prop": "wsAve70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风速标准差(m/s)",
-      "prop": "wsSta70"
-    }
-    , {
-      "type": "input",
       "label": "70米风向瞬时值(°)",
       "prop": "wdInst70"
     }
     , {
       "type": "input",
-      "label": "70米风向最大值(°)",
-      "prop": "wdMax70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风向最小值(°)",
-      "prop": "wdMin70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风向平均值(°)",
-      "prop": "wdAve70"
-    }
-    , {
-      "type": "input",
-      "label": "70米风向标准差(°)",
-      "prop": "wdSta70"
-    }
-    , {
-      "type": "input",
-      "label": "80米风速瞬时值(m/s)",
-      "prop": "wsInst80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风速最大值(m/s)",
-      "prop": "wsMax80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风速最小值(m/s)",
-      "prop": "wsMin80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风速平均值(m/s)",
-      "prop": "wsAve80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风速标准差(m/s)",
-      "prop": "wsSta80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风向瞬时值(°)",
-      "prop": "wdInst80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风向最大值(°)",
-      "prop": "wdMax80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风向最小值(°)",
-      "prop": "wdMin80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风向平均值(°)",
-      "prop": "wdAve80"
-    }
-    , {
-      "type": "input",
-      "label": "80米风向标准差(°)",
-      "prop": "wdSta80"
-    }
-    , {
-      "type": "input",
-      "label": "90米风速瞬时值(m/s)",
-      "prop": "wsInst90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风速最大值(m/s)",
-      "prop": "wsMax90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风速最小值(m/s)",
-      "prop": "wsMin90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风速平均值(m/s)",
-      "prop": "wsAve90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风速标准差(m/s)",
-      "prop": "wsSta90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风向瞬时值(°)",
-      "prop": "wdInst90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风向最大值(°)",
-      "prop": "wdMax90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风向最小值(°)",
-      "prop": "wdMin90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风向平均值(°)",
-      "prop": "wdAve90"
-    }
-    , {
-      "type": "input",
-      "label": "90米风向标准差(°)",
-      "prop": "wdSta90"
-    }
-    , {
-      "type": "input",
-      "label": "100米风速瞬时值(m/s)",
-      "prop": "wsInst100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风速最大值(m/s)",
-      "prop": "wsMax100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风速最小值(m/s)",
-      "prop": "wsMin100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风速平均值(m/s)",
-      "prop": "wsAve100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风速标准差(m/s)",
-      "prop": "wsSta100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风向瞬时值(°)",
-      "prop": "wdInst100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风向最大值(°)",
-      "prop": "wdMax100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风向最小值(°)",
-      "prop": "wdMin100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风向平均值(°)",
-      "prop": "wdAve100"
-    }
-    , {
-      "type": "input",
-      "label": "100米风向标准差(°)",
-      "prop": "wdSta100"
-    }
-    , {
-      "type": "input",
-      "label": "110米风速瞬时值(m/s)",
-      "prop": "wsInst110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风速最大值(m/s)",
-      "prop": "wsMax110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风速最小值(m/s)",
-      "prop": "wsMin110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风速平均值(m/s)",
-      "prop": "wsAve110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风速标准差(m/s)",
-      "prop": "wsSta110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风向瞬时值(°)",
-      "prop": "wdInst110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风向最大值(°)",
-      "prop": "wdMax110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风向最小值(°)",
-      "prop": "wdMin110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风向平均值(°)",
-      "prop": "wdAve110"
-    }
-    , {
-      "type": "input",
-      "label": "110米风向标准差(°)",
-      "prop": "wdSta110"
-    }
-    , {
-      "type": "input",
-      "label": "120米风速瞬时值(m/s)",
-      "prop": "wsInst120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风速最大值(m/s)",
-      "prop": "wsMax120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风速最小值(m/s)",
-      "prop": "wsMin120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风速平均值(m/s)",
-      "prop": "wsAve120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风速标准差(m/s)",
-      "prop": "wsSta120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风向瞬时值(°)",
-      "prop": "wdInst120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风向最大值(°)",
-      "prop": "wdMax120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风向最小值(°)",
-      "prop": "wdMin120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风向平均值(°)",
-      "prop": "wdAve120"
-    }
-    , {
-      "type": "input",
-      "label": "120米风向标准差(°)",
-      "prop": "wdSta120"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风速瞬时值",
+      "label": "轮毂高度风速瞬时值(m/s)",
       "prop": "wsInstHubHeight"
     }
     , {
       "type": "input",
-      "label": "风机轮毂高度风速最大值(m/s)",
-      "prop": "wsMaxHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风速最小值(m/s)",
-      "prop": "wsMinHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风速平均值(m/s)",
-      "prop": "wsAveHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风速标准差(m/s)",
-      "prop": "wsStaHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风向瞬时值(°)",
+      "label": "轮毂高度风向瞬时值(°)",
       "prop": "wdInstHubHeight"
     }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风向最大值(°)",
-      "prop": "wdMaxHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风向最小值(°)",
-      "prop": "wdMinHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风向平均值(°)",
-      "prop": "wdAveHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "风机轮毂高度风向标准差(°)",
-      "prop": "wdStaHubHeight"
-    }
-    , {
-      "type": "input",
-      "label": "空气密度  Kg/m³",
-      "prop": "airDensity"
-    }
   ]
 }

+ 40 - 0
ipp-ap/src/router/page/index.js

@@ -33,6 +33,26 @@ export default [
     }],
   },
   {
+    path: '/idp/data/windtowerstatusdata',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '测风塔数据查询',
+      component: () =>
+        import ( /* webpackChunkName: "views" */ '@/views/idp/data/windtowerstatusdata')
+    }],
+  },
+  {
+    path: '/idp/data/weatherstationstatusdata',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '气象站数据查询',
+      component: () =>
+        import ( /* webpackChunkName: "views" */ '@/views/idp/data/weatherstationstatusdata')
+    }],
+  },
+  {
     path: '/idp/data/accuracyCalculation',
     component: Layout,
     children: [{
@@ -63,6 +83,26 @@ export default [
     }],
   },
   {
+    path: '/idp/control/windtowerinfo',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '测风塔管理',
+      component: () =>
+        import ( /* webpackChunkName: "views" */ '@/views/idp/control/windtowerinfo')
+    }],
+  },
+  {
+    path: '/idp/control/weatherstationinfo',
+    component: Layout,
+    children: [{
+      path: 'index',
+      name: '气象站管理',
+      component: () =>
+        import ( /* webpackChunkName: "views" */ '@/views/idp/control/weatherstationinfo')
+    }],
+  },
+  {
     path: '/idp/system/sysparameter',
     component: Layout,
     children: [{

+ 33 - 1
ipp-ap/src/router/views/index.js

@@ -28,7 +28,39 @@ export default [
       permission: "",
       sort: 1,
       spread: false
-    }, {
+    },
+      {
+        children: [],
+        hasChildren: false,
+        icon: "",
+        id: "4080",
+        keepAlive: "0",
+        label: "测风塔数据查询",
+        menuType: "0",
+        name: "测风塔数据查询",
+        parentId: "4058",
+        path: "/idp/data/windtowerstatusdata/index",
+        permission: "",
+        sort: 1,
+        spread: false
+      },
+      {
+        children: [],
+        hasChildren: false,
+        icon: "",
+        id: "4080",
+        keepAlive: "0",
+        label: "气象站数据查询",
+        menuType: "0",
+        name: "气象站数据查询",
+        parentId: "4058",
+        path: "/idp/data/weatherstationstatusdata/index",
+        permission: "",
+        sort: 1,
+        spread: false
+      },
+
+      {
       children: [],
       hasChildren: false,
       icon: "",

+ 145 - 142
ipp-ap/src/views/idp/data/windtowerstatusdata/index.vue

@@ -75,9 +75,9 @@
       <el-tab-pane label="风速曲线图" name="second">
         <div style="width: 100%; height: calc(80vh - 50px)" id="wscharts"></div>
       </el-tab-pane>
-      <el-tab-pane label="风频柱状图" name="Third">
-        <div style="width: 100%; height: calc(80vh - 50px)" id="wfcharts"></div>
-      </el-tab-pane>
+<!--      <el-tab-pane label="风频柱状图" name="Third">-->
+<!--        <div style="width: 100%; height: calc(80vh - 50px)" id="wfcharts"></div>-->
+<!--      </el-tab-pane>-->
       <el-tab-pane label="表格" name="Firstly">
         <basic-container>
           <avue-crud ref="crud"
@@ -871,139 +871,139 @@ export default {
     },
     wfDraw(wfData) {
 
-      this.charts = echarts.init(document.getElementById('wfcharts'))
-      var option = {
-        title: {
-          top: 20,
-          text: '测风塔信息-风速频率图',
-          textStyle: {
-            fontWeight: 'normal',
-            fontSize: 16,
-            color: this.lineColor
-          },
-          left: '1%'
-        },
-        tooltip: {
-          trigger: 'axis'
-        },
-        grid: {
-          top: 100,
-          left: '2%',
-          right: '2%',
-          bottom: '10%',
-          containLabel: true
-        },
-        legend: {
-          top: 20,
-          width: '70%',
-          icon: 'rect',
-          itemWidth: 14,
-          itemHeight: 5,
-          itemGap: 13,
-          data: [],
-          right: '4%',
-          textStyle: {
-            fontSize: 12,
-            color: this.lineColor
-          },
-          selected: {}
-        },
-        calculable: true,
-
-        xAxis: [
-          {
-            type: 'category',
-            axisLine: {
-              lineStyle: {
-                color: this.lineColor
-              }
-            },
-            data: ['0-3m/s', '3-6m/s', '6-9m/s', '9-12m/s', '12-15m/s', '15-18m/s', '18-21m/s', '21-24m/s', '24-27m/s', '>27m/s']
-          }
-        ],
-        yAxis: [
-          {
-            type: 'value',
-            name: '%',
-            axisTick: {
-              show: false
-            },
-            axisLine: {
-              lineStyle: {
-                color: this.lineColor
-              }
-            },
-
-            axisLabel: {
-              margin: 10,
-              textStyle: {
-                fontSize: 14,
-                color: this.lineColor
-              },
-              formatter: '{value}',
-            },
-            splitLine: {
-              lineStyle: {
-                color: '#57617B'
-              }
-            }
-          }
-        ],
-        series: []
-      };
-      var index = 0;
-
-      for (var key in wfData) {
-        var keyName = '';
-        for (let thFormatKey in this.thFormat) {
-          if (key == thFormatKey) {
-            keyName = this.thFormat[thFormatKey];
-          }
-        }
-        option.legend.data.push(keyName)
-        if (index > 3) {
-          option.legend.selected[keyName] = false
-        } else {
-          option.legend.selected[keyName] = true
-        }
-        var wf = new Object
-        wf.name = keyName
-        wf.type = 'bar'
-        wf.data = wfData[key]
-        wf.connectNulls = true
-        wf.itemStyle = {
-          normal: {
-            color: {
-              type: "linear",
-              x: 0,
-              y: 0,
-              x2: 0,
-              y2: 1,
-              colorStops: [{
-                offset: 0,
-                color: this.colorArr[index].start + "0.7)"
-              },
-                {
-                  offset: 0.5,
-                  color: this.colorArr[index].start + "0.3)"
-                },
-                {
-                  offset: 1,
-                  color: this.colorArr[index].end
-                }
-              ],
-              globalCoord: false
-            }
-          }
-        }
-        option.series[index] = wf
-        index++;
-      }
-      this.charts.setOption(option, true)
-      var _this = this
-      window.addEventListener("resize", function () {
-        _this.charts.resize();
-      });
+      // this.charts = echarts.init(document.getElementById('wfcharts'))
+      // var option = {
+      //   title: {
+      //     top: 20,
+      //     text: '测风塔信息-风速频率图',
+      //     textStyle: {
+      //       fontWeight: 'normal',
+      //       fontSize: 16,
+      //       color: this.lineColor
+      //     },
+      //     left: '1%'
+      //   },
+      //   tooltip: {
+      //     trigger: 'axis'
+      //   },
+      //   grid: {
+      //     top: 100,
+      //     left: '2%',
+      //     right: '2%',
+      //     bottom: '10%',
+      //     containLabel: true
+      //   },
+      //   legend: {
+      //     top: 20,
+      //     width: '70%',
+      //     icon: 'rect',
+      //     itemWidth: 14,
+      //     itemHeight: 5,
+      //     itemGap: 13,
+      //     data: [],
+      //     right: '4%',
+      //     textStyle: {
+      //       fontSize: 12,
+      //       color: this.lineColor
+      //     },
+      //     selected: {}
+      //   },
+      //   calculable: true,
+      //
+      //   xAxis: [
+      //     {
+      //       type: 'category',
+      //       axisLine: {
+      //         lineStyle: {
+      //           color: this.lineColor
+      //         }
+      //       },
+      //       data: ['0-3m/s', '3-6m/s', '6-9m/s', '9-12m/s', '12-15m/s', '15-18m/s', '18-21m/s', '21-24m/s', '24-27m/s', '>27m/s']
+      //     }
+      //   ],
+      //   yAxis: [
+      //     {
+      //       type: 'value',
+      //       name: '%',
+      //       axisTick: {
+      //         show: false
+      //       },
+      //       axisLine: {
+      //         lineStyle: {
+      //           color: this.lineColor
+      //         }
+      //       },
+      //
+      //       axisLabel: {
+      //         margin: 10,
+      //         textStyle: {
+      //           fontSize: 14,
+      //           color: this.lineColor
+      //         },
+      //         formatter: '{value}',
+      //       },
+      //       splitLine: {
+      //         lineStyle: {
+      //           color: '#57617B'
+      //         }
+      //       }
+      //     }
+      //   ],
+      //   series: []
+      // };
+      // var index = 0;
+      //
+      // for (var key in wfData) {
+      //   var keyName = '';
+      //   for (let thFormatKey in this.thFormat) {
+      //     if (key == thFormatKey) {
+      //       keyName = this.thFormat[thFormatKey];
+      //     }
+      //   }
+      //   option.legend.data.push(keyName)
+      //   if (index > 3) {
+      //     option.legend.selected[keyName] = false
+      //   } else {
+      //     option.legend.selected[keyName] = true
+      //   }
+      //   var wf = new Object
+      //   wf.name = keyName
+      //   wf.type = 'bar'
+      //   wf.data = wfData[key]
+      //   wf.connectNulls = true
+      //   wf.itemStyle = {
+      //     normal: {
+      //       color: {
+      //         type: "linear",
+      //         x: 0,
+      //         y: 0,
+      //         x2: 0,
+      //         y2: 1,
+      //         colorStops: [{
+      //           offset: 0,
+      //           color: this.colorArr[index].start + "0.7)"
+      //         },
+      //           {
+      //             offset: 0.5,
+      //             color: this.colorArr[index].start + "0.3)"
+      //           },
+      //           {
+      //             offset: 1,
+      //             color: this.colorArr[index].end
+      //           }
+      //         ],
+      //         globalCoord: false
+      //       }
+      //     }
+      //   }
+      //   option.series[index] = wf
+      //   index++;
+      // }
+      // this.charts.setOption(option, true)
+      // var _this = this
+      // window.addEventListener("resize", function () {
+      //   _this.charts.resize();
+      // });
     },
     wsDraw(wsData) {
 
@@ -1194,6 +1194,8 @@ export default {
       param.append('equipmentId', this.equipmentId)
       queryTableData(param).then((res) => {
         this.tableData = res.data.data.records
+
+        console.log(this.tableData)
         this.page.pageSize = res.data.data.size
         this.page.total = res.data.data.total
       })
@@ -1251,13 +1253,14 @@ export default {
           this.wsDraw(this.wsData)
           this.wsChart.resize()
         })
-      } else if (this.activeName === "Third") {
-        this.charts = null
-        this.$nextTick(() => {
-          this.wfDraw(this.wfData)
-          this.charts.resize()
-        })
       }
+      // else if (this.activeName === "Third") {
+      //   this.charts = null
+      //   this.$nextTick(() => {
+      //     this.wfDraw(this.wfData)
+      //     this.charts.resize()
+      //   })
+      // }
     }
   }
 }

+ 2 - 2
ipp-common/ipp-common-data/src/main/java/com/jiayue/ipp/common/data/entity/WeatherStationStatusData.java

@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
 
 import javax.validation.constraints.Digits;
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * idp_weather_station_status_data
@@ -53,7 +53,7 @@ public class WeatherStationStatusData extends BaseDataEntity<WeatherStationStatu
      * 时间
      */
     @ApiModelProperty(value = "时间")
-    private LocalDateTime time;
+    private Date time;
 
 
     /**

+ 2 - 2
ipp-common/ipp-common-data/src/main/java/com/jiayue/ipp/common/data/entity/WindTowerStatusData.java

@@ -11,7 +11,7 @@ import lombok.EqualsAndHashCode;
 
 import javax.validation.constraints.Digits;
 import java.math.BigDecimal;
-import java.time.LocalDateTime;
+import java.util.Date;
 
 /**
  * idp_wind_tower_status_data
@@ -53,7 +53,7 @@ public class WindTowerStatusData extends BaseDataEntity<WindTowerStatusData> {
      * 时间
      */
     @ApiModelProperty(value = "时间")
-    private LocalDateTime time;
+    private Date time;
 
 
     /**

+ 107 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/controller/WeatherStationStatusDataController.java

@@ -0,0 +1,107 @@
+package com.jiayue.ipp.idp.controller;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.ipp.common.data.entity.WeatherStationStatusData;
+import com.jiayue.ipp.idp.service.WeatherStationStatusDataService;
+import com.jiayue.ipp.idp.util.R;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+
+
+/**
+ * idp_weather_station_status_data
+ *
+ * @author whc
+ * @date 2022-03-18 15:49:50
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/weatherstationstatusdata")
+@Api(value = "weatherstationstatusdata", tags = "idp_weather_station_status_data管理")
+public class WeatherStationStatusDataController {
+
+    private final WeatherStationStatusDataService weatherStationStatusDataService;
+
+    /**
+     * 分页查询
+     *
+     * @param page                     分页对象
+     * @param weatherStationStatusData idp_weather_station_status_data
+     * @return
+     */
+    @ApiOperation(value = "分页查询", notes = "分页查询")
+    @GetMapping("/page")
+    public R getWeatherStationStatusDataPage(Page page, WeatherStationStatusData weatherStationStatusData) {
+        return R.ok(weatherStationStatusDataService.page(page, Wrappers.query(weatherStationStatusData)).addOrder(OrderItem.asc("time")));
+    }
+
+    /**
+     * 通过id查询idp_weather_station_status_data
+     *
+     * @param id id
+     * @return R
+     */
+    @ApiOperation(value = "通过id查询", notes = "通过id查询")
+    @GetMapping("/{id}")
+    public R getById(@PathVariable("id") String id) {
+        return R.ok(weatherStationStatusDataService.getById(id));
+    }
+
+    /**
+     * 新增idp_weather_station_status_data
+     *
+     * @param weatherStationStatusData idp_weather_station_status_data
+     * @return R
+     */
+    @ApiOperation(value = "新增idp_weather_station_status_data", notes = "新增idp_weather_station_status_data")
+    @PostMapping
+    public R save(@RequestBody WeatherStationStatusData weatherStationStatusData) {
+        return R.ok(weatherStationStatusDataService.save(weatherStationStatusData));
+    }
+
+    /**
+     * 修改idp_weather_station_status_data
+     *
+     * @param weatherStationStatusData idp_weather_station_status_data
+     * @return R
+     */
+    @ApiOperation(value = "修改idp_weather_station_status_data", notes = "修改idp_weather_station_status_data")
+    @PutMapping
+    public R updateById(@RequestBody WeatherStationStatusData weatherStationStatusData) {
+        return R.ok(weatherStationStatusDataService.updateById(weatherStationStatusData));
+    }
+
+    /**
+     * 通过id删除idp_weather_station_status_data
+     *
+     * @param id id
+     * @return R
+     */
+    @ApiOperation(value = "通过id删除idp_weather_station_status_data", notes = "通过id删除idp_weather_station_status_data")
+    @DeleteMapping("/{id}")
+    public R removeById(@PathVariable String id) {
+        return R.ok(weatherStationStatusDataService.removeById(id));
+    }
+
+    @ApiOperation(value = "根据条件查询", notes = "查询")
+    @PostMapping("/queryCharts")
+    public R queryCharts(String stationCode, Long startTime, Long endTime, String equipmentId) {
+        return R.ok(weatherStationStatusDataService.findByStationCodeAndeTimeBetweenAndEquipmentId(stationCode, new Date(startTime), new Date(endTime), equipmentId));
+    }
+
+    @ApiOperation(value = "根据条件查询", notes = "分页查询")
+    @PostMapping("/queryTableData")
+    public R queryTableData(Long currentPage, Long pageSize, String stationCode, Long startTime, Long endTime, String equipmentId) {
+        Page page = new Page(currentPage, pageSize);
+        page.addOrder(OrderItem.asc("time"));
+        page.setMaxLimit((long) -1);
+        return R.ok(weatherStationStatusDataService.page(page, weatherStationStatusDataService.getPageByStationCodeAndeTimeBetweenAndEquipmentId(stationCode, new Date(startTime), new Date(endTime), equipmentId)));
+    }
+}

+ 65 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/controller/WindTowerStatusDataController.java

@@ -0,0 +1,65 @@
+package com.jiayue.ipp.idp.controller;
+
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.ipp.common.data.entity.WindTowerStatusData;
+import com.jiayue.ipp.idp.service.WindTowerStatusDataService;
+import com.jiayue.ipp.idp.util.R;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+
+/**
+ * idp_wind_tower_status_data
+ *
+ * @author whc
+ * @date 2022-03-18 15:50:05
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/windtowerstatusdata")
+@Api(value = "windtowerstatusdata", tags = "idp_wind_tower_status_data管理")
+public class WindTowerStatusDataController {
+
+    private final WindTowerStatusDataService windTowerStatusDataService;
+
+    /**
+     * 分页查询
+     *
+     * @param page                分页对象
+     * @param windTowerStatusData idp_wind_tower_status_data
+     * @return
+     */
+    @ApiOperation(value = "分页查询", notes = "分页查询")
+    @GetMapping("/page")
+    public R getWindTowerStatusDataPage(Page page, WindTowerStatusData windTowerStatusData) {
+        return R.ok(windTowerStatusDataService.page(page, Wrappers.query(windTowerStatusData)));
+    }
+
+    @ApiOperation(value = "通过条件查询", notes = "通过条件查询")
+    @PostMapping("/queryCharts")
+    public R queryCharts(String stationCode,
+                         Long startTime,
+                         Long endTime,
+                         String equipmentId) throws Exception {
+        return R.ok(windTowerStatusDataService.queryCharts(stationCode, new Date(startTime), new Date(endTime), equipmentId));
+    }
+
+    @ApiOperation(value = "根据条件查询", notes = "分页查询")
+    @PostMapping("/queryTableData")
+    public R queryTableData(Long currentPage, Long pageSize, String stationCode, Long startTime, Long endTime, String equipmentId) {
+        Page page = new Page(currentPage, pageSize);
+        page.addOrder(OrderItem.asc("time"));
+        page.setMaxLimit((long) -1);
+        return R.ok(windTowerStatusDataService.page(page, windTowerStatusDataService.getByBetweenTimeAndEquipmentIdAndStationCode(new Date(startTime), new Date(endTime), equipmentId, stationCode)));
+    }
+}

+ 6 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/WeatherStationStatusDataService.java

@@ -1,8 +1,12 @@
 package com.jiayue.ipp.idp.service;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jiayue.ipp.common.data.entity.WeatherStationStatusData;
 
+import java.util.Date;
+import java.util.Map;
+
 
 /**
  * 气象站数据业务层接口
@@ -11,5 +15,7 @@ import com.jiayue.ipp.common.data.entity.WeatherStationStatusData;
  * @date 2022-05-11 09:51:21
  */
 public interface WeatherStationStatusDataService extends IService<WeatherStationStatusData> {
+    Map<String, Object> findByStationCodeAndeTimeBetweenAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId);
 
+    QueryWrapper<WeatherStationStatusData> getPageByStationCodeAndeTimeBetweenAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId);
 }

+ 9 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/WindTowerStatusDataService.java

@@ -1,8 +1,13 @@
 package com.jiayue.ipp.idp.service;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jiayue.ipp.common.data.entity.WindTowerStatusData;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
 /**
  * 测风塔数据业务层接口
  *
@@ -10,5 +15,9 @@ import com.jiayue.ipp.common.data.entity.WindTowerStatusData;
  * @date 2022-05-11 09:51:21
  */
 public interface WindTowerStatusDataService extends IService<WindTowerStatusData> {
+    List<WindTowerStatusData> getByStationCodeBetweenTimeAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId);
+
+    QueryWrapper<WindTowerStatusData> getByBetweenTimeAndEquipmentIdAndStationCode(Date startTime, Date endTime, String equipmentId, String stationCode);
 
+    Map<String, Object> queryCharts(String stationCode, Date startTime, Date endTime, String equipmentId) throws Exception;
 }

+ 145 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/WeatherStationStatusDataServiceImpl.java

@@ -1,11 +1,18 @@
 package com.jiayue.ipp.idp.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jiayue.ipp.common.data.entity.WeatherStationStatusData;
 import com.jiayue.ipp.idp.mapper.WeatherStationStatusDataMapper;
 import com.jiayue.ipp.idp.service.WeatherStationStatusDataService;
 import org.springframework.stereotype.Service;
 
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.time.ZoneOffset;
+import java.util.*;
+import java.util.stream.Collectors;
+
 /**
  * 气象站数据业务层实现类
  *
@@ -15,4 +22,142 @@ import org.springframework.stereotype.Service;
 @Service
 public class WeatherStationStatusDataServiceImpl extends ServiceImpl<WeatherStationStatusDataMapper, WeatherStationStatusData> implements WeatherStationStatusDataService {
 
+    public QueryWrapper<WeatherStationStatusData> getPageByStationCodeAndeTimeBetweenAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId) {
+        QueryWrapper<WeatherStationStatusData> wrapper = new QueryWrapper<>();
+
+        if (stationCode != null && !stationCode.equals("")) {
+            wrapper.eq("station_code", stationCode);
+        }
+        if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
+            wrapper.between("time", startTime, endTime);
+        }
+        if (equipmentId != null && !equipmentId.equals("")) {
+            wrapper.eq("equipment_id", equipmentId);
+        }
+        return wrapper;
+    }
+
+    public List<WeatherStationStatusData> getByStationCodeAndTimeAndEndTimeAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId) {
+        QueryWrapper<WeatherStationStatusData> wrapper = new QueryWrapper<>();
+        if (stationCode != null && !stationCode.equals("")) {
+            wrapper.eq("station_code", stationCode);
+        }
+        if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
+            wrapper.between("time", startTime, endTime);
+        }
+        if (equipmentId != null && !equipmentId.equals("")) {
+            wrapper.eq("equipment_id", equipmentId);
+        }
+        return baseMapper.selectList(wrapper);
+    }
+
+    public Map<String, Object> findByStationCodeAndeTimeBetweenAndEquipmentId(String stationCode, Date startTime, Date endTime, String id) {
+        Map<String, Object> map = new HashMap<>();
+        List<WeatherStationStatusData> list = new ArrayList<>();
+        List<WeatherStationStatusData> checkList = new ArrayList<>();
+        list = getByStationCodeAndTimeAndEndTimeAndEquipmentId(stationCode, startTime, endTime, id);
+        list.sort(Comparator.comparing(WeatherStationStatusData::getTime));
+        long startTimeLong = startTime.getTime();
+        long endTimeLong = endTime.getTime();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        List<String> times = new ArrayList<>();
+        long timeStep = 300000L;
+        if (startTimeLong % timeStep != 0) {
+            startTimeLong = startTimeLong - (startTimeLong % timeStep) + timeStep;
+        }
+
+        for (long i = startTimeLong; i < endTimeLong; i = i + 300000L) {
+            long finalI = i;
+            List<WeatherStationStatusData> w = list.stream().filter(t -> t.getTime().getTime() == finalI).collect(Collectors.toList());
+            if (w != null && w.size() > 0) {
+                checkList.add(w.get(0));
+            } else {
+                //数据没有默认值 会空指针
+                checkList.add(new WeatherStationStatusData());
+            }
+            String timeFormat = sdf.format(new Date(i));
+            times.add(timeFormat);
+        }
+
+        List<Float> globalRDatas = new ArrayList<>();
+        List<Float> directRDatas = new ArrayList<>();
+        List<Float> diffuseRDatas = new ArrayList<>();
+        List<Float> obliqueRDatas = new ArrayList<>();
+        Map<String, Object> radiationMap = new HashMap<>();
+
+
+        List<Float> wsDatas = new ArrayList<>();
+        List<Float> wdDatas = new ArrayList<>();
+        Map<String, Object> otherMap = new HashMap<>();
+
+        BigDecimal nullValue = new BigDecimal(-99);
+        //总辐射
+        List<BigDecimal> globalRs = checkList.stream().map(WeatherStationStatusData::getGlobalR).collect(Collectors.toList());
+        for (BigDecimal b : globalRs) {
+            if (b.compareTo(nullValue) == 0) {
+                globalRDatas.add(null);
+            } else {
+                globalRDatas.add(b.floatValue());
+            }
+        }
+        //直辐射
+        List<BigDecimal> directRs = checkList.stream().map(WeatherStationStatusData::getDirectR).collect(Collectors.toList());
+        for (BigDecimal b : directRs) {
+            if (b.compareTo(nullValue) == 0) {
+                directRDatas.add(null);
+            } else {
+                directRDatas.add(b.floatValue());
+            }
+        }
+        //散辐射
+        List<BigDecimal> diffuseRs = checkList.stream().map(WeatherStationStatusData::getDiffuseR).collect(Collectors.toList());
+        for (BigDecimal b : diffuseRs) {
+            if (b.compareTo(nullValue) == 0) {
+                diffuseRDatas.add(null);
+            } else {
+                diffuseRDatas.add(b.floatValue());
+            }
+        }
+        //斜面辐射
+        List<BigDecimal> obliqueRs = checkList.stream().map(WeatherStationStatusData::getObliqueR).collect(Collectors.toList());
+        for (BigDecimal b : obliqueRs) {
+            if (b.compareTo(nullValue) == 0) {
+                obliqueRDatas.add(null);
+            } else {
+                obliqueRDatas.add(b.floatValue());
+            }
+        }
+
+
+        List<BigDecimal> wss = checkList.stream().map(WeatherStationStatusData::getWs).collect(Collectors.toList());
+        for (BigDecimal b : wss) {
+            if (b.compareTo(nullValue) == 0) {
+                wsDatas.add(null);
+            } else {
+                wsDatas.add(b.floatValue());
+            }
+        }
+
+        List<BigDecimal> wds = checkList.stream().map(WeatherStationStatusData::getWd).collect(Collectors.toList());
+        for (BigDecimal b : wds) {
+            if (b.compareTo(nullValue) == 0) {
+                wdDatas.add(null);
+            } else {
+                wdDatas.add(b.floatValue());
+            }
+        }
+
+        radiationMap.put("globalRs", globalRDatas);
+        radiationMap.put("directRs", directRDatas);
+        radiationMap.put("diffuseRs", diffuseRDatas);
+        radiationMap.put("obliqueRs", obliqueRDatas);
+
+        otherMap.put("wss", wsDatas);
+        otherMap.put("wds", wdDatas);
+
+        map.put("times", times);
+        map.put("radiationMap", radiationMap);
+        map.put("otherMap", otherMap);
+        return map;
+    }
 }

+ 391 - 0
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/WindTowerStatusDataServiceImpl.java

@@ -1,11 +1,23 @@
 package com.jiayue.ipp.idp.service.impl;
 
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jiayue.ipp.common.data.entity.WindTowerStatusData;
+import com.jiayue.ipp.common.data.entity.an.ParsingCftInfo;
 import com.jiayue.ipp.idp.mapper.WindTowerStatusDataMapper;
 import com.jiayue.ipp.idp.service.WindTowerStatusDataService;
+import com.jiayue.ipp.idp.service.an.ParsingCftInfoService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.time.ZoneOffset;
+import java.util.*;
+import java.util.stream.Collectors;
+
 /**
  * 测风塔数据业务层实现类
  *
@@ -14,5 +26,384 @@ import org.springframework.stereotype.Service;
  */
 @Service
 public class WindTowerStatusDataServiceImpl extends ServiceImpl<WindTowerStatusDataMapper, WindTowerStatusData> implements WindTowerStatusDataService {
+//    private final TunnelGatherDataPointService tunnelGatherDataPointService;
+
+//    private final EquipmentAttributeService equipmentAttributeService;
+    @Autowired
+    ParsingCftInfoService parsingCftInfoService;
+
+
+    @Override
+    public List<WindTowerStatusData> getByStationCodeBetweenTimeAndEquipmentId(String stationCode, Date startTime, Date endTime, String equipmentId) {
+        QueryWrapper<WindTowerStatusData> wrapper = new QueryWrapper<>();
+        if (stationCode != null && !stationCode.equals("")) {
+            wrapper.eq("station_code", stationCode);
+        }
+        if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
+            wrapper.between("time", startTime, endTime);
+        }
+        if (equipmentId != null && !equipmentId.equals("")) {
+            wrapper.eq("equipment_id", equipmentId);
+        }
+
+        return baseMapper.selectList(wrapper);
+    }
+
+    @Override
+    public QueryWrapper<WindTowerStatusData> getByBetweenTimeAndEquipmentIdAndStationCode(Date startTime, Date endTime, String equipmentId, String stationCode) {
+        QueryWrapper<WindTowerStatusData> wrapper = new QueryWrapper<>();
+        if (stationCode != null && !stationCode.equals("")) {
+            wrapper.eq("station_code", stationCode);
+        }
+        if (startTime != null && !startTime.equals("") && endTime != null && !endTime.equals("")) {
+            wrapper.between("time", startTime, endTime);
+        }
+        if (equipmentId != null && !equipmentId.equals("")) {
+            wrapper.eq("equipment_id", equipmentId);
+        }
+
+        return wrapper;
+    }
+
+    public Map<String, Object> queryCharts(String stationCode, Date startTime, Date endTime, String equipmentId) throws Exception {
+        Map<String, Object> map = new HashMap<>();
+        //所有数据
+        List<WindTowerStatusData> windTowerStatusDataList = getByStationCodeBetweenTimeAndEquipmentId(stationCode, startTime, endTime, equipmentId);
+        Collections.sort(windTowerStatusDataList, Comparator.comparing(WindTowerStatusData::getTime));
+        //根据设备id查询该设备下的所有接入点位
+        //TODO 没接入通道了 得重写
+//        List<TunnelGatherDataPoint> tunnelGatherDataPointList = tunnelGatherDataPointService.getByEquipmentId(equipmentId);
+//        List<String> thList = this.getTableHead(stationCode, tunnelGatherDataPointList);
+        //List<String> wsList = thList.stream().filter(t -> t.contains("wsInst")).collect(Collectors.toList());
+        //List<String> wdList = thList.stream().filter(t -> t.contains("wdInst")).collect(Collectors.toList());
+        List<ParsingCftInfo> list = parsingCftInfoService.list();
+        //根据场站编号过滤
+        List<ParsingCftInfo> parsingCftInfoList = list.stream().filter(p -> p.getStationCode().contains(stationCode)).collect(Collectors.toList());
+        //风速
+        Map<String, List<BigDecimal>> wsMap = new LinkedHashMap<>();
+        //风向
+        Map<String, List<BigDecimal>> wdMap = new LinkedHashMap();
+        if (!parsingCftInfoList.isEmpty()) {
+            //据唐乐说 不会出现一个场站配置两个测风塔解析的情况
+            ParsingCftInfo parsingCftInfo = parsingCftInfoList.get(0);
+            Field[] field = parsingCftInfo.getClass().getDeclaredFields();
+            for (Field f : field) {
+                //如果是private 不设置为true读取不到
+                f.setAccessible(true);
+                Map jsonMap = JSON.parseObject(JSON.toJSONString(parsingCftInfo), Map.class);
+                if (f.getName().contains("wsInst")) {
+                    if (!jsonMap.get(f.getName()).equals("")) {
+                        wsMap.put(f.getName(), new ArrayList<>());
+                    }
+                } else if (f.getName().contains("wdInst")) {
+                    if (!jsonMap.get(f.getName()).equals("")) {
+                        wdMap.put(f.getName(), new ArrayList<>());
+                    }
+                }
+            }
+        }
+        List<String> times = new ArrayList<>();
+        Long startTimes = startTime.getTime();
+        Long endTimes = endTime.getTime();
+        Long amendStartTime = startTimes;
+        Long timeStep = 300000L;
+        if (startTimes % timeStep != 0) {
+            amendStartTime = startTimes - (startTimes % timeStep) + timeStep;
+        }
+
+        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for (long i = amendStartTime; i < endTimes; i = i + 1000 * 60 * 5L) {
+            long filterI = i;
+            times.add(formatter.format(new Date(i)));
+            List<WindTowerStatusData> filterList = windTowerStatusDataList.stream().filter(t -> t.getTime().getTime()==filterI).collect(Collectors.toList());
+            if (!filterList.isEmpty()) {
+                WindTowerStatusData w = filterList.get(0);
+                Class c = w.getClass();
+                Field f;
+                for (String wsKey : wsMap.keySet()) {
+                    f = c.getDeclaredField(wsKey);
+                    f.setAccessible(true);
+                    if (new BigDecimal(-99).compareTo((BigDecimal) f.get(w)) == 0) {
+                        wsMap.get(wsKey).add(null);
+                    } else {
+                        wsMap.get(wsKey).add((BigDecimal) f.get(w));
+                    }
+                }
+                for (String wdKey : wdMap.keySet()) {
+                    f = c.getDeclaredField(wdKey);
+                    f.setAccessible(true);
+                    if (new BigDecimal(-99).compareTo((BigDecimal) f.get(w)) == 0) {
+                        wdMap.get(wdKey).add(null);
+                    } else {
+                        wdMap.get(wdKey).add((BigDecimal) f.get(w));
+                    }
+                }
+            } else {
+                for (String wsKey : wsMap.keySet()) {
+                    wsMap.get(wsKey).add(null);
+                }
+                for (String wsKey : wdMap.keySet()) {
+                    wdMap.get(wsKey).add(null);
+                }
+            }
+        }
+        Map<String, Object> wdFrequencyMap = new LinkedHashMap<>();
+        for (String wdMapKey : wdMap.keySet()) {
+            int[] frequency16 = new int[16];
+            Float[] frequency16Rate = new Float[16];
+            for (BigDecimal b : wdMap.get(wdMapKey)) {
+                if (b != null) {
+                    float wdfloat = b.floatValue();
+                    //N 北 0 348.76-11.25
+                    if ((wdfloat >= 348.76F && wdfloat <= 360F) || (wdfloat >= 0 && wdfloat <= 11.25)) {
+                        frequency16[0]++;
+                    }
+                    //NNE 北东北 22.5 11.26-33.75
+                    if (wdfloat >= 11.26F && wdfloat <= 33.75F) {
+                        frequency16[15]++;
+                    }
+                    //NE 东北 45 33.76-56.25
+                    if (wdfloat >= 33.76F && wdfloat <= 56.25F) {
+                        frequency16[14]++;
+                    }
+                    //ENE 东东北 67.5 56.26-78.75
+                    if (wdfloat >= 56.26F && wdfloat <= 78.75F) {
+                        frequency16[13]++;
+                    }
+                    //E 东 90 78.76-101.25
+                    if (wdfloat >= 78.76F && wdfloat <= 101.25F) {
+                        frequency16[12]++;
+                    }
+                    //ESE 东东南 112.5 101.26-123.75
+                    if (wdfloat >= 101.26F && wdfloat <= 123.75F) {
+                        frequency16[11]++;
+                    }
+                    //SE 东南 135 123.76-146.25
+                    if (wdfloat >= 123.76F && wdfloat <= 146.25F) {
+                        frequency16[10]++;
+                    }
+                    //SSE 南东南 157.5 146.26-168.75
+                    if (wdfloat >= 146.26F && wdfloat <= 168.75F) {
+                        frequency16[9]++;
+                    }
+                    //S 南 180 168.76-191.25
+                    if (wdfloat >= 168.76F && wdfloat <= 191.25F) {
+                        frequency16[8]++;
+                    }
+                    //SSW 南西南 202.5 191.26-213.75
+                    if (wdfloat >= 191.26F && wdfloat <= 213.75F) {
+                        frequency16[7]++;
+                    }
+                    //SW 西南  225 213.76-236.25
+                    if (wdfloat >= 213.76F && wdfloat <= 236.25F) {
+                        frequency16[6]++;
+                    }
+                    //WSW 西西南 247.5 236.26-258.75
+                    if (wdfloat >= 236.26F && wdfloat <= 258.75F) {
+                        frequency16[5]++;
+                    }
+                    //W 西 270 258.76-281.25
+                    if (wdfloat >= 258.76F && wdfloat <= 281.25F) {
+                        frequency16[4]++;
+                    }
+                    //WNW 西西北 295.5 281.26-303.75
+                    if (wdfloat >= 281.26F && wdfloat <= 303.75F) {
+                        frequency16[3]++;
+                    }
+                    //NW 西北 315 303.76-326.25
+                    if (wdfloat >= 303.76F && wdfloat <= 326.25F) {
+                        frequency16[2]++;
+                    }
+                    //NNW 北西北 337.5 326.26-348.
+                    if (wdfloat >= 326.26F && wdfloat <= 348.75F) {
+                        frequency16[1]++;
+                    }
+                }
+            }
+
+            if (wdMapKey.equals("wdInst50") || wdMapKey.equals("wdInst70")) {
+                String[] d = {"北", "北西北", "西北", "西西北", "西", "西西南", "西南", "南西南", "南", "南东南", "东南", "东东南", "东", "东北北", "东北", "北东北"};
+                int result = 0;
+                String dr = "无";
+                for (int i = 0; i < d.length; i++) {
+                    if (frequency16[i] > result) {
+                        result = frequency16[i];
+                        dr = d[i];
+                    }
+                }
+                map.put(wdMapKey, dr);
+            }
+
+
+            BigDecimal sumToltal = new BigDecimal(0);
+            for (int wdf : frequency16) {
+                BigDecimal b = new BigDecimal(wdf);
+                sumToltal = sumToltal.add(b);
+            }
+
+            for (int i = 0; i < frequency16.length; i++) {
+                if (frequency16[i] == 0) {
+                    frequency16Rate[i] = 0f;
+                } else {
+                    BigDecimal dividend = new BigDecimal(frequency16[i]);
+                    frequency16Rate[i] = dividend.divide(sumToltal, 2, BigDecimal.ROUND_HALF_UP).floatValue();
+                }
+            }
+            wdFrequencyMap.put(wdMapKey, frequency16Rate);
+        }
+
+        Map<String, Object> wsFrequencyMap = new LinkedHashMap<>();
+
+        for (String wsMapKey : wsMap.keySet()) {
+            int[] wsFrequency = new int[10];
+            float[] wsFrequencyRate = new float[16];
+            for (BigDecimal b : wsMap.get(wsMapKey)) {
+
+                if (b != null) {
+                    float wsfloat = b.floatValue();
+                    //0-3米风速
+                    if (wsfloat >= 0 && wsfloat <= 3) {
+                        wsFrequency[0]++;
+                    }
+                    //3-6米风速
+                    if (wsfloat > 3 && wsfloat <= 6) {
+                        wsFrequency[1]++;
+                    }
+                    //6-9米风速
+                    if (wsfloat > 6 && wsfloat <= 9) {
+                        wsFrequency[2]++;
+                    }
+                    //9-12米风速
+                    if (wsfloat > 9 && wsfloat <= 12) {
+                        wsFrequency[3]++;
+                    }
+                    //12-15米风速
+                    if (wsfloat > 12 && wsfloat <= 15) {
+                        wsFrequency[4]++;
+                    }
+                    //15-18米风速
+                    if (wsfloat > 15 && wsfloat <= 18) {
+                        wsFrequency[5]++;
+                    }
+                    //18-21米风速
+                    if (wsfloat > 18 && wsfloat <= 21) {
+                        wsFrequency[6]++;
+                    }
+                    //21-24米风速
+                    if (wsfloat > 21 && wsfloat <= 24) {
+                        wsFrequency[7]++;
+                    }
+                    //24-27米风速
+                    if (wsfloat > 24 && wsfloat <= 27) {
+                        wsFrequency[8]++;
+                    }
+                    //27米以上风速
+                    if (wsfloat > 27) {
+                        wsFrequency[9]++;
+                    }
+                }
+            }
+
+            BigDecimal sumToltal = new BigDecimal(0);
+
+            for (int wdf : wsFrequency) {
+                BigDecimal b = new BigDecimal(wdf);
+                sumToltal = sumToltal.add(b);
+            }
+
+            for (int i = 0; i < wsFrequency.length; i++) {
+                if (wsFrequency[i] == 0) {
+                    wsFrequencyRate[i] = 0f;
+                } else {
+                    BigDecimal dividend = new BigDecimal(wsFrequency[i]);
+                    wsFrequencyRate[i] = dividend.divide(sumToltal, 2, BigDecimal.ROUND_HALF_UP).floatValue();
+                }
+            }
+
+            wsFrequencyMap.put(wsMapKey, wsFrequencyRate);
+        }
+
+
+
+        Map<String, String> typemap = new HashMap<>();
+        typemap.put("wsInst10", "10风速瞬时值");
+        typemap.put("wsInst30", "30风速瞬时值");
+        typemap.put("wsInst50", "50风速瞬时值");
+        typemap.put("wsInst70", "70风速瞬时值");
+
+
+        map.put("equipmentType", typemap);
+        map.put("ws", wsMap);
+        map.put("wd", wdFrequencyMap);
+        map.put("wf", wsFrequencyMap);
+        map.put("times", times);
+//        map.put("tableHead", getTableHeader(tunnelGatherDataPointList));
+
+//        List<Map<String, String>> mapList = new ArrayList<>();
+//        Map<String, String> ws10heads = new HashMap<>();
+//        ws10heads.put("prop", "wsInst10");
+//        ws10heads.put("label", "10风速瞬时值");
+//        mapList.add(ws10heads);
+//        Map<String, String> ws30heads = new HashMap<>();
+//        ws30heads.put("prop", "wsInst30");
+//        ws30heads.put("label", "30风速瞬时值");
+//        mapList.add(ws30heads);
+
+        map.put("tableHead", "");
+        map.put("list", windTowerStatusDataList);
+        return map;
+    }
+
+//    public List<String> getTableHead(String stationCode, List<TunnelGatherDataPoint> tunnelGatherDataPointList) {
+//        List<String> allAttributeName = new ArrayList<>();
+//        List<EquipmentAttribute> byEquipmentType = equipmentAttributeService.getByEquipmentType("WINDTOWER");
+//        for (EquipmentAttribute equipmentAttribute : byEquipmentType) {
+//            allAttributeName.add(equipmentAttribute.getFieldName());
+//        }
+//        List<String> heads = new ArrayList<>();
+//        for (TunnelGatherDataPoint t : tunnelGatherDataPointList) {
+//            EquipmentAttribute equipmentAttribute = equipmentAttributeService.getById(t.getEquipmentAttributeId());
+//            String ponitName = equipmentAttribute.getFieldName();
+//            if (ponitName != null) {
+//                for (String an : allAttributeName) {
+//                    if (an.equals(ponitName)) {
+//                        heads.add(an);
+//                    }
+//                }
+//            }
+//        }
+//        return heads;
+//    }
+
+    /**
+     * 表格表头
+     *
+     * @param tunnelGatherDataPointList 点表
+     * @return
+     */
+//    public List<Map<String, String>> getTableHeader(List<TunnelGatherDataPoint> tunnelGatherDataPointList) {
+//        List<String> allAttributeName = new ArrayList<>();
+//        List<EquipmentAttribute> byEquipmentType = equipmentAttributeService.getByEquipmentType("WINDTOWER");
+//        for (EquipmentAttribute equipmentAttribute : byEquipmentType) {
+//            allAttributeName.add(equipmentAttribute.getFieldName());
+//        }
+//        List<Map<String, String>> mapList = new ArrayList<>();
+//        for (TunnelGatherDataPoint t : tunnelGatherDataPointList) {
+//            EquipmentAttribute equipmentAttribute = equipmentAttributeService.getById(t.getEquipmentAttributeId());
+//            String ponitName = equipmentAttribute.getFieldName();
+//            if (ponitName != null) {
+//                for (String an : allAttributeName) {
+//                    if (an.equals(ponitName)) {
+//                        Map<String, String> heads = new HashMap<>();
+//                        heads.put("prop", an);
+//                        heads.put("label", equipmentAttribute.getSignificance());
+//                        mapList.add(heads);
+//                    }
+//                }
+//
+//            }
+//        }
+//        return mapList;
+//    }
 
 }

+ 2 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/an/ParsingCftInfoServiceImpl.java

@@ -26,6 +26,7 @@ import java.io.File;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -80,8 +81,7 @@ public class ParsingCftInfoServiceImpl extends ServiceImpl<ParsingCftInfoMapper,
                                 Long time = parsingTime(parsingCftInfo.getTime(), fileContent);
                                 if (time != 0L) {
                                     WindTowerStatusData windTowerStatusData = new WindTowerStatusData();
-                                    LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault());
-                                    windTowerStatusData.setTime(localDateTime);
+                                    windTowerStatusData.setTime(new Date(time));
 
                                     windTowerStatusData.setTInst(parsingValue(parsingCftInfo.gettInst(), fileContent));
                                     windTowerStatusData.setPaInst(parsingValue(parsingCftInfo.getPaInst(), fileContent));

+ 2 - 2
ipp-idp/src/main/java/com/jiayue/ipp/idp/service/impl/an/ParsingQxzInfoServiceImpl.java

@@ -25,6 +25,7 @@ import java.io.File;
 import java.time.Instant;
 import java.time.LocalDateTime;
 import java.time.ZoneId;
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -75,8 +76,7 @@ public class ParsingQxzInfoServiceImpl extends ServiceImpl<ParsingQxzInfoMapper,
                                 Long time = parsingTime(parsingQxzInfo.getTime(), fileContent);
                                 if (time != 0L) {
                                     WeatherStationStatusData w = new WeatherStationStatusData();
-                                    LocalDateTime localDateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneId.systemDefault());
-                                    w.setTime(localDateTime);
+                                    w.setTime(new Date(time));
                                     w.setAirT(parsingValue(parsingQxzInfo.getAirT(), fileContent));
                                     w.setCellT(parsingValue(parsingQxzInfo.getCellT(), fileContent));
                                     w.setDiffuseR(parsingValue(parsingQxzInfo.getDiffuseR(), fileContent));