yuanhao 2 gadi atpakaļ
vecāks
revīzija
13ff250cde

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

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

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

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

+ 112 - 180
in-client-qn-ui/src/views/data/rpcorrect/index.vue

@@ -5,20 +5,18 @@
       <vab-query-form-left-panel>
       <vab-query-form-left-panel>
         <el-form
         <el-form
           ref="searchForm"
           ref="searchForm"
-          :model="searchForm"
           :inline="true"
           :inline="true"
           @submit.native.prevent
           @submit.native.prevent
         >
         >
           <el-form-item>
           <el-form-item>
+            标记时间:
             <el-date-picker
             <el-date-picker
-              v-model="times"
-              type="datetimerange"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
+              v-model="searchForm.signTime"
+              type="date"
               format="yyyy-MM-dd HH:mm:ss"
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
-            ></el-date-picker>
+              placeholder="选择日期">
+            </el-date-picker>
           </el-form-item>
           </el-form-item>
 
 
           <el-form-item>
           <el-form-item>
@@ -59,32 +57,14 @@
         </template>
         </template>
       </el-table-column>
       </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="signTime" />
+      <el-table-column show-overflow-tooltip label="请求时间" prop="requestTime" />
+      <el-table-column show-overflow-tooltip label="传输时间" prop="passTime"/>
+      <el-table-column show-overflow-tooltip label="开始时间" prop="startTime" />
+      <el-table-column show-overflow-tooltip label="结束时间" prop="endTime" />
+      <el-table-column show-overflow-tooltip label="削减容量" prop="cap" />
 
 
-      <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-table>
     <el-pagination
     <el-pagination
       :background="background"
       :background="background"
@@ -99,166 +79,118 @@
 </template>
 </template>
 
 
 <script>
 <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()
+import { fetchList } from '@/api/rpcorrect'
+
+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
-        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
-          )
+  },
+  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()
-      },
-      handleDelete(row) {
-        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
-          await delObj(row.id)
-          this.$baseMessage('删除成功', 'success')
-          this.fetchData()
+      )
+        .then((response) => {
+          this.tableData = response.data.records
+          this.page.total = response.data.total
+          this.listLoading = false
         })
         })
-      },
+        .catch(() => {
+          this.listLoading = false
+        })
+    },
 
 
-      formatType(row, column) {
-        for (let i = 0; i < this.types.length; i++) {
-          if (row.type == this.types[i].value) {
-            return this.types[i].label
-          }
+    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]
         }
         }
-      },
+      }
 
 
-      formatContent(row, column) {
-        for (let i = 0; i < this.contents.length; i++) {
-          if (row.content == this.contents[i].value) {
-            return this.contents[i].label
-          }
-        }
-      },
+      this.page.currentPage = 1
+      this.fetchData()
+    },
 
 
-      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')
-            )
-          }
+    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
-      },
+      }
+      return fmt
     },
     },
-  }
+  },
+}
 </script>
 </script>
 
 
 <style>
 <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%;
-  }
+.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>
 </style>

+ 111 - 180
in-client-qn-ui/src/views/data/usfpcorrect/index.vue

@@ -5,20 +5,18 @@
       <vab-query-form-left-panel>
       <vab-query-form-left-panel>
         <el-form
         <el-form
           ref="searchForm"
           ref="searchForm"
-          :model="searchForm"
           :inline="true"
           :inline="true"
           @submit.native.prevent
           @submit.native.prevent
         >
         >
           <el-form-item>
           <el-form-item>
+            标记时间:
             <el-date-picker
             <el-date-picker
-              v-model="times"
-              type="datetimerange"
-              range-separator="至"
-              start-placeholder="开始日期"
-              end-placeholder="结束日期"
+              v-model="searchForm.signTime"
+              type="datetime"
               format="yyyy-MM-dd HH:mm:ss"
               format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
               value-format="yyyy-MM-dd HH:mm:ss"
-            ></el-date-picker>
+              placeholder="选择日期">
+            </el-date-picker>
           </el-form-item>
           </el-form-item>
 
 
           <el-form-item>
           <el-form-item>
@@ -59,32 +57,13 @@
         </template>
         </template>
       </el-table-column>
       </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="signTime" />
+      <el-table-column show-overflow-tooltip label="请求时间" prop="requestTime" />
+      <el-table-column show-overflow-tooltip label="传输时间" prop="passTime"/>
+      <el-table-column show-overflow-tooltip label="预测时间" prop="forecastTime" />
+      <el-table-column show-overflow-tooltip label="预测系数" prop="ratio" />
 
 
-      <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-table>
     <el-pagination
     <el-pagination
       :background="background"
       :background="background"
@@ -99,166 +78,118 @@
 </template>
 </template>
 
 
 <script>
 <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()
+import { fetchList } from '@/api/usfpcorrect'
+
+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
-        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
-          )
+  },
+  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()
-      },
-      handleDelete(row) {
-        this.$baseConfirm('你确定要删除当前项吗', null, async () => {
-          await delObj(row.id)
-          this.$baseMessage('删除成功', 'success')
-          this.fetchData()
+      )
+        .then((response) => {
+          this.tableData = response.data.records
+          this.page.total = response.data.total
+          this.listLoading = false
         })
         })
-      },
+        .catch(() => {
+          this.listLoading = false
+        })
+    },
 
 
-      formatType(row, column) {
-        for (let i = 0; i < this.types.length; i++) {
-          if (row.type == this.types[i].value) {
-            return this.types[i].label
-          }
+    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]
         }
         }
-      },
+      }
 
 
-      formatContent(row, column) {
-        for (let i = 0; i < this.contents.length; i++) {
-          if (row.content == this.contents[i].value) {
-            return this.contents[i].label
-          }
-        }
-      },
+      this.page.currentPage = 1
+      this.fetchData()
+    },
 
 
-      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')
-            )
-          }
+    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
-      },
+      }
+      return fmt
     },
     },
-  }
+  },
+}
 </script>
 </script>
 
 
 <style>
 <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%;
-  }
+.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>
 </style>

+ 8 - 0
in-client-qn-ui/src/views/vab/station/index.vue

@@ -47,6 +47,10 @@
               <span>{{ props.row.localFilePath }}</span>
               <span>{{ props.row.localFilePath }}</span>
             </el-form-item>
             </el-form-item>
 
 
+            <el-form-item label="回传位置:">
+              <span>{{ props.row.backFilePath }}</span>
+            </el-form-item>
+
             <el-form-item label="秘钥过期:">
             <el-form-item label="秘钥过期:">
               <span>{{ props.row.keyTime }}</span>
               <span>{{ props.row.keyTime }}</span>
             </el-form-item>
             </el-form-item>
@@ -157,6 +161,10 @@
           <el-input v-model.trim="form.localFilePath" autocomplete="off"></el-input>
           <el-input v-model.trim="form.localFilePath" autocomplete="off"></el-input>
         </el-form-item>
         </el-form-item>
 
 
+        <el-form-item label="回传文件位置" prop="backFilePath">
+          <el-input v-model.trim="form.backFilePath" autocomplete="off"></el-input>
+        </el-form-item>
+
         <el-form-item label="推送天数" prop="days">
         <el-form-item label="推送天数" prop="days">
           <el-input-number
           <el-input-number
             v-model.trim="form.days"
             v-model.trim="form.days"

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

@@ -0,0 +1,54 @@
+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.CorrectUltraShortTerm;
+import com.jiayue.insu.inclientqn.entity.RepairPlan;
+import com.jiayue.insu.inclientqn.service.CorrectUltraShortTermService;
+import com.jiayue.insu.inclientqn.service.RepairPlanService;
+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("/correctRepairPlan")
+public class CorrectRepairPlanController {
+
+    private final RepairPlanService repairPlanService;
+
+    /**
+     * 分页查询
+     *
+     * @param page   分页对象
+     * @return
+     */
+
+    @GetMapping("/page")
+    public R getPage(Page page, RepairPlan repairPlan) {
+
+        LambdaQueryWrapper<RepairPlan> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+
+
+        if(repairPlan.getSignTime()!=null ){
+            lambdaQueryWrapper.eq(RepairPlan::getSignTime, repairPlan.getSignTime());
+        }
+
+        lambdaQueryWrapper.orderByAsc(RepairPlan::getStartTime);
+        return R.ok(repairPlanService.page(page, lambdaQueryWrapper));
+    }
+
+
+
+
+
+}

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

@@ -35,7 +35,7 @@ public class CorrectUsJob implements Job {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
     public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
         long time = DateTimeUtils.get15min(DateUtil.date().getTime());
         long time = DateTimeUtils.get15min(DateUtil.date().getTime());
         LocalDateTime localDateTime = LocalDateTimeUtil.of(time);
         LocalDateTime localDateTime = LocalDateTimeUtil.of(time);
-        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime, CommonStant.RECORD_TYPE_CORRECT_DATA, QNHLEnum.DATA_CORRULTRSHOR_TYPE.getCode(), StatusEnum.SUCCESS.getSign());
+        Record record = recordService.findTimeAndTypeAndContentAndState(localDateTime.plusMinutes(15L), CommonStant.RECORD_TYPE_CORRECT_DATA, QNHLEnum.DATA_CORRULTRSHOR_TYPE.getCode(), StatusEnum.SUCCESS.getSign());
 
 
         if (record == null) {
         if (record == null) {
             corrforeService.downLoadUltraShortTerm(time);
             corrforeService.downLoadUltraShortTerm(time);

+ 2 - 2
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/model/RequestVo.java

@@ -46,13 +46,13 @@ public class RequestVo {
 
 
     public static RequestVo CORRECT_US(String el,String data,long time) {
     public static RequestVo CORRECT_US(String el,String data,long time) {
 
 
-        DateTime dateTime =  DateTime.of(time);
+        DateTime dateTime =  DateTime.of(time+1800000L);
         String fileName = el + "_" + dateTime.toString("yyyyMMdd_HHmm") + "_" + QNHLEnum.DATA_CORRULTRSHOR_TYPE.getSign() + ".CIME";
         String fileName = el + "_" + dateTime.toString("yyyyMMdd_HHmm") + "_" + QNHLEnum.DATA_CORRULTRSHOR_TYPE.getSign() + ".CIME";
         return RequestVo.builder()
         return RequestVo.builder()
                 .transferType(QNHLEnum.TRANSFER_TYPE_CORRECT.getCode())
                 .transferType(QNHLEnum.TRANSFER_TYPE_CORRECT.getCode())
                 .date(dateTime.toString("yyyyMMdd"))
                 .date(dateTime.toString("yyyyMMdd"))
                 .dataType(QNHLEnum.DATA_CORRULTRSHOR_TYPE.getSign())
                 .dataType(QNHLEnum.DATA_CORRULTRSHOR_TYPE.getSign())
-                //.fileName(fileName)
+                .fileName(fileName)
                 .data(data).build();
                 .data(data).build();
     }
     }
 
 

+ 19 - 23
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/service/client/BackDataAnalysisService.java

@@ -105,13 +105,7 @@ public class BackDataAnalysisService {
      */
      */
     public void watchFile() {
     public void watchFile() {
 
 
-        Record record = new Record();
-        record.setType(CommonStant.RECORD_TYPE_BACK_DATA_FILE);
-        record.setState(StatusEnum.FILE_NULL.getCode());
-        record.setStateContent(StatusEnum.FILE_NULL.getMsg());
-        LocalDateTime localDateTime = LocalDateTimeUtil.of(DateTimeUtils.get15min(DateUtil.date().getTime()));
-        record.setTime(localDateTime);
-        record.setCreateTime(LocalDateTime.now());
+
         //获取扫描文件路径
         //获取扫描文件路径
         if (StrUtil.isEmpty(backFilePath)) {
         if (StrUtil.isEmpty(backFilePath)) {
             backFilePath = stationService.findThis().getBackFilePath();
             backFilePath = stationService.findThis().getBackFilePath();
@@ -128,36 +122,38 @@ public class BackDataAnalysisService {
         watchMonitor.setWatcher(new DelayWatcher(new Watcher() {
         watchMonitor.setWatcher(new DelayWatcher(new Watcher() {
             @Override
             @Override
             public void onCreate(WatchEvent<?> event, Path currentPath) {
             public void onCreate(WatchEvent<?> event, Path currentPath) {
-                File file = null;
+                Record record = new Record();
+                record.setType(CommonStant.RECORD_TYPE_BACK_DATA_FILE);
+                record.setContent("BACK_FILE_ANALYSIS");
+                record.setState(StatusEnum.FILE_NULL.getCode());
+                record.setStateContent(StatusEnum.FILE_NULL.getMsg());
+                LocalDateTime localDateTime = LocalDateTimeUtil.of(DateTimeUtils.get15min(DateUtil.date().getTime()));
+                record.setTime(localDateTime);
+                record.setCreateTime(LocalDateTime.now());
+
                 try {
                 try {
                     Object obj = event.context();
                     Object obj = event.context();
                     System.out.println();
                     System.out.println();
                     Console.log("创建:{}-> {}", currentPath, obj);
                     Console.log("创建:{}-> {}", currentPath, obj);
                     if (obj.toString().startsWith(CommonStant.RECORD_TYPE_BACK_DATA_FILE)) {
                     if (obj.toString().startsWith(CommonStant.RECORD_TYPE_BACK_DATA_FILE)) {
 
 
-                        file = FileUtil.file(currentPath.toString() + File.separatorChar + obj.toString());
-
-                        if (file.exists()) {// 判断目录是否存在
-                            FileReader fileReader = new FileReader(currentPath.toString() + File.separatorChar + obj.toString());
-                            List<String> contents = fileReader.readLines();
-                            if (CollectionUtil.isNotEmpty(contents)) {
-                                String s = fileAnalysis(contents);
-                                if (StrUtil.isNotEmpty(s)) {
-                                    record.setStateContent(s);
-                                    record.setState(StatusEnum.SUCCESS.getCode());
-                                }
-
+                        FileReader fileReader = new FileReader(currentPath.toString() + File.separatorChar + obj.toString());
+                        List<String> contents = fileReader.readLines();
+                        if (CollectionUtil.isNotEmpty(contents)) {
+                            String s = fileAnalysis(contents);
+                            if (StrUtil.isNotEmpty(s)) {
+                                record.setStateContent(s);
+                                record.setState(StatusEnum.SUCCESS.getCode());
                             }
                             }
-                        } else {
-                            file.mkdirs();
+
                         }
                         }
 
 
+
                     }
                     }
                 } catch (Exception e) {
                 } catch (Exception e) {
                     e.printStackTrace();
                     e.printStackTrace();
                 } finally {
                 } finally {
                     record.setCreateTime(LocalDateTime.now());
                     record.setCreateTime(LocalDateTime.now());
-                    LocalDateTime localDateTime = LocalDateTimeUtil.of(DateTimeUtils.get15min(DateUtil.date().getTime()));
                     record.setTime(localDateTime);
                     record.setTime(localDateTime);
                     recordService.save(record);
                     recordService.save(record);
                 }
                 }

+ 51 - 43
in-client-qn/src/main/java/com/jiayue/insu/inclientqn/service/client/BackDataGenBodyService.java

@@ -45,17 +45,21 @@ public class BackDataGenBodyService {
 
 
         StringBuilder content = new StringBuilder();
         StringBuilder content = new StringBuilder();
 
 
-        String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_RealPower.getCode());
-        String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_RealPower.getCode());
-        String title = TemplateStant.BACK_STAT_REAL_POWER_TITLE;
+        if (backStatDatas.get(0).getRealPower() != null) {
 
 
-        content.append(labelStart);
-        content.append(title);
+            String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_RealPower.getCode());
+            String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_RealPower.getCode());
+            String title = TemplateStant.BACK_STAT_REAL_POWER_TITLE;
 
 
-        String dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_POWER_TEMPLATE, backStatDatas.get(0).getRealPower().toString());
+            content.append(labelStart);
+            content.append(title);
+
+            String dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_POWER_TEMPLATE, backStatDatas.get(0).getRealPower().toString());
+
+            content.append(dataContent);
+            content.append(labelEnd);
+        }
 
 
-        content.append(dataContent);
-        content.append(labelEnd);
 
 
         return content;
         return content;
     }
     }
@@ -72,34 +76,42 @@ public class BackDataGenBodyService {
 
 
         StringBuilder content = new StringBuilder();
         StringBuilder content = new StringBuilder();
 
 
-        String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_RealWeather.getCode());
-        String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_RealWeather.getCode());
 
 
-        content.append(labelStart);
-        String title = "";
-        String dataContent = "";
-        BackStatData backStatData = backStatDatas.get(0);
+        try {
+            String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_RealWeather.getCode());
+            String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_RealWeather.getCode());
 
 
-        if (stationType.equals(ElectricFieldTypeEnum.E2.name())) {
+            content.append(labelStart);
+            String title = "";
+            String dataContent = "";
+            BackStatData backStatData = backStatDatas.get(0);
 
 
-            title = TemplateStant.BACK_STAT_REAL_WEATHER_TITLE_E2;
-            dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_WEATHER_TEMPLATE_E2, backStatData.getWs().toString(), backStatData.getWd().toString()
-                    , backStatData.getTemperature().toString(), backStatData.getHumidity().toString(), backStatData.getPressure().toString());
+            if (stationType.equals(ElectricFieldTypeEnum.E2.name())) {
 
 
-        } else {
+                title = TemplateStant.BACK_STAT_REAL_WEATHER_TITLE_E2;
+                dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_WEATHER_TEMPLATE_E2, backStatData.getWs().toString(), backStatData.getWd().toString()
+                        , backStatData.getTemperature().toString(), backStatData.getHumidity().toString(), backStatData.getPressure().toString());
 
 
-            title = TemplateStant.BACK_STAT_REAL_WEATHER_TITLE_E1;
-            dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_WEATHER_TEMPLATE_E1, backStatData.getGlobalR().toString(), backStatData.getDirectR().toString()
-                    , backStatData.getDiffuseR().toString(), backStatData.getTemperature().toString(), backStatData.getCellT().toString(),
-                    backStatData.getHumidity().toString(), backStatData.getPressure().toString(), backStatData.getWs().toString(), backStatData.getWd().toString()
-            );
+            } else {
 
 
+                title = TemplateStant.BACK_STAT_REAL_WEATHER_TITLE_E1;
+                dataContent = StrUtil.format(TemplateStant.BACK_STAT_REAL_WEATHER_TEMPLATE_E1, backStatData.getGlobalR().toString(), backStatData.getDirectR().toString()
+                        , backStatData.getDiffuseR().toString(), backStatData.getTemperature().toString(), backStatData.getCellT().toString(),
+                        backStatData.getHumidity().toString(), backStatData.getPressure().toString(), backStatData.getWs().toString(), backStatData.getWd().toString()
+                );
+
+            }
+
+
+            content.append(title);
+            content.append(dataContent);
+            content.append(labelEnd);
+        }catch (Exception e){
+            e.printStackTrace();
+            content = new StringBuilder();
         }
         }
 
 
 
 
-        content.append(title);
-        content.append(dataContent);
-        content.append(labelEnd);
 
 
 
 
         return content;
         return content;
@@ -115,21 +127,21 @@ public class BackDataGenBodyService {
     public StringBuilder genStateForecastPowerReport(List<BackStatData> backStatDatas) {
     public StringBuilder genStateForecastPowerReport(List<BackStatData> backStatDatas) {
 
 
         StringBuilder content = new StringBuilder();
         StringBuilder content = new StringBuilder();
+        if (backStatDatas.get(0).getReportStateForecast() != null) {
 
 
-
-        String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_ForecastPowerReport.getCode());
-        String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_ForecastPowerReport.getCode());
-        String title = TemplateStant.BACK_FORE_FORECAST_TITLE_REPORT;
+            String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_ForecastPowerReport.getCode());
+            String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_ForecastPowerReport.getCode());
+            String title = TemplateStant.BACK_FORE_FORECAST_TITLE_REPORT;
 
 
 
 
-        content.append(labelStart);
-        content.append(title);
-
-        String dataContent = StrUtil.format(TemplateStant.BACK_FORE_FORECAST_TEMPLATE_REPORT, backStatDatas.get(0).getReportStateForecast().toString());
+            content.append(labelStart);
+            content.append(title);
 
 
-        content.append(dataContent);
-        content.append(labelEnd);
+            String dataContent = StrUtil.format(TemplateStant.BACK_FORE_FORECAST_TEMPLATE_REPORT, backStatDatas.get(0).getReportStateForecast().toString());
 
 
+            content.append(dataContent);
+            content.append(labelEnd);
+        }
 
 
         return content;
         return content;
     }
     }
@@ -145,8 +157,7 @@ public class BackDataGenBodyService {
 
 
 
 
         StringBuilder content = new StringBuilder();
         StringBuilder content = new StringBuilder();
-        if (CollectionUtil.isNotEmpty(backStatDatas) && backStatDatas.get(0).getReportStateForecastshort() != null) {
-
+        if (backStatDatas.get(0).getReportStateForecastshort() != null) {
 
 
             String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_UltraShortTermForecastReport.getCode());
             String labelStart = TemplateStant.GEN_LABELSTART(QNHLEnum.DATA_STAT_TYPE_UltraShortTermForecastReport.getCode());
             String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_UltraShortTermForecastReport.getCode());
             String labelEnd = TemplateStant.GEN_LABELEND(QNHLEnum.DATA_STAT_TYPE_UltraShortTermForecastReport.getCode());
@@ -155,16 +166,13 @@ public class BackDataGenBodyService {
             content.append(labelStart);
             content.append(labelStart);
             content.append(title);
             content.append(title);
 
 
-
             String dataContent = StrUtil.format(TemplateStant.BACK_FORE_US_FORECAST_TITLE_TEMPLATE, backStatDatas.get(0).getReportStateForecastshort().toString());
             String dataContent = StrUtil.format(TemplateStant.BACK_FORE_US_FORECAST_TITLE_TEMPLATE, backStatDatas.get(0).getReportStateForecastshort().toString());
 
 
             content.append(dataContent);
             content.append(dataContent);
             content.append(labelEnd);
             content.append(labelEnd);
 
 
-
         }
         }
 
 
-
         return content;
         return content;
     }
     }
 
 
@@ -230,7 +238,7 @@ public class BackDataGenBodyService {
 
 
             BackForeForecastData b = backForeForecastDatas.get(i);
             BackForeForecastData b = backForeForecastDatas.get(i);
             String format = LocalDateTimeUtil.format(b.getForecastTime(), DatePattern.PURE_DATETIME_PATTERN);
             String format = LocalDateTimeUtil.format(b.getForecastTime(), DatePattern.PURE_DATETIME_PATTERN);
-            String dataContent = StrUtil.format( TemplateStant.BACK_FORE_FORECAST_TEMPLATE, i+1, format, b.getForecastValue(), b.getForecastOpenCap());
+            String dataContent = StrUtil.format(TemplateStant.BACK_FORE_FORECAST_TEMPLATE, i + 1, format, b.getForecastValue(), b.getForecastOpenCap());
             content.append(dataContent);
             content.append(dataContent);
         }
         }
 
 

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

@@ -75,13 +75,15 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
     public void downLoadUltraShortTerm(long signTime){
     public void downLoadUltraShortTerm(long signTime){
 
 
         Station station = stationService.findThis();
         Station station = stationService.findThis();
-
-        LocalDateTime signLDT = LocalDateTimeUtil.of(signTime);
+        //标记为要生成超短期的时刻
+        LocalDateTime signLDT = LocalDateTimeUtil.of(signTime).plusMinutes(15L);
 
 
         Record record = new Record();
         Record record = new Record();
         record.setType(CommonStant.RECORD_TYPE_CORRECT_DATA);
         record.setType(CommonStant.RECORD_TYPE_CORRECT_DATA);
         record.setContent(QNHLEnum.DATA_CORRULTRSHOR_TYPE.getCode());
         record.setContent(QNHLEnum.DATA_CORRULTRSHOR_TYPE.getCode());
         record.setCreateTime(LocalDateTime.now());
         record.setCreateTime(LocalDateTime.now());
+
+        //标记为要生成超短期的时刻
         record.setTime(signLDT);
         record.setTime(signLDT);
 
 
         RequestVo requestVo = RequestVo.CORRECT_US(station.getSignCode(), null, signTime);
         RequestVo requestVo = RequestVo.CORRECT_US(station.getSignCode(), null, signTime);
@@ -125,7 +127,6 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
 
 
         Station station = stationService.findThis();
         Station station = stationService.findThis();
 
 
-        LocalDateTime signLDT = LocalDateTimeUtil.of(signTime);
         LocalDateTime localDateTime = LocalDateTimeUtil.beginOfDay(LocalDateTime.now());
         LocalDateTime localDateTime = LocalDateTimeUtil.beginOfDay(LocalDateTime.now());
         Record record = new Record();
         Record record = new Record();
         record.setType(CommonStant.RECORD_TYPE_CORRECT_DATA);
         record.setType(CommonStant.RECORD_TYPE_CORRECT_DATA);
@@ -147,7 +148,7 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
 
 
                 if(genRp(station,responseVo.getData())){
                 if(genRp(station,responseVo.getData())){
 
 
-                    repairPlan(responseVo.getData(),signLDT);
+                    repairPlan(responseVo.getData(),localDateTime);
 
 
                     record.setState(StatusEnum.SUCCESS.getSign());
                     record.setState(StatusEnum.SUCCESS.getSign());
                     record.setStateContent(responseVo.getRetMsg());
                     record.setStateContent(responseVo.getRetMsg());
@@ -466,6 +467,7 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
                 String[] datas = column.split("\\s+");
                 String[] datas = column.split("\\s+");
                 cus.setSignTime(signTime);
                 cus.setSignTime(signTime);
                 cus.setRequestTime(LocalDateTime.now());
                 cus.setRequestTime(LocalDateTime.now());
+                cus.setPassTime(LocalDateTime.now());
                 cus.setForecastTime( DateUtil.parse(datas[2], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 cus.setForecastTime( DateUtil.parse(datas[2], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 cus.setRatio(new BigDecimal(datas[3]));
                 cus.setRatio(new BigDecimal(datas[3]));
                 list.add(cus);
                 list.add(cus);
@@ -495,8 +497,9 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
                 RepairPlan rp = new RepairPlan();
                 RepairPlan rp = new RepairPlan();
                 String column = contents[i];
                 String column = contents[i];
                 String[] datas = column.split("\\s+");
                 String[] datas = column.split("\\s+");
-                rp.setSignTime(LocalDateTimeUtil.beginOfDay(signTime));
+                rp.setSignTime(signTime);
                 rp.setRequestTime(LocalDateTime.now());
                 rp.setRequestTime(LocalDateTime.now());
+                rp.setPassTime(LocalDateTime.now());
                 rp.setStartTime( DateUtil.parse(datas[2], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 rp.setStartTime( DateUtil.parse(datas[2], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 rp.setEndTime( DateUtil.parse(datas[3], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 rp.setEndTime( DateUtil.parse(datas[3], "yyyyMMddHHmmss").toTimestamp().toLocalDateTime());
                 rp.setCap(new BigDecimal(datas[4]));
                 rp.setCap(new BigDecimal(datas[4]));
@@ -645,7 +648,7 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
 
 
             String fileName = jsonObject.get("fileName").toString() ;
             String fileName = jsonObject.get("fileName").toString() ;
             String[] s = fileName.split("_");
             String[] s = fileName.split("_");
-            String fn = "CDQ_"+s[1]+s[2]+"00.CIME";
+            String fn = "CDQ_"+s[1]+s[2]+"00.RB";
             file = new File(station.getLocalFilePath() + File.separatorChar + fn);
             file = new File(station.getLocalFilePath() + File.separatorChar + fn);
 
 
 
 
@@ -705,7 +708,7 @@ public class CorrforeService extends ServiceImpl<CorrforeStMapper, CorrforeSt> {
                 fileUrl.mkdirs();
                 fileUrl.mkdirs();
             }
             }
 
 
-            String fileName = "JX_"+LocalDateTimeUtil.format(LocalDateTimeUtil.beginOfDay(LocalDateTime.now()),"yyyyMMddHHmmss")+".CIME" ;
+            String fileName = "JX_"+LocalDateTimeUtil.format(LocalDateTimeUtil.beginOfDay(LocalDateTime.now()),"yyyyMMddHHmmss")+".RB" ;
 
 
             file = new File(station.getLocalFilePath() + File.separatorChar + fileName);
             file = new File(station.getLocalFilePath() + File.separatorChar + fileName);
 
 

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

@@ -84,7 +84,7 @@ public class RequestDataService {
             RequestVo requestVo = RequestVo.UPLOAD_STAT(station.getSignCode(), stringBuilder.toString(), signTime);
             RequestVo requestVo = RequestVo.UPLOAD_STAT(station.getSignCode(), stringBuilder.toString(), signTime);
 
 
             //校验请求数据是否为null  和  token是否有效
             //校验请求数据是否为null  和  token是否有效
-            if (requestVo != null && comPermisson.isToken(station)) {
+            if (comPermisson.isToken(station)) {
                 JSONObject json = JSONUtil.parseObj(requestVo, true);
                 JSONObject json = JSONUtil.parseObj(requestVo, true);
                 String body = json.toString();
                 String body = json.toString();
                 String response = RequestUtils.post(station.getBackurl(), body, station.getComKey());
                 String response = RequestUtils.post(station.getBackurl(), body, station.getComKey());
@@ -116,11 +116,14 @@ public class RequestDataService {
                 }
                 }
 
 
             } else {
             } else {
-                record.setState(StatusEnum.BACK_DATA_GEN_FAIL.getSign());
-                record.setStateContent("token失效或请求体为null");
+                record.setState(QNHLEnum.PERMISSON_TOKEN_INVALID.getCode());
+                record.setStateContent(QNHLEnum.PERMISSON_TOKEN_INVALID.getMsg());
             }
             }
 
 
 
 
+        }else{
+            record.setState(StatusEnum.DATA_DEFICIENCY.getCode());
+            record.setStateContent(StatusEnum.DATA_DEFICIENCY.getMsg());
         }
         }
 
 
         recordService.save(record);
         recordService.save(record);
@@ -146,10 +149,13 @@ public class RequestDataService {
 
 
         List<BackForeForecastData> list = backForeForecastDataService.findBySignTime(beginDay);
         List<BackForeForecastData> list = backForeForecastDataService.findBySignTime(beginDay);
 
 
+        String stateContent = "";
+
         if (CollectionUtil.isNotEmpty(uList)) {
         if (CollectionUtil.isNotEmpty(uList)) {
             stringBuilder.append(backDataGenBodyService.genForeUltraShortTermForecast(station.getType(),uList));
             stringBuilder.append(backDataGenBodyService.genForeUltraShortTermForecast(station.getType(),uList));
 
 
             uList.forEach(u->u.setBackTime(LocalDateTime.now()));
             uList.forEach(u->u.setBackTime(LocalDateTime.now()));
+            stateContent+="cdq,";
         }
         }
 
 
         if (CollectionUtil.isNotEmpty(list)) {
         if (CollectionUtil.isNotEmpty(list)) {
@@ -158,13 +164,14 @@ public class RequestDataService {
             if(CollectionUtil.isNotEmpty(fList)){
             if(CollectionUtil.isNotEmpty(fList)){
                 stringBuilder.append(backDataGenBodyService.genForeForecast(list));
                 stringBuilder.append(backDataGenBodyService.genForeForecast(list));
                 list.forEach(u->u.setBackTime(LocalDateTime.now()));
                 list.forEach(u->u.setBackTime(LocalDateTime.now()));
+                stateContent+="dq,";
             }
             }
 
 
         }
         }
 
 
         RequestVo requestVo = RequestVo.UPLOAD_FORE(station.getSignCode(), stringBuilder.toString(), signTime);
         RequestVo requestVo = RequestVo.UPLOAD_FORE(station.getSignCode(), stringBuilder.toString(), signTime);
         //校验请求数据是否为null  和  token是否有效
         //校验请求数据是否为null  和  token是否有效
-        if (stringBuilder != null && comPermisson.isToken(station)) {
+        if ((CollectionUtil.isNotEmpty(uList) || CollectionUtil.isNotEmpty(list)) && comPermisson.isToken(station)) {
             JSONObject json = JSONUtil.parseObj(requestVo, true);
             JSONObject json = JSONUtil.parseObj(requestVo, true);
             String body = json.toString();
             String body = json.toString();
             String response = RequestUtils.post(station.getBackurl(), body, station.getComKey());
             String response = RequestUtils.post(station.getBackurl(), body, station.getComKey());
@@ -177,8 +184,7 @@ public class RequestDataService {
                 if (code.equals(QNHLEnum.REQUEST_SUCCESS.getCode())) {
                 if (code.equals(QNHLEnum.REQUEST_SUCCESS.getCode())) {
 
 
                     record.setState(StatusEnum.SUCCESS.getSign());
                     record.setState(StatusEnum.SUCCESS.getSign());
-                    record.setStateContent(responseVo.getRetMsg());
-
+                    record.setStateContent(stateContent);
 
 
 
 
                     try {
                     try {
@@ -195,8 +201,8 @@ public class RequestDataService {
             }
             }
 
 
         } else {
         } else {
-            record.setState(StatusEnum.BACK_DATA_GEN_FAIL.getSign());
-            record.setStateContent("token失效或请求体为null");
+            record.setState(StatusEnum.DATA_DEFICIENCY.getSign());
+            record.setStateContent(StatusEnum.DATA_DEFICIENCY.getMsg());
         }
         }
 
 
         recordService.save(record);
         recordService.save(record);