Преглед на файлове

监视模块后台接口

shilin преди 3 години
родител
ревизия
195ed0559d
променени са 50 файла, в които са добавени 5017 реда и са изтрити 217 реда
  1. 10 0
      pom.xml
  2. 43 47
      src/main/java/com/gyee/frame/common/file/FileUtils.java
  3. 48 6
      src/main/java/com/gyee/frame/common/spring/Constant.java
  4. 130 86
      src/main/java/com/gyee/frame/common/spring/InitialRunner.java
  5. 4 1
      src/main/java/com/gyee/frame/controller/AdminController.java
  6. 7 7
      src/main/java/com/gyee/frame/controller/powersaturation/PowerSaturationAmonutController.java
  7. 96 0
      src/main/java/com/gyee/frame/mapper/auto/WindTurbineTestingPointDi2Mapper.java
  8. 2 0
      src/main/java/com/gyee/frame/mapper/auto/WindturbinepowercurvefittingMapper.java
  9. 608 0
      src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointDi2.java
  10. 1523 0
      src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointDi2Example.java
  11. 21 0
      src/main/java/com/gyee/frame/model/custom/MatrixVo.java
  12. 9 1
      src/main/java/com/gyee/frame/model/custom/ValueVo.java
  13. 176 0
      src/main/java/com/gyee/frame/service/WindTurbineTestingPointDiService.java
  14. 49 0
      src/main/java/com/gyee/frame/service/WindturbinepowercurvefittingService.java
  15. 10 5
      src/main/java/com/gyee/frame/service/singleanalysis/SingleAnalysisService.java
  16. 1 1
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  17. 1 0
      src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java
  18. 262 0
      src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java
  19. 1 0
      src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java
  20. 337 0
      src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java
  21. 166 0
      src/main/java/com/gyee/frame/service/websocket/PowerFirstPushService.java
  22. 124 35
      src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java
  23. 6 3
      src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java
  24. 339 0
      src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java
  25. 184 0
      src/main/java/com/gyee/frame/service/websocket/WtWarnPushService.java
  26. 1 1
      src/main/resources/mybatis-generator.xml
  27. 478 0
      src/main/resources/mybatis/auto/WindTurbineTestingPointDi2Mapper.xml
  28. 8 0
      src/main/resources/mybatis/auto/WindturbinepowercurvefittingMapper.xml
  29. BIN
      src/main/resources/static/syz/dwk_gf.xls
  30. BIN
      src/main/resources/static/syz/dwk_zm.xls
  31. BIN
      src/main/resources/static/syz/mch_gf.xls
  32. BIN
      src/main/resources/static/syz/mch_zm.xls
  33. BIN
      src/main/resources/static/syz/mhs_fdc.xls
  34. BIN
      src/main/resources/static/syz/nss_fdc.xls
  35. BIN
      src/main/resources/static/syz/pleq_gf.xls
  36. BIN
      src/main/resources/static/syz/pleq_zm.xls
  37. BIN
      src/main/resources/static/syz/plyq_gf.xls
  38. BIN
      src/main/resources/static/syz/plyq_zm.xls
  39. BIN
      src/main/resources/static/syz/qs_fdc.xls
  40. BIN
      src/main/resources/static/syz/sbq_fdc.xls
  41. BIN
      src/main/resources/static/syz/sl_fdc.xls
  42. BIN
      src/main/resources/static/syz/xh_gf.xls
  43. BIN
      src/main/resources/static/syz/xh_zm.xls
  44. BIN
      src/main/resources/static/syz/xs_fdc.xls
  45. 62 0
      src/test/java/test/FileExcelTest.java
  46. 73 0
      src/test/java/test/MatrixQfPushTest.java
  47. 65 0
      src/test/java/test/PowerFirstPushTest.java
  48. 27 24
      src/test/java/test/PowerSaturationTest.java
  49. 73 0
      src/test/java/test/WtInfoPushServiceTest.java
  50. 73 0
      src/test/java/test/WtWarnPushServiceTest.java

+ 10 - 0
pom.xml

@@ -294,6 +294,16 @@
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-data-redis</artifactId>
 		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi-ooxml</artifactId>
+			<version>4.0.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.poi</groupId>
+			<artifactId>poi</artifactId>
+			<version>4.0.1</version>
+		</dependency>
 
 		<dependency>
 			<groupId>org.pegdown</groupId>

+ 43 - 47
src/main/java/com/gyee/frame/common/file/FileUtils.java

@@ -1,72 +1,62 @@
 package com.gyee.frame.common.file;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.OutputStream;
+import org.apache.poi.ss.usermodel.Workbook;
+import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.util.ClassUtils;
 
+import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.*;
 
 /**
  * 文件处理工具类
+ *
  * @author gyee
  * @date: 2018年9月22日 下午10:33:31
  */
-public class FileUtils
-{
+public class FileUtils {
+
+    // 设置目标文件的映射路径
+    @Value("classpath:static/syz")
+    private Resource syz;
+
+    private FileUtils() {
+    }
 
-    private FileUtils(){}
     /**
      * 输出指定文件的byte数组
-     * 
-     * @param filename 文件
+     *
      * @return
      */
-    public static void writeBytes(String filePath, OutputStream os) throws IOException
-    {
+    public static void writeBytes(String filePath, OutputStream os) throws IOException {
         FileInputStream fis = null;
-        try
-        {
+        try {
             File file = new File(filePath);
-            if (!file.exists())
-            {
+            if (!file.exists()) {
                 throw new FileNotFoundException(filePath);
             }
             fis = new FileInputStream(file);
             byte[] b = new byte[1024];
             int length;
-            while ((length = fis.read(b)) > 0)
-            {
+            while ((length = fis.read(b)) > 0) {
                 os.write(b, 0, length);
             }
-        }
-        catch (IOException e)
-        {
+        } catch (IOException e) {
             throw e;
-        }
-        finally
-        {
-            if (os != null)
-            {
-                try
-                {
+        } finally {
+            if (os != null) {
+                try {
                     os.close();
-                }
-                catch (IOException e1)
-                {
+                } catch (IOException e1) {
                     e1.printStackTrace();
                 }
             }
-            if (fis != null)
-            {
-                try
-                {
+            if (fis != null) {
+                try {
                     fis.close();
-                }
-                catch (IOException e1)
-                {
+                } catch (IOException e1) {
                     e1.printStackTrace();
                 }
             }
@@ -75,35 +65,34 @@ public class FileUtils
 
     /**
      * 删除文件
-     * 
+     *
      * @param filePath 文件
      * @return
      */
-    public static boolean deleteFile(String filePath)
-    {
+    public static boolean deleteFile(String filePath) {
         boolean flag = false;
         File file = new File(filePath);
         // 路径为文件且不为空则进行删除
-        if (file.isFile() && file.exists())
-        {
+        if (file.isFile() && file.exists()) {
             file.delete();
             flag = true;
         }
         return flag;
     }
-    
+
     /**
      * 读取图片地址 输出到页面
+     *
      * @param request
      * @param response
      * @param fileurl
-     * @throws IOException 
+     * @throws IOException
      */
-    public static void readIMGTohtml(HttpServletRequest request, HttpServletResponse response,String fileurl) throws IOException{
+    public static void readIMGTohtml(HttpServletRequest request, HttpServletResponse response, String fileurl) throws IOException {
         //设置发送到客户端的响应内容类型
         response.setContentType("image/*");
         //读取本地图片输入流
-        try (FileInputStream inputStream = new FileInputStream(fileurl);OutputStream out = response.getOutputStream()){
+        try (FileInputStream inputStream = new FileInputStream(fileurl); OutputStream out = response.getOutputStream()) {
             int i = inputStream.available();
             //byte数组用于存放图片字节数据
             byte[] buff = new byte[i];
@@ -111,4 +100,11 @@ public class FileUtils
             out.write(buff);
         }
     }
+
+
+
+
+
+
+
 }

+ 48 - 6
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -129,12 +129,7 @@ public class Constant {
 	public static final String LXNUM = "LXNUM";// 风机离线台数
 
 
-	public static final String TPOINT_WT_U1YZDL = "AI061";// U1项绕组电流
-	public static final String TPOINT_WT_U2YZDL = "AI062";// U2项绕组电流
-	public static final String TPOINT_WT_U3YZDL = "AI063";// U3项绕组电流
-	public static final String TPOINT_WT_U1YZDY = "AI058";// U1项绕组电压
-	public static final String TPOINT_WT_U2YZDY = "AI059";// U2项绕组电压
-	public static final String TPOINT_WT_U3YZDY = "AI060";// U3项绕组电压
+
 	public static final String TPOINT_WT_FDJZS = "AI128";// 发电机转速
 	public static final String TPOINT_WT_U1YZWD = "AI045";// U1绕组温度
 	public static final String TPOINT_WT_V1YZWD = "AI047";// V1绕组温度
@@ -367,4 +362,51 @@ public class Constant {
 	public static final String FDJJKZT = "JKZT003";// 发电机健康状态
 	public static final String BJJKZT = "JKZT004";// 变桨健康
 	public static final String ZKJKZT = "JKZT005";// 主控健康状态
+
+	public static final String TPOINT_QS3_YGCL4 = "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ002,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ004,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ006,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ008,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ010,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ012,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ016,SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ016";
+
+	public static final String R0QFZT = "R0QFZT"; // 日0欠发电量
+	public static final String R1QFZT = "R1QFZT"; // 日1欠发电量
+	public static final String R2QFZT = "R2QFZT"; // 日2欠发电量
+	public static final String R3QFZT = "R3QFZT"; // 日3欠发电量
+	public static final String R4QFZT = "R4QFZT"; // 日4欠发电量
+
+
+	public static final String QSTPOINT_WT_FDJZS = "AI223";// 发电机转速
+	public static final String QSTPOINT_WT_U1YZWD = "AI188";// U1绕组温度
+	public static final String QSTPOINT_WT_V1YZWD = "AI189";// V1绕组温度
+	public static final String QSTPOINT_WT_W1YZWD = "AI190";// W1绕组温度
+	public static final String QSTPOINT_WT_BJJD1 = "AI184";// 青山变桨角度1
+	public static final String QSTPOINT_WT_PHWZ = "AI206";// 偏航位置
+/********************************************变桨*********************************************************************/
+	public static final String TPOINT_WT_RYBMQ1 = "AI088";// 冗余编码器1
+	public static final String TPOINT_WT_RYBMQ2 = "AI089";// 冗余编码器2
+	public static final String TPOINT_WT_RYBMQ3 = "AI090";// 冗余编码器3
+
+	public static final String TPOINT_WT_BJSD1 = "AI091";// 变桨速度1
+	public static final String TPOINT_WT_BJSD2 = "AI092";// 变桨速度2
+	public static final String TPOINT_WT_BJSD3 = "AI093";// 变桨速度3
+
+	public static final String QSTPOINT_WT_U1YZDL = "AI210";// U1项绕组电流
+	public static final String QSTPOINT_WT_U2YZDL = "AI211";// U2项绕组电流
+	public static final String QSTPOINT_WT_U3YZDL = "AI212";// U3项绕组电流
+	public static final String QSTPOINT_WT_U1YZDY = "AI207";// U1项绕组电压
+	public static final String QSTPOINT_WT_U2YZDY = "AI208";// U2项绕组电压
+	public static final String QSTPOINT_WT_U3YZDY = "AI209";// U3项绕组电压
+
+
+
+	public static final String TPOINT_WT_U1YZDL = "AI061";// U1项绕组电流
+	public static final String TPOINT_WT_U2YZDL = "AI062";// U2项绕组电流
+	public static final String TPOINT_WT_U3YZDL = "AI063";// U3项绕组电流
+	public static final String TPOINT_WT_U1YZDY = "AI058";// U1项绕组电压
+	public static final String TPOINT_WT_U2YZDY = "AI059";// U2项绕组电压
+	public static final String TPOINT_WT_U3YZDY = "AI060";// U3项绕组电压
+
+/********************************************变桨*********************************************************************/
+
+
+
+
+
 }

+ 130 - 86
src/main/java/com/gyee/frame/common/spring/InitialRunner.java

@@ -64,18 +64,19 @@ public class InitialRunner implements CommandLineRunner {
     public static List<Windturbine> wtls = new ArrayList<Windturbine>(); // 风电机LIST集合
 
 
-    public static Map<String, Windpowerstation>  wpmap = new HashMap<String, Windpowerstation>();//风场(包含光电电)
+    public static Map<String, Windpowerstation> wpmap = new HashMap<String, Windpowerstation>();//风场(包含光电电)
     public static Map<String, Project> pjmap = new HashMap<String, Project>(); // 项目MAP(包含光电电)
     public static Map<String, Line> lnmap = new HashMap<String, Line>(); // 线路(包含光电电)
-    public static Map<String, Windturbine>  wtmap = new HashMap<String, Windturbine>();//风机(包含光电电)
+    public static Map<String, Windturbine> wtmap = new HashMap<String, Windturbine>();//风机(包含光电电)
 
 
+    public static List<Warning2> warnls = new ArrayList<Warning2>(); // 报警LIST集合
+    public static Map<String, Warning2> warningmap = new HashMap<String, Warning2>();// 报警MAP集合
 
-
-
-    public static Map<String, Warning2>  warningmap = new HashMap<String, Warning2>();
-    public static Map<String, WarningClassify>  warningClassifymap = new HashMap<String, WarningClassify>();
-    public static Map<String, Manufacturer>  manufacturermap = new HashMap<String, Manufacturer>();
+    public static Map<String, Map<String, List<Warning2>>> warnmodelmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,<报警类型,报警集合>>
+    public static Map<String, List<Warning2>> warnmap = new HashMap<>();// 按照型号划分报警MAP集合 <型号,报警集合>
+    public static Map<String, WarningClassify> warningClassifymap = new HashMap<String, WarningClassify>();
+    public static Map<String, Manufacturer> manufacturermap = new HashMap<String, Manufacturer>();
 
     public static Map<String, List<Windturbine>> wp_wtmap = new HashMap<String, List<Windturbine>>();
     public static Map<String, List<Windturbine>> pj_wtmap = new HashMap<String, List<Windturbine>>();
@@ -87,16 +88,31 @@ public class InitialRunner implements CommandLineRunner {
     public static Map<String, Map<String, WindPowerStationTestingPoint2>> wpPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//场站测点
     public static Map<String, Map<String, WindPowerStationTestingPoint2>> pjPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//项目测点
     public static Map<String, Map<String, WindPowerStationTestingPoint2>> lnPointmap = new HashMap<String, Map<String, WindPowerStationTestingPoint2>>();//线路测点
-    public static Map<String, SysQuartzJob>  jobsmap = new HashMap<String, SysQuartzJob>();
+    public static Map<String, SysQuartzJob> jobsmap = new HashMap<String, SysQuartzJob>();
     public static Map<String, Map<Double, Windturbinepowercurvefitting>> wpcmap = new HashMap<String, Map<Double, Windturbinepowercurvefitting>>();
     public static Map<String, Equipmentmodel> mlmap = new HashMap<String, Equipmentmodel>();// 风电机模型
     public static Map<String, Map<String, ModelPower>> modelPowermap = new HashMap<String, Map<String, ModelPower>>();// 风电机类型对应功率表
 
 
+    public static Map<String, Map<String, Object>> appendYcglMap = new HashMap<String, Map<String, Object>>();// 预测功率追加
+
+    Map<String, Object> ycmap = new HashMap<>();
+
     @Override
     public void run(String... args) throws Exception {
         System.out.println(">>>>>>>>>>>>>>>服务启动执行,换成测点关联数据 <<<<<<<<<<<<<");
 
+        //配置追加功率曲线测点
+        Map<String, Object> ycmap = new HashMap<>();
+
+        String[] ycPoints3 = Constant.TPOINT_QS3_YGCL4.split(",");
+        //添加预测风速第一个点,存储到当前的历史值
+        ycmap.put("cdq1", "SLFGL.NX_GD_QSF_YC_P1_L1_001_CDQ001");
+        //添加预测功率后续预测点字符串数组,实时数据
+        ycmap.put("cdq2", ycPoints3);
+
+        appendYcglMap.put("QS_FDC", ycmap);
+
 //        List<SysQuartzJob> quartzJobs=sysQuartzJobService.selectByExample(new SysQuartzJobExample());
 //
 //        if(!quartzJobs.isEmpty())
@@ -108,44 +124,44 @@ public class InitialRunner implements CommandLineRunner {
 //
 //        }
 
-        String wpString=JSON.toJSONString(globalCache.get("WP"));
-        wpPointmap= JSONObject.parseObject(wpString,new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>(){});
-        String pjString=JSON.toJSONString(globalCache.get("PJ"));
-        pjPointmap= JSONObject.parseObject(pjString,new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>(){});
-        String lnString=JSON.toJSONString(globalCache.get("LN"));
-        lnPointmap= JSONObject.parseObject(lnString,new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>(){});
+        String wpString = JSON.toJSONString(globalCache.get("WP"));
+        wpPointmap = JSONObject.parseObject(wpString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
+        });
+        String pjString = JSON.toJSONString(globalCache.get("PJ"));
+        pjPointmap = JSONObject.parseObject(pjString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
+        });
+        String lnString = JSON.toJSONString(globalCache.get("LN"));
+        lnPointmap = JSONObject.parseObject(lnString, new TypeReference<Map<String, Map<String, WindPowerStationTestingPoint2>>>() {
+        });
 
-        String wtString=JSON.toJSONString(globalCache.get("WT"));
-        wtPointmap= JSONObject.parseObject(wtString,new TypeReference<Map<String, Map<String, WindTurbineTestingPointAi2>>>(){});
+        String wtString = JSON.toJSONString(globalCache.get("WT"));
+        wtPointmap = JSONObject.parseObject(wtString, new TypeReference<Map<String, Map<String, WindTurbineTestingPointAi2>>>() {
+        });
 
 
-        WindpowerstationExample windpowerstationExample=new WindpowerstationExample();
+        WindpowerstationExample windpowerstationExample = new WindpowerstationExample();
         windpowerstationExample.setOrderByClause("ordernum ASC");
 //        windpowerstationExample.createCriteria().andIdNotLike("%MCH%");
-        wpallls= windpowerstationService.selectByExample(windpowerstationExample);
-        if(!wpallls.isEmpty())
-        {
-            for(Windpowerstation wp:wpallls)
-            {
-                if(wp.getId().endsWith("FDC"))
-                {
+        wpallls = windpowerstationService.selectByExample(windpowerstationExample);
+        if (!wpallls.isEmpty()) {
+            for (Windpowerstation wp : wpallls) {
+                if (wp.getId().endsWith("FDC")) {
                     wpls.add(wp);
                 }
-                wpmap.put(wp.getId(),wp);
+                wpmap.put(wp.getId(), wp);
             }
         }
 
 
-        ProjectExample projectExample=new ProjectExample();
+        ProjectExample projectExample = new ProjectExample();
         projectExample.setOrderByClause("ordernum ASC");
- //       projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
-        pjallls= projectService.selectByExample(projectExample);
+        //       projectExample.createCriteria().andWindpowerstationidNotLike("%GDC");
+        pjallls = projectService.selectByExample(projectExample);
 
         if (!pjallls.isEmpty()) {
             for (Project pj : pjallls) {
                 pjmap.put(pj.getId(), pj);
-                if(pj.getWindpowerstationid().endsWith("FDC"))
-                {
+                if (pj.getWindpowerstationid().endsWith("FDC")) {
                     pjls.add(pj);
                 }
                 if (pjsmap.containsKey(pj.getWindpowerstationid())) {
@@ -160,19 +176,17 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        LineExample lineExample=new LineExample();
+        LineExample lineExample = new LineExample();
         lineExample.setOrderByClause("ordernum ASC");
         lineExample.createCriteria().getAllCriteria();
-        lineallls= lineService.selectByExample(lineExample);
+        lineallls = lineService.selectByExample(lineExample);
 
         if (!lineallls.isEmpty()) {
             for (Line ln : lineallls) {
                 lnmap.put(ln.getId(), ln);
-                if(pjmap.containsKey(ln.getProjectid()))
-                {
-                    Project pj=pjmap.get(ln.getProjectid());
-                    if(pj.getWindpowerstationid().endsWith("FDC"))
-                    {
+                if (pjmap.containsKey(ln.getProjectid())) {
+                    Project pj = pjmap.get(ln.getProjectid());
+                    if (pj.getWindpowerstationid().endsWith("FDC")) {
                         linels.add(ln);
                     }
                 }
@@ -188,24 +202,21 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        WindturbineExample windturbineExample=new WindturbineExample();
+        WindturbineExample windturbineExample = new WindturbineExample();
         windturbineExample.setOrderByClause("status ASC");
 
-        wtallls= windturbineService.selectByExample(windturbineExample);
+        wtallls = windturbineService.selectByExample(windturbineExample);
 
-        if(!wtallls.isEmpty())
-        {
-            for(Windturbine wt:wtallls)
-            {
-                if(wt.getWindpowerstationid().endsWith("FDC"))
-                {
+        if (!wtallls.isEmpty()) {
+            for (Windturbine wt : wtallls) {
+                if (wt.getWindpowerstationid().endsWith("FDC")) {
                     wtls.add(wt);
                 }
-                wtmap.put(wt.getId(),wt);
+                wtmap.put(wt.getId(), wt);
             }
         }
 
-        mprdMap=modelpowerRdService.getModelpowerRdAllMap();
+        mprdMap = modelpowerRdService.getModelpowerRdAllMap();
 
 //        WindturbinepowercurvefittingExample windturbinepowercurvefittingExample=new WindturbinepowercurvefittingExample();
 //        windturbinepowercurvefittingExample.setOrderByClause("WINDTURBINEID ASC,speed ASC");
@@ -224,59 +235,92 @@ public class InitialRunner implements CommandLineRunner {
 //            }
 //        }
 
-        Warning2Example warning2Example=new Warning2Example();
+        Warning2Example warning2Example = new Warning2Example();
         warning2Example.setOrderByClause("id ASC");
-        List<Warning2> warnls= warning2Service.selectByExample(warning2Example);
 
-        if(warnls!=null && !warnls.isEmpty()) {
-            for(int i=0;i<warnls.size();i++){
-                Warning2 warning=warnls.get(i);
-                warningmap.put(warning.getId(),warning);
+        Warning2Example.Criteria criteria = warning2Example.createCriteria();
+        criteria.andEdnavalueNotEqualTo(0);
+        criteria.andWarningclassifyidIsNotNull();
+        warnls = warning2Service.selectByExample(warning2Example);
+
+        if (warnls != null && !warnls.isEmpty()) {
+            for (int i = 0; i < warnls.size(); i++) {
+                Warning2 warning = warnls.get(i);
+
+                if (warnmodelmap.containsKey(warning.getModelid())) {
+                    Map<String, List<Warning2>> map = warnmodelmap.get(warning.getModelid());
+                    if(map.containsKey(warning.getWarningclassifyid()))
+                    {
+                        List<Warning2> ls =map.get(warning.getWarningclassifyid());
+                        ls.add(warning);
+                        map.put(warning.getWarningclassifyid(), ls);
+                    }else
+                    {
+                        List<Warning2> ls = new ArrayList<>();
+                        ls.add(warning);
+                        map.put(warning.getWarningclassifyid(), ls);
+                    }
+                    warnmodelmap.put(warning.getModelid(),map);
+                } else {
+                    Map<String, List<Warning2>> map = new HashMap<>();
+                    List<Warning2> ls = new ArrayList<>();
+                    ls.add(warning);
+                    map.put(warning.getWarningclassifyid(), ls);
+                    warnmodelmap.put(warning.getModelid(),map);
+                }
+
+                if (warnmap.containsKey(warning.getModelid())) {
+                    List<Warning2> ls =warnmap.get(warning.getModelid());
+                    ls.add(warning);
+                    warnmap.put(warning.getModelid(),ls);
+                } else {
+                    List<Warning2> ls =new ArrayList<>();
+                    ls.add(warning);
+                    warnmap.put(warning.getModelid(),ls);
+                }
+
+                warningmap.put(warning.getId(), warning);
             }
         }
-            if(wtallls!=null && !wtallls.isEmpty()){
+        if (wtallls != null && !wtallls.isEmpty()) {
 
-            for(int i=0;i<wtallls.size();i++){
+            for (int i = 0; i < wtallls.size(); i++) {
 
-                Windturbine point=wtallls.get(i);
-                if(wp_wtmap.containsKey(point.getWindpowerstationid())){
-                    List<Windturbine> ls=wp_wtmap.get(point.getWindpowerstationid());
+                Windturbine point = wtallls.get(i);
+                if (wp_wtmap.containsKey(point.getWindpowerstationid())) {
+                    List<Windturbine> ls = wp_wtmap.get(point.getWindpowerstationid());
                     ls.add(point);
-                    wp_wtmap.put(point.getWindpowerstationid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
+                    wp_wtmap.put(point.getWindpowerstationid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
                     ls.add(point);
-                    wp_wtmap.put(point.getWindpowerstationid(),ls);
+                    wp_wtmap.put(point.getWindpowerstationid(), ls);
                 }
 
-                if(pj_wtmap.containsKey(point.getProjectid())){
-                    List<Windturbine> ls=pj_wtmap.get(point.getProjectid());
+                if (pj_wtmap.containsKey(point.getProjectid())) {
+                    List<Windturbine> ls = pj_wtmap.get(point.getProjectid());
                     ls.add(point);
-                    pj_wtmap.put(point.getProjectid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
+                    pj_wtmap.put(point.getProjectid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
                     ls.add(point);
-                    pj_wtmap.put(point.getProjectid(),ls);
+                    pj_wtmap.put(point.getProjectid(), ls);
                 }
 
 
-                if(ln_wtmap.containsKey(point.getLineid())){
-                    List<Windturbine> ls=ln_wtmap.get(point.getLineid());
+                if (ln_wtmap.containsKey(point.getLineid())) {
+                    List<Windturbine> ls = ln_wtmap.get(point.getLineid());
                     ls.add(point);
-                    ln_wtmap.put(point.getLineid(),ls);
-                }
-                else{
-                    List<Windturbine> ls =new ArrayList();
+                    ln_wtmap.put(point.getLineid(), ls);
+                } else {
+                    List<Windturbine> ls = new ArrayList();
                     ls.add(point);
-                    ln_wtmap.put(point.getLineid(),ls);
+                    ln_wtmap.put(point.getLineid(), ls);
                 }
 
             }
 
 
-
         }
 
 
@@ -320,7 +364,7 @@ public class InitialRunner implements CommandLineRunner {
 //            }
 //        }
 
-        EquipmentmodelExample example=new EquipmentmodelExample();
+        EquipmentmodelExample example = new EquipmentmodelExample();
         List<Equipmentmodel> mlls = equipmentmodelService.selectByExample(example);
         if (!mlls.isEmpty()) {
             for (Equipmentmodel model : mlls) {
@@ -328,7 +372,7 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        WarningClassifyExample wcexample=new WarningClassifyExample();
+        WarningClassifyExample wcexample = new WarningClassifyExample();
         List<WarningClassify> wcls = warningClassifyService.selectByExample(wcexample);
         if (!wcls.isEmpty()) {
             for (WarningClassify model : wcls) {
@@ -336,7 +380,7 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        ManufacturerExample mfexample=new ManufacturerExample();
+        ManufacturerExample mfexample = new ManufacturerExample();
         List<Manufacturer> mfls = manufacturerService.selectByExample(mfexample);
         if (!mfls.isEmpty()) {
             for (Manufacturer model : mfls) {
@@ -344,18 +388,18 @@ public class InitialRunner implements CommandLineRunner {
             }
         }
 
-        ModelPowerExample mpexample=new ModelPowerExample();
+        ModelPowerExample mpexample = new ModelPowerExample();
         List<ModelPower> mpls = modelPowerService.selectByExample(mpexample);
         if (!mpls.isEmpty()) {
 
             Map<String, ModelPower> mpmap = null;
 
-            if(mpls != null && !mpls.isEmpty()){
-                for(ModelPower mp : mpls){
-                    if(modelPowermap.containsKey(mp.getModelid())){
+            if (mpls != null && !mpls.isEmpty()) {
+                for (ModelPower mp : mpls) {
+                    if (modelPowermap.containsKey(mp.getModelid())) {
                         mpmap = modelPowermap.get(mp.getModelid());
                         mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
-                    }else{
+                    } else {
                         mpmap = new HashMap<String, ModelPower>();
                         mpmap.put(String.valueOf(mp.getSpeed().doubleValue()), mp);
                         modelPowermap.put(mp.getModelid(), mpmap);

+ 4 - 1
src/main/java/com/gyee/frame/controller/AdminController.java

@@ -30,6 +30,7 @@ import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.util.Enumeration;
 import java.util.List;
 
 /**
@@ -240,9 +241,11 @@ public class AdminController extends BaseController {
 
 
 	@ApiOperation(value = "获取用户菜单", notes = "获取用户菜单")
-	@GetMapping("/usermenu")
+	@PostMapping("/usermenu")
 	@ResponseBody
 	public AjaxResult usermenu(HttpServletRequest request) {
+		Enumeration<String> headNames = request.getHeaderNames();
+		request.getParameter("authToken");
 		// 获取菜单栏
 		List<ElementNode> menuTree = sysPermissionService.getTreePerm(ShiroUtils.getUserId());
 

+ 7 - 7
src/main/java/com/gyee/frame/controller/powersaturation/PowerSaturationAmonutController.java

@@ -6,10 +6,10 @@ import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.model.auto.ModelPower;
 import com.gyee.frame.model.auto.Windturbine;
-import com.gyee.frame.model.auto.Windturbinecurvefitting;
+import com.gyee.frame.model.auto.Windturbinepowercurvefitting;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
-import com.gyee.frame.service.WindturbinecurvefittingService;
+import com.gyee.frame.service.WindturbinepowercurvefittingService;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -30,7 +30,7 @@ import java.util.Map;
 @Api(value = "总单机饱和度统计",tags =  "总单机饱和度统计")
 public class PowerSaturationAmonutController {
     @Resource
-    private WindturbinecurvefittingService windturbinecurvefittingService;
+    private WindturbinepowercurvefittingService windturbinepowercurvefittingService;
 
     /**总功率饱和列表**/
     @PostMapping("/powersaturationamonutlist")
@@ -43,10 +43,10 @@ public class PowerSaturationAmonutController {
 
     public AjaxResult powersaturationamonutlist(Tablepar tablepar, String wtId) {
 
-        PageInfo<Windturbinecurvefitting> vos=new PageInfo<>();
+        PageInfo<Windturbinepowercurvefitting> vos=new PageInfo<>();
         if (StringUtils.notEmp(wtId) )
         {
-            vos=windturbinecurvefittingService.getWindturbinecurvefitting(tablepar, wtId);
+            vos=windturbinepowercurvefittingService.getWindturbinepowercurvefitting(tablepar, wtId);
         }
 
         if (null!=vos) {
@@ -74,7 +74,7 @@ public class PowerSaturationAmonutController {
         if (StringUtils.notEmp(wtId) )
         {
 
-            List<Windturbinecurvefitting> wcls=windturbinecurvefittingService.getWindturbinecurvefittingByWtId(wtId);
+            List<Windturbinepowercurvefitting> wcls=windturbinepowercurvefittingService.getWindturbinepowercurvefittingByWtId(wtId);
 
             if (!wcls.isEmpty()) {
 //				Collections.sort(wcls, new Comparator<Windturbinepowercurvefitting>() {
@@ -95,7 +95,7 @@ public class PowerSaturationAmonutController {
                 }
 
                 double temp = 0.0;
-                for (Windturbinecurvefitting wc : wcls) {
+                for (Windturbinepowercurvefitting wc : wcls) {
                     DataVo vo = new DataVo();
 
                     int c = (int) wc.getSpeed().intValue();

+ 96 - 0
src/main/java/com/gyee/frame/mapper/auto/WindTurbineTestingPointDi2Mapper.java

@@ -0,0 +1,96 @@
+package com.gyee.frame.mapper.auto;
+
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2Example;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface WindTurbineTestingPointDi2Mapper {
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    long countByExample(WindTurbineTestingPointDi2Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int deleteByExample(WindTurbineTestingPointDi2Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int deleteByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int insert(WindTurbineTestingPointDi2 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int insertSelective(WindTurbineTestingPointDi2 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    List<WindTurbineTestingPointDi2> selectByExample(WindTurbineTestingPointDi2Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    WindTurbineTestingPointDi2 selectByPrimaryKey(String id);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int updateByExampleSelective(@Param("record") WindTurbineTestingPointDi2 record, @Param("example") WindTurbineTestingPointDi2Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int updateByExample(@Param("record") WindTurbineTestingPointDi2 record, @Param("example") WindTurbineTestingPointDi2Example example);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKeySelective(WindTurbineTestingPointDi2 record);
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    int updateByPrimaryKey(WindTurbineTestingPointDi2 record);
+}

+ 2 - 0
src/main/java/com/gyee/frame/mapper/auto/WindturbinepowercurvefittingMapper.java

@@ -94,4 +94,6 @@ public interface WindturbinepowercurvefittingMapper {
      * @mbg.generated
      */
     int updateByPrimaryKey(Windturbinepowercurvefitting record);
+
+    List<Windturbinepowercurvefitting> getWindturbinepowercurvefittingByWtId(@Param("wtId") String wtId);
 }

+ 608 - 0
src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointDi2.java

@@ -0,0 +1,608 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class WindTurbineTestingPointDi2 implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.ID
+     *
+     * @mbg.generated
+     */
+    private String id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.CODE
+     *
+     * @mbg.generated
+     */
+    private String code;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.NAME
+     *
+     * @mbg.generated
+     */
+    private String name;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.MODEL
+     *
+     * @mbg.generated
+     */
+    private String model;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    private String valueunit;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    private String englishname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.TYPEID
+     *
+     * @mbg.generated
+     */
+    private String typeid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.MODELID
+     *
+     * @mbg.generated
+     */
+    private String modelid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.MAXVAL
+     *
+     * @mbg.generated
+     */
+    private BigDecimal maxval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.MINVAL
+     *
+     * @mbg.generated
+     */
+    private BigDecimal minval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    private BigDecimal reasonablemaxval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    private BigDecimal reasonableminval;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    private String windturbineid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    private String uniformcode;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.SHORTID
+     *
+     * @mbg.generated
+     */
+    private String shortid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.LONGID
+     *
+     * @mbg.generated
+     */
+    private String longid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    private String windpowerstationid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column WINDTURBINETESTINGPOINTDI2.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    private String realtimeid;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table WINDTURBINETESTINGPOINTDI2
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.ID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.ID
+     *
+     * @mbg.generated
+     */
+    public String getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.ID
+     *
+     * @param id the value for WINDTURBINETESTINGPOINTDI2.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(String id) {
+        this.id = id == null ? null : id.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.CODE
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.CODE
+     *
+     * @mbg.generated
+     */
+    public String getCode() {
+        return code;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.CODE
+     *
+     * @param code the value for WINDTURBINETESTINGPOINTDI2.CODE
+     *
+     * @mbg.generated
+     */
+    public void setCode(String code) {
+        this.code = code == null ? null : code.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.NAME
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.NAME
+     *
+     * @mbg.generated
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.NAME
+     *
+     * @param name the value for WINDTURBINETESTINGPOINTDI2.NAME
+     *
+     * @mbg.generated
+     */
+    public void setName(String name) {
+        this.name = name == null ? null : name.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.MODEL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.MODEL
+     *
+     * @mbg.generated
+     */
+    public String getModel() {
+        return model;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.MODEL
+     *
+     * @param model the value for WINDTURBINETESTINGPOINTDI2.MODEL
+     *
+     * @mbg.generated
+     */
+    public void setModel(String model) {
+        this.model = model == null ? null : model.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.VALUEUNIT
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    public String getValueunit() {
+        return valueunit;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.VALUEUNIT
+     *
+     * @param valueunit the value for WINDTURBINETESTINGPOINTDI2.VALUEUNIT
+     *
+     * @mbg.generated
+     */
+    public void setValueunit(String valueunit) {
+        this.valueunit = valueunit == null ? null : valueunit.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.ENGLISHNAME
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    public String getEnglishname() {
+        return englishname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.ENGLISHNAME
+     *
+     * @param englishname the value for WINDTURBINETESTINGPOINTDI2.ENGLISHNAME
+     *
+     * @mbg.generated
+     */
+    public void setEnglishname(String englishname) {
+        this.englishname = englishname == null ? null : englishname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.TYPEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.TYPEID
+     *
+     * @mbg.generated
+     */
+    public String getTypeid() {
+        return typeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.TYPEID
+     *
+     * @param typeid the value for WINDTURBINETESTINGPOINTDI2.TYPEID
+     *
+     * @mbg.generated
+     */
+    public void setTypeid(String typeid) {
+        this.typeid = typeid == null ? null : typeid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.MODELID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.MODELID
+     *
+     * @mbg.generated
+     */
+    public String getModelid() {
+        return modelid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.MODELID
+     *
+     * @param modelid the value for WINDTURBINETESTINGPOINTDI2.MODELID
+     *
+     * @mbg.generated
+     */
+    public void setModelid(String modelid) {
+        this.modelid = modelid == null ? null : modelid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.MAXVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.MAXVAL
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getMaxval() {
+        return maxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.MAXVAL
+     *
+     * @param maxval the value for WINDTURBINETESTINGPOINTDI2.MAXVAL
+     *
+     * @mbg.generated
+     */
+    public void setMaxval(BigDecimal maxval) {
+        this.maxval = maxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.MINVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.MINVAL
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getMinval() {
+        return minval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.MINVAL
+     *
+     * @param minval the value for WINDTURBINETESTINGPOINTDI2.MINVAL
+     *
+     * @mbg.generated
+     */
+    public void setMinval(BigDecimal minval) {
+        this.minval = minval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMAXVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getReasonablemaxval() {
+        return reasonablemaxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMAXVAL
+     *
+     * @param reasonablemaxval the value for WINDTURBINETESTINGPOINTDI2.REASONABLEMAXVAL
+     *
+     * @mbg.generated
+     */
+    public void setReasonablemaxval(BigDecimal reasonablemaxval) {
+        this.reasonablemaxval = reasonablemaxval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMINVAL
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    public BigDecimal getReasonableminval() {
+        return reasonableminval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.REASONABLEMINVAL
+     *
+     * @param reasonableminval the value for WINDTURBINETESTINGPOINTDI2.REASONABLEMINVAL
+     *
+     * @mbg.generated
+     */
+    public void setReasonableminval(BigDecimal reasonableminval) {
+        this.reasonableminval = reasonableminval;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.WINDTURBINEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public String getWindturbineid() {
+        return windturbineid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.WINDTURBINEID
+     *
+     * @param windturbineid the value for WINDTURBINETESTINGPOINTDI2.WINDTURBINEID
+     *
+     * @mbg.generated
+     */
+    public void setWindturbineid(String windturbineid) {
+        this.windturbineid = windturbineid == null ? null : windturbineid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.UNIFORMCODE
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public String getUniformcode() {
+        return uniformcode;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.UNIFORMCODE
+     *
+     * @param uniformcode the value for WINDTURBINETESTINGPOINTDI2.UNIFORMCODE
+     *
+     * @mbg.generated
+     */
+    public void setUniformcode(String uniformcode) {
+        this.uniformcode = uniformcode == null ? null : uniformcode.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.SHORTID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.SHORTID
+     *
+     * @mbg.generated
+     */
+    public String getShortid() {
+        return shortid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.SHORTID
+     *
+     * @param shortid the value for WINDTURBINETESTINGPOINTDI2.SHORTID
+     *
+     * @mbg.generated
+     */
+    public void setShortid(String shortid) {
+        this.shortid = shortid == null ? null : shortid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.LONGID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.LONGID
+     *
+     * @mbg.generated
+     */
+    public String getLongid() {
+        return longid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.LONGID
+     *
+     * @param longid the value for WINDTURBINETESTINGPOINTDI2.LONGID
+     *
+     * @mbg.generated
+     */
+    public void setLongid(String longid) {
+        this.longid = longid == null ? null : longid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.WINDPOWERSTATIONID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public String getWindpowerstationid() {
+        return windpowerstationid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.WINDPOWERSTATIONID
+     *
+     * @param windpowerstationid the value for WINDTURBINETESTINGPOINTDI2.WINDPOWERSTATIONID
+     *
+     * @mbg.generated
+     */
+    public void setWindpowerstationid(String windpowerstationid) {
+        this.windpowerstationid = windpowerstationid == null ? null : windpowerstationid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column WINDTURBINETESTINGPOINTDI2.REALTIMEID
+     *
+     * @return the value of WINDTURBINETESTINGPOINTDI2.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    public String getRealtimeid() {
+        return realtimeid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column WINDTURBINETESTINGPOINTDI2.REALTIMEID
+     *
+     * @param realtimeid the value for WINDTURBINETESTINGPOINTDI2.REALTIMEID
+     *
+     * @mbg.generated
+     */
+    public void setRealtimeid(String realtimeid) {
+        this.realtimeid = realtimeid == null ? null : realtimeid.trim();
+    }
+}

Файловите разлики са ограничени, защото са твърде много
+ 1523 - 0
src/main/java/com/gyee/frame/model/auto/WindTurbineTestingPointDi2Example.java


+ 21 - 0
src/main/java/com/gyee/frame/model/custom/MatrixVo.java

@@ -3,11 +3,32 @@ package com.gyee.frame.model.custom;
 public class MatrixVo {
 
 	private String wtId;
+	private String wtCode;
 	private Integer wtnum;
 	private Double fjzt;
 	private Double fs;
     private Double gl;
+	/**
+	 *利用率=实时功率/装机容量
+	 */
 
+	private Double lyl;
+
+	public String getWtCode() {
+		return wtCode;
+	}
+
+	public void setWtCode(String wtCode) {
+		this.wtCode = wtCode;
+	}
+
+	public Double getLyl() {
+		return lyl;
+	}
+
+	public void setLyl(Double lyl) {
+		this.lyl = lyl;
+	}
 
 	public String getWtId() {
 		return wtId;

+ 9 - 1
src/main/java/com/gyee/frame/model/custom/ValueVo.java

@@ -4,12 +4,20 @@ public class ValueVo {
 	private String name;
 	private String value;
 	private Double data1;
-
+	private String typeId;
 	private String warningId;
 	private String shutdowneventId;
 	private String wpId;
 	private String wtId;
 
+	public String getTypeId() {
+		return typeId;
+	}
+
+	public void setTypeId(String typeId) {
+		this.typeId = typeId;
+	}
+
 	public String getValue() {
 		return value;
 	}

+ 176 - 0
src/main/java/com/gyee/frame/service/WindTurbineTestingPointDiService.java

@@ -0,0 +1,176 @@
+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.support.Convert;
+import com.gyee.frame.mapper.auto.WindTurbineTestingPointDi2Mapper;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2Example;
+import com.gyee.frame.model.custom.Tablepar;
+import com.gyee.frame.util.SnowflakeIdWorker;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 风机AI测点 WindTurbineTestingPointDiService
+ * @Title: WindTurbineTestingPointDiService.java 
+ * @Package com.gyee.frame.service 
+ * @author gyee_自动生成
+ * @email 1@qq.com
+ * @date 2019-12-31 14:58:09  
+ **/
+@Service
+public class WindTurbineTestingPointDiService implements BaseService<WindTurbineTestingPointDi2, WindTurbineTestingPointDi2Example> {
+	@Resource
+	private WindTurbineTestingPointDi2Mapper windTurbineTestingPointDi2Mapper;
+	
+      	   	      	      	      	      	      	      	      	      	      	
+	/**
+	 * 分页查询
+	 * @param tablepar
+	 * @param name
+	 * @return
+	 */
+	 public PageInfo<WindTurbineTestingPointDi2> list(Tablepar tablepar, String name){
+	        WindTurbineTestingPointDi2Example testExample=new WindTurbineTestingPointDi2Example();
+	        testExample.setOrderByClause("id ASC");
+	        if(name!=null&&!"".equals(name)){
+	        	testExample.createCriteria().andCodeLike("%"+name+"%");
+	        }
+
+	        PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+	        List<WindTurbineTestingPointDi2> list= windTurbineTestingPointDi2Mapper.selectByExample(testExample);
+	        PageInfo<WindTurbineTestingPointDi2> pageInfo = new PageInfo<WindTurbineTestingPointDi2>(list);
+	        return  pageInfo;
+	 }
+
+	@Override
+	public int deleteByPrimaryKey(String ids) {
+				
+			List<String> lista=Convert.toListStrArray(ids);
+			WindTurbineTestingPointDi2Example example=new WindTurbineTestingPointDi2Example();
+			example.createCriteria().andIdIn(lista);
+			return windTurbineTestingPointDi2Mapper.deleteByExample(example);
+			
+				
+	}
+	
+	
+	@Override
+	public WindTurbineTestingPointDi2 selectByPrimaryKey(String id) {
+				
+			return windTurbineTestingPointDi2Mapper.selectByPrimaryKey(id);
+				
+	}
+
+	
+	@Override
+	public int updateByPrimaryKeySelective(WindTurbineTestingPointDi2 record) {
+		return windTurbineTestingPointDi2Mapper.updateByPrimaryKeySelective(record);
+	}
+	
+	
+	/**
+	 * 添加
+	 */
+	@Override
+	public int insertSelective(WindTurbineTestingPointDi2 record) {
+				
+		//添加雪花主键id
+		record.setId(SnowflakeIdWorker.getUUID());
+			
+				
+		return windTurbineTestingPointDi2Mapper.insertSelective(record);
+	}
+	
+	
+	@Override
+	public int updateByExampleSelective(WindTurbineTestingPointDi2 record, WindTurbineTestingPointDi2Example example) {
+		
+		return windTurbineTestingPointDi2Mapper.updateByExampleSelective(record, example);
+	}
+
+	
+	@Override
+	public int updateByExample(WindTurbineTestingPointDi2 record, WindTurbineTestingPointDi2Example example) {
+		
+		return windTurbineTestingPointDi2Mapper.updateByExample(record, example);
+	}
+
+	@Override
+	public List<WindTurbineTestingPointDi2> selectByExample(WindTurbineTestingPointDi2Example example) {
+		
+		return windTurbineTestingPointDi2Mapper.selectByExample(example);
+	}
+
+	
+	@Override
+	public long countByExample(WindTurbineTestingPointDi2Example example) {
+		
+		return windTurbineTestingPointDi2Mapper.countByExample(example);
+	}
+
+	
+	@Override
+	public int deleteByExample(WindTurbineTestingPointDi2Example example) {
+		
+		return windTurbineTestingPointDi2Mapper.deleteByExample(example);
+	}
+	
+	/**
+	 * 检查name
+	 * @param windTurbineTestingPointDi
+	 * @return
+	 */
+	public int checkNameUnique(WindTurbineTestingPointDi2 windTurbineTestingPointDi){
+		WindTurbineTestingPointDi2Example example=new WindTurbineTestingPointDi2Example();
+		example.createCriteria().andCodeEqualTo(windTurbineTestingPointDi.getCode());
+		List<WindTurbineTestingPointDi2> list=windTurbineTestingPointDi2Mapper.selectByExample(example);
+		return list.size();
+	}
+
+	public WindTurbineTestingPointDi2 getWindTurbineTestingPointDi2(String wtId, String unicode)  {
+
+		WindTurbineTestingPointDi2 point=new WindTurbineTestingPointDi2();
+		if(StringUtils.notEmp(wtId) && StringUtils.notEmp(unicode) )
+		{
+			WindTurbineTestingPointDi2Example example=new WindTurbineTestingPointDi2Example();
+			example.setOrderByClause("id ASC");
+			WindTurbineTestingPointDi2Example.Criteria criteria =example.createCriteria();
+			criteria.andWindturbineidEqualTo(wtId);
+			criteria.andUniformcodeEqualTo(unicode);
+			List<WindTurbineTestingPointDi2> list= windTurbineTestingPointDi2Mapper.selectByExample(example);
+			if(!list.isEmpty())
+			{
+				point=list.get(0);
+			}
+		}
+
+		return point;
+	}
+
+	public List<WindTurbineTestingPointDi2> getWindTurbineTestingPointDi2List(String wtId,List<String> unicoadels)  {
+
+		List<WindTurbineTestingPointDi2> list=new ArrayList<>();
+
+		if(StringUtils.notEmp(wtId)  && StringUtils.notEmp(unicoadels))
+		{
+			WindTurbineTestingPointDi2Example example=new WindTurbineTestingPointDi2Example();
+			example.setOrderByClause("id ASC");
+			WindTurbineTestingPointDi2Example.Criteria criteria =example.createCriteria();
+			criteria.andWindturbineidEqualTo(wtId);
+			criteria.andUniformcodeIn(unicoadels);
+			list= windTurbineTestingPointDi2Mapper.selectByExample(example);
+
+		}
+
+		return list;
+	}
+
+
+}

+ 49 - 0
src/main/java/com/gyee/frame/service/WindturbinepowercurvefittingService.java

@@ -9,9 +9,11 @@ import com.gyee.frame.model.auto.Windturbinepowercurvefitting;
 import com.gyee.frame.model.auto.WindturbinepowercurvefittingExample;
 import com.gyee.frame.model.custom.Tablepar;
 import com.gyee.frame.util.SnowflakeIdWorker;
+import com.gyee.frame.util.StringUtils;
 import org.springframework.stereotype.Service;
 
 import javax.annotation.Resource;
+import java.util.ArrayList;
 import java.util.List;
 
 
@@ -110,6 +112,53 @@ public class WindturbinepowercurvefittingService implements BaseService<Windturb
 		return windturbinepowercurvefittingMapper.deleteByExample(example);
 	}
 
+	public PageInfo<Windturbinepowercurvefitting>  getWindturbinepowercurvefitting(Tablepar tablepar, String wtId)  {
 
 
+		List<Windturbinepowercurvefitting> list =new ArrayList<>();
+
+		WindturbinepowercurvefittingExample example=new WindturbinepowercurvefittingExample();
+		if(StringUtils.isNotEmpty(tablepar.getOrderByColumn()))
+		{
+			StringBuilder sb=new StringBuilder();
+			sb.append(" ").append(tablepar.getOrderByColumn());
+			if(StringUtils.isNotEmpty(tablepar.getIsAsc()))
+			{
+				sb.append(" ").append(tablepar.getIsAsc());
+			}else
+			{
+				sb.append(" asc ");
+			}
+			example.setOrderByClause(String.valueOf(sb));
+		}else {
+			example.setOrderByClause("speed ASC");
+		}
+		PageHelper.startPage(tablepar.getPageNum(), tablepar.getPageSize());
+
+		WindturbinepowercurvefittingExample.Criteria criteria =example.createCriteria();
+		criteria.andWindturbineidEqualTo(wtId);
+		list= windturbinepowercurvefittingMapper.selectByExample(example);
+
+		PageInfo<Windturbinepowercurvefitting> pageInfo = new PageInfo<Windturbinepowercurvefitting>(list);
+		return pageInfo;
+
+	}
+
+	public List<Windturbinepowercurvefitting> getWindturbinepowercurvefittingByWtId(String windturbineid)  {
+
+
+		List<Windturbinepowercurvefitting> list =new ArrayList<>();
+
+		if(StringUtils.notEmp(windturbineid))
+		{
+			WindturbinepowercurvefittingExample example=new WindturbinepowercurvefittingExample();
+			example.setOrderByClause("speed ASC");
+			WindturbinepowercurvefittingExample.Criteria criteria =example.createCriteria();
+			criteria.andWindturbineidEqualTo(windturbineid);
+			list= windturbinepowercurvefittingMapper.selectByExample(example);
+		}
+
+		return list;
+
+	}
 }

+ 10 - 5
src/main/java/com/gyee/frame/service/singleanalysis/SingleAnalysisService.java

@@ -74,6 +74,8 @@ public class SingleAnalysisService {
                         SingleAnalysisVo wtd = wtdaymap.get(wt.getId());
 
                         fdl = null != wtd.getFdl() ? wtd.getFdl() : 0.0;//风机发电量合计
+                        fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
+
                         double yxxs = null != wtd.getYxxs() ? wtd.getYxxs() : 0.0;//风机运行小时合计
                         double gzxs = null != wtd.getGzxs() ? wtd.getGzxs() : 0.0;//风机故障小时合计
                         double jxxs = null != wtd.getJxxs() ? wtd.getJxxs() : 0.0;//风机检修小时合计
@@ -121,11 +123,11 @@ public class SingleAnalysisService {
 
                         double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
 
-                        vo.setGzss(gzss);
-                        vo.setJxss(jxss);
-                        vo.setXdss(xdss);
-                        vo.setXnss(xnss);
-                        vo.setSlss(slss);
+                        vo.setGzss(StringUtils.round(gzss,2));
+                        vo.setJxss(StringUtils.round(jxss,2));
+                        vo.setXdss(StringUtils.round(xdss,2));
+                        vo.setXnss(StringUtils.round(xnss,2));
+                        vo.setSlss(StringUtils.round(xnss,2));
 
                         vo.setLlfdl(StringUtils.round(llfdl, 2));
                     }
@@ -407,6 +409,7 @@ public class SingleAnalysisService {
                 yxfss = null != wtd.getYxfss() ? wtd.getYxfss() : 0.0;//风机平均有效风时速
             }
 
+            fdl = new BigDecimal(fdl).divide(new BigDecimal(10000), 2, RoundingMode.HALF_UP).doubleValue();
                 vo.setFdl(StringUtils.round(fdl, 2));
                 vo.setYxxs(StringUtils.round(yxxs, 2));
                 vo.setGzxs(StringUtils.round(gzxs, 2));
@@ -436,6 +439,8 @@ public class SingleAnalysisService {
                  xnss = null != wtd.getXnss() ? wtd.getXnss() : 0.0;//风机性能损失时合计
                  slss = null != wtd.getSlss() ? wtd.getSlss() : 0.0;//风机受累损失合计
 
+
+
                  llfdl = fdl + gzss + jxss + xdss + xnss + slss;
             }
 

+ 1 - 1
src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -103,7 +103,7 @@ public class GenreSetPushService {
                 WindPowerStationTestingPoint2 fcgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL);
 
                 Double fcztvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
-                Double fcglvalue = realApiUtil.getRealData(fczt).getPointValueInDouble();
+                Double fcglvalue = realApiUtil.getRealData(fcgl).getPointValueInDouble();
 
                 StringBuilder sb = new StringBuilder();
                 sb.append(wp.getId()).append("_").append("zjrl");

+ 1 - 0
src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -326,6 +326,7 @@ public class MatrixDetialPushService {
                     vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
                     vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
                     vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vo.setWtCode(wt.getCode());
                     vos.add(vo);
 
                 }

+ 262 - 0
src/main/java/com/gyee/frame/service/websocket/MatrixPushByWpService.java

@@ -0,0 +1,262 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.MatrixVo;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class MatrixPushByWpService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = findMatrix("MHS_FDC");
+
+
+        return map;
+
+    }
+
+    private Map<String, Object> findMatrix(String wpId) throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        Map<String, Object> wpmap = new HashMap<String, Object>();
+
+        int fcdjnum = 0;
+        int fcyxnum = 0;
+        int fcgznum = 0;
+        int fclxnum = 0;
+        int fcwhnum = 0;
+        int fcxdnum = 0;
+
+        int gfdjnum = 0;
+        int gfyxnum = 0;
+        int gfgznum = 0;
+        int gflxnum = 0;
+        int gfwhnum = 0;
+        int gfxdnum = 0;
+        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+        Map<String, Map<String, MatrixVo>> fjmap = new HashMap<>();
+        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+
+  
+        
+        if(StringUtils.notEmp(wpId))
+        {
+            Map<String, Double> jczbmap = new HashMap<>();
+
+            /*************************************************风场指标统计*************************************************************/
+
+
+            List<String> jczbls = new ArrayList<>();
+            //实时风速
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS).getCode());
+            //预测功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, ycPoints1[0]).getCode());
+            //保证功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.ZBZGL).getCode());
+            //应发功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_ZZSGL).getCode());
+            //实际功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL).getCode());
+            //AGC出线有功
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC001).getCode());
+            //AGC有功设定
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.AGC002).getCode());
+            //待机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_DJTS).getCode());
+            //运行台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_YXTS).getCode());
+            //故障台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_GZTJ).getCode());
+            //离线台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_TXZD).getCode());
+            //维护台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_WHTJ).getCode());
+            //限电台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WT_XDTS).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                //实时风速
+                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                //预测功率
+                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //保证功率
+                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //实际功率
+                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                //AGC出线有功
+                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //AGC有功设定
+                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+
+
+                Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                //待机台数
+                jczbmap.put("djts", djts);
+                //运行台数
+                Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                jczbmap.put("yxts", yxts);
+                //故障台数
+                Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                jczbmap.put("gzts", gzts);
+                //离线台数
+                Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                jczbmap.put("lxts", lxts);
+                //维护台数
+                Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                jczbmap.put("whts", whts);
+                //限电台数
+                Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                jczbmap.put("xdts", xdts);
+
+
+            } else {
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //预测功率
+                jczbmap.put("ssfs", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //AGC出线有功
+                jczbmap.put("agccxyg", 0.0);
+                //AGC有功设定
+                jczbmap.put("agcygsd", 0.0);
+                //待机台数
+                jczbmap.put("djts", 0.0);
+                //运行台数
+                jczbmap.put("yxts", 0.0);
+                //故障台数
+                jczbmap.put("gzts", 0.0);
+                //离线台数
+                jczbmap.put("lxts", 0.0);
+                //维护台数
+                jczbmap.put("whts", 0.0);
+                //限电台数
+                jczbmap.put("xdts", 0.0);
+            }
+
+            fczbmap.put(wpId,jczbmap);
+/*************************************************风场指标统计*************************************************************/
+
+
+
+
+/*************************************************风机指标统计*************************************************************/
+            List<String> fjzbls = new ArrayList<>();
+
+            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wpId);
+
+            Map<String, MatrixVo> vomap = new HashMap<>();
+
+            for(Windturbine wt:wtls)
+            {
+                //风机状态
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                //风速
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                //功率
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+
+            }
+
+            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+
+            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+
+
+                int step=3;
+                for(int i=0;i<wtls.size();i++)
+                {
+                    Windturbine wt=wtls.get(i);
+
+                    MatrixVo vo=new MatrixVo();
+                    vo.setWtId(wt.getId());
+                    if(StringUtils.notEmp(wt.getStatus()))
+                    {
+                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                        if(StringUtils.isNumeric(num))
+                        {
+                            vo.setWtnum(Integer.valueOf(num));
+                        }
+
+                    }
+
+                    vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
+                    vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
+                    vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vo.setWtCode(wt.getCode());
+                    vomap.put(wt.getId(),vo);
+
+                }
+
+            }
+            fjmap.put(wpId,vomap);
+
+/*************************************************风机指标统计*************************************************************/
+        }
+      
+        //风场指标MAP
+        map.put("fczbmap", fczbmap);
+        //风机指标MAP
+        map.put("fjmap", fjmap);
+
+
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+        return map;
+    }
+
+
+}
+
+

+ 1 - 0
src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -247,6 +247,7 @@ public class MatrixPushService {
                     vo.setFjzt(MathUtil.twoBit(fjzblist.get(i*step).getPointValueInDouble()));
                     vo.setFs(MathUtil.twoBit(fjzblist.get(i*step+1).getPointValueInDouble()));
                     vo.setGl(MathUtil.twoBit(fjzblist.get(i*step+2).getPointValueInDouble()));
+                    vo.setWtCode(wt.getCode());
                     vos.add(vo);
 
                 }

+ 337 - 0
src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java

@@ -0,0 +1,337 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Equipmentmodel;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.MatrixVo;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.ProjectPlanService;
+import com.gyee.frame.service.WindPowerstationTestingPointService;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class MatrixQfPushService {
+
+
+    @Resource
+    private WindPowerstationTestingPointService windPowerstationTestingPointService;
+    @Resource
+    private WindpowerinfodayService windpowerinfodayService;
+    @Resource
+    private ProjectPlanService projectPlanService;
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+    private final String QS = "0";
+    private final String FD = "-1";
+    private final String GF = "-2";
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = findMatrix();
+
+
+        return map;
+
+    }
+
+    private Map<String, Object> findMatrix() throws Exception {
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        Map<String, Object> wpmap = new HashMap<String, Object>();
+
+        int fcdjnum = 0;
+        int fcyxnum = 0;
+        int fcgznum = 0;
+        int fclxnum = 0;
+        int fcwhnum = 0;
+        int fcxdnum = 0;
+
+        int gfdjnum = 0;
+        int gfyxnum = 0;
+        int gfgznum = 0;
+        int gflxnum = 0;
+        int gfwhnum = 0;
+        int gfxdnum = 0;
+        String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
+
+        Map<String, List<MatrixVo>> fjmap = new HashMap<>();
+        Map<String, Map<String, Double>> fczbmap = new HashMap<>();
+        for (Windpowerstation wp : InitialRunner.wpls) {
+
+            Map<String, Double> jczbmap = new HashMap<>();
+
+            /*************************************************风场指标统计*************************************************************/
+
+
+            List<String> jczbls = new ArrayList<>();
+            //实时风速
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SSFS).getCode());
+            //预测功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), ycPoints1[0]).getCode());
+            //保证功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.ZBZGL).getCode());
+            //应发功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_ZZSGL).getCode());
+            //实际功率
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WP_SJGL).getCode());
+            //AGC出线有功
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC001).getCode());
+            //AGC有功设定
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.AGC002).getCode());
+            //待机台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_DJTS).getCode());
+            //运行台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_YXTS).getCode());
+            //故障台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_GZTJ).getCode());
+            //离线台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_TXZD).getCode());
+            //维护台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_WHTJ).getCode());
+            //限电台数
+            jczbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wp.getId(), Constant.TPOINT_WT_XDTS).getCode());
+
+
+            List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+            if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                //实时风速
+                jczbmap.put("ssfs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));
+                //预测功率
+                jczbmap.put("ycgl", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));
+                //保证功率
+                double bzgl = new BigDecimal(jczblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("bzgl", bzgl);
+                //应发功率
+                double yfgl = new BigDecimal(jczblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+                jczbmap.put("yfgl", yfgl);
+                //实际功率
+                jczbmap.put("sjgl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));
+                //AGC出线有功
+                jczbmap.put("agccxyg", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));
+                //AGC有功设定
+                jczbmap.put("agcygsd", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));
+
+
+                Double djts = MathUtil.twoBit(jczblist.get(7).getPointValueInDouble());
+                //待机台数
+                jczbmap.put("djts", djts);
+                //运行台数
+                Double yxts = MathUtil.twoBit(jczblist.get(8).getPointValueInDouble());
+                jczbmap.put("yxts", yxts);
+                //故障台数
+                Double gzts = MathUtil.twoBit(jczblist.get(9).getPointValueInDouble());
+                jczbmap.put("gzts", gzts);
+                //离线台数
+                Double lxts = MathUtil.twoBit(jczblist.get(10).getPointValueInDouble());
+                jczbmap.put("lxts", lxts);
+                //维护台数
+                Double whts = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+                jczbmap.put("whts", whts);
+                //限电台数
+                Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
+                jczbmap.put("xdts", xdts);
+
+                fcdjnum = fcdjnum + djts.intValue();
+                fcyxnum = fcyxnum + yxts.intValue();
+                fcgznum = fcgznum + gzts.intValue();
+                fclxnum = fclxnum + lxts.intValue();
+                fcwhnum = fcwhnum + whts.intValue();
+                fcxdnum = fcxdnum + xdts.intValue();
+
+            } else {
+                //实时风速
+                jczbmap.put("ssfs", 0.0);
+                //预测功率
+                jczbmap.put("ssfs", 0.0);
+                //保证功率
+                jczbmap.put("bzgl", 0.0);
+                //应发功率
+                jczbmap.put("yfgl", 0.0);
+                //实际功率
+                jczbmap.put("sjgl", 0.0);
+                //AGC出线有功
+                jczbmap.put("agccxyg", 0.0);
+                //AGC有功设定
+                jczbmap.put("agcygsd", 0.0);
+                //待机台数
+                jczbmap.put("djts", 0.0);
+                //运行台数
+                jczbmap.put("yxts", 0.0);
+                //故障台数
+                jczbmap.put("gzts", 0.0);
+                //离线台数
+                jczbmap.put("lxts", 0.0);
+                //维护台数
+                jczbmap.put("whts", 0.0);
+                //限电台数
+                jczbmap.put("xdts", 0.0);
+            }
+
+            fczbmap.put(wp.getId(), jczbmap);
+/*************************************************风场指标统计*************************************************************/
+
+
+/*************************************************风机指标统计*************************************************************/
+            List<String> fjzbls = new ArrayList<>();
+
+            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
+
+            List<MatrixVo> vos = new ArrayList<>();
+
+            for (Windturbine wt : wtls) {
+                //风机状态
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getId());
+                //风速
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getId());
+                //功率
+                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getId());
+
+            }
+
+            List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
+
+            if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
+
+
+                int step = 3;
+                for (int i = 0; i < wtls.size(); i++) {
+                    Windturbine wt = wtls.get(i);
+
+                    MatrixVo vo = new MatrixVo();
+                    vo.setWtId(wt.getId());
+                    if (StringUtils.notEmp(wt.getStatus())) {
+                        String num = wt.getStatus().substring(wt.getStatus().length() - 3);
+                        if (StringUtils.isNumeric(num)) {
+                            vo.setWtnum(Integer.valueOf(num));
+                        }
+
+                    }
+                    double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
+                    vo.setFjzt(fjzt);
+                    double fs = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
+                    vo.setFs(fs);
+                    double gl = MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble());
+                    vo.setGl(gl);
+                    vo.setWtCode(wt.getCode());
+                    if (fjzt == 3) {
+                        vo.setLyl(0.0);
+                    } else {
+                        if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
+                            Equipmentmodel ml = InitialRunner.mlmap.get(wt.getModelid());
+                            double generatingcapacity = ml.getPowerproduction();
+                            BigDecimal temp = new BigDecimal(generatingcapacity).divide(new BigDecimal(100), 2, RoundingMode.HALF_UP);
+                            double lyl = new BigDecimal(gl).divide(temp, 2, RoundingMode.HALF_UP).doubleValue();
+                            vo.setLyl(lyl);
+                        } else {
+                            vo.setLyl(0.0);
+                        }
+                    }
+                    vos.add(vo);
+                }
+
+            }
+            fjmap.put(wp.getId(), vos);
+
+/*************************************************风机指标统计*************************************************************/
+
+        }
+        //风场待机台数
+        map.put("fczbmap", fczbmap);
+        //风机指标对象
+        map.put("fjmap", fjmap);
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+        //风场待机台数
+        map.put("fcdjnum", fcdjnum);
+        //风场运行台数
+        map.put("fcyxnum", fcyxnum);
+        //风场故障台数
+        map.put("fcgznum", fcgznum);
+        //风场离线台数
+        map.put("fclxnum", fclxnum);
+        //风场维护台数
+        map.put("fcwhnum", fcwhnum);
+        //风场限电台数
+        map.put("fcxdnum", fcxdnum);
+
+
+        List<String> qfzbls = new ArrayList<>();
+        //日0欠发电量
+        qfzbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(FD, Constant.R0QFZT).getCode());
+        //日1欠发电量
+        qfzbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(FD, Constant.R1QFZT).getCode());
+        //日2欠发电量
+        qfzbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(FD, Constant.R2QFZT).getCode());
+        //日3欠发电量
+        qfzbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(FD, Constant.R3QFZT).getCode());
+        //日4欠发电量
+        qfzbls.add(windPowerstationTestingPointService.getWindPowerStationTestingPoint2(FD, Constant.R4QFZT).getCode());
+        List<PointData> qfzblist = realApiUtil.getRealData(qfzbls);
+
+        if (!qfzblist.isEmpty() && qfzblist.size() == qfzbls.size()) {
+
+            //日0欠发电量
+            double r0qf = new BigDecimal(qfzblist.get(0).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+            map.put("r0qf", r0qf);
+            //日1欠发电量
+            double r1qf = new BigDecimal(qfzblist.get(1).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+            map.put("r1qf", r1qf);
+            //日2欠发电量
+            double r2qf = new BigDecimal(qfzblist.get(2).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+            map.put("r2qf", r2qf);
+            //日3欠发电量
+            double r3qf = new BigDecimal(qfzblist.get(3).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+            map.put("r3qf", r3qf);
+            //日4欠发电量
+            double r4qf = new BigDecimal(qfzblist.get(4).getPointValueInDouble()).divide(new BigDecimal(1000), 2, RoundingMode.HALF_EVEN).doubleValue();
+            map.put("r4qf", r4qf);
+
+
+        } else {
+            //日0欠发电量
+            map.put("r0qf", 0.0);
+            //日1欠发电量
+            map.put("r1qf", 0.0);
+            //日2欠发电量
+            map.put("r2qf", 0.0);
+            //日3欠发电量
+            map.put("r3qf", 0.0);
+            //日4欠发电量
+            map.put("r4qf", 0.0);
+        }
+
+/*******************************************风场、光伏状态数量统计***********************************************************/
+
+
+        return map;
+    }
+
+
+}
+
+

+ 166 - 0
src/main/java/com/gyee/frame/service/websocket/PowerFirstPushService.java

@@ -0,0 +1,166 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.apache.poi.ss.usermodel.*;
+import org.springframework.stereotype.Service;
+import org.springframework.util.ClassUtils;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class PowerFirstPushService {
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        List<String> ls = new ArrayList<>();
+        ls.add("MHS_FDC");
+        ls.add("NSS_FDC");
+        ls.add("QS_FDC");
+        ls.add("SBQ_FDC");
+        ls.add("XS_FDC");
+        ls.add("QS03_GC");
+        ls.add("DWK_GDC");
+        ls.add("PL01_GC");
+        ls.add("PL02_GC");
+        ls.add("MCH_GDC");
+        ls.add("XH_GDC");
+
+
+        for (String wpId : ls) {
+            map.put(wpId, findPowerFirst(wpId));
+        }
+        return map;
+
+    }
+
+    public Map<String, Object> findPowerFirst(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if (StringUtils.notEmp(id)) {
+
+            map = findPowerMap(id);
+        }
+
+
+        return map;
+    }
+
+
+    private Workbook openExcelByFile(String wpId) throws FileNotFoundException {
+        Workbook wb = null;
+        //String path = ClassUtils.getDefaultClassLoader().getResource("").getPath();
+        String staticPath = ClassUtils.getDefaultClassLoader().getResource("static").getPath();
+
+        StringBuilder sb = new StringBuilder();
+        switch (wpId) {
+            case "MHS_FDC":
+                sb.append(staticPath).append("/syz/mhs_fdc.xls");
+                break;
+            case "NSS_FDC":
+                sb.append(staticPath).append("/syz/nss_fdc.xls");
+                break;
+            case "QS_FDC":
+                sb.append(staticPath).append("/syz/qs_fdc.xls");
+                break;
+            case "SBQ_FDC":
+                sb.append(staticPath).append("/syz/sbq_fdc.xls");
+                break;
+            case "XS_FDC":
+                sb.append(staticPath).append("/syz/xs_fdc.xls");
+                break;
+            case "QS03_GC":
+                sb.append(staticPath).append("/syz/sl_fdc.xls");
+                break;
+            case "DWK_GDC":
+                sb.append(staticPath).append("/syz/dwk_gf.xls");
+                break;
+            case "PL01_GC":
+                sb.append(staticPath).append("/syz/plyq_gf.xls");
+                break;
+            case "PL02_GC":
+                sb.append(staticPath).append("/syz/pleq_gf.xls");
+                break;
+            case "MCH_GDC":
+                sb.append(staticPath).append("/syz/mch_gf.xls");
+                break;
+            case "XH_GDC":
+                sb.append(staticPath).append("/syz/xh_gf.xls");
+                break;
+
+            default:
+
+        }
+        File file = new File(String.valueOf(sb));
+
+        try {
+            wb = WorkbookFactory.create(file);
+
+        } catch (Exception ex) {
+            // do something
+        }
+
+        return wb;
+    }
+
+    public Map<String, Object> findPowerMap(String wpId) throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+        List<String> namels = new ArrayList<>();
+        List<String> valuels = new ArrayList<>();
+        Workbook wb = openExcelByFile(wpId);
+
+        if (StringUtils.notEmp(wb)) {
+            Sheet sheet = wb.getSheetAt(0);//第一个
+
+            boolean firstRow = true;
+            for (int i = sheet.getFirstRowNum(); i <= sheet.getLastRowNum(); i++) {
+                if (i == 0) {
+                    continue;
+                }
+                Row row = sheet.getRow(i);
+                Cell cell0 = row.getCell(0);
+                Cell cell1 = row.getCell(1);
+                if (StringUtils.notEmp(cell0) && StringUtils.notEmp(cell1)) {
+                    String pointName = cell0.getStringCellValue(); //点名
+                    String pointValue = cell1.getStringCellValue(); //点值
+                    //System.out.println(pointName + "*********" + pointValue);
+                    namels.add(pointName);
+                    valuels.add(pointValue);
+                }
+            }
+
+            if (!valuels.isEmpty()) {
+                List<PointData> pointlist = realApiUtil.getRealData(valuels);
+
+                if (!pointlist.isEmpty() && pointlist.size() == valuels.size() && namels.size() == valuels.size()) {
+                    Map<String, Object> valuemap = new HashMap<>();
+
+                    for (int i = 0; i < pointlist.size(); i++) {
+
+                        valuemap.put(namels.get(i), pointlist.get(i).getPointValueInDouble());
+                    }
+                    map.put(wpId, valuemap);
+                }
+
+            }
+
+        }
+        return map;
+    }
+}

+ 124 - 35
src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java

@@ -37,6 +37,8 @@ public class RealPowerPushService {
     private final String FD = "-1";
     private final String GF = "-2";
 
+
+
     IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
 
 
@@ -48,9 +50,9 @@ public class RealPowerPushService {
         map.put(QS, findRealPower(QS));
         map.put(FD, findRealPower(FD));
         map.put(GF, findRealPower(GF));
-        map.put("SBQ_FDC",findRealPower("SBQ_FDC"));
-        map.put("SBQ02_GC",findRealPower("SBQ02_GC"));
-        map.put("SBQ05_XL",findRealPower("SBQ05_XL"));
+        map.put("QS_FDC",findRealPower("QS_FDC"));
+        map.put("QSQ02_GC",findRealPower("QSQ02_GC"));
+        map.put("QSQ05_XL",findRealPower("QSQ05_XL"));
 
         return map;
 
@@ -98,14 +100,14 @@ public class RealPowerPushService {
 
             Date endDate = cal.getTime();
 
-            long pried = 3600l;
-            long num = DateUtils.hoursDiff(beginDate, endDate) * 3;
-            int cdqyc = 4; //未来4小时超短期预测
+            long pried = 1800l;
+            long num = DateUtils.hoursDiff(beginDate, endDate) * 2;
+            int cdqyc = 8; //未来4小时超短期预测
             String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
-            String[] ycPoints2 = Constant.TPOINT_WP_FGLYC1HOUR2.split(",");
-            String[] ycPoints3 = Constant.TPOINT_QS3_YGCL.split(",");
+            String[] ycPoints2 = Constant.TPOINT_WP_FGLYC2.split(",");
+            //String[] ycPoints3 = Constant.TPOINT_QS3_YGCL.split(",");
 
-            int length = 72;
+            int length = 48;
 
             for (int i = 0; i < length; i++) {
 
@@ -117,6 +119,7 @@ public class RealPowerPushService {
                 vo.setValue4(0.0);// 预测功率
                 vo.setValue5(0.0);// 保证功率
                 vo.setValue6(0.0);// 平均风速
+                vo.setValue7(0.0);// 72小时预测功率
                 vo.setValue9(0.0);// 最优功率律
 
                 vos.add(vo);
@@ -154,18 +157,40 @@ public class RealPowerPushService {
                             List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
                             if (!datas.isEmpty()) {
 
-                                for (int j = 0; j < datas.size(); j++) {
+                                if(InitialRunner.appendYcglMap.containsKey(station.getId()))
+                                {
+                                    Map<String, Object> ycmap=InitialRunner.appendYcglMap.get(station.getId());
+                                    if(ycmap.containsKey("cdq1"))
+                                    {
+                                        String qs3_ycgl1=(String)ycmap.get("cdq1");
+
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 1800L);
+
+                                        for (int j = 0; j < datas.size(); j++) {
+
+                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue4(StringUtils.round(datas.get(j).getPointValueInDouble()+qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
+                                        }
+                                    }
+
+                                }else{
+                                    for (int j = 0; j < datas.size(); j++) {
 
-                                    vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+                                        double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
 
-                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+                                        vos.get(j).setValue4(StringUtils.round(ycgl, 2));
 
-                                    if (j == datas.size() - 1) {
-                                        cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
+
                                 int subresult = 0;
                                 int total = 0;
 
@@ -174,20 +199,41 @@ public class RealPowerPushService {
                                     if (subresult >= cdqyc) {
                                         subresult = cdqyc;
                                     }
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR_OF_DAY, 1);
 
-                                        vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                    if(InitialRunner.appendYcglMap.containsKey(station.getId()))
+                                    {
+                                        Map<String, Object> ycmap=InitialRunner.appendYcglMap.get(station.getId());
+                                        if(ycmap.containsKey("cdq2"))
+                                        {
+                                            String[] ycPoints3 =(String[])ycmap.get("cdq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl =ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble()+realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
+                                        }
+
+                                    }else
+                                    {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
+                                            vos.get(datas.size() + i).setTime(cal.getTime().getTime());
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(station.getId(), ycPoints2[i]);
 
-                                        ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
+
+                                            vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                        }
                                     }
 
+
                                     total = datas.size() + subresult;
                                     subresult = length - (total);
 
@@ -431,18 +477,40 @@ public class RealPowerPushService {
                             List<PointData> datas = realApiUtil.getHistoryDatasSnap(ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, pried);
                             if (!datas.isEmpty()) {
 
-                                for (int j = 0; j < datas.size(); j++) {
+                                if(InitialRunner.appendYcglMap.containsKey(id))
+                                {
+                                    Map<String, Object> ycmap=InitialRunner.appendYcglMap.get(id);
+                                    if(ycmap.containsKey("cdq1"))
+                                    {
+                                        String qs3_ycgl1=(String)ycmap.get("cdq1");
+
+                                        List<PointData> qs3_datas = realApiUtil.getHistoryDatasSnap(qs3_ycgl1, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 1800L);
 
-                                    vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                        for (int j = 0; j < datas.size(); j++) {
 
-                                    double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+                                            vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+                                            vos.get(j).setValue4(StringUtils.round(datas.get(j).getPointValueInDouble()+qs3_datas.get(j).getPointValueInDouble(), 2));
+                                            if (j == datas.size() - 1) {
+                                                cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                            }
+                                        }
+                                    }
 
-                                    vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+                                }else{
+                                    for (int j = 0; j < datas.size(); j++) {
 
-                                    if (j == datas.size() - 1) {
-                                        cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        vos.get(j).setTime(datas.get(j).getPointTime() * 1000);
+
+                                        double ycgl = (vos.get(j).getValue4() == null ? vos.get(0).getValue4() : vos.get(j).getValue4()) + (datas.get(j) == null ? datas.get(0).getPointValueInDouble() : datas.get(j).getPointValueInDouble());
+
+                                        vos.get(j).setValue4(StringUtils.round(ycgl, 2));
+
+                                        if (j == datas.size() - 1) {
+                                            cal.setTime(new Date(datas.get(j).getPointTime() * 1000));
+                                        }
                                     }
                                 }
+
                                 int subresult = 0;
                                 int total = 0;
 
@@ -451,20 +519,41 @@ public class RealPowerPushService {
                                     if (subresult >= cdqyc) {
                                         subresult = cdqyc;
                                     }
-                                    for (int i = 0; i < subresult; i++) {
-                                        cal.add(Calendar.HOUR_OF_DAY, 1);
 
-                                        vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                    if(InitialRunner.appendYcglMap.containsKey(id))
+                                    {
+                                        Map<String, Object> ycmap=InitialRunner.appendYcglMap.get(id);
+                                        if(ycmap.containsKey("cdq2"))
+                                        {
+                                            String[] ycPoints3 =(String[])ycmap.get("cdq2");
+                                            for (int i = 0; i < subresult; i++) {
+                                                cal.add(Calendar.HOUR_OF_DAY, 1);
+                                                vos.get(datas.size() + i).setTime(cal.getTime().getTime());
+                                                String qs3_ycgl =ycPoints3[i];
+                                                WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
+
+                                                vos.get(datas.size() + i).setValue4(StringUtils.round(realApiUtil.getRealData(ycglpoint).getPointValueInDouble()+realApiUtil.getRealData(qs3_ycgl).getPointValueInDouble(), 2));
+                                            }
+                                        }
+
+                                    }else
+                                    {
+                                        for (int i = 0; i < subresult; i++) {
+                                            cal.add(Calendar.HOUR_OF_DAY, 1);
+
+                                            vos.get(datas.size() + i).setTime(cal.getTime().getTime());
 
-                                        WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
+                                            WindPowerStationTestingPoint2 ycglpoint = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(id, ycPoints2[i]);
 
-                                        double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
+                                            double ycgl = realApiUtil.getRealData(ycglpoint).getPointValueInDouble();
 
-                                        ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
+                                            ycgl = (vos.get(datas.size() + i).getValue4() == null ? vos.get(0).getValue4() : vos.get(datas.size() + i).getValue4()) + ycgl;
 
-                                        vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                            vos.get(datas.size() + i).setValue4(StringUtils.round(ycgl, 2));
+                                        }
                                     }
 
+
                                     total = datas.size() + subresult;
                                     subresult = length - (total);
 

+ 6 - 3
src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java

@@ -518,12 +518,15 @@ public class WpInfoPushService {
                 gxkmap.put("ndxkyss", wd.getYeardxkyxs());
                 gxkmap.put("nsbklyl", wd.getYearsbklyl());
 
-            }else
-            {
+                gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
+                gxkmap.put("ysbklyl", wd.getMonthsbklyl());
+
+            } else {
                 gxkmap.put("ndxkyss", 0.0);
                 gxkmap.put("nsbklyl", 0.0);
+                gxkmap.put("ydxkyss", 0.0);
+                gxkmap.put("ysbklyl", 0.0);
             }
-            
             map.put("gxkmap", gxkmap);
         }
 /*************************************************关系库指标**************************************************************/

+ 339 - 0
src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -0,0 +1,339 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.Constant;
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Equipmentmodel;
+import com.gyee.frame.model.auto.WindTurbineInfoDay;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.service.WindTurbineTestingPointAiService;
+import com.gyee.frame.service.WindturbineinfodayService;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+@Service
+public class WtInfoPushService {
+
+
+    @Resource
+    private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
+
+    @Resource
+    private WindturbineinfodayService windturbineinfodayService;
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+    String QS_FDC = "QS_FDC";
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        map.put("MG01_01", findWtInfo("MG01_01"));
+
+        return map;
+
+    }
+
+    public Map<String, Object> findWtInfo(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if (StringUtils.notEmp(id)) {
+
+            if (InitialRunner.wtmap.containsKey(id)) {
+
+                Windturbine wt = InitialRunner.wtmap.get(id);
+
+                map.put("model",wt.getModelid());
+                map.put("wpid",wt.getWindpowerstationid());
+                map.put("pjid",wt.getProjectid());
+                map.put("lnid",wt.getLineid());
+
+                Double sjgl = 0.0;
+                Double bzgl = 0.0;
+                Double yfgl = 0.0;
+
+/*************************************************基础指标*************************************************************/
+
+
+                Map<String, Double> jczbmap = new HashMap<>();
+
+
+                List<String> jczbls = new ArrayList<>();
+
+
+                // 2MW风机转速上传的数据单位是rad/s,我们系统应该显示的是rpm,所以显示的时候应该加上公式 1rad/s =9.55rpm
+                if (wt.getWindpowerstationid().equals(QS_FDC)) {
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_BJJD1).getId());// 变桨角度
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_PHWZ).getId());// 偏航角度
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U1YZDL).getId());// 电流1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U2YZDL).getId());// 电流2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U3YZDL).getId());// 电流3
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U1YZDY).getId());// 电压1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U2YZDY).getId());// 电压2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U3YZDY).getId());// 电压3
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_FDJZS).getId());// 发电机转速
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_U1YZWD).getId());// 温度1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_V1YZWD).getId());// 温度2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.QSTPOINT_WT_W1YZWD).getId());// 温度3
+                } else {
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_BJJD1).getId());// 变桨角度
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_PHWZ).getId());// 偏航角度
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U1YZDL).getId());// 电流1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U2YZDL).getId());// 电流2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U3YZDL).getId());// 电流3
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U1YZDY).getId());// 电压1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U2YZDY).getId());// 电压2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U3YZDY).getId());// 电压3
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZS).getId());// 发电机转速
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_U1YZWD).getId());// 温度1
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_V1YZWD).getId());// 温度2
+                    jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_W1YZWD).getId());// 温度3
+                }
+
+                List<PointData> jczblist = realApiUtil.getRealData(jczbls);
+
+
+                if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+
+                    jczbmap.put("bjjd", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));// 变桨角度
+                    jczbmap.put("phjd", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));// 偏航角度
+                    jczbmap.put("dl1", MathUtil.twoBit(jczblist.get(2).getPointValueInDouble()));// 电流1
+                    jczbmap.put("dl2", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));// 电流2
+                    jczbmap.put("dl3", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));// 电流3
+                    jczbmap.put("dy1", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));// 电压1
+                    jczbmap.put("dy2", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));// 电压2
+                    jczbmap.put("dy3", MathUtil.twoBit(jczblist.get(7).getPointValueInDouble()));// 电压3
+                    jczbmap.put("wd1", MathUtil.twoBit(jczblist.get(8).getPointValueInDouble()));// 温度1
+                    jczbmap.put("wd2", MathUtil.twoBit(jczblist.get(9).getPointValueInDouble()));// 温度2
+                    jczbmap.put("wd3", MathUtil.twoBit(jczblist.get(10).getPointValueInDouble()));// 温度3
+
+                    Double fdjzs = MathUtil.twoBit(jczblist.get(11).getPointValueInDouble());
+
+                    if (InitialRunner.mlmap.containsKey(wt.getModelid())) {
+                        Equipmentmodel model = InitialRunner.mlmap.get(wt.getModelid());
+
+                        if (model.getPowerproduction() == 2000) {
+                            jczbmap.put("fdjzs", StringUtils.round(fdjzs * 9.55, 2));// 发电机转速
+                        } else {
+                            jczbmap.put("fdjzs", fdjzs);// 发电机转速
+                        }
+                    }
+
+                } else {
+                    jczbmap.put("bjjd", 0.0);// 变桨角度
+                    jczbmap.put("phjd", 0.0);// 偏航角度
+                    jczbmap.put("dl1", 0.0);// 电流1
+                    jczbmap.put("dl2", 0.0);// 电流2
+                    jczbmap.put("dl3", 0.0);// 电流3
+                    jczbmap.put("dy1", 0.0);// 电压1
+                    jczbmap.put("dy2", 0.0);// 电压2
+                    jczbmap.put("dy3", 0.0);// 电压3
+                    jczbmap.put("wd1", 0.0);// 温度1
+                    jczbmap.put("wd2", 0.0);// 温度2
+                    jczbmap.put("wd3", 0.0);// 温度3
+                    jczbmap.put("fdjzs", 0.0);// 发电机转速
+
+                }
+
+                jczbls = new ArrayList<>();
+
+
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_YLZS).getId());// 叶轮转速
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_DWZWD).getId());// 轴温1
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_GWZWD).getId());// 轴温2
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_CLXWD).getId());// 齿轮箱油温
+
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJGL).getId());// 功率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJSSFS).getId());// 风速
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_PJFS).getId());// 平均风速
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_GLYS).getId());// 功率因数
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_JCWWD).getId());// 环境温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJFX).getId());// 风向
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJPL).getId());// 风机频率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_WGGL).getId());// 无功功率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJKYL).getId());// 可利用率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_RFDL).getId());// 日发电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZCAWD).getId());// 发电机轴承A温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZCBWD).getId());// 发电机轴承B温度
+
+
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_LLGL).getId());// 风机理论功率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_YFGL).getId());// 风机应发功率
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_RFDLBZ).getId());// 日理论发电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_RFDLZS).getId());//  日应发电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_JCWWD).getId());// 机舱外温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_JCWD).getId());//  机舱温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_TDGWD).getId());// 塔底柜温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_JCGWD).getId());// 机舱柜温度
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.FJZT).getId());// 风机状态
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_DFJD).getId());// 对风角
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_PJGL).getId());// 平均风速功率
+
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RGZSSDL).getId());// 风机日故障损失电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RJXSSDL).getId());// 风机日检修损失电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RQFSSDL).getId());// 风机日欠发损失电量
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RXDSSDL).getId());// 风机日限电损失电量
+
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RGZSSDL).getId());// 日场内受累检修
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RJXSSDL).getId());// 日场内受累故障
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RQFSSDL).getId());// 日场外受累电网
+                jczbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RXDSSDL).getId());// 日场外受累天气
+
+
+                jczblist = realApiUtil.getRealData(jczbls);
+
+
+                if (!jczblist.isEmpty() && jczblist.size() == jczbls.size()) {
+
+                    jczbmap.put("ylzs", MathUtil.twoBit(jczblist.get(0).getPointValueInDouble()));// 叶轮转速
+                    jczbmap.put("zw1", MathUtil.twoBit(jczblist.get(1).getPointValueInDouble()));// 轴温1
+                    jczbmap.put("zw2", MathUtil.twoBit(jczblist.get(2).getPointValueInDouble()));// 轴温2
+                    jczbmap.put("clxwd", MathUtil.twoBit(jczblist.get(3).getPointValueInDouble()));// 齿轮箱油温
+                    jczbmap.put("gl", MathUtil.twoBit(jczblist.get(4).getPointValueInDouble()));// 功率
+                    jczbmap.put("fs", MathUtil.twoBit(jczblist.get(5).getPointValueInDouble()));// 风速
+                    jczbmap.put("pjfs", MathUtil.twoBit(jczblist.get(6).getPointValueInDouble()));// 平均风速
+                    jczbmap.put("glys", MathUtil.twoBit(jczblist.get(7).getPointValueInDouble()));// 功率因数
+                    jczbmap.put("hjwd", MathUtil.twoBit(jczblist.get(8).getPointValueInDouble()));// 环境温度
+                    jczbmap.put("fx", MathUtil.twoBit(jczblist.get(9).getPointValueInDouble()));// 风向
+                    jczbmap.put("fjpl", MathUtil.twoBit(jczblist.get(10).getPointValueInDouble()));// 风机频率
+                    jczbmap.put("wggl", MathUtil.twoBit(jczblist.get(11).getPointValueInDouble()));// 无功功率
+                    jczbmap.put("klyl", MathUtil.twoBit(jczblist.get(12).getPointValueInDouble()));// 可利用率
+                    double rfdl = MathUtil.twoBit(jczblist.get(13).getPointValueInDouble());
+                    jczbmap.put("rfdl", rfdl);// 日发电量
+                    jczbmap.put("zcwda", MathUtil.twoBit(jczblist.get(14).getPointValueInDouble()));// 发电机轴承A温度
+                    jczbmap.put("zcwdb", MathUtil.twoBit(jczblist.get(15).getPointValueInDouble()));// 发电机轴承B温度
+
+                    jczbmap.put("llgl", MathUtil.twoBit(jczblist.get(16).getPointValueInDouble()));// 风机理论功率
+                    jczbmap.put("yfgl", MathUtil.twoBit(jczblist.get(17).getPointValueInDouble()));// 风机应发功率
+                    jczbmap.put("rlldl", MathUtil.twoBit(jczblist.get(18).getPointValueInDouble()));// 日理论发电量
+                    jczbmap.put("ryfdl", MathUtil.twoBit(jczblist.get(19).getPointValueInDouble()));// 日应发电量
+                    jczbmap.put("jcwwd", MathUtil.twoBit(jczblist.get(20).getPointValueInDouble()));// 机舱外温度
+                    jczbmap.put("jcwd", MathUtil.twoBit(jczblist.get(21).getPointValueInDouble()));// 机舱温度
+                    jczbmap.put("tdwd", MathUtil.twoBit(jczblist.get(22).getPointValueInDouble()));// 塔底柜温度
+                    jczbmap.put("jcgwd", MathUtil.twoBit(jczblist.get(23).getPointValueInDouble()));// 机舱柜温度
+                    jczbmap.put("fjzt", MathUtil.twoBit(jczblist.get(24).getPointValueInDouble()));// 风机状态
+                    jczbmap.put("dfjd", MathUtil.twoBit(jczblist.get(25).getPointValueInDouble()));// 对风角度
+
+
+                    jczbmap.put("rpjgl", MathUtil.twoBit(jczblist.get(26).getPointValueInDouble()));// 平均风速功率
+                    double rssdl = 0.0;
+                    double rgzss = MathUtil.twoBit(jczblist.get(27).getPointValueInDouble());
+                    double rjxss = MathUtil.twoBit(jczblist.get(28).getPointValueInDouble());
+                    double rxnss = MathUtil.twoBit(jczblist.get(29).getPointValueInDouble());
+                    double rxdss = MathUtil.twoBit(jczblist.get(30).getPointValueInDouble());
+
+                    double rlzssdl = MathUtil.twoBit(jczblist.get(31).getPointValueInDouble()); // 日场内受累检修
+                    double rszssdl = MathUtil.twoBit(jczblist.get(32).getPointValueInDouble()); // 日场内受累故障
+                    double rwzssdl = MathUtil.twoBit(jczblist.get(33).getPointValueInDouble()); // 日场外受累电网
+                    double rtzssdl = MathUtil.twoBit(jczblist.get(34).getPointValueInDouble()); // 日场外受累天气
+
+                    jczbmap.put("rxnss", rxnss);// 日欠发损失电量
+                    jczbmap.put("rgzss", StringUtils.round(rgzss + rlzssdl, 2));// 日故障损失电量
+                    jczbmap.put("rwhss", StringUtils.round(rjxss + rszssdl, 2));// 日维护损失电量
+                    jczbmap.put("rxdss", rxdss);// 日限电损失电量
+                    jczbmap.put("rslss", StringUtils.round(rwzssdl + rtzssdl, 2));// 日受累损失电量
+
+
+                    rssdl = rgzss + rjxss + rxnss + rxdss + rwzssdl + rtzssdl + rszssdl + rlzssdl;
+
+                    jczbmap.put("rssdl", StringUtils.round(rssdl, 2));// 风机日损失电量
+
+                    jczbmap.put("rlldl", StringUtils.round(rssdl + rfdl, 2));// 风机日理论电量
+                } else {
+                    jczbmap.put("ylzs", 0.0);// 叶轮转速
+                    jczbmap.put("zw1", 0.0);// 轴温1
+                    jczbmap.put("zw2", 0.0);// 轴温2
+                    jczbmap.put("clxwd", 0.0);// 齿轮箱油温
+                    jczbmap.put("gl", 0.0);// 功率
+                    jczbmap.put("fs", 0.0);// 风速
+                    jczbmap.put("pjfs", 0.0);// 平均风速
+                    jczbmap.put("glys", 0.0);// 功率因数
+                    jczbmap.put("hjwd", 0.0);// 环境温度
+                    jczbmap.put("fx", 0.0);// 风向
+                    jczbmap.put("fjpl", 0.0);// 风机频率
+                    jczbmap.put("wggl", 0.0);// 无功功率
+                    jczbmap.put("klyl", 0.0);// 可利用率
+                    jczbmap.put("rfdl", 0.0);// 日发电量
+                    jczbmap.put("zcwda", 0.0);// 发电机轴承A温度
+                    jczbmap.put("zcwdb", 0.0);// 发电机轴承B温度
+
+                    jczbmap.put("llgl", 0.0);// 风机理论功率
+                    jczbmap.put("yfgl", 0.0);// 风机应发功率
+                    jczbmap.put("rlldl", 0.0);// 日理论发电量
+                    jczbmap.put("ryfdl", 0.0);// 日应发电量
+                    jczbmap.put("jcwwd", 0.0);// 机舱外温度
+                    jczbmap.put("jcwd", 0.0);// 机舱温度
+                    jczbmap.put("tdwd", 0.0);// 塔底柜温度
+                    jczbmap.put("jcgwd", 0.0);// 机舱柜温度
+                    jczbmap.put("fjzt", 0.0);// 风机状态
+                    jczbmap.put("dfjd", 0.0);// 对风角度
+
+                    jczbmap.put("rpjgl", 0.0);// 平均风速功率
+                    jczbmap.put("rxnss", 0.0);// 日欠发损失电量
+                    jczbmap.put("rgzss", 0.0);// 日故障损失电量
+                    jczbmap.put("rwhss", 0.0);// 日维护损失电量
+                    jczbmap.put("rxdss", 0.0);// 日限电损失电量
+                    jczbmap.put("rslss", 0.0);// 日受累损失电量
+                    jczbmap.put("rssdl", 0.0);// 风机日损失电量
+                    jczbmap.put("rlldl", 0.0);// 风机日理论电量
+                }
+
+                map.put("jczbmap", jczbmap);
+
+
+/*************************************************基础指标*************************************************************/
+
+        }
+
+
+/*************************************************关系库指标**************************************************************/
+
+            Map<String, Double> gxkmap = new HashMap<>();
+            Date date=DateUtils.truncate(new Date());
+            List<WindTurbineInfoDay> wtdls = windturbineinfodayService.getWindturbineinfo(id,date);
+            if (!wtdls.isEmpty()) {
+                WindTurbineInfoDay wd = wtdls.get(0);
+                gxkmap.put("ndxkyss", wd.getYeardxkyxs());
+                gxkmap.put("nsbklyl", wd.getYearsbklyl());
+                gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
+                gxkmap.put("ysbklyl", wd.getMonthsbklyl());
+
+                gxkmap.put("yyxxs", wd.getMonthruntime());
+                gxkmap.put("ygzxs", wd.getMonthfaulttime());
+                gxkmap.put("yjxxs", wd.getMonthmaintaintime());
+                gxkmap.put("ytjxs", wd.getMonhtstoptime());
+
+            } else {
+                gxkmap.put("ndxkyss", 0.0);
+                gxkmap.put("nsbklyl", 0.0);
+                gxkmap.put("ydxkyss", 0.0);
+                gxkmap.put("ysbklyl", 0.0);
+
+                gxkmap.put("yyxxs", 0.0);
+                gxkmap.put("ygzxs", 0.0);
+                gxkmap.put("yjxxs", 0.0);
+                gxkmap.put("ytjxs",0.0);
+            }
+
+            map.put("gxkmap", gxkmap);
+        }
+/*************************************************关系库指标**************************************************************/
+
+        return map;
+    }
+
+
+}
+
+

+ 184 - 0
src/main/java/com/gyee/frame/service/websocket/WtWarnPushService.java

@@ -0,0 +1,184 @@
+package com.gyee.frame.service.websocket;
+
+
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Warning2;
+import com.gyee.frame.model.auto.WindTurbineTestingPointDi2;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.PointData;
+import com.gyee.frame.model.custom.ValueVo;
+import com.gyee.frame.service.WindTurbineTestingPointDiService;
+import com.gyee.frame.util.IRealTimeDataBaseUtil;
+import com.gyee.frame.util.StringUtils;
+import com.gyee.frame.util.golden.EdosUtil;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class WtWarnPushService {
+
+
+    @Resource
+    private WindTurbineTestingPointDiService windTurbineTestingPointDiService;
+
+
+    IRealTimeDataBaseUtil realApiUtil = new EdosUtil();
+
+    String QS_FDC = "QS_FDC";
+
+    public Map<String, Object> genreSetMap() throws Exception {
+
+        Map<String, Object> map = new HashMap<>();
+
+        for(Windturbine wt:InitialRunner.wtls)
+        {
+            map.put(wt.getId(), findWtWarnInfo(wt.getId()));
+        }
+
+ //       map.put("MG01_01", findWtWarnInfo("MG01_01"));
+        return map;
+
+    }
+
+    public Map<String, Object> findWtWarnInfo(String id) throws Exception {
+
+        Map<String, Object> map = new HashMap<String, Object>();
+
+        if (StringUtils.notEmp(id)) {
+
+            if (InitialRunner.wtmap.containsKey(id)) {
+
+                Windturbine wt = InitialRunner.wtmap.get(id);
+
+                Map<String, List<Warning2>> warnmap=InitialRunner.warnmodelmap.get(wt.getModelid());
+
+//                Set<Map.Entry<String, List<Warning2>>> set = warnmap.entrySet();
+//
+//                for (Iterator<Map.Entry<String, List<Warning2>>> it = set.iterator(); it.hasNext(); ) {
+//
+//                    Map.Entry<String, List<Warning2>> entry = (Map.Entry<String, List<Warning2>>) it.next();
+//
+//                    List<Warning2> warnls = entry.getValue();
+//
+//                    if (!warnls.isEmpty()) {
+//
+//                        if(!warnls.isEmpty())
+//                        {
+//                            List<String> unicodels = new ArrayList<>();
+//                            for(Warning2 wr :warnls)
+//                            {
+//                                StringBuilder sb = new StringBuilder();
+//                                sb.setLength(0);
+//                                sb.append("DI").append(wr.getEdnavalue());
+//                                unicodels.add(String.valueOf(sb));
+//                            }
+//
+//                            List<WindTurbineTestingPointDi2> list=windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(id,unicodels);
+//                            if(!list.isEmpty())
+//                            {
+//                                List<ValueVo> vos = new ArrayList<>();
+//                                List<String> pointls = new ArrayList<>();
+//                                for(WindTurbineTestingPointDi2 di:list)
+//                                {
+//                                    pointls.add(di.getId());
+//                                    ValueVo vo = new ValueVo();
+//                                    vo.setName(di.getName());
+//                                    vos.add(vo);
+//                                }
+//                                List<PointData> pointlist = realApiUtil.getRealData(pointls);
+//
+//                                if (!pointlist.isEmpty() && pointlist.size() == pointls.size() && pointlist.size() == vos.size()) {
+//
+//                                    for (int i = 0; i < pointlist.size(); i++) {
+//
+//                                        vos.get(i).setData1(pointlist.get(i).getPointValueInDouble());
+//                                    }
+//                                }
+//                                map.put(entry.getKey(), vos);
+//                            }
+//
+//                        }
+//                    }
+//
+//                }
+
+                List<Warning2> warnls=InitialRunner.warnmap.get(wt.getModelid());
+
+                if (!warnls.isEmpty()) {
+
+                        if(!warnls.isEmpty())
+                        {
+                            List<String> unicodels = new ArrayList<>();
+                            Map<String,Warning2> wmap=new HashMap<>();
+                            for(Warning2 wr :warnls)
+                            {
+                                StringBuilder sb = new StringBuilder();
+                                sb.setLength(0);
+                                sb.append("DI").append(wr.getEdnavalue());
+                                unicodels.add(String.valueOf(sb));
+
+                                wmap.put(String.valueOf(sb),wr);
+                            }
+
+                            List<WindTurbineTestingPointDi2> list=windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(id,unicodels);
+                            if(!list.isEmpty())
+                            {
+                                List<ValueVo> vos = new ArrayList<>();
+                                List<String> pointls = new ArrayList<>();
+                                for(WindTurbineTestingPointDi2 di:list)
+                                {
+                                    pointls.add(di.getId());
+                                    ValueVo vo = new ValueVo();
+                                    vo.setName(di.getName());
+                                    if(wmap.containsKey(di.getUniformcode()))
+                                    {
+                                        Warning2 wr=wmap.get(di.getUniformcode());
+                                        vo.setTypeId(wr.getWarningclassifyid());
+                                    }
+                                    vos.add(vo);
+                                }
+                                List<PointData> pointlist = realApiUtil.getRealData(pointls);
+
+
+                                if (!pointlist.isEmpty() && pointlist.size() == pointls.size() && pointlist.size() == vos.size()) {
+
+                                    for (int i = 0; i < pointlist.size(); i++) {
+
+                                        vos.get(i).setData1(pointlist.get(i).getPointValueInDouble());
+                                    }
+                                }
+                                Map<String,List<ValueVo>> typemap=new HashMap<>();
+                                for(ValueVo vo:vos)
+                                {
+
+                                    if(typemap.containsKey(vo.getTypeId()))
+                                    {
+                                        List<ValueVo> ls =typemap.get(vo.getTypeId());
+                                        ls.add(vo);
+                                        typemap.put(vo.getTypeId(), ls);
+                                    }else
+                                    {
+                                        List<ValueVo> ls = new ArrayList<>();
+                                        ls.add(vo);
+                                        typemap.put(vo.getTypeId(), ls);
+                                    }
+                                }
+                                map.put(wt.getModelid(),typemap);
+                            }
+
+                        }
+                    }
+
+
+                }
+            }
+
+
+        return map;
+    }
+}

+ 1 - 1
src/main/resources/mybatis-generator.xml

@@ -105,7 +105,7 @@
 <!--        <table tableName='Windturbine' domainObjectName='WindturbineSql'/>-->
 <!--        <table tableName='Equipment' domainObjectName='EquipmentSql'/>-->
 
-        <table tableName='P3_device_fault' domainObjectName='P3DeviceFault'/>
+        <table tableName='WindTurbineTestingPointDi2' domainObjectName='WindTurbineTestingPointDi2'/>
 
 
     </context>

+ 478 - 0
src/main/resources/mybatis/auto/WindTurbineTestingPointDi2Mapper.xml

@@ -0,0 +1,478 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.gyee.frame.mapper.auto.WindTurbineTestingPointDi2Mapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindTurbineTestingPointDi2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="VARCHAR" property="id" />
+    <result column="CODE" jdbcType="VARCHAR" property="code" />
+    <result column="NAME" jdbcType="VARCHAR" property="name" />
+    <result column="MODEL" jdbcType="VARCHAR" property="model" />
+    <result column="VALUEUNIT" jdbcType="VARCHAR" property="valueunit" />
+    <result column="ENGLISHNAME" jdbcType="VARCHAR" property="englishname" />
+    <result column="TYPEID" jdbcType="VARCHAR" property="typeid" />
+    <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
+    <result column="MAXVAL" jdbcType="DECIMAL" property="maxval" />
+    <result column="MINVAL" jdbcType="DECIMAL" property="minval" />
+    <result column="REASONABLEMAXVAL" jdbcType="DECIMAL" property="reasonablemaxval" />
+    <result column="REASONABLEMINVAL" jdbcType="DECIMAL" property="reasonableminval" />
+    <result column="WINDTURBINEID" jdbcType="VARCHAR" property="windturbineid" />
+    <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
+    <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
+    <result column="LONGID" jdbcType="VARCHAR" property="longid" />
+    <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
+    <result column="REALTIMEID" jdbcType="VARCHAR" property="realtimeid" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    ID, CODE, NAME, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL, 
+    REASONABLEMINVAL, WINDTURBINEID, UNIFORMCODE, SHORTID, LONGID, WINDPOWERSTATIONID, 
+    REALTIMEID
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2Example" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from WINDTURBINETESTINGPOINTDI2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from WINDTURBINETESTINGPOINTDI2
+    where ID = #{id,jdbcType=VARCHAR}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WINDTURBINETESTINGPOINTDI2
+    where ID = #{id,jdbcType=VARCHAR}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2Example">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from WINDTURBINETESTINGPOINTDI2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WINDTURBINETESTINGPOINTDI2 (ID, CODE, NAME, 
+      MODEL, VALUEUNIT, ENGLISHNAME, 
+      TYPEID, MODELID, MAXVAL, 
+      MINVAL, REASONABLEMAXVAL, REASONABLEMINVAL, 
+      WINDTURBINEID, UNIFORMCODE, SHORTID, 
+      LONGID, WINDPOWERSTATIONID, REALTIMEID
+      )
+    values (#{id,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, 
+      #{model,jdbcType=VARCHAR}, #{valueunit,jdbcType=VARCHAR}, #{englishname,jdbcType=VARCHAR}, 
+      #{typeid,jdbcType=VARCHAR}, #{modelid,jdbcType=VARCHAR}, #{maxval,jdbcType=DECIMAL}, 
+      #{minval,jdbcType=DECIMAL}, #{reasonablemaxval,jdbcType=DECIMAL}, #{reasonableminval,jdbcType=DECIMAL}, 
+      #{windturbineid,jdbcType=VARCHAR}, #{uniformcode,jdbcType=VARCHAR}, #{shortid,jdbcType=VARCHAR}, 
+      #{longid,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR}, #{realtimeid,jdbcType=VARCHAR}
+      )
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into WINDTURBINETESTINGPOINTDI2
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="code != null">
+        CODE,
+      </if>
+      <if test="name != null">
+        NAME,
+      </if>
+      <if test="model != null">
+        MODEL,
+      </if>
+      <if test="valueunit != null">
+        VALUEUNIT,
+      </if>
+      <if test="englishname != null">
+        ENGLISHNAME,
+      </if>
+      <if test="typeid != null">
+        TYPEID,
+      </if>
+      <if test="modelid != null">
+        MODELID,
+      </if>
+      <if test="maxval != null">
+        MAXVAL,
+      </if>
+      <if test="minval != null">
+        MINVAL,
+      </if>
+      <if test="reasonablemaxval != null">
+        REASONABLEMAXVAL,
+      </if>
+      <if test="reasonableminval != null">
+        REASONABLEMINVAL,
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID,
+      </if>
+      <if test="uniformcode != null">
+        UNIFORMCODE,
+      </if>
+      <if test="shortid != null">
+        SHORTID,
+      </if>
+      <if test="longid != null">
+        LONGID,
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID,
+      </if>
+      <if test="realtimeid != null">
+        REALTIMEID,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=VARCHAR},
+      </if>
+      <if test="code != null">
+        #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        #{model,jdbcType=VARCHAR},
+      </if>
+      <if test="valueunit != null">
+        #{valueunit,jdbcType=VARCHAR},
+      </if>
+      <if test="englishname != null">
+        #{englishname,jdbcType=VARCHAR},
+      </if>
+      <if test="typeid != null">
+        #{typeid,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="maxval != null">
+        #{maxval,jdbcType=DECIMAL},
+      </if>
+      <if test="minval != null">
+        #{minval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonablemaxval != null">
+        #{reasonablemaxval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonableminval != null">
+        #{reasonableminval,jdbcType=DECIMAL},
+      </if>
+      <if test="windturbineid != null">
+        #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="uniformcode != null">
+        #{uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="shortid != null">
+        #{shortid,jdbcType=VARCHAR},
+      </if>
+      <if test="longid != null">
+        #{longid,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="realtimeid != null">
+        #{realtimeid,jdbcType=VARCHAR},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2Example" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from WINDTURBINETESTINGPOINTDI2
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTDI2
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=VARCHAR},
+      </if>
+      <if test="record.code != null">
+        CODE = #{record.code,jdbcType=VARCHAR},
+      </if>
+      <if test="record.name != null">
+        NAME = #{record.name,jdbcType=VARCHAR},
+      </if>
+      <if test="record.model != null">
+        MODEL = #{record.model,jdbcType=VARCHAR},
+      </if>
+      <if test="record.valueunit != null">
+        VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
+      </if>
+      <if test="record.englishname != null">
+        ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.typeid != null">
+        TYPEID = #{record.typeid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.modelid != null">
+        MODELID = #{record.modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.maxval != null">
+        MAXVAL = #{record.maxval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.minval != null">
+        MINVAL = #{record.minval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reasonablemaxval != null">
+        REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.reasonableminval != null">
+        REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
+      </if>
+      <if test="record.windturbineid != null">
+        WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.uniformcode != null">
+        UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="record.shortid != null">
+        SHORTID = #{record.shortid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.longid != null">
+        LONGID = #{record.longid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.windpowerstationid != null">
+        WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.realtimeid != null">
+        REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTDI2
+    set ID = #{record.id,jdbcType=VARCHAR},
+      CODE = #{record.code,jdbcType=VARCHAR},
+      NAME = #{record.name,jdbcType=VARCHAR},
+      MODEL = #{record.model,jdbcType=VARCHAR},
+      VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
+      ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
+      TYPEID = #{record.typeid,jdbcType=VARCHAR},
+      MODELID = #{record.modelid,jdbcType=VARCHAR},
+      MAXVAL = #{record.maxval,jdbcType=DECIMAL},
+      MINVAL = #{record.minval,jdbcType=DECIMAL},
+      REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
+      REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
+      WINDTURBINEID = #{record.windturbineid,jdbcType=VARCHAR},
+      UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
+      SHORTID = #{record.shortid,jdbcType=VARCHAR},
+      LONGID = #{record.longid,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
+      REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTDI2
+    <set>
+      <if test="code != null">
+        CODE = #{code,jdbcType=VARCHAR},
+      </if>
+      <if test="name != null">
+        NAME = #{name,jdbcType=VARCHAR},
+      </if>
+      <if test="model != null">
+        MODEL = #{model,jdbcType=VARCHAR},
+      </if>
+      <if test="valueunit != null">
+        VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
+      </if>
+      <if test="englishname != null">
+        ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
+      </if>
+      <if test="typeid != null">
+        TYPEID = #{typeid,jdbcType=VARCHAR},
+      </if>
+      <if test="modelid != null">
+        MODELID = #{modelid,jdbcType=VARCHAR},
+      </if>
+      <if test="maxval != null">
+        MAXVAL = #{maxval,jdbcType=DECIMAL},
+      </if>
+      <if test="minval != null">
+        MINVAL = #{minval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonablemaxval != null">
+        REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
+      </if>
+      <if test="reasonableminval != null">
+        REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
+      </if>
+      <if test="windturbineid != null">
+        WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      </if>
+      <if test="uniformcode != null">
+        UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
+      </if>
+      <if test="shortid != null">
+        SHORTID = #{shortid,jdbcType=VARCHAR},
+      </if>
+      <if test="longid != null">
+        LONGID = #{longid,jdbcType=VARCHAR},
+      </if>
+      <if test="windpowerstationid != null">
+        WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      </if>
+      <if test="realtimeid != null">
+        REALTIMEID = #{realtimeid,jdbcType=VARCHAR},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.WindTurbineTestingPointDi2">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update WINDTURBINETESTINGPOINTDI2
+    set CODE = #{code,jdbcType=VARCHAR},
+      NAME = #{name,jdbcType=VARCHAR},
+      MODEL = #{model,jdbcType=VARCHAR},
+      VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
+      ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
+      TYPEID = #{typeid,jdbcType=VARCHAR},
+      MODELID = #{modelid,jdbcType=VARCHAR},
+      MAXVAL = #{maxval,jdbcType=DECIMAL},
+      MINVAL = #{minval,jdbcType=DECIMAL},
+      REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
+      REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
+      WINDTURBINEID = #{windturbineid,jdbcType=VARCHAR},
+      UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
+      SHORTID = #{shortid,jdbcType=VARCHAR},
+      LONGID = #{longid,jdbcType=VARCHAR},
+      WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
+      REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
+    where ID = #{id,jdbcType=VARCHAR}
+  </update>
+</mapper>

+ 8 - 0
src/main/resources/mybatis/auto/WindturbinepowercurvefittingMapper.xml

@@ -307,4 +307,12 @@
       OPTMALPOWER = #{optmalpower,jdbcType=FLOAT}
     where ID = #{id,jdbcType=VARCHAR}
   </update>
+
+  <select id="getWindturbinepowercurvefittingByWtId"  resultType="com.gyee.frame.model.auto.Windturbinepowercurvefitting">
+    select WINDTURBINEID,avg(Speed)   Speed,avg(Actualpower)   Actualpower
+    ,avg(Optimalpower) Optimalpower
+    from Windturbinecurvefitting
+    where   WINDTURBINEID = #{wtId}
+    group BY WINDTURBINEID,speed   ORDER BY Speed
+  </select>
 </mapper>

BIN
src/main/resources/static/syz/dwk_gf.xls


BIN
src/main/resources/static/syz/dwk_zm.xls


BIN
src/main/resources/static/syz/mch_gf.xls


BIN
src/main/resources/static/syz/mch_zm.xls


BIN
src/main/resources/static/syz/mhs_fdc.xls


BIN
src/main/resources/static/syz/nss_fdc.xls


BIN
src/main/resources/static/syz/pleq_gf.xls


BIN
src/main/resources/static/syz/pleq_zm.xls


BIN
src/main/resources/static/syz/plyq_gf.xls


BIN
src/main/resources/static/syz/plyq_zm.xls


BIN
src/main/resources/static/syz/qs_fdc.xls


BIN
src/main/resources/static/syz/sbq_fdc.xls


BIN
src/main/resources/static/syz/sl_fdc.xls


BIN
src/main/resources/static/syz/xh_gf.xls


BIN
src/main/resources/static/syz/xh_zm.xls


BIN
src/main/resources/static/syz/xs_fdc.xls


+ 62 - 0
src/test/java/test/FileExcelTest.java

@@ -0,0 +1,62 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class FileExcelTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+        List<String> ls=new ArrayList<>();
+        ls.add("MHS_FDC");
+        ls.add("NSS_FDC");
+        ls.add("QS_FDC");
+        ls.add("SBQ_FDC");
+        ls.add("XS_FDC");
+        ls.add("QS03_GC");
+        ls.add("DWK_GDC");
+        ls.add("PL01_GC");
+        ls.add("PL02_GC");
+        ls.add("MCH_GDC");
+        ls.add("XH_GDC");
+
+
+//        for(String wpId:ls)
+//        {
+//
+//            Workbook wb = FileUtils.OpenExcelByFile(wpId);
+//
+//            Sheet sheet = wb.getSheetAt(0);//第一个
+////            Sheet sheet1=wb.getSheet("sheet1");//根据名称读取
+//// 默认读取第一个sheet        Sheet sheet = workbook.getSheetAt(0);
+//
+//            boolean firstRow = true;
+//            for (int i = sheet.getFirstRowNum(); i <= sheet.getLastRowNum(); i++) {
+//                if(i==0)
+//                {
+//                    continue;
+//                }
+//                Row row = sheet.getRow(i);
+//                Cell cell0 = row.getCell(0);
+//                Cell cell1 = row.getCell(1);
+//                if(StringUtils.notEmp(cell0) && StringUtils.notEmp(cell1))
+//                {
+//                    String pointName = cell0.getStringCellValue(); //点名
+//                    String pointValue = cell1.getStringCellValue(); //点值
+//                    System.out.println(pointName+"*********"+pointValue);
+//                }
+//
+//            }
+//            System.out.println("/*****************************************************************************************************/");
+//        }
+/*****************************************************************************************************/
+    }
+}

+ 73 - 0
src/test/java/test/MatrixQfPushTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.MatrixQfPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class MatrixQfPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        MatrixQfPushService matrixQfPushService= SpringUtils.getBean("matrixQfPushService");
+
+
+
+
+
+        Map<String, Object> map = matrixQfPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 65 - 0
src/test/java/test/PowerFirstPushTest.java

@@ -0,0 +1,65 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.PowerFirstPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class PowerFirstPushTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        PowerFirstPushService powerFirstPushService= SpringUtils.getBean("powerFirstPushService");
+
+        Map<String, Object> map = powerFirstPushService.genreSetMap();
+
+         System.out.println(map.size());
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 27 - 24
src/test/java/test/PowerSaturationTest.java

@@ -4,6 +4,8 @@ import com.gyee.SpringbootStart;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.powersaturation.PowerSaturationAmonutController;
+import com.gyee.frame.controller.powersaturation.PowerSaturationController;
+import com.gyee.frame.controller.powersaturation.PowerSaturationMonthController;
 import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.Tablepar;
 import lombok.SneakyThrows;
@@ -35,6 +37,8 @@ public class PowerSaturationTest {
 
         String wpid="MHS_FDC";
 
+        PowerSaturationController powerSaturationController= SpringUtils.getBean("powerSaturationController");
+        PowerSaturationMonthController powerSaturationMonthController= SpringUtils.getBean("powerSaturationMonthController");
         PowerSaturationAmonutController powerSaturationAmonutController= SpringUtils.getBean("powerSaturationAmonutController");
 
 
@@ -43,46 +47,45 @@ public class PowerSaturationTest {
         tablepar.setPageSize(10);
 
 
-//        AjaxResult ajaxResult = powerCompareController.powerAjaxAll("MHS_FDC","2021-01-01","2021-01-03","xl",null,null);
+//        AjaxResult ajaxResult = powerSaturationController.powersaturationlist(tablepar,"MG01_01","2021-05-01");
 //
-//        List<Windpowerinfoday3> test=(List<Windpowerinfoday3>)ajaxResult.get("data");
-//        for(Windpowerinfoday3 wtd:test)
+//        PageInfo<Windturbinecurvefitting> result1=(PageInfo<Windturbinecurvefitting>)ajaxResult.get("data");
+//        List<Windturbinecurvefitting> test=result1.getList();
+//        for(Windturbinecurvefitting wtd:test)
 //        {
-//            System.out.println(wtd.getLineid()+"----------------"+wtd.getLocation());
+//            System.out.println(wtd.getActualpower()+"----------------"+wtd.getOptimalpower());
 //        }
-//        System.out.println(test);
+//        System.out.println("*****************************************************************");
 //
-//        AjaxResult ajaxResult3 = powerCompareController.windfarmAjax();
+//        AjaxResult ajaxResult2 = powerSaturationMonthController.powersaturationmonthlist(tablepar,"MG01_01","2021","5");
 //
-//        List<StopTypeTreeVo> test3=(List<StopTypeTreeVo>)ajaxResult3.get("data");
-//        for(StopTypeTreeVo wtd:test3)
+//        List<Windturbinecurvefittingmonth> test2=(List<Windturbinecurvefittingmonth>)ajaxResult2.get("data");
+//        for(Windturbinecurvefittingmonth wtd:test2)
 //        {
-//            System.out.println(wtd.getId()+"----------------"+wtd.getName());
+//            System.out.println(wtd.getActualpower()+"----------------"+wtd.getOptimalpower());
 //        }
 //
+//        System.out.println("*****************************************************************");
 //
-//        AjaxResult ajaxResult = powerCompareController.projectAjax("MHS_FDC");
 //
-//        List<StopTypeTreeVo> test=(List<StopTypeTreeVo>)ajaxResult.get("data");
-//        for(StopTypeTreeVo wtd:test)
-//        {
-//            System.out.println(wtd.getId()+"----------------"+wtd.getName());
-//        }
-//
-//        AjaxResult ajaxResult2 = powerCompareController.lineAjax("MHS01_GC");
-//        List<StopTypeTreeVo> test2=(List<StopTypeTreeVo>)ajaxResult2.get("data");
-//        for(StopTypeTreeVo wtd:test2)
+//        System.out.println("*****************************************************************");
+
+//        AjaxResult ajaxResult3 = powerSaturationAmonutController.powersaturationamonutlist(tablepar,"MG01_01");
+//        PageInfo<Windturbinecurvefitting> result3=(PageInfo<Windturbinecurvefitting>)ajaxResult3.get("data");
+//        List<Windturbinecurvefitting> test3=result3.getList();
+//        for(Windturbinecurvefitting wtd:test3)
 //        {
-//            System.out.println(wtd.getId()+"----------------"+wtd.getName());
+//            System.out.println(wtd.getActualpower()+"----------------"+wtd.getOptimalpower());
 //        }
 
-        AjaxResult ajaxResult2 = powerSaturationAmonutController.powersaturationamonutchart("MG01_01");
-        List<DataVo> test2=(List<DataVo>)ajaxResult2.get("data");
-        for(DataVo wtd:test2)
+
+        AjaxResult ajaxResult4 = powerSaturationAmonutController.powersaturationamonutchart("MG01_01");
+        List<DataVo> test4=(List<DataVo>)ajaxResult4.get("data");
+
+        for(DataVo wtd:test4)
         {
             System.out.println(wtd.getValue1()+"----------------"+wtd.getValue2()+"----------------"+wtd.getValue3()+"----------------"+wtd.getValue4());
         }
-
     }
 
 

+ 73 - 0
src/test/java/test/WtInfoPushServiceTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.WtInfoPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class WtInfoPushServiceTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        WtInfoPushService wtInfoPushService= SpringUtils.getBean("wtInfoPushService");
+
+
+
+
+
+        Map<String, Object> map = wtInfoPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}

+ 73 - 0
src/test/java/test/WtWarnPushServiceTest.java

@@ -0,0 +1,73 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.service.websocket.WtWarnPushService;
+import lombok.SneakyThrows;
+import org.springframework.boot.SpringApplication;
+
+import java.util.Map;
+
+public class WtWarnPushServiceTest {
+
+    @SneakyThrows
+    public static void main(String[] args) {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        WtWarnPushService wtWarnPushService= SpringUtils.getBean("wtWarnPushService");
+
+
+
+
+
+        Map<String, Object> map = wtWarnPushService.genreSetMap();
+
+
+
+         System.out.println(map.size());
+
+
+
+//        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
+//
+//        Map<String,Object> map=( Map<String,Object>)ar.get("data");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+//        }
+//
+//        AjaxResult ar = singleAnalysisController.singleanalysisChart(wtId,year,month);
+//
+//        Map<String, List<SingleAnalysisVo>> map=( Map<String,List<SingleAnalysisVo>>)ar.get("data");
+//        List<SingleAnalysisVo> vos=map.get("ff");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getFdl()+"----------------"+wtd.getFs());
+//        }
+//
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("ws");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getGzss()+"----------------"+wtd.getJxss()+"----------------"+wtd.getXdss()
+//                    +"----------------"+wtd.getXnss()+"----------------"+wtd.getSlss());
+//        }
+//        System.out.println("---------------------------------------------------------------------------------");
+//        vos=map.get("jd");
+//        for(SingleAnalysisVo wtd:vos)
+//        {
+//            System.out.println(wtd.getJfpl()+"----------------"+wtd.getTjxs());
+//        }
+//
+//
+//
+    }
+}