瀏覽代碼

新增气象站数据查询

xusl 3 年之前
父節點
當前提交
04e5f9f395

+ 1 - 1
ipfcst-common/ipfcst-common-data/src/main/java/com/jiayue/ipfcst/common/data/repository/WeatherStationStatusDataRepository.java

@@ -21,6 +21,6 @@ public interface WeatherStationStatusDataRepository extends BaseRepository<Weath
 	 * @param endTime   结束时间
 	 * @param no        设备编号
 	 */
-	List<WeatherStationStatusData> findByTimeBetweenAndEquipmentId(Date startTime, Date endTime, String no);
+	List<WeatherStationStatusData> findByStationCodeAndTimeBetweenAndEquipmentId(String stationCode,Date startTime, Date endTime, String no);
 
 }

+ 135 - 185
ipfcst-console/src/main/frontend/views/dataquery/weatherStationStatusData/index.vue

@@ -1,56 +1,73 @@
 <template>
-  <div style="width: 100%;height: 100%" >
-    <div style="width: 100%;background-color: transparent;height: 1%;display:inline-block">
-      <div class="filter">
-        <div class="startTime">
-          <span class="timeText">间隔时间</span>
-          <el-select v-model="jgTime"  placeholder="请选择" @change="changeJgTime">
-            <el-option
-              v-for="item in jgTimes"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value">
-            </el-option>
-          </el-select>
-          <vxe-button style="background:transparent;border:none"  @click="exportDataEvent"><i class="vxe-icon--download" style="color: white"></i></vxe-button>
-        </div>
-      </div>
-    </div>
-    <div class="tableContent" style="padding-top: 10px">
-
-      <vxe-table
-        id="weatherStationStatusDataTable"
-        ref="wTable"
-        border
-        @sort-change="sortChangeEvent"
-        :loading="loading"
-        export-config
-        :custom-config="{storage: true, checkMethod: checkColumnMethod}"
-        :auto-resize="true"
-        highlight-hover-row
-        :header-cell-style="{background:'black',color:'white'}"
-        max-height="90%"
-        :cell-style="{background:'black',color:'white'}"
-        align="center"
-        :data="tableData.slice((currentPage-1)*pageSize,currentPage*pageSize)">
-        <vxe-table-column  field="time" title="接收时间" :formatter="dateFormat" min-width="150" sortable ></vxe-table-column>
-        <vxe-table-column field="globalR" title="总辐射" min-width="60"></vxe-table-column>
-        <vxe-table-column field="directR" title="直接辐射" min-width="60"></vxe-table-column>
-        <vxe-table-column field="diffuseR" title="散射辐射" min-width="60"></vxe-table-column>
-        <vxe-table-column field="obliqueR" title="斜面辐射" min-width="60"></vxe-table-column>
-        <vxe-table-column field="airT" title="环境温度" min-width="60"></vxe-table-column>
-        <vxe-table-column field="p" title="气压" min-width="60"></vxe-table-column>
-        <vxe-table-column field="rh" title="湿度"min-width="60"></vxe-table-column>
-        <vxe-table-column field="cellT" title="背板温度" min-width="60"></vxe-table-column>
-        <vxe-table-column field="ws" title="风速" min-width="60"></vxe-table-column>
-        <vxe-table-column field="wd" title="风向" min-width="60"></vxe-table-column>
-        <vxe-table-column field="hourDA" title="日照小时数" min-width="60"></vxe-table-column>
-        <vxe-table-column field="globalRDA" title="总辐射日累计" min-width="60"></vxe-table-column>
-        <vxe-table-column field="directRDA" title="直接辐射日累计" min-width="60"></vxe-table-column>
-        <vxe-table-column field="diffuseRDA" title="散射辐射日累计" min-width="60"></vxe-table-column>
-        <vxe-table-column field="obliqueRDA" title="斜面辐射日累计" min-width="60"></vxe-table-column>
-      </vxe-table>
+  <div class="chart-container">
+    <div class="filter">
+      <span style="font-weight: bold;font-size: 14px">场站名称:</span>
+      <el-select style="width:250px" clearable v-model="stationCode" size="small" @change="stationCodeChange">
+        <el-option
+          v-for="item in stationList"
+          :key="item.stationCode"
+          :label="item.name"
+          :value="item.stationCode">
+          <span style="float: left">{{ item.name }}</span>
+          <span style="float: right; color: #8492a6;font-size: 13px">{{ item.stationCode }}</span>
+        </el-option>
+      </el-select>
+      <span style="font-weight: bold;font-size: 14px">气象站:</span>
+      <el-select v-model="weatherStationInfoId" clearable placeholder="请选择">
+        <el-option
+          v-for="item in weatherStationInfos"
+          :key="item.id"
+          :label="item.name"
+          :value="item.id">
+        </el-option>
+      </el-select>
+      <span style="font-weight: bold;font-size: 14px">起始时间:</span>
+      <el-date-picker
+        v-model="startTime"
+        :clearable="false"
+        type="datetime"
+        value-format="timestamp"
+        placeholder="选择日期">
+      </el-date-picker>
+      <span style="font-weight: bold;font-size: 14px">截止时间:</span>
+      <el-date-picker
+        v-model="endTime"
+        :clearable="false"
+        type="datetime"
+        value-format="timestamp"
+        placeholder="选择日期">
+      </el-date-picker>
+      <el-button  :loading=loading  size="small"  @click="queryData">查询</el-button>
     </div>
+    <vxe-table
+      id="weatherStationStatusDataTable"
+      ref="wTable"
+      :loading="loading"
+      border
+      @sort-change="sortChangeEvent"
+      :auto-resize="true"
+      highlight-hover-row
+      max-height="90%"
+      :resizable="true"
+      align="center"
+      :data="tableData">
+      <vxe-table-column  field="time" title="接收时间" :formatter="dateFormat" min-width="150" sortable ></vxe-table-column>
+      <vxe-table-column field="globalR" title="总辐射" min-width="60"></vxe-table-column>
+      <vxe-table-column field="directR" title="直接辐射" min-width="60"></vxe-table-column>
+      <vxe-table-column field="diffuseR" title="散射辐射" min-width="60"></vxe-table-column>
+      <vxe-table-column field="obliqueR" title="斜面辐射" min-width="60"></vxe-table-column>
+      <vxe-table-column field="airT" title="环境温度" min-width="60"></vxe-table-column>
+      <vxe-table-column field="p" title="气压" min-width="60"></vxe-table-column>
+      <vxe-table-column field="rh" title="湿度"min-width="60"></vxe-table-column>
+      <vxe-table-column field="cellT" title="背板温度" min-width="60"></vxe-table-column>
+      <vxe-table-column field="ws" title="风速" min-width="60"></vxe-table-column>
+      <vxe-table-column field="wd" title="风向" min-width="60"></vxe-table-column>
+      <vxe-table-column field="hourDA" title="日照小时数" min-width="60"></vxe-table-column>
+      <vxe-table-column field="globalRDA" title="总辐射日累计" min-width="60"></vxe-table-column>
+      <vxe-table-column field="directRDA" title="直接辐射日累计" min-width="60"></vxe-table-column>
+      <vxe-table-column field="diffuseRDA" title="散射辐射日累计" min-width="60"></vxe-table-column>
+      <vxe-table-column field="obliqueRDA" title="斜面辐射日累计" min-width="60"></vxe-table-column>
+    </vxe-table>
     <div class="rtPageturning">
       <vxe-pager
         :loading="loading"
@@ -67,54 +84,21 @@
 
 <script>
   export default {
-    watch: {
-      // 如果 `question` 发生改变,这个函数就会运行
-      queryTime: function(newQuestion, oldQuestion) {
-        var queryTimeList = newQuestion.split(",")
-        this.currentPage = 1
-        this.startTime=Number(queryTimeList[0])
-        this.endTime=Number(queryTimeList[1])
-        this.weatherStationInfoId = Number(queryTimeList[2])
-        this.eqTimeInterval()
-      }
-    },
-    props: {
-      width: {
-        type: String,
-        default: '200px'
-      },
-      height: {
-        type: String,
-        default: '200px'
-      },
-      queryTime:{
-        type:String,
-      },
-    },
     data() {
       return {
-        startTime:'',
-        endTime: '',
+        stationCode: '',
+        stationList: [],
+        startTime:new Date(new Date().toLocaleDateString()).getTime(),
+        endTime:new Date(new Date().toLocaleDateString()).getTime() + 60 * 60 * 24 * 1000-1,
         tableData:[],
         total:0,
         sortOrder:'asc',
         pageSize: 10,
         currentPage: 1,
-        weatherStationInfoId:'',
+        weatherStationInfos: [],
+        weatherStationInfoId: '',
         columns:[],
         loading:false,
-        jgTime:3600000,
-        jgTimes:[
-          {label: "1分钟",value:60000},
-          {label: "15分钟",value:900000},
-          {label: "1小时",value:3600000}
-        ],
-        displayConfigJgTime:{
-          id:"",
-          displayCode:"timeInterval",
-          showCode:"",
-          hiddenCode:""
-        },
         displayConfigPageSize:{
           id:"",
           displayCode:"pageSize",
@@ -124,55 +108,67 @@
       }
     },
     mounted() {
-
+      this.getStationList()
     },
-
     methods: {
-      exportDataEvent() {
+      queryData(){
+        let queryParam = this.stationCode;
+        if (queryParam==''){
+          this.$message.error("请选择场站")
+          return;
+        }
+        let infoId = this.weatherStationInfoId;
+        if (infoId==''){
+          this.$message.error("请选择气象站")
+          return;
+        }
         this.loading = true
-        this.$axios.get('export/weatherStationStatusData/'+this.startTime+'/'+this.endTime+'/'+this.weatherStationInfoId+'/'+this.jgTime+'?sortOrder='+this.sortOrder, {
-          responseType: 'blob'// 用于解决中文乱码
-        }).then((response) => {
+        if(this.endTime<=this.startTime){
+          this.$message.error("开始时间不能小于结束时间")
+          this.startTime = this.queryStartTime
+          this.endTime = this.queryEndTime
           this.loading = false
-        }).catch((error) => {
+          return
+        }
+        if(this.endTime-this.startTime> 60 * 60 * 24 * 1000*3){
+          this.startTime = this.queryStartTime
+          this.endTime = this.queryEndTime
+          this.$message.error("只能最多查询3天的数据")
           this.loading = false
-          this.$message.error('导出失败' + error)
-        })
+          return
+        }
+        this.queryStartTime = this.startTime
+        this.queryEndTime = this.endTime
+        this.getTable()
       },
-      eqTimeInterval(){
-        this.$axios.get('displayConfig/eqTimeInterval').then((res) => {
-          this.displayConfigJgTime = res.data
-          this.jgTime = parseInt(this.displayConfigJgTime.showCode)
-          this.getTable()
-          // this.$message.success('间隔时间获取成功' )
-          this.dialogVisible = false
-        }).catch((error) => {
-          this.$message.error('间隔时间获取出错' + error)
-        })
-        this.$axios.get('displayConfig/pageSize').then((res) => {
-          this.displayConfigPageSize = res.data
-          this.pageSize = parseInt(this.displayConfigPageSize.showCode)
-          // this.$message.success('PageSize获取成功' )
-          this.dialogVisible = false
-        }).catch((error) => {
-          this.$message.error('PageSize获取出错' + error)
-        })
+      stationCodeChange() {
+        // 获取逆变器设备
+        let queryParam = this.stationCode;
+        if (queryParam==''){
+          // 清除设备下拉框
+          this.weatherStationInfos = ''
+        }
+        else{
+          this.$axios.get('/weatherStationInfo/' + queryParam).then((res) => {
+            this.weatherStationInfos = res.data
+          })
+        }
       },
-      changeJgTime(){
-        this.displayConfigJgTime.showCode = this.jgTime
-        this.$axios.post('displayConfig/',this.displayConfigJgTime).then((res) => {
-          this.displayConfigJgTime = res.data
-          // this.$message.success('间隔时间设置成功' )
-          this.dialogVisible = false
-          this.getTable(this.startTime,this.endTime)
+      getStationList() {
+        this.$axios.get('/electricField/getElectricField').then((res) => {
+          this.stationList = res.data
         }).catch((error) => {
-          this.$message.error('间隔时间设置出错' + error)
+          this.$message.error('获取场站下拉框出错' + error)
         })
       },
       getTable(){
         this.loading = true
         this.$emit('sendLoading', this.loading)
-        this.$axios.get('/weatherStationStatusData/'+this.startTime+'/'+this.endTime+'/'+this.weatherStationInfoId+'/'+this.jgTime+'?sortOrder='+this.sortOrder).then((res) => {
+        let weatherStationId = this.weatherStationInfoId;
+        if (weatherStationId==''){
+          weatherStationId="ALL"
+        }
+        this.$axios.get('/weatherStationStatusData/'+this.stationCode+'/'+this.startTime+'/'+this.endTime+'/'+this.currentPage+'/'+this.pageSize+'/'+weatherStationId).then((res) => {
           this.tableData = res.data.content
           // 表分页格数据总条数
           this.total = res.data.count
@@ -196,14 +192,20 @@
       },
       handlePageChange ({ currentPage, pageSize }) {
         this.currentPage = currentPage
-        if(this.pageSize!=pageSize){
-          this.changePageSize(pageSize)
-        }
         this.pageSize = pageSize
-        // this.getTable();
+        this.startTime = this.queryStartTime
+        this.endTime = this.queryEndTime
+        this.getTable();
       },
       dateFormat({ cellValue, row, column }) {
-        return this.$XEUtils.toDateString(cellValue, 'yyyy-MM-dd HH:mm:ss')
+        const date = new Date(cellValue) // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
+        const Y = date.getFullYear() + '-'
+        const M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+        const D = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()) + '    '
+        const H = (date.getHours() < 10 ? '0' + (date.getHours()) : date.getHours()) + ':'
+        const m = (date.getMinutes() < 10 ? '0' + (date.getMinutes()) : date.getMinutes()) + ':'
+        const s = (date.getSeconds() < 10 ? '0' + (date.getSeconds()) : date.getSeconds())
+        return Y + M + D + H + m + s
       },
       sortChangeEvent ({ column, property, order }) {
         if(order == null){
@@ -223,60 +225,8 @@
   }
 </script>
 <style scoped>
-  .tableContent{
-    width: 100%;
-    height:90%;
-  }
-  .tableContent >>> td{
-    border:1px solid #ffffff;
-  }
-  .rtPageturning{
-    width: 100%;
-    height: 10%;
-  }
-  .rtPageturning >>> button,
-  .rtPageturning >>> span,
-  .rtPageturning >>> input,
-  .rtPageturning >>> .vxe-pager--btn-wrapper li{
-    background-color: transparent !important;
-    color: #ffffff !important;
-    border: 1px solid #ffffff;
-  }
-  .rtPageturning >>> span{
-    border:none
-  }
-  .rtPageturning >>> .vxe-pager--wrapper .vxe-pager--btn-wrapper li:not(.disabled).is--active {
-    background-color: #9f9fa0 !important;
-  }
-  .tableContent >>> .vxe-button.type--button.is--circle {
-    padding: 0 .5em;
-    min-width: 34px;
-    border-radius: 10%;
-    border: none;
-    background: transparent;
-    color: white;
-  }
-  .timeText{
 
-    display:inline-block;
-    opacity:0.69;
-    padding-right:7px;
-    font-size:14px;
-  }
-  .filter{
-    position:relative;
-    display:flex;
-    padding:0px 0px 10px 10px;
-    font-size:12px;
-    line-height:11px;
-    color:white;
-  }
-  .filter >>> input{
-    background:transparent;
-    border:none;
-    color:white;
-  }
-  .startTime{
-    display:inline-block;
+  .my_table_insert .vxe-body--row.is--new {
+    background-color: #f1fdf1;
   }
 </style>

+ 56 - 0
ipfcst-console/src/main/java/com/jiayue/ipfcst/console/controller/WeatherStationStatusDataController.java

@@ -0,0 +1,56 @@
+package com.jiayue.ipfcst.console.controller;
+
+import com.jiayue.ipfcst.common.core.web.vo.ResponseVO;
+import com.jiayue.ipfcst.common.data.entity.WeatherStationStatusData;
+import com.jiayue.ipfcst.console.service.WeatherStationStatusDataService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.net.URLEncoder;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 气象站数据restful接口
+ *
+ * @author yh
+ * @version 1.0
+ * @since 2019/8/7 10:12
+ */
+@RestController
+@Slf4j
+public class WeatherStationStatusDataController {
+
+  private final WeatherStationStatusDataService weatherStationStatusDataService;
+
+  @Autowired
+  public WeatherStationStatusDataController(WeatherStationStatusDataService weatherStationStatusDataService){
+    this.weatherStationStatusDataService=weatherStationStatusDataService;
+  }
+
+  @GetMapping(value = "/weatherStationStatusData/{stationCode}/{startTime}/{endTime}/{page}/{size}/{no}")
+  public ResponseVO findByTimeBetweenAndNoAndTimeStep(@PathVariable("stationCode") String stationCode,@PathVariable("startTime") Long startTime,
+                                                      @PathVariable("endTime") Long endTime,
+                                                      @PathVariable("page") Integer page,
+                                                      @PathVariable("size") Integer size,
+                                                      @PathVariable("no") String no){
+    Map<String,Object> map = new HashMap<>();
+    try{
+      map =  weatherStationStatusDataService.findByTimeBetweenAndNoAndTimeStep(stationCode,new Date(startTime),new Date(endTime),page,size,no);
+      return ResponseVO.success(map);
+    }catch(Exception e){
+      e.printStackTrace();
+      log.error("气象数据分页查询错误");
+      return ResponseVO.fail(e.toString());
+    }
+  }
+}

+ 163 - 0
ipfcst-console/src/main/java/com/jiayue/ipfcst/console/service/WeatherStationStatusDataService.java

@@ -0,0 +1,163 @@
+package com.jiayue.ipfcst.console.service;
+
+import com.jiayue.ipfcst.common.data.entity.InverterStatusData;
+import com.jiayue.ipfcst.common.data.entity.WeatherStationStatusData;
+import com.jiayue.ipfcst.common.data.repository.WeatherStationStatusDataRepository;
+import com.jiayue.ipfcst.common.data.service.BaseService;
+import org.apache.commons.lang.time.DateFormatUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.jpa.domain.Specification;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.persistence.criteria.Predicate;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.stream.Collectors;
+
+/**
+ * 环境监测仪数据业务层
+ *
+ * @author yh
+ * @version 1.0
+ * @since 2019/8/5 16:02
+ */
+@Service
+public class WeatherStationStatusDataService extends BaseService {
+
+    private final WeatherStationStatusDataRepository weatherStationStatusDataRepository;
+
+    @Autowired
+    public WeatherStationStatusDataService(WeatherStationStatusDataRepository weatherStationStatusDataRepository){
+       this.weatherStationStatusDataRepository = weatherStationStatusDataRepository;
+    }
+
+  /**
+   * 分页查询 环境监测仪数据 tl
+   *
+   * @param startTime 开始时间
+   * @param endTime   结束时间
+   * @param no        设备编号
+   * @return
+   */
+  @Transactional(propagation = Propagation.NOT_SUPPORTED, readOnly = true)
+  public Map<String, Object> findByTimeBetweenAndNoAndTimeStep(String stationCode,Date startTime, Date endTime,
+                                               Integer page,Integer size,String no) {
+
+    Map<String, Object> map = new HashMap<>();
+    Sort sort = Sort.by(Sort.Direction.DESC, "time");
+    Specification<WeatherStationStatusData> specification = this.specificationFindByTime(stationCode,startTime, endTime,no);
+    Pageable pageable = PageRequest.of(page - 1, size, sort); //页码:前端从1开始,jpa从0开始,做个转换
+    Page inverterStatusDatas = weatherStationStatusDataRepository.findAll(specification, pageable);
+    List<WeatherStationStatusData> datas = new ArrayList<>();
+    datas = inverterStatusDatas.getContent();
+    this.defaultReplace(datas);
+    map.put("content", datas);// 结果集
+    map.put("count", inverterStatusDatas.getTotalElements());// 总记录数
+    return map;
+  }
+  /**
+   *  对集合进行 -99替换null操作
+   *
+   * @param datas  需要替换集合
+   */
+  public void defaultReplace(List<WeatherStationStatusData> datas){
+    BigDecimal nullBig =  new BigDecimal(-99);
+    for(WeatherStationStatusData w:datas){
+
+      if(w.getDirectR().compareTo(nullBig)==0){
+        w.setDirectR(null);
+      }
+
+      if(w.getGlobalR().compareTo(nullBig)==0){
+        w.setGlobalR(null);
+      }
+
+      if(w.getDiffuseR().compareTo(nullBig)==0){
+        w.setDiffuseR(null);
+      }
+
+      if(w.getObliqueR().compareTo(nullBig)==0){
+        w.setObliqueR(null);
+      }
+
+      if(w.getAirT().compareTo(nullBig)==0){
+        w.setAirT(null);
+      }
+
+      if(w.getP().compareTo(nullBig)==0){
+        w.setP(null);
+      }
+
+      if(w.getRh().compareTo(nullBig)==0){
+        w.setRh(null);
+      }
+
+      if(w.getCellT().compareTo(nullBig)==0){
+        w.setCellT(null);
+      }
+
+      if(w.getWs().compareTo(nullBig)==0){
+        w.setWs(null);
+      }
+
+      if(w.getWd().compareTo(nullBig)==0){
+        w.setWd(null);
+      }
+
+      if(w.getHourDA().compareTo(nullBig)==0){
+        w.setHourDA(null);
+      }
+
+      if(w.getGlobalRDA().compareTo(nullBig)==0){
+        w.setGlobalRDA(null);
+      }
+
+      if(w.getDirectRDA().compareTo(nullBig)==0){
+        w.setDirectRDA(null);
+      }
+
+      if(w.getDiffuseRDA().compareTo(nullBig)==0){
+        w.setDiffuseRDA(null);
+      }
+
+      if(w.getObliqueRDA().compareTo(nullBig)==0){
+        w.setObliqueRDA(null);
+      }
+
+    }
+
+  }
+  /**
+   * 根据时间 分页查询条件 yh
+   *
+   * @param startTime 开始时间
+   * @param endTime   结束时间
+   * @return 过滤条件
+   */
+  Specification<WeatherStationStatusData> specificationFindByTime(final String stationCode, final Date startTime, final Date endTime,final String no) {
+    return (Specification<WeatherStationStatusData>) (root, criteriaQuery, cb) -> {
+      List<Predicate> predicates = new ArrayList<>();
+      predicates.add(cb.equal(root.get("stationCode").as(String.class), stationCode));
+      if (!"ALL".equals(no)){
+        predicates.add(cb.equal(root.get("equipmentId").as(String.class), no));
+      }
+      if (startTime != null) {
+        //大于或等于传入时间
+        predicates.add(cb.greaterThanOrEqualTo(root.get("time").as(Date.class), startTime));
+      }
+      if (endTime != null) {
+        //小于传入时间
+        predicates.add(cb.lessThan(root.get("time").as(Date.class), endTime));
+      }
+      //添加排序的功能
+      return cb.and(predicates.toArray(new Predicate[predicates.size()]));
+    };
+  }
+}

+ 1 - 1
ipfcst-console/src/main/java/com/jiayue/ipfcst/fileupload/service/E63UploadFileService.java

@@ -493,7 +493,7 @@ public class E63UploadFileService extends BaseUploadFileService {
       }
 
       if (!isUseRedis) {
-        List<WeatherStationStatusData> weatherStationStatusDataList = weatherStationStatusDataRepository.findByTimeBetweenAndEquipmentId(new Date(startTime), new Date(endTime), qxzId);
+        List<WeatherStationStatusData> weatherStationStatusDataList = weatherStationStatusDataRepository.findByStationCodeAndTimeBetweenAndEquipmentId(electricFieldInfo.getStationCode(),new Date(startTime), new Date(endTime), qxzId);
         if (weatherStationStatusDataList.isEmpty()){
           // 总辐射产生500-1000随机数
           globalR = qxzRandomCreate("globalR");