wangchangsheng vor 2 Jahren
Ursprung
Commit
1475526d9d

+ 13 - 3
web/monitor-web-sxjn/pom.xml

@@ -376,6 +376,12 @@
             <artifactId>postgresql</artifactId>
             <version>${pgsql.version}</version>
         </dependency>
+        <dependency>
+            <groupId>com.gyee</groupId>
+            <artifactId>common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
     </dependencies>
 
     <dependencyManagement>
@@ -444,9 +450,13 @@
                     <!--						<version>${mysql.version}</version>-->
                     <!--					</dependency>-->
                     <dependency>
-                        <groupId>com.oracle</groupId>
-                        <artifactId>ojdbc6</artifactId>
-                        <version>11.2.0.3</version>
+<!--                        <groupId>com.oracle</groupId>-->
+<!--                        <artifactId>ojdbc6</artifactId>-->
+<!--                        <version>11.2.0.3</version>-->
+
+                        <groupId>org.postgresql</groupId>
+                        <artifactId>postgresql</artifactId>
+                        <version>${pgsql.version}</version>
                     </dependency>
 
                     <!--					<dependency>-->

+ 1 - 1
web/monitor-web-sxjn/src/main/java/com/gyee/frame/controller/peranalysis/EBAPerSisController.java

@@ -65,7 +65,7 @@ public class EBAPerSisController {
             Date beginDate = cal.getTime();
             cal.add(Calendar.MONTH, 1);
             Date endDate = cal.getTime();
-            vos = ebApersisService.getElePerAnalysisList(companyid, regionid, station, beginDate, endDate);
+            vos = ebApersisService.getEBApersisList(companyid, regionid, station, beginDate, endDate);
         }
 
 

+ 3 - 0
web/monitor-web-sxjn/src/main/java/com/gyee/frame/model/custom/ElePerAnalysisVo.java

@@ -34,6 +34,9 @@ public class ElePerAnalysisVo {
 
 
     public double getFinishrate() {
+        if(0==generatingcapacity){
+            return 0;
+        }
         return generation/generatingcapacity;
     }
 }

+ 11 - 3
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/peranalysis/EBApersisService.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.auto.Windpowerstationpointnew;
 import com.gyee.frame.model.custom.DNAVal;
 import com.gyee.frame.model.custom.EBAPerSisVo;
 import com.gyee.frame.service.WindpowerstationPGService;
+import com.gyee.frame.util.DoubleUtils;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,7 +34,7 @@ public class EBApersisService {
     private WindpowerstationPGService windpowerstationPGService;
 
 
-    public List<EBAPerSisVo> getElePerAnalysisList(String companyid, String regionid, String station, Date beginDate, Date endDate) throws Exception {
+    public List<EBAPerSisVo> getEBApersisList(String companyid, String regionid, String station, Date beginDate, Date endDate) throws Exception {
 
         if(endDate.getTime()>new Date().getTime()){
             endDate = new Date();
@@ -50,6 +51,13 @@ public class EBApersisService {
             EBAPerSisVo vo = new EBAPerSisVo();
             Map<String, Windpowerstationpointnew> stringMapMap = InitialRunner.wpPointmap.get(wp.getId());
 
+            if (null == stringMapMap || stringMapMap.size() <= 0
+                    || null == stringMapMap.get("YPJFS").getCode() || null == stringMapMap.get("YFDL")
+                    || null == stringMapMap.get("GZSSDL") || null == stringMapMap.get("WHSSDL")
+                    || null == stringMapMap.get("XNSSDL") || null == stringMapMap.get("XDSSDL")
+                    || null == stringMapMap.get("SLSSDL") || null == stringMapMap.get("FNLYL")) {
+                continue;
+            }
             String[] points = {stringMapMap.get("YPJFS").getCode(),
                     stringMapMap.get("YFDL").getCode(),
                     stringMapMap.get("GZSSDL").getCode(),
@@ -57,7 +65,7 @@ public class EBApersisService {
                     stringMapMap.get("XNSSDL").getCode(),
                     stringMapMap.get("XDSSDL").getCode(),
                     stringMapMap.get("SLSSDL").getCode(),
-                    stringMapMap.get("YPJFS").getCode() };
+                    stringMapMap.get("FNLYL").getCode()};
 
             DNAVal[] jkvalues = realApiUtil.getHistMatrix(points, newend);
             vo.setStation(wp.getId());
@@ -69,7 +77,7 @@ public class EBApersisService {
             vo.setXnssdl(jkvalues[4].DValue); //性能损失电量
             vo.setXdssdl(jkvalues[5].DValue); //限电损失电量
             vo.setSlssdl(jkvalues[6].DValue);//受累损失电量
-            vo.setFnlyl(jkvalues[7].DValue);//风能利用率
+            vo.setFnlyl(DoubleUtils.keepPrecision(jkvalues[7].DValue,4));//风能利用率
             vos.add(vo);
         }
 

+ 5 - 2
web/monitor-web-sxjn/src/main/java/com/gyee/frame/service/peranalysis/ElePerAnalysisService.java

@@ -60,7 +60,7 @@ public class ElePerAnalysisService {
             calendar.setTime(beginDate);
 
 
-            List<ProjectplanPG> pgList = projectplanPGService.findProjectplanPG(station, String.valueOf(calendar.get(Calendar.YEAR)), String.valueOf(calendar.get(Calendar.MONTH)));
+            List<ProjectplanPG> pgList = projectplanPGService.findProjectplanPG(wp.getId(), String.valueOf(calendar.get(Calendar.YEAR)), String.valueOf(calendar.get(Calendar.MONTH)));
             //(风场、发电量 YFDL、风速 YPJFS、计划发电量、发电小时、停机小时、故障小时、电量完成率)
             ElePerAnalysisVo vo = new ElePerAnalysisVo();
             vo.setId(wp.getId());
@@ -79,7 +79,10 @@ public class ElePerAnalysisService {
                     vo.setFs(jkvalues[0].DValue);
                     vo.setGeneration(jkvalues[1].DValue);
                 }
-                vo.setGeneratingcapacity(Double.valueOf(pgList.get(0).getGeneratingcapacity()));
+
+                if(null != pgList && pgList.size()>0){
+                    vo.setGeneratingcapacity(Double.valueOf(pgList.get(0).getGeneratingcapacity()));
+                }
             }
 
             List<Windpowerinfoday> windpowerinfodayList = windpowerinfodayService.getWindpowerinfodayList2(station, beginDate, endDate);

+ 1 - 1
web/monitor-web-sxjn/src/main/resources/logback.xml

@@ -8,7 +8,7 @@
     <contextName>logback</contextName>
 
     <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 -->
-    <property name="log.path" value="/usr/local/gyee/monitor/logs/" />
+    <property name="log.path" value="E://monitor//monitor//logs//" />
 
     <!--0. 日志格式和颜色渲染 -->
     <!-- 彩色日志依赖的渲染类 -->

+ 1 - 1
web/monitor-web-sxjn/src/main/resources/mybatis-generator.xml

@@ -125,7 +125,7 @@
 <!--        <table tableName='StopAnalysismainVo' domainObjectName='StopAnalysismainVo'/>-->
 
 
-        <table tableName='windpowerstation' domainObjectName='WindpowerstationPG'/>
+        <table tableName='projectplan' domainObjectName='ProjectplanPG'/>
 
 
     </context>