yuanhao 2 年之前
父节点
当前提交
4a2ed1a519

+ 9 - 0
in-client-qn-ui/src/api/backforefp.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function fetchList(query) {
+  return request({
+    url: '/backForeForecastData/page',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
in-client-qn-ui/src/api/backforeusfp.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function fetchList(query) {
+  return request({
+    url: '/backForeUsForecastData/page',
+    method: 'get',
+    params: query
+  })
+}

+ 9 - 0
in-client-qn-ui/src/api/backstat.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+export function fetchList(query) {
+  return request({
+    url: '/backStatData/page',
+    method: 'get',
+    params: query
+  })
+}

+ 60 - 4
in-client-qn-ui/src/router/index.js

@@ -65,6 +65,7 @@ export const asyncRoutes = [
         name: 'station',
         meta: {
           title: '场站信息',
+          icon: 'info',
           permissions: ['admin'],
         },
       },
@@ -101,21 +102,76 @@ export const asyncRoutes = [
     ],
   },
 
+
   {
-    path: '/forecastData',
+    path: '/data',
     component: Layout,
-    redirect: '/forecastData',
+    redirect: 'noRedirect',
+    name: 'data',
+    alwaysShow: true,
+    meta: { title: '数据查询', icon: 'flag' },
     children: [
       {
         path: 'forecastData',
+        component: () => import('@/views/data/forecastData/index'),
         name: 'forecastData',
-        component: () => import('@/views/forecastData/index'),
         meta: {
-          title: '数据查询', icon: 'bell',
+          title: '功率修正',
+          permissions: ['admin'],
+        },
+      },
+      {
+        path: 'backforefp',
+        component: () => import('@/views/data/backforefp/index'),
+        name: 'backforefp',
+        meta: {
+          title: '短期回传',
+          permissions: ['admin'],
+        },
+      },
+
+      {
+        path: 'backforeusfp',
+        component: () => import('@/views/data/backforeusfp/index'),
+        name: 'backforeusfp',
+        meta: {
+          title: '超短期回传',
+          permissions: ['admin'],
+        },
+      },
+
+      {
+        path: 'backstatdata',
+        component: () => import('@/views/data/backstatdata/index'),
+        name: 'backstatdata',
+        meta: {
+          title: '统计回传',
+          permissions: ['admin'],
+        },
+      },
+
+      {
+        path: 'usfpcorrect',
+        component: () => import('@/views/data/usfpcorrect/index'),
+        name: 'usfpcorrect',
+        meta: {
+          title: '超短期修正',
+          permissions: ['admin'],
+        },
+      },
+      {
+        path: 'rpcorrect',
+        component: () => import('@/views/data/rpcorrect/index'),
+        name: 'rpcorrect',
+        meta: {
+          title: '检修计划',
+          permissions: ['admin'],
         },
       },
     ],
   },
+
+
   {
     path: '/record',
     component: Layout,

+ 193 - 0
in-client-qn-ui/src/views/data/backforefp/index.vue

@@ -0,0 +1,193 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            标记时间:
+            <el-date-picker
+              v-model="searchForm.signTime"
+              type="date"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+          </el-form-item>
+
+        </el-form>
+
+      </vab-query-form-left-panel>
+
+
+      <vab-query-form-right-panel :span="1">
+
+      </vab-query-form-right-panel>
+
+
+    </vab-query-form>
+
+    <el-table
+      ref="table"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="标记时间" prop="signTime" />
+      <el-table-column show-overflow-tooltip label="解析时间" prop="analysisTime"/>
+
+      <el-table-column show-overflow-tooltip label="回传时间" prop="backTime" />
+      <el-table-column show-overflow-tooltip label="预测时间" prop="forecastTime" />
+      <el-table-column show-overflow-tooltip label="预测功率" prop="forecastValue" />
+      <el-table-column show-overflow-tooltip label="预测开机" prop="forecastOpenCap" />
+
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+  </div>
+</template>
+
+<script>
+  import { fetchList } from '@/api/backforefp'
+
+  export default {
+    name: 'Record',
+
+    data() {
+      return {
+        tableData: [],
+        searchForm: {signTime:this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(0, 0, 0, 0))),},
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.fetchData()
+    },
+    methods: {
+      async fetchData() {
+        this.listLoading = true
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+
+
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'y+': date.getFullYear().toString(), // 年
+          'M+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          'm+': date.getMinutes().toString(), // 分
+          's+': date.getSeconds().toString(), // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 196 - 0
in-client-qn-ui/src/views/data/backforeusfp/index.vue

@@ -0,0 +1,196 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            标记时间:
+            <el-date-picker
+              v-model="searchForm.signTime"
+              type="datetime"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+          </el-form-item>
+
+        </el-form>
+
+      </vab-query-form-left-panel>
+
+
+      <vab-query-form-right-panel :span="1">
+
+      </vab-query-form-right-panel>
+
+
+    </vab-query-form>
+
+    <el-table
+      ref="table"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="标记时间" prop="signTime" />
+      <el-table-column show-overflow-tooltip label="解析时间" prop="analysisTime"/>
+
+      <el-table-column show-overflow-tooltip label="回传时间" prop="backTime" />
+      <el-table-column show-overflow-tooltip label="预测时间" prop="forecastTime" />
+      <el-table-column show-overflow-tooltip label="预测功率" prop="forecastValue" />
+      <el-table-column show-overflow-tooltip label="预测开机" prop="forecastOpenCap" />
+
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+  </div>
+</template>
+
+<script>
+import { fetchList } from '@/api/backforeusfp'
+
+export default {
+  name: 'Record',
+
+  data() {
+    return {
+      tableData: [],
+      searchForm: {signTime:this.dateFormat("yyyy-MM-dd HH:mm:ss",this.dateFor15(new Date())),},
+      listLoading: true,
+      layout: 'total, sizes, prev, pager, next, jumper',
+      total: 0,
+      background: true,
+      elementLoadingText: '正在加载...',
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20, // 每页显示多少条
+      },
+    }
+  },
+  computed: {
+    height() {
+      return this.$baseTableHeight()
+    },
+  },
+  created() {
+    this.fetchData()
+  },
+  methods: {
+    async fetchData() {
+      this.listLoading = true
+      fetchList(
+        Object.assign(
+          {
+            current: this.page.currentPage,
+            size: this.page.pageSize,
+          },
+          this.searchForm
+        )
+      )
+        .then((response) => {
+          this.tableData = response.data.records
+          this.page.total = response.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.listLoading = false
+        })
+    },
+
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.fetchData()
+    },
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.fetchData()
+    },
+    handleQuery() {
+      for (var v in this.searchForm) {
+        if (this.searchForm[v] == '') {
+          delete this.searchForm[v]
+        }
+      }
+
+      this.page.currentPage = 1
+      this.fetchData()
+    },
+
+    dateFor15(date){
+      return  new Date(Math.floor(date.getTime()/900000) *900000)
+    },
+
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'y+': date.getFullYear().toString(), // 年
+        'M+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        'm+': date.getMinutes().toString(), // 分
+        's+': date.getSeconds().toString(), // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+  },
+}
+</script>
+
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+.demo-table-expand label {
+  width: 90px;
+  color: #99a9bf;
+}
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+  width: 50%;
+}
+</style>

+ 226 - 0
in-client-qn-ui/src/views/data/backstatdata/index.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            标记时间:
+<!--            <el-date-picker
+              v-model="searchForm.signTime"
+              type="datetime"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              placeholder="选择日期">
+            </el-date-picker>-->
+
+            <el-date-picker
+              v-model="times"
+              type="datetimerange"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+          </el-form-item>
+
+        </el-form>
+
+      </vab-query-form-left-panel>
+
+
+      <vab-query-form-right-panel :span="1">
+
+      </vab-query-form-right-panel>
+
+
+    </vab-query-form>
+
+    <el-table
+      ref="table"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column width="150" show-overflow-tooltip label="标记时间" prop="signTime" />
+      <el-table-column  width="150" show-overflow-tooltip label="解析时间" prop="analysisTime"/>
+      <el-table-column width="150" show-overflow-tooltip label="实际功率" prop="realPower" />
+      <el-table-column show-overflow-tooltip label="总辐射" prop="globalR" />
+      <el-table-column show-overflow-tooltip label="直辐射" prop="directR" />
+      <el-table-column show-overflow-tooltip label="散辐射" prop="diffuseR" />
+      <el-table-column show-overflow-tooltip label="风速" prop="ws" />
+      <el-table-column show-overflow-tooltip label="风向" prop="wd" />
+      <el-table-column show-overflow-tooltip label="电池温度" prop="cellT" />
+
+      <el-table-column show-overflow-tooltip label="温度" prop="temperature" />
+      <el-table-column show-overflow-tooltip label="湿度" prop="humidity" />
+      <el-table-column show-overflow-tooltip label="气压" prop="pressure" />
+      <el-table-column show-overflow-tooltip label="气压" prop="pressure" />
+      <el-table-column show-overflow-tooltip label="超短期上报" prop="reportStateForecastshort" />
+      <el-table-column show-overflow-tooltip label="短期上报" prop="reportStateForecast" />
+
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+  </div>
+</template>
+
+<script>
+import { fetchList } from '@/api/backstat'
+
+export default {
+  name: 'Record',
+
+  data() {
+    return {
+      tableData: [],
+      searchForm: {
+
+        },
+
+      times:[ this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(0, 0, 0, 0))),
+        this.dateFormat("yyyy-MM-dd HH:mm:ss",this.dateFor15(new Date()))],
+      listLoading: true,
+      layout: 'total, sizes, prev, pager, next, jumper',
+      total: 0,
+      background: true,
+      elementLoadingText: '正在加载...',
+      page: {
+        total: 0, // 总页数
+        currentPage: 1, // 当前页数
+        pageSize: 20, // 每页显示多少条
+      },
+    }
+  },
+  computed: {
+    height() {
+      return this.$baseTableHeight()
+    },
+  },
+  created() {
+    this.fetchData()
+  },
+  methods: {
+    async fetchData() {
+      this.listLoading = true
+      this.searchForm.startTime = null
+      this.searchForm.endTime = null
+      if(this.times !=null){
+        this.searchForm.startTime = this.times[0]
+        this.searchForm.endTime = this.times[1]
+      }
+      fetchList(
+        Object.assign(
+          {
+            current: this.page.currentPage,
+            size: this.page.pageSize,
+          },
+          this.searchForm
+        )
+      )
+        .then((response) => {
+          this.tableData = response.data.records
+          this.page.total = response.data.total
+          this.listLoading = false
+        })
+        .catch(() => {
+          this.listLoading = false
+        })
+    },
+
+    handleSizeChange(val) {
+      this.page.pageSize = val
+      this.page.currentPage = 1
+      this.fetchData()
+    },
+    handleCurrentChange(val) {
+      this.page.currentPage = val
+      this.fetchData()
+    },
+    handleQuery() {
+      for (var v in this.searchForm) {
+        if (this.searchForm[v] == '') {
+          delete this.searchForm[v]
+        }
+      }
+
+      this.page.currentPage = 1
+      this.fetchData()
+    },
+
+  dateFor15(date){
+   return  new Date(Math.floor(date.getTime()/900000) *900000)
+  },
+
+    dateFormat(fmt, date) {
+      let ret
+      const opt = {
+        'y+': date.getFullYear().toString(), // 年
+        'M+': (date.getMonth() + 1).toString(), // 月
+        'd+': date.getDate().toString(), // 日
+        'H+': date.getHours().toString(), // 时
+        'm+': date.getMinutes().toString(), // 分
+        's+': date.getSeconds().toString(), // 秒
+        // 有其他格式化字符需求可以继续添加,必须转化成字符串
+      }
+      for (let k in opt) {
+        ret = new RegExp('(' + k + ')').exec(fmt)
+        if (ret) {
+          fmt = fmt.replace(
+            ret[1],
+            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+          )
+        }
+      }
+      return fmt
+    },
+  },
+}
+</script>
+
+<style>
+.demo-table-expand {
+  font-size: 0;
+}
+.demo-table-expand label {
+  width: 90px;
+  color: #99a9bf;
+}
+.demo-table-expand .el-form-item {
+  margin-right: 0;
+  margin-bottom: 0;
+  width: 50%;
+}
+</style>

+ 0 - 0
in-client-qn-ui/src/views/forecastData/index.vue → in-client-qn-ui/src/views/data/forecastData/index.vue


+ 264 - 0
in-client-qn-ui/src/views/data/rpcorrect/index.vue

@@ -0,0 +1,264 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            <el-date-picker
+              v-model="times"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            ></el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+          </el-form-item>
+
+        </el-form>
+
+      </vab-query-form-left-panel>
+
+
+      <vab-query-form-right-panel :span="1">
+
+      </vab-query-form-right-panel>
+
+
+    </vab-query-form>
+
+    <el-table
+      ref="table"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="日志类型" prop="type" :formatter="formatType"/>
+      <el-table-column show-overflow-tooltip label="内容" prop="content" :formatter="formatContent"/>
+
+      <el-table-column show-overflow-tooltip label="状态" prop="state" />
+      <el-table-column show-overflow-tooltip label="状态内容" prop="stateContent" />
+      <el-table-column
+        show-overflow-tooltip
+        label="标记时间"
+        prop="time"
+        :formatter="formatDate"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        label="创建时间"
+        prop="createTime"
+        :formatter="formatDate"
+      />
+
+      <el-table-column show-overflow-tooltip label="操作" width="180px">
+        <template #default="{ row }">
+
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+  </div>
+</template>
+
+<script>
+  import { fetchList ,delObj} from '@/api/record'
+
+  export default {
+    name: 'Record',
+
+    data() {
+      return {
+        tableData: [],
+        types: [{label:"拉取原始数据",value:"PULL_INIT"},
+          {label:"推送原始数据",value:"PUSH_INIT"},
+          {label:"拉取修正数据",value:"PULL_CORRECT"},
+          {label:"交互权限",value:"COM_PERMISSON"},
+          {label:"拉取修正文件",value:"PULL_CORRECT_JY"},
+          {label:"修正数据",value:"CORRECT_DATA"},
+          {label:"回传数据",value:"BACK_DATA"},
+          {label:"回传文件解析",value:"BACK_DATA_FILE"},
+        ],
+        contents:[
+          {label:"回传预测数据",value:"BACK_FORE_ALL"},
+          {label:"回传统计数据",value:"BACK_STAT_ALL"},
+          {label:"下发超短期修正",value:"CORRULTRSHOR"},
+          {label:"下发检修计划",value:"REPAPLAN"},
+        ],
+        searchForm: {},
+        times: [
+          this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(0, 0, 0, 0))),
+          this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(23, 59, 59, 59))),
+        ],
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.fetchData()
+    },
+    methods: {
+      async fetchData() {
+        this.listLoading = true
+        this.searchForm.startTime = null
+        this.searchForm.endTime = null
+        if(this.times !=null){
+          this.searchForm.startTime = this.times[0]
+          this.searchForm.endTime = this.times[1]
+        }
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          await delObj(row.id)
+          this.$baseMessage('删除成功', 'success')
+          this.fetchData()
+        })
+      },
+
+      formatType(row, column) {
+        for (let i = 0; i < this.types.length; i++) {
+          if (row.type == this.types[i].value) {
+            return this.types[i].label
+          }
+        }
+      },
+
+      formatContent(row, column) {
+        for (let i = 0; i < this.contents.length; i++) {
+          if (row.content == this.contents[i].value) {
+            return this.contents[i].label
+          }
+        }
+      },
+
+      formatDate(row, column) {
+        let pro = column.property
+        return row[pro]
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'y+': date.getFullYear().toString(), // 年
+          'M+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          'm+': date.getMinutes().toString(), // 分
+          's+': date.getSeconds().toString(), // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 264 - 0
in-client-qn-ui/src/views/data/usfpcorrect/index.vue

@@ -0,0 +1,264 @@
+<template>
+  <div class="table-container">
+    <vab-query-form>
+
+      <vab-query-form-left-panel>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          :inline="true"
+          @submit.native.prevent
+        >
+          <el-form-item>
+            <el-date-picker
+              v-model="times"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+            ></el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-button
+              icon="el-icon-search"
+              type="primary"
+              native-type="submit"
+              @click="handleQuery"
+            >
+              查询
+            </el-button>
+          </el-form-item>
+
+        </el-form>
+
+      </vab-query-form-left-panel>
+
+
+      <vab-query-form-right-panel :span="1">
+
+      </vab-query-form-right-panel>
+
+
+    </vab-query-form>
+
+    <el-table
+      ref="table"
+      v-loading="listLoading"
+      :data="tableData"
+      :element-loading-text="elementLoadingText"
+      :height="height"
+      :header-cell-style="{ 'text-align': 'center' }"
+      :cell-style="{ 'text-align': 'center' }"
+    >
+      <el-table-column show-overflow-tooltip label="序号" width="95">
+        <template #default="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+
+      <el-table-column show-overflow-tooltip label="日志类型" prop="type" :formatter="formatType"/>
+      <el-table-column show-overflow-tooltip label="内容" prop="content" :formatter="formatContent"/>
+
+      <el-table-column show-overflow-tooltip label="状态" prop="state" />
+      <el-table-column show-overflow-tooltip label="状态内容" prop="stateContent" />
+      <el-table-column
+        show-overflow-tooltip
+        label="标记时间"
+        prop="time"
+        :formatter="formatDate"
+      />
+      <el-table-column
+        show-overflow-tooltip
+        label="创建时间"
+        prop="createTime"
+        :formatter="formatDate"
+      />
+
+      <el-table-column show-overflow-tooltip label="操作" width="180px">
+        <template #default="{ row }">
+
+          <el-button type="text" @click="handleDelete(row)">
+            <el-tag type="danger">删除</el-tag>
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      :background="background"
+      :current-page="page.currentPage"
+      :layout="layout"
+      :page-size="page.pageSize"
+      :total="page.total"
+      @current-change="handleCurrentChange"
+      @size-change="handleSizeChange"
+    ></el-pagination>
+  </div>
+</template>
+
+<script>
+  import { fetchList ,delObj} from '@/api/record'
+
+  export default {
+    name: 'Record',
+
+    data() {
+      return {
+        tableData: [],
+        types: [{label:"拉取原始数据",value:"PULL_INIT"},
+          {label:"推送原始数据",value:"PUSH_INIT"},
+          {label:"拉取修正数据",value:"PULL_CORRECT"},
+          {label:"交互权限",value:"COM_PERMISSON"},
+          {label:"拉取修正文件",value:"PULL_CORRECT_JY"},
+          {label:"修正数据",value:"CORRECT_DATA"},
+          {label:"回传数据",value:"BACK_DATA"},
+          {label:"回传文件解析",value:"BACK_DATA_FILE"},
+        ],
+        contents:[
+          {label:"回传预测数据",value:"BACK_FORE_ALL"},
+          {label:"回传统计数据",value:"BACK_STAT_ALL"},
+          {label:"下发超短期修正",value:"CORRULTRSHOR"},
+          {label:"下发检修计划",value:"REPAPLAN"},
+        ],
+        searchForm: {},
+        times: [
+          this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(0, 0, 0, 0))),
+          this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(23, 59, 59, 59))),
+        ],
+        listLoading: true,
+        layout: 'total, sizes, prev, pager, next, jumper',
+        total: 0,
+        background: true,
+        elementLoadingText: '正在加载...',
+        page: {
+          total: 0, // 总页数
+          currentPage: 1, // 当前页数
+          pageSize: 20, // 每页显示多少条
+        },
+      }
+    },
+    computed: {
+      height() {
+        return this.$baseTableHeight()
+      },
+    },
+    created() {
+      this.fetchData()
+    },
+    methods: {
+      async fetchData() {
+        this.listLoading = true
+        this.searchForm.startTime = null
+        this.searchForm.endTime = null
+        if(this.times !=null){
+          this.searchForm.startTime = this.times[0]
+          this.searchForm.endTime = this.times[1]
+        }
+        fetchList(
+          Object.assign(
+            {
+              current: this.page.currentPage,
+              size: this.page.pageSize,
+            },
+            this.searchForm
+          )
+        )
+          .then((response) => {
+            this.tableData = response.data.records
+            this.page.total = response.data.total
+            this.listLoading = false
+          })
+          .catch(() => {
+            this.listLoading = false
+          })
+      },
+
+      handleSizeChange(val) {
+        this.page.pageSize = val
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleCurrentChange(val) {
+        this.page.currentPage = val
+        this.fetchData()
+      },
+      handleQuery() {
+        for (var v in this.searchForm) {
+          if (this.searchForm[v] == '') {
+            delete this.searchForm[v]
+          }
+        }
+
+        this.page.currentPage = 1
+        this.fetchData()
+      },
+      handleDelete(row) {
+        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
+          await delObj(row.id)
+          this.$baseMessage('删除成功', 'success')
+          this.fetchData()
+        })
+      },
+
+      formatType(row, column) {
+        for (let i = 0; i < this.types.length; i++) {
+          if (row.type == this.types[i].value) {
+            return this.types[i].label
+          }
+        }
+      },
+
+      formatContent(row, column) {
+        for (let i = 0; i < this.contents.length; i++) {
+          if (row.content == this.contents[i].value) {
+            return this.contents[i].label
+          }
+        }
+      },
+
+      formatDate(row, column) {
+        let pro = column.property
+        return row[pro]
+      },
+      dateFormat(fmt, date) {
+        let ret
+        const opt = {
+          'y+': date.getFullYear().toString(), // 年
+          'M+': (date.getMonth() + 1).toString(), // 月
+          'd+': date.getDate().toString(), // 日
+          'H+': date.getHours().toString(), // 时
+          'm+': date.getMinutes().toString(), // 分
+          's+': date.getSeconds().toString(), // 秒
+          // 有其他格式化字符需求可以继续添加,必须转化成字符串
+        }
+        for (let k in opt) {
+          ret = new RegExp('(' + k + ')').exec(fmt)
+          if (ret) {
+            fmt = fmt.replace(
+              ret[1],
+              ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
+            )
+          }
+        }
+        return fmt
+      },
+    },
+  }
+</script>
+
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 90px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 50%;
+  }
+</style>

+ 15 - 0
in-client-qn-ui/src/views/record/index.vue

@@ -60,6 +60,7 @@
       </el-table-column>
 
       <el-table-column show-overflow-tooltip label="日志类型" prop="type" :formatter="formatType"/>
+      <el-table-column show-overflow-tooltip label="内容" prop="content" :formatter="formatContent"/>
 
       <el-table-column show-overflow-tooltip label="状态" prop="state" />
       <el-table-column show-overflow-tooltip label="状态内容" prop="stateContent" />
@@ -115,6 +116,12 @@
           {label:"回传数据",value:"BACK_DATA"},
           {label:"回传文件解析",value:"BACK_DATA_FILE"},
         ],
+        contents:[
+          {label:"回传预测数据",value:"BACK_FORE_ALL"},
+          {label:"回传统计数据",value:"BACK_STAT_ALL"},
+          {label:"下发超短期修正",value:"CORRULTRSHOR"},
+          {label:"下发检修计划",value:"REPAPLAN"},
+        ],
         searchForm: {},
         times: [
           this.dateFormat("yyyy-MM-dd HH:mm:ss",new Date(new Date().setHours(0, 0, 0, 0))),
@@ -203,6 +210,14 @@
         }
       },
 
+      formatContent(row, column) {
+        for (let i = 0; i < this.contents.length; i++) {
+          if (row.content == this.contents[i].value) {
+            return this.contents[i].label
+          }
+        }
+      },
+
       formatDate(row, column) {
         let pro = column.property
         return row[pro]

+ 54 - 0
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/controller/BackForeForecastDataController.java

@@ -0,0 +1,54 @@
+package com.jiayue.insu.inclientqn.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.inclientqn.entity.BackForeForecastData;
+import com.jiayue.insu.inclientqn.entity.CorrforeSt;
+import com.jiayue.insu.inclientqn.service.BackForeForecastDataService;
+import com.jiayue.insu.inclientqn.service.CorrforeStService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+
+/**
+ * backForeForecstData
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/backForeForecastData")
+public class BackForeForecastDataController {
+
+    private final BackForeForecastDataService backForeForecstDataService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @param backForeForecastData backForeForecastData
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getPage(Page page, BackForeForecastData backForeForecastData) {
+            LambdaQueryWrapper<BackForeForecastData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+
+
+        if(backForeForecastData.getSignTime()!=null){
+            lambdaQueryWrapper.eq(BackForeForecastData::getSignTime,backForeForecastData.getSignTime());
+
+        }
+        lambdaQueryWrapper.orderByAsc(BackForeForecastData::getForecastTime);
+
+        return R.ok(backForeForecstDataService.page(page, lambdaQueryWrapper));
+    }
+
+
+
+
+
+}

+ 67 - 0
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/controller/BackForeUsForecastDataController.java

@@ -0,0 +1,67 @@
+package com.jiayue.insu.inclientqn.controller;
+
+import cn.hutool.core.date.DatePattern;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.date.LocalDateTimeUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.inclientqn.entity.BackForeForecastData;
+import com.jiayue.insu.inclientqn.entity.BackForeUsForecastData;
+import com.jiayue.insu.inclientqn.service.BackForeForecastDataService;
+import com.jiayue.insu.inclientqn.service.BackForeUsForecastDataService;
+import com.jiayue.insu.inclientqn.util.DateTimeUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.cglib.core.Local;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+
+/**
+ * backForeForecstData
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/backForeUsForecastData")
+public class BackForeUsForecastDataController {
+
+    private final BackForeUsForecastDataService backForeUsForecastDataService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @param backForeUsForecastData backForeUsForecastData
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getPage(Page page, BackForeUsForecastData backForeUsForecastData) {
+            LambdaQueryWrapper<BackForeUsForecastData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+
+
+        if(backForeUsForecastData.getSignTime()!=null){
+            String dateStr = LocalDateTimeUtil.formatNormal(backForeUsForecastData.getSignTime());
+            DateTime dateTime = new DateTime(dateStr, DatePattern.NORM_DATETIME_FORMAT);
+            long longTime = DateTimeUtils.get15min(dateTime.getTime());
+            lambdaQueryWrapper.eq(BackForeUsForecastData::getSignTime, LocalDateTimeUtil.of(longTime));
+
+        }
+        lambdaQueryWrapper.orderByAsc(BackForeUsForecastData::getForecastTime);
+
+        return R.ok(backForeUsForecastDataService.page(page, lambdaQueryWrapper));
+    }
+
+
+
+
+
+}

+ 60 - 0
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/controller/BackStatDataController.java

@@ -0,0 +1,60 @@
+package com.jiayue.insu.inclientqn.controller;
+
+import cn.hutool.core.date.DatePattern;
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.LocalDateTimeUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.inclientqn.entity.BackForeUsForecastData;
+import com.jiayue.insu.inclientqn.entity.BackStatData;
+import com.jiayue.insu.inclientqn.service.BackForeUsForecastDataService;
+import com.jiayue.insu.inclientqn.service.BackStatDataService;
+import com.jiayue.insu.inclientqn.util.DateTimeUtils;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.time.LocalDateTime;
+
+
+/**
+ * backForeForecstData
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/backStatData")
+public class BackStatDataController {
+
+    private final BackStatDataService backStatDataService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getPage(Page page, String startTime, String endTime) {
+            LambdaQueryWrapper<BackStatData> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+
+
+        if(startTime!=null && endTime!=null){
+            lambdaQueryWrapper.between(BackStatData::getSignTime, startTime,endTime);
+
+        }
+        lambdaQueryWrapper.orderByAsc(BackStatData::getSignTime);
+
+        return R.ok(backStatDataService.page(page, lambdaQueryWrapper));
+    }
+
+
+
+
+
+}

+ 55 - 0
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/controller/CorrectUltraShortTermController.java

@@ -0,0 +1,55 @@
+package com.jiayue.insu.inclientqn.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.jiayue.insu.common.core.util.R;
+import com.jiayue.insu.inclientqn.entity.BackStatData;
+import com.jiayue.insu.inclientqn.entity.CorrectUltraShortTerm;
+import com.jiayue.insu.inclientqn.service.BackStatDataService;
+import com.jiayue.insu.inclientqn.service.CorrectUltraShortTermService;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * backForeForecstData
+ *
+ * @author yh
+ * @date 2022-03-18 15:48:48
+ */
+@RestController
+@RequiredArgsConstructor
+@RequestMapping("/correctUltraShortTerm")
+public class CorrectUltraShortTermController {
+
+    private final CorrectUltraShortTermService correctUltraShortTermService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getPage(Page page, CorrectUltraShortTerm correctUltraShortTerm) {
+
+        LambdaQueryWrapper<CorrectUltraShortTerm> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+
+
+        if(correctUltraShortTerm.getSignTime()!=null ){
+            lambdaQueryWrapper.eq(CorrectUltraShortTerm::getSignTime, correctUltraShortTerm.getSignTime());
+        }
+
+        lambdaQueryWrapper.orderByAsc(CorrectUltraShortTerm::getSignTime);
+
+        return R.ok(correctUltraShortTermService.page(page, lambdaQueryWrapper));
+    }
+
+
+
+
+
+}

+ 4 - 0
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/inenum/QNHLEnum.java

@@ -41,6 +41,10 @@ public enum QNHLEnum {
     DATA_STAT_TYPE_RealWeather("RealWeather","RealWeather","实际气象回传"),
     DATA_STAT_TYPE_ForecastPowerReport("ForecastPowerReport","ForecastPowerReport","短期上报状态回传"),
     DATA_STAT_TYPE_UltraShortTermForecastReport("UltraShortTermForecastReport","UltraShortTermForecastReport","超短期上报状态回传"),
+
+    DATA_STAT_ALL("BACK_STAT_ALL","BACK_STAT_ALL","统计数据回传"),
+
+    DATA_FORE_ALL("BACK_FORE_ALL","BACK_FORE_ALL","预测数据回传")
             ;
 
     private String code;

+ 2 - 1
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/job/BackForeDataJob.java

@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.date.LocalDateTimeUtil;
 import com.jiayue.insu.inclientqn.constant.CommonStant;
 import com.jiayue.insu.inclientqn.entity.Record;
+import com.jiayue.insu.inclientqn.inenum.QNHLEnum;
 import com.jiayue.insu.inclientqn.inenum.StatusEnum;
 import com.jiayue.insu.inclientqn.service.RecordService;
 import com.jiayue.insu.inclientqn.service.client.RequestDataService;
@@ -33,7 +34,7 @@ public class BackForeDataJob implements Job {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
         long time = DateTimeUtils.get15min(DateUtil.date().getTime());
         LocalDateTime localDateTime = LocalDateTimeUtil.of(time);
-        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime, CommonStant.RECORD_TYPE_BACK_DATA, "BACK_FORE_ALL", StatusEnum.SUCCESS.getSign());
+        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime, CommonStant.RECORD_TYPE_BACK_DATA, QNHLEnum.DATA_FORE_ALL.getCode(), StatusEnum.SUCCESS.getSign());
 
         if (record == null) {
             requestDataService.requestBackFore(time);

+ 1 - 1
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/job/BackStatDataJob.java

@@ -34,7 +34,7 @@ public class BackStatDataJob implements Job {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
         long time = DateTimeUtils.get15min(DateUtil.date().getTime());
         LocalDateTime localDateTime = LocalDateTimeUtil.of(time);
-        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime, CommonStant.RECORD_TYPE_BACK_DATA, "BACK_STAT_ALL", StatusEnum.SUCCESS.getSign());
+        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime, CommonStant.RECORD_TYPE_BACK_DATA, QNHLEnum.DATA_STAT_ALL.getCode(), StatusEnum.SUCCESS.getSign());
 
         if (record == null) {
             requestDataService.requestBackStat(time);

+ 9 - 7
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/service/client/RequestDataService.java

@@ -26,6 +26,7 @@ import java.time.LocalDateTime;
 import java.util.List;
 import java.util.SortedMap;
 import java.util.TreeMap;
+import java.util.stream.Collectors;
 
 
 /**
@@ -66,7 +67,7 @@ public class RequestDataService {
         record.setType(CommonStant.RECORD_TYPE_BACK_DATA);
         record.setTime(localDateTime);
         record.setCreateTime(LocalDateTime.now());
-        record.setContent("BACK_STAT_ALL");
+        record.setContent(QNHLEnum.DATA_STAT_ALL.getCode());
 
         Station station = stationService.findThis();
         StringBuilder stringBuilder = new StringBuilder();
@@ -86,9 +87,6 @@ public class RequestDataService {
             if (requestVo != null && comPermisson.isToken(station)) {
                 JSONObject json = JSONUtil.parseObj(requestVo, true);
                 String body = json.toString();
-                System.out.println("----------------------------------------------------------------------");
-                System.out.println(body);
-                System.out.println("----------------------------------------------------------------------");
                 String response = RequestUtils.post(station.getBackurl(), body, station.getComKey());
 
                 if (RequestUtils.checkResponse(response, record)) {
@@ -137,7 +135,7 @@ public class RequestDataService {
         record.setType(CommonStant.RECORD_TYPE_BACK_DATA);
         record.setTime(localDateTime);
         record.setCreateTime(LocalDateTime.now());
-        record.setContent("BACK_FORE_ALL");
+        record.setContent(QNHLEnum.DATA_FORE_ALL.getCode());
 
         Station station = stationService.findThis();
         StringBuilder stringBuilder = new StringBuilder();
@@ -155,9 +153,13 @@ public class RequestDataService {
         }
 
         if (CollectionUtil.isNotEmpty(list)) {
-            stringBuilder.append(backDataGenBodyService.genForeForecast(list));
+            //当数据有回传记录则不再回传
+            List<BackForeForecastData> fList = list.stream().filter(b -> b.getBackTime() == null).collect(Collectors.toList());
+            if(CollectionUtil.isNotEmpty(fList)){
+                stringBuilder.append(backDataGenBodyService.genForeForecast(list));
+                list.forEach(u->u.setBackTime(LocalDateTime.now()));
+            }
 
-            list.forEach(u->u.setBackTime(LocalDateTime.now()));
         }
 
         RequestVo requestVo = RequestVo.UPLOAD_FORE(station.getSignCode(), stringBuilder.toString(), signTime);