Procházet zdrojové kódy

风机绩效表明细风能利用率修改

shilin před 4 roky
rodič
revize
6a4a0dc559

+ 13 - 15
src/main/java/com/gyee/frame/service/WindturbinecurvefittingmonthService.java

@@ -3,10 +3,8 @@ package com.gyee.frame.service;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.base.BaseService;
-import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.WindturbinecurvefittingmonthMapper;
-import com.gyee.frame.model.auto.Windturbine;
 import com.gyee.frame.model.auto.Windturbinecurvefittingmonth;
 import com.gyee.frame.model.auto.WindturbinecurvefittingmonthExample;
 import com.gyee.frame.model.custom.Tablepar;
@@ -170,19 +168,19 @@ public class WindturbinecurvefittingmonthService implements BaseService<Windturb
 		WindturbinecurvefittingmonthExample.Criteria criteria =example.createCriteria();
 
 
-		if(StringUtils.notEmp(wpIps))
-		{
-			if(InitialRunner.wp_wtmap.containsKey(wpIps))
-			{
-				List<Windturbine> ls=InitialRunner.wp_wtmap.get(wpIps);
-				List<String> wtls=new ArrayList<>();
-				for (Windturbine wt : ls) {
-					wtls.add(wt.getId());
-				}
-				criteria.andWindturbineidIn(wtls);
-			}
-
-		}
+//		if(StringUtils.notEmp(wpIps))
+//		{
+//			if(InitialRunner.wp_wtmap.containsKey(wpIps))
+//			{
+//				List<Windturbine> ls=InitialRunner.wp_wtmap.get(wpIps);
+//				List<String> wtls=new ArrayList<>();
+//				for (Windturbine wt : ls) {
+//					wtls.add(wt.getId());
+//				}
+//				criteria.andWindturbineidIn(wtls);
+//			}
+//
+//		}
 		Calendar c= Calendar.getInstance();
 		c.setTime(endDate);
 

+ 6 - 6
src/main/java/com/gyee/frame/service/goodness/WindturbinegoodnessService.java

@@ -90,10 +90,10 @@ public class WindturbinegoodnessService {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat sdfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
-        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(recorddate, 1)) + " 00:0:00");
+        Date endDate = sdfs.parse(sdf.format(DateUtils.addDays(recorddate, 1)) + " 01:00:00");
         Date beginDate = sdfs.parse(sdf.format(recorddate) + " 00:00:00");
 
-        int length = 240;
+        int length = 25;
         for (int i = 0; i < length; i++) {
             DataVo vo = new DataVo();
 
@@ -114,7 +114,7 @@ public class WindturbinegoodnessService {
        // WindTurbineTestingPointAi2 fs = map.get(Constant.TPOINT_WT_PJFS);
 
         if (null != sjgl) {
-            List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
+            List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
             int count = 0;
             double temp = 0;
             for (int i = 0; i < vos.size(); i++) {
@@ -139,7 +139,7 @@ public class WindturbinegoodnessService {
         }
 
         if (null != bzgl) {
-            List<PointData> bzglls = realApiUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
+            List<PointData> bzglls = realApiUtil.getHistoryDatasSnap(bzgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
             int count = 0;
             double temp = 0;
             for (int i = 0; i < vos.size(); i++) {
@@ -163,7 +163,7 @@ public class WindturbinegoodnessService {
         }
 
         if (null != pjfs) {
-            List<PointData> pjfsls = realApiUtil.getHistoryDatasSnap(pjfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 360L);
+            List<PointData> pjfsls = realApiUtil.getHistoryDatasSnap(pjfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, (long) length, 3600L);
 
             int count = 0;
             double temp = 0;
@@ -218,7 +218,7 @@ public class WindturbinegoodnessService {
     public List<List<EchartDataVo>> getplotBands(String wtId, Date recorddate) throws Exception {
 
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm");
-        SimpleDateFormat sdf2 = new SimpleDateFormat("YYYY-MM-DD HH:mm");
+        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm");
         Calendar c = Calendar.getInstance();
         c.setTime(recorddate);
         c.set(Calendar.HOUR_OF_DAY, 0);

+ 16 - 16
src/main/java/com/gyee/frame/service/leaderboard/LeaderboardService.java

@@ -60,24 +60,24 @@ public class LeaderboardService {
 //        }
         List<StatisticalAnalysisRnewTopVo> list =activePowerDataService.getStatisticalAnalysisRnewTopVoList(wpIps,beginDate, endDate);
 
-        List<Windturbinecurvefittingmonth> windturbineList=windturbinecurvefittingmonthService.getWindturbinecurvefittingmonthList(wpIps,endDate);
+//        List<Windturbinecurvefittingmonth> windturbineList=windturbinecurvefittingmonthService.getWindturbinecurvefittingmonthList(wpIps,endDate);
+//
+//        Map<String, Map<Double, Windturbinecurvefittingmonth>> res = new HashMap<String, Map<Double,Windturbinecurvefittingmonth>>();
+//        Map<Double, Windturbinecurvefittingmonth> map = null;
+//        if(windturbineList != null && !windturbineList.isEmpty()){
+//            for(Windturbinecurvefittingmonth mp : windturbineList){
+//                if(res.containsKey(mp.getWindturbineid())){
+//                    map = res.get(mp.getWindturbineid());
+//                    map.put(mp.getSpeed(), mp);
+//                }else{
+//                    map = new HashMap<Double, Windturbinecurvefittingmonth>();
+//                    map.put(mp.getSpeed(), mp);
+//                    res.put(mp.getWindturbineid(), map);
+//                }
+//            }
+//        }
 
         Map<String, Map<Double, Windturbinecurvefittingmonth>> res = new HashMap<String, Map<Double,Windturbinecurvefittingmonth>>();
-        Map<Double, Windturbinecurvefittingmonth> map = null;
-        if(windturbineList != null && !windturbineList.isEmpty()){
-            for(Windturbinecurvefittingmonth mp : windturbineList){
-                if(res.containsKey(mp.getWindturbineid())){
-                    map = res.get(mp.getWindturbineid());
-                    map.put(mp.getSpeed(), mp);
-                }else{
-                    map = new HashMap<Double, Windturbinecurvefittingmonth>();
-                    map.put(mp.getSpeed(), mp);
-                    res.put(mp.getWindturbineid(), map);
-                }
-            }
-        }
-
-
 
         Map<String, StatisticalAnalysisTopVo> theMap = new HashMap<String, StatisticalAnalysisTopVo>();
         List<StatisticalAnalysisTopVo> theList = new ArrayList<StatisticalAnalysisTopVo>();

+ 7 - 7
src/main/resources/application-dev.yml

@@ -7,14 +7,14 @@ spring:
     druid:
      #主库数据源
      master:
-        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
-        username: root
-        password: 123456
+#        url: jdbc:mysql://localhost:3306/springbootv2?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&serverTimezone=UTC&zeroDateTimeBehavior=convertToNull
+#        username: root
+#        password: 123456
 
-#        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
-#        username: nxfdprod
-#        password: gdnxfd123
-#        driver-class-name: oracle.jdbc.driver.OracleDriver
+        url: jdbc:oracle:thin:@192.168.1.105:1521:gdnxfd
+        username: nxfdprod
+        password: gdnxfd123
+        driver-class-name: oracle.jdbc.driver.OracleDriver
      #备数据源 #关闭
      slave:
         enabled: false

+ 1 - 1
src/main/resources/application.yml

@@ -109,7 +109,7 @@ spring :
 #    cache-enabled: false
 #pagehelper分页插件
 pagehelper:
-    helperDialect: mysql
+    helperDialect: oracle
     reasonable: true
     supportMethodsArguments: true
     params: count=countSql