فهرست منبع

资管概况后台

hxf 2 سال پیش
والد
کامیت
f0f503e99c

+ 9 - 0
neim-biz/src/main/java/com/jiayue/biz/controller/ManualEntryController.java

@@ -1,6 +1,7 @@
 package com.jiayue.biz.controller;
 
 import com.jiayue.biz.domain.ProjectInfo;
+import com.jiayue.biz.domain.ProvincialEnergyStations;
 import com.jiayue.biz.domain.TotalityInfo;
 import com.jiayue.biz.service.ManualEntryService;
 import com.jiayue.biz.service.ProjectInfoService;
@@ -10,6 +11,7 @@ import com.jiayue.common.core.domain.AjaxResult;
 import lombok.RequiredArgsConstructor;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
@@ -59,4 +61,11 @@ public class ManualEntryController extends BaseController {
         }
         return AjaxResult.success(list);
     }
+
+    @PutMapping("updateProvincialEnergyStations")
+    public void update(ProvincialEnergyStations provincialEnergyStations){
+        manualEntryService.updateProvincialEnergyStations(provincialEnergyStations);
+    }
+
+
 }

+ 2 - 5
neim-biz/src/main/java/com/jiayue/biz/service/ManualEntryService.java

@@ -2,13 +2,8 @@ package com.jiayue.biz.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.jiayue.biz.domain.ProvincialEnergyStations;
-import com.jiayue.biz.domain.TotalityInfo;
 import com.jiayue.biz.domain.WindTowerDataParentTable;
-import com.jiayue.biz.dto.ProjectEvolveDto;
-import com.jiayue.biz.dto.SelectLabForVal;
 
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -23,4 +18,6 @@ public interface ManualEntryService extends IService<WindTowerDataParentTable> {
     Map<String,List<Map<String,String>>> getStationInfo();
     //获取华电以及全省资源概况
     ProvincialEnergyStations getProvincialEnergyStations();
+    //更新
+    void updateProvincialEnergyStations(ProvincialEnergyStations provincialEnergyStations);
 }

+ 3 - 0
neim-biz/src/main/java/com/jiayue/biz/service/impl/DataRecalculationImpl.java

@@ -629,6 +629,9 @@ public class DataRecalculationImpl implements DataRecalculationService {
             //日平均气压
             ArrayList<WindTowerCalculationData> paDay = windTowerCalculationDataService.paDay(startTime, endTime, equipmentNo, prophaseWeatherDataList, equipmentAttributeList);
             allDataList.addAll(paDay);
+            //发电量与满发小时数
+            ArrayList<WindTowerCalculationData> calculateBattery = windTowerCalculationDataService.calculateBattery(startTime.getTime(), endTime.getTime(), windTowerInfoList.get(0), prophaseAnemometryDataList,  equipmentAttributeList, windTowerCalculationDataList);
+            allDataList.addAll(calculateBattery);
             //日平均风速
             ArrayList<WindTowerCalculationData> wsDay = windTowerCalculationDataService.wsDay(startTime, endTime, equipmentNo, windTowerCalculationDataList, equipmentAttributeList, windTowerInfoList);
             allDataList.addAll(wsDay);

+ 1 - 1
neim-biz/src/main/java/com/jiayue/biz/service/impl/HomePageServiceImpl.java

@@ -528,7 +528,7 @@ public class HomePageServiceImpl extends ServiceImpl<WindTowerDataParentTableMap
             }
 
             hashMap.put(value.name(), heightAndWindDirectionEnum.size());
-            BigDecimal total = BigDecimal.valueOf(heightAndWindDirectionEnum.size());
+
             if (anemometryData.size() > 0) {
                 //风向频率
                 BigDecimal wdF = BigDecimal.valueOf(heightAndWindDirectionEnum.size()).divide(BigDecimal.valueOf(anemometryData.size()), 2, RoundingMode.HALF_UP);

+ 9 - 17
neim-biz/src/main/java/com/jiayue/biz/service/impl/ManualEntryServiceImpl.java

@@ -1,30 +1,14 @@
 package com.jiayue.biz.service.impl;
 
-import cn.hutool.core.date.DateTime;
-import cn.hutool.core.util.StrUtil;
-import cn.hutool.db.Entity;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.jiayue.biz.domain.*;
-import com.jiayue.biz.dto.EquipmentDto;
-import com.jiayue.biz.dto.ProjectEvolveDto;
-import com.jiayue.biz.dto.ProjectInfoDto;
-import com.jiayue.biz.dto.SelectLabForVal;
-import com.jiayue.biz.eunms.WindDirectionEnum;
 import com.jiayue.biz.mapper.WindTowerDataParentTableMapper;
 import com.jiayue.biz.service.*;
-import com.jiayue.biz.util.CalculationUtil;
-import com.jiayue.biz.util.DateTimeUtil;
-import com.jiayue.common.utils.DateUtil;
 import lombok.AllArgsConstructor;
+import org.springframework.data.mongodb.core.MongoTemplate;
 import org.springframework.stereotype.Service;
 
-import java.math.BigDecimal;
-import java.math.RoundingMode;
-import java.sql.Timestamp;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.util.*;
-import java.util.stream.Collectors;
 
 /**
  * 人工录入Service业务层处理
@@ -40,6 +24,8 @@ public class ManualEntryServiceImpl extends ServiceImpl<WindTowerDataParentTable
 
     private final ProvincialEnergyStationsService provincialEnergyStationsService;
 
+    private final MongoTemplate mongoTemplate;
+
     /*
      * 获取光伏站下拉框,风场站的下拉框
     */
@@ -70,6 +56,12 @@ public class ManualEntryServiceImpl extends ServiceImpl<WindTowerDataParentTable
         return map;
     }
 
+    //更新
+    public void updateProvincialEnergyStations(ProvincialEnergyStations provincialEnergyStations){
+        mongoTemplate.save(provincialEnergyStations,"province_info");
+    }
+
+
     //获取华电以及全省资源概况
     public ProvincialEnergyStations getProvincialEnergyStations() {
         return provincialEnergyStationsService.getProvincialEnergyStations();