فهرست منبع

添加逆变器判定

shilin 2 سال پیش
والد
کامیت
f14033d052

+ 41 - 0
web/monitor-hb/src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -587,4 +587,45 @@ public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
 
 
 	public static final String JSZT = "JSZT";// 接收状态
+
+    /*************************************************************************/
+
+    public static final String TPOINT_NBQ_AB_DY = "AIG003";// 电网AB线电压
+    public static final String TPOINT_NBQ_BC_DY = "AIG004";// 电网BC线电压
+    public static final String TPOINT_NBQ_CA_DY = "AIG005";// 1电网CA线电压
+    public static final String TPOINT_NBQ_A_DL = "AIG009";// 电网A相电流
+    public static final String TPOINT_NBQ_B_DL = "AIG010";//电网B相电流
+    public static final String TPOINT_NBQ_C_DL = "AIG011";//电网C相电流
+    public static final String TPOINT_NBQ_DWPL = "AIG012";// 电网频率
+    public static final String TPOINT_NBQ_GL = "AIG013";// 功率
+    public static final String TPOINT_NBQ_WGGL = "AIG014";// 功率
+    public static final String TPOINT_NBQ_GLYS = "AIG015";// 功率因数
+    public static final String TPOINT_NBQ_WD = "AIG017";// 机内温度
+    public static final String TPOINT_NBQ_XL = "AIG018";// 效率
+    public static final String TPOINT_NBQ_EYHT = "AIG022";// 累计二氧化碳减排量
+    public static final String TPOINT_NBQ_JLDY = "AIG023";// 交流电压
+    public static final String TPOINT_NBQ_JLDL = "AIG024";// 交流电流
+    public static final String TPOINT_NBQ_ZLDY = "AIG025";// 直流电压
+    public static final String TPOINT_NBQ_ZLDL = "AIG026";// 直流电流
+    public static final String TPOINT_NBQ_RFDL = "AIG027";// 日发电量
+    public static final String TPOINT_NBQ_YFDL = "AIG028";// 月发电量
+    public static final String TPOINT_NBQ_NFDL = "AIG029";// 年发电量
+    public static final String TPOINT_NBQ_ZFDL = "AIG030";// 总发电量
+    public static final String TPOINT_NBQ_RBWFZ = "AIG034";// 日并网分钟
+    public static final String TPOINT_NBQ_ZYXSJ = "AIG035";// 总运行时间
+
+
+
+
+    //汇流箱测点
+    public static final String[] TPOINT_Inverter_Junctionbox = { "AIG051", "AIG052",
+            "AIG053", "AIG054", "AIG055", "AIG056", "AIG057", "AIG058", "AIG059",
+            "AIG060", "AIG061", "AIG062", "AIG063", "AIG064", "AIG065", "AIG066",
+            "AIG067"};
+
+    //逆变器矩阵测点
+    public static final String[] TPOINT_Inverter_Matrix = { "FJZT", "AIG013",
+            "AIG027"};
+
+
 }

+ 88 - 51
web/monitor-hb/src/main/java/com/gyee/frame/controller/monitor/MonitorInverterPushController.java

@@ -1,77 +1,114 @@
 package com.gyee.frame.controller.monitor;
 
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-
-import javax.annotation.Resource;
-
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
-
 import com.google.common.collect.Maps;
 import com.gyee.frame.common.conf.AjaxStatus;
 import com.gyee.frame.common.domain.AjaxResult;
 import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.agc.AgcVo;
+import com.gyee.frame.model.auto.Inverter;
 import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.InverterVo;
+import com.gyee.frame.model.custom.JunctionboxVo;
 import com.gyee.frame.service.websocket.WtInfoPushService;
 import com.gyee.frame.service.websocket.WtWarnPushService;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import javax.annotation.Resource;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
 
 @Controller
 @RequestMapping("/monitorinverter")
 @Api(value = "逆变器监视", tags = "逆变器监视")
 public class MonitorInverterPushController {
 
-	@Resource
-	private WtInfoPushService wtInfoPushService;
-	@Resource
-	private WtWarnPushService wtWarnPushService;
-
-	@GetMapping("/findInverterInfo")
-	@ResponseBody
-	@ApiOperation(value = "逆变器信息", notes = "逆变器AI点、报警点")
-	@ApiImplicitParams({ @ApiImplicitParam(name = "wtId", value = "逆变器ID", required = true, dataType = "string", paramType = "query") })
-	public AjaxResult findWtInfo(String wtId) throws Exception {
-		List<Object> listAI = wtInfoPushService.findInverterInfo(wtId);
-		Object listDI = wtInfoPushService.findInverterDI(wtId);
-		Windturbine wt = InitialRunner.wtmap.get(wtId);
-		Map<String, Object> map = Maps.newHashMap();
-		map.put("listAI", listAI);
-		map.put("listDI", listDI);
-		map.put("info",wt);
-		return AjaxResult.successData(AjaxStatus.success.code, map);
-	}
+    @Resource
+    private WtInfoPushService wtInfoPushService;
+    @Resource
+    private WtWarnPushService wtWarnPushService;
+
+    @GetMapping("/findInverterInfo")
+    @ResponseBody
+    @ApiOperation(value = "逆变器信息", notes = "逆变器AI点、报警点")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "wtId", value = "逆变器ID", required = true, dataType = "string", paramType = "query") })
+    public AjaxResult findWtInfo(String wtId) throws Exception {
+        List<Object> listAI = wtInfoPushService.findInverterInfo(wtId);
+        Object listDI = wtInfoPushService.findInverterDI(wtId);
+
+
+
+        Map<String, Object> map = Maps.newHashMap();
+        map.put("listAI", listAI);
+        map.put("listDI", listDI);
+
+        if(InitialRunner.wtmap.containsKey(wtId))
+        {
+            Windturbine wt = InitialRunner.wtmap.get(wtId);
+            map.put("info",wt);
+        }else if(InitialRunner.nbqmap.containsKey(wtId))
+        {
+            Inverter wt = InitialRunner.nbqmap.get(wtId);
+            map.put("info",wt);
+        }
+
+        return AjaxResult.successData(AjaxStatus.success.code, map);
+    }
 
     @GetMapping("/findInverterInfoList")
     @ResponseBody
-    @ApiOperation(value = "逆变器信息列表", notes = "逆变器信息列表")
+    @ApiOperation(value = "汇流箱信息列表", notes = "汇流箱信息列表")
     @ApiImplicitParams({@ApiImplicitParam(name = "wpId", value = "风场编号", required = true, dataType = "string", paramType = "query")
     })
 
-	public AjaxResult findWtInfoList(String wpId) throws Exception {
-		List<Map<String, Object>> vos = new ArrayList<>();
-		vos = wtInfoPushService.findInverterInfoList(wpId);
-		if (null != vos) {
-			return AjaxResult.successData(AjaxStatus.success.code, vos);
-		} else {
-			return AjaxResult.successData(AjaxStatus.error.code, vos);
-		}
-	}
-
-	@GetMapping("/findInverterPowerLine")
-	@ResponseBody
-	@ApiOperation(value = "逆变器开网频率", notes = "逆变器当日0点至今功率,间隔30分钟")
-	@ApiImplicitParams({ @ApiImplicitParam(name = "wtId", value = "逆变器ID", required = true, dataType = "string", paramType = "query") })
-	public AjaxResult findInverterPowerLine(String wtId) throws Exception {
-		List<Object> list = wtInfoPushService.findInverterPowerCurve(wtId);
-		return AjaxResult.successData(AjaxStatus.success.code, list);
-	}
+    public AjaxResult findWtInfoList(String wpId) throws Exception {
+        List<JunctionboxVo> vos=new ArrayList<>();
+        vos = wtInfoPushService.findInverterInfoList(wpId);
+        if (null != vos) {
+            return AjaxResult.successData(AjaxStatus.success.code, vos);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, vos);
+        }
+    }
+
+    @GetMapping("/findInverterPowerLine")
+    @ResponseBody
+    @ApiOperation(value = "逆变器开网频率", notes = "逆变器当日0点至今功率,间隔30分钟")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "wtId", value = "逆变器ID", required = true, dataType = "string", paramType = "query") })
+    public AjaxResult findInverterPowerLine(String wtId) throws Exception {
+        List<AgcVo> list = wtInfoPushService.findInverterPowerCurve(wtId);
+        return AjaxResult.successData(AjaxStatus.success.code, list);
+    }
+
+    @GetMapping("/findMatrixByWpId")
+    @ResponseBody
+    @ApiOperation(value = "场站逆变器矩阵", notes = "场站逆变器矩阵")
+    @ApiImplicitParams({ @ApiImplicitParam(name = "wpId", value = "场站编号", required = true, dataType = "string", paramType = "query") })
+    public AjaxResult findMatrixByWpId(String wpId) throws Exception {
+
+        Map<String,List<InverterVo>> map = wtInfoPushService.findMatrixByWpId(wpId);
+
+        return AjaxResult.successData(AjaxStatus.success.code, map);
+    }
+
+
+    @GetMapping("/findMatrix")
+    @ResponseBody
+    @ApiOperation(value = "逆变器矩阵", notes = "逆变器矩阵")
+    @ApiImplicitParams({ })
+    public AjaxResult findMatrix() throws Exception {
+
+
+        Map<String,Map<String,List<InverterVo>>>  map = wtInfoPushService.findMatrix();
+
+        return AjaxResult.successData(AjaxStatus.success.code, map);
+    }
+
 }

+ 66 - 0
web/monitor-hb/src/main/java/com/gyee/frame/model/custom/InverterVo.java

@@ -0,0 +1,66 @@
+
+package com.gyee.frame.model.custom;
+
+
+
+public class InverterVo {
+
+    private Integer zt;
+    private Double fdl;
+
+    private Double gl;
+
+    private String id;
+
+    private String name;
+
+    private String sqname;
+
+    public String getSqname() {
+        return sqname;
+    }
+
+    public void setSqname(String sqname) {
+        this.sqname = sqname;
+    }
+
+    public Integer getZt() {
+        return zt;
+    }
+
+    public void setZt(Integer zt) {
+        this.zt = zt;
+    }
+
+    public Double getFdl() {
+        return fdl;
+    }
+
+    public void setFdl(Double fdl) {
+        this.fdl = fdl;
+    }
+
+    public Double getGl() {
+        return gl;
+    }
+
+    public void setGl(Double gl) {
+        this.gl = gl;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+}

+ 200 - 0
web/monitor-hb/src/main/java/com/gyee/frame/model/custom/JunctionboxVo.java

@@ -0,0 +1,200 @@
+
+package com.gyee.frame.model.custom;
+
+/**
+ *
+ */
+
+public class JunctionboxVo {
+
+    private String id;
+    private String name;
+    private Double zdy;
+    
+    private Double dl1;
+
+    private Double dl2;
+
+    private Double dl3;
+
+    private Double dl4;
+
+    private Double dl5;
+
+    private Double dl6;
+
+    private Double dl7;
+
+    private Double dl8;
+
+    private Double dl9;
+
+    private Double dl10;
+
+    private Double dl11;
+
+    private Double dl12;
+
+    private Double dl13;
+
+    private Double dl14;
+
+    private Double dl15;
+
+    private Double dl16;
+
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public Double getZdy() {
+        return zdy;
+    }
+
+    public void setZdy(Double zdy) {
+        this.zdy = zdy;
+    }
+
+    public Double getDl1() {
+        return dl1;
+    }
+
+    public void setDl1(Double dl1) {
+        this.dl1 = dl1;
+    }
+
+    public Double getDl2() {
+        return dl2;
+    }
+
+    public void setDl2(Double dl2) {
+        this.dl2 = dl2;
+    }
+
+    public Double getDl3() {
+        return dl3;
+    }
+
+    public void setDl3(Double dl3) {
+        this.dl3 = dl3;
+    }
+
+    public Double getDl4() {
+        return dl4;
+    }
+
+    public void setDl4(Double dl4) {
+        this.dl4 = dl4;
+    }
+
+    public Double getDl5() {
+        return dl5;
+    }
+
+    public void setDl5(Double dl5) {
+        this.dl5 = dl5;
+    }
+
+    public Double getDl6() {
+        return dl6;
+    }
+
+    public void setDl6(Double dl6) {
+        this.dl6 = dl6;
+    }
+
+    public Double getDl7() {
+        return dl7;
+    }
+
+    public void setDl7(Double dl7) {
+        this.dl7 = dl7;
+    }
+
+    public Double getDl8() {
+        return dl8;
+    }
+
+    public void setDl8(Double dl8) {
+        this.dl8 = dl8;
+    }
+
+    public Double getDl9() {
+        return dl9;
+    }
+
+    public void setDl9(Double dl9) {
+        this.dl9 = dl9;
+    }
+
+    public Double getDl10() {
+        return dl10;
+    }
+
+    public void setDl10(Double dl10) {
+        this.dl10 = dl10;
+    }
+
+    public Double getDl11() {
+        return dl11;
+    }
+
+    public void setDl11(Double dl11) {
+        this.dl11 = dl11;
+    }
+
+    public Double getDl12() {
+        return dl12;
+    }
+
+    public void setDl12(Double dl12) {
+        this.dl12 = dl12;
+    }
+
+    public Double getDl13() {
+        return dl13;
+    }
+
+    public void setDl13(Double dl13) {
+        this.dl13 = dl13;
+    }
+
+    public Double getDl14() {
+        return dl14;
+    }
+
+    public void setDl14(Double dl14) {
+        this.dl14 = dl14;
+    }
+
+    public Double getDl15() {
+        return dl15;
+    }
+
+    public void setDl15(Double dl15) {
+        this.dl15 = dl15;
+    }
+
+    public Double getDl16() {
+        return dl16;
+    }
+
+    public void setDl16(Double dl16) {
+        this.dl16 = dl16;
+    }
+
+
+}

+ 82 - 85
web/monitor-hb/src/main/java/com/gyee/frame/service/photovolatic/PhotovoltaicTestingPointNewService.java

@@ -18,81 +18,81 @@ import java.util.Map;
 
 @Service
 public class PhotovoltaicTestingPointNewService implements BaseService<PhotovoltaicTestingPointNew, PhotovoltaicTestingPointNewExample> {
-	@Resource
-	private PhotovoltaicTestingPointNewMapper photovoltaicTestingPointNewMapper;
-	
-	@Override
-	public int deleteByPrimaryKey(String ids) {
-				
-			List<String> lista=Convert.toListStrArray(ids);
-			PhotovoltaicTestingPointNewExample example=new PhotovoltaicTestingPointNewExample();
-			example.createCriteria().andIdIn(lista);
-			return photovoltaicTestingPointNewMapper.deleteByExample(example);
-			
-				
-	}
-	
-	
-	@Override
-	public PhotovoltaicTestingPointNew selectByPrimaryKey(String id) {
-				
-			return photovoltaicTestingPointNewMapper.selectByPrimaryKey(id);
-				
-	}
-
-	
-	@Override
-	public int updateByPrimaryKeySelective(PhotovoltaicTestingPointNew record) {
-		return photovoltaicTestingPointNewMapper.updateByPrimaryKeySelective(record);
-	}
-	
-	
-	/**
-	 * 添加
-	 */
-	@Override
-	public int insertSelective(PhotovoltaicTestingPointNew record) {
-				
-		//添加雪花主键id
-		record.setId(SnowflakeIdWorker.getUUID());
-			
-				
-		return photovoltaicTestingPointNewMapper.insertSelective(record);
-	}
-	
-	
-	@Override
-	public int updateByExampleSelective(PhotovoltaicTestingPointNew record, PhotovoltaicTestingPointNewExample example) {
-		
-		return photovoltaicTestingPointNewMapper.updateByExampleSelective(record, example);
-	}
-
-	
-	@Override
-	public int updateByExample(PhotovoltaicTestingPointNew record, PhotovoltaicTestingPointNewExample example) {
-		
-		return photovoltaicTestingPointNewMapper.updateByExample(record, example);
-	}
-
-	@Override
-	public List<PhotovoltaicTestingPointNew> selectByExample(PhotovoltaicTestingPointNewExample example) {
-		
-		return photovoltaicTestingPointNewMapper.selectByExample(example);
-	}
-
-	
-	@Override
-	public long countByExample(PhotovoltaicTestingPointNewExample example) {
-		
-		return photovoltaicTestingPointNewMapper.countByExample(example);
-	}
-
-	
-	@Override
-	public int deleteByExample(PhotovoltaicTestingPointNewExample example) {
-		
-		return photovoltaicTestingPointNewMapper.deleteByExample(example);
-	}
+    @Resource
+    private PhotovoltaicTestingPointNewMapper photovoltaicTestingPointNewMapper;
+
+    @Override
+    public int deleteByPrimaryKey(String ids) {
+
+        List<String> lista=Convert.toListStrArray(ids);
+        PhotovoltaicTestingPointNewExample example=new PhotovoltaicTestingPointNewExample();
+        example.createCriteria().andIdIn(lista);
+        return photovoltaicTestingPointNewMapper.deleteByExample(example);
+
+
+    }
+
+
+    @Override
+    public PhotovoltaicTestingPointNew selectByPrimaryKey(String id) {
+
+        return photovoltaicTestingPointNewMapper.selectByPrimaryKey(id);
+
+    }
+
+
+    @Override
+    public int updateByPrimaryKeySelective(PhotovoltaicTestingPointNew record) {
+        return photovoltaicTestingPointNewMapper.updateByPrimaryKeySelective(record);
+    }
+
+
+    /**
+     * 添加
+     */
+    @Override
+    public int insertSelective(PhotovoltaicTestingPointNew record) {
+
+        //添加雪花主键id
+        record.setId(SnowflakeIdWorker.getUUID());
+
+
+        return photovoltaicTestingPointNewMapper.insertSelective(record);
+    }
+
+
+    @Override
+    public int updateByExampleSelective(PhotovoltaicTestingPointNew record, PhotovoltaicTestingPointNewExample example) {
+
+        return photovoltaicTestingPointNewMapper.updateByExampleSelective(record, example);
+    }
+
+
+    @Override
+    public int updateByExample(PhotovoltaicTestingPointNew record, PhotovoltaicTestingPointNewExample example) {
+
+        return photovoltaicTestingPointNewMapper.updateByExample(record, example);
+    }
+
+    @Override
+    public List<PhotovoltaicTestingPointNew> selectByExample(PhotovoltaicTestingPointNewExample example) {
+
+        return photovoltaicTestingPointNewMapper.selectByExample(example);
+    }
+
+
+    @Override
+    public long countByExample(PhotovoltaicTestingPointNewExample example) {
+
+        return photovoltaicTestingPointNewMapper.countByExample(example);
+    }
+
+
+    @Override
+    public int deleteByExample(PhotovoltaicTestingPointNewExample example) {
+
+        return photovoltaicTestingPointNewMapper.deleteByExample(example);
+    }
 
 
     public List<PhotovoltaicTestingPointNew> selectAll() {
@@ -108,15 +108,12 @@ public class PhotovoltaicTestingPointNewService implements BaseService<Photovolt
         PhotovoltaicTestingPointNew point=new PhotovoltaicTestingPointNew();
         if(StringUtils.notEmp(wtId) && StringUtils.notEmp(unicode) )
         {
-            if(InitialRunner.nbqmap.containsKey(wtId))
+            if(InitialRunner.phPointmap.containsKey(wtId))
             {
-                if(InitialRunner.phPointmap.containsKey(wtId))
+                Map<String, PhotovoltaicTestingPointNew> map=InitialRunner.phPointmap.get(wtId);
+                if(map.containsKey(unicode))
                 {
-                    Map<String, PhotovoltaicTestingPointNew> map=InitialRunner.phPointmap.get(wtId);
-                    if(map.containsKey(unicode))
-                    {
-                        point=map.get(unicode);
-                    }
+                    point=map.get(unicode);
                 }
             }
         }
@@ -125,7 +122,7 @@ public class PhotovoltaicTestingPointNewService implements BaseService<Photovolt
     }
 
 
-    public List<PhotovoltaicTestingPointNew> getPhotovoltaicTestingPointNewList(String wtId)  {
+    public List<PhotovoltaicTestingPointNew> getPhotovoltaicTestingPointNewDiList(String wtId)  {
 
         List<PhotovoltaicTestingPointNew> list=new ArrayList<>();
 
@@ -134,10 +131,10 @@ public class PhotovoltaicTestingPointNewService implements BaseService<Photovolt
         {
             PhotovoltaicTestingPointNewExample example=new PhotovoltaicTestingPointNewExample();
             example.setOrderByClause("id ASC");
-            example.isDistinct();
             PhotovoltaicTestingPointNewExample.Criteria criteria =example.createCriteria();
             criteria.andWindturbineidEqualTo(wtId);
-            criteria.andUniformcodeLike("DI");
+            criteria.andUniformcodeLike("%DI%");
+            criteria.andCodeNotEqualTo("INITIAL");
             list= photovoltaicTestingPointNewMapper.selectByExample(example);
 
         }

+ 11 - 9
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.*;
@@ -51,7 +52,8 @@ public class GenreSetPushService {
     private WobugeqService wobugeqService;
     @Resource
     private RecommenmainService recommenmainService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
 
     private final String QS = "0";
     private final String FD = "-1";
@@ -406,7 +408,7 @@ public class GenreSetPushService {
                         List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
                         for (Inverter wt : wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }
 
@@ -656,19 +658,19 @@ public class GenreSetPushService {
                         List<Inverter> wtls = InitialRunner.gp_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }  else  if( InitialRunner.pj_nbqmap.containsKey(id)){
                         List<Inverter> wtls = InitialRunner.pj_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }else if( InitialRunner.ln_nbqmap.containsKey(id)){
                         List<Inverter> wtls = InitialRunner.ln_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     } else  if( InitialRunner.pj_wtmap.containsKey(id)){
                         List<Windturbine> wtls = InitialRunner.pj_wtmap.get(id);
@@ -2185,7 +2187,7 @@ public class GenreSetPushService {
                         List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
                         for (Inverter wt : wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }
 
@@ -2435,19 +2437,19 @@ public class GenreSetPushService {
                         List<Inverter> wtls = InitialRunner.gp_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }  else  if( InitialRunner.pj_nbqmap.containsKey(id)){
                         List<Inverter> wtls = InitialRunner.pj_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }else if( InitialRunner.ln_nbqmap.containsKey(id)){
                         List<Inverter> wtls = InitialRunner.ln_nbqmap.get(id);
                         for(Inverter wt:wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     } else  if( InitialRunner.pj_wtmap.containsKey(id)){
                         List<Windturbine> wtls = InitialRunner.pj_wtmap.get(id);

+ 7 - 5
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/GenreSetPushService_bak.java

@@ -10,6 +10,7 @@ import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.model.custom.MatrixVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.service.weather.WeatherDay5Service;
 import com.gyee.frame.service.weather.WeatherService;
 import com.gyee.frame.util.*;
@@ -51,7 +52,8 @@ public class GenreSetPushService_bak {
     private WobugeqService wobugeqService;
     @Resource
     private RecommenmainService recommenmainService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
 
     private final String QS = "0";
     private final String FD = "-1";
@@ -330,7 +332,7 @@ public class GenreSetPushService_bak {
                     } else if (wp.getId().endsWith("GDC")) {
                         for (Windturbine wt : wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }
 
@@ -590,7 +592,7 @@ public class GenreSetPushService_bak {
 
                     for(Windturbine wt:wtls) {
                         //状态
-                        gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                        gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                     }
                     List<PointData> gfzblist = realApiUtil.getRealData(gfzbls);
                     if (!gfzblist.isEmpty() && gfzblist.size() == gfzblist.size()) {
@@ -1995,7 +1997,7 @@ public class GenreSetPushService_bak {
                     } else if (wp.getId().endsWith("GDC")) {
                         for (Windturbine wt : wtls) {
                             //状态
-                            gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                            gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                         }
                     }
 
@@ -2255,7 +2257,7 @@ public class GenreSetPushService_bak {
 
                     for(Windturbine wt:wtls) {
                         //状态
-                        gfzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                        gfzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                     }
                     List<PointData> gfzblist = realApiUtil.getRealData(gfzbls);
                     if (!gfzblist.isEmpty() && gfzblist.size() == gfzblist.size()) {

+ 14 - 12
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixDetialGfPushService.java

@@ -3,14 +3,15 @@ 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.Inverter;
 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.WindPowerstationTestingPoint2Service;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
@@ -37,7 +38,8 @@ public class MatrixDetialGfPushService {
     private ProjectPlanService projectPlanService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
 
 
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
@@ -81,7 +83,7 @@ public class MatrixDetialGfPushService {
             Map<String, Object> jczbmap = new HashMap<>();
             jczbmap.put("name", wp.getName());
 
-        /*************************************************风场指标统计*************************************************************/
+            /*************************************************风场指标统计*************************************************************/
 
 
             List<String> jczbls = new ArrayList<>();
@@ -152,20 +154,20 @@ public class MatrixDetialGfPushService {
 /*************************************************风机指标统计*************************************************************/
             List<String> fjzbls = new ArrayList<>();
 
-            List<Windturbine> wtls=InitialRunner.wp_wtmap.get(wp.getId());
+            List<Inverter> wtls=InitialRunner.gp_nbqmap.get(wp.getId());
 
             List<MatrixVo> vos = new ArrayList<>();
 
-            for(Windturbine wt:wtls)
+            for(Inverter wt:wtls)
             {
                 //状态
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                 //交流电流
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_NBQJLDL).getCode());
+                fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_NBQJLDL).getCode());
                 //功率
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
+                fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
                 //交流电压
-                fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_NBQJLDY).getCode());
+                fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_NBQJLDY).getCode());
             }
 
             List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
@@ -185,14 +187,14 @@ public class MatrixDetialGfPushService {
                 double slts=0.0;
                 for(int i=0;i<wtls.size();i++)
                 {
-                    Windturbine wt=wtls.get(i);
+                    Inverter wt=wtls.get(i);
 
                     MatrixVo vo=new MatrixVo();
                     vo.setWtId(wt.getId());
 
-                    if(StringUtils.notEmp(wt.getStatus()))
+                    if(StringUtils.notEmp(wt.getId()))
                     {
-                        String num=wt.getStatus().substring(wt.getStatus().length()-3);
+                        String num=wt.getId().substring(wt.getId().indexOf("_")+1);
                         vo.setWtnum(num);
 
                     }

+ 7 - 5
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixDetialPushService.java

@@ -13,6 +13,7 @@ import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPoint2Service;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
@@ -38,7 +39,8 @@ public class MatrixDetialPushService {
     private ProjectPlanService projectPlanService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
 
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
@@ -327,13 +329,13 @@ public class MatrixDetialPushService {
                 List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
                 for (Inverter wt : wtls) {
                     //风机状态
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.ZTMX).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.ZTMX).getCode());
                     //风速
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
                     //功率
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
 
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FDJZS).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FDJZS).getCode());
 
                 }
             }

+ 136 - 42
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixPushService.java

@@ -12,6 +12,7 @@ import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPoint2Service;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
@@ -39,7 +40,8 @@ public class MatrixPushService {
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
 
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
 
@@ -156,23 +158,23 @@ public class MatrixPushService {
                 Double xdts = MathUtil.twoBit(jczblist.get(12).getPointValueInDouble());
                 jczbmap.put("xdts", xdts);
 
-                if (wp.getId().endsWith("FDC")) {
-                    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 if (wp.getId().endsWith("GDC")) {
-
-                    gfdjnum = gfdjnum + djts.intValue();
-                    gfyxnum = gfyxnum + yxts.intValue();
-                    gfgznum = gfgznum + gzts.intValue();
-                    gflxnum = gflxnum + lxts.intValue();
-                    gfwhnum = gfwhnum + whts.intValue();
-                    gfxdnum = gfxdnum + xdts.intValue();
-                }
+//                if (wp.getId().endsWith("FDC")) {
+//                    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 if (wp.getId().endsWith("GDC")) {
+//
+//                    gfdjnum = gfdjnum + djts.intValue();
+//                    gfyxnum = gfyxnum + yxts.intValue();
+//                    gfgznum = gfgznum + gzts.intValue();
+//                    gflxnum = gflxnum + lxts.intValue();
+//                    gfwhnum = gfwhnum + whts.intValue();
+//                    gfxdnum = gfxdnum + xdts.intValue();
+//                }
 
             } else {
                 //实时风速
@@ -211,8 +213,10 @@ public class MatrixPushService {
             List<String> fjzbls = new ArrayList<>();
 
 
+
             List<MatrixVo> vos = new ArrayList<>();
 
+
             if(wp.getId().endsWith("FDC") && InitialRunner.wp_wtmap.containsKey(wp.getId()))
             {
                 List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
@@ -230,24 +234,33 @@ public class MatrixPushService {
                 List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
                 for (Inverter wt : wtls) {
                     //风机状态
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                     //风速
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
                     //功率
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
 
                 }
             }
 
+
             List<PointData> fjzblist = realApiUtil.getRealData(fjzbls);
 
             if (!fjzblist.isEmpty() && fjzblist.size() == fjzbls.size()) {
 
 
                 int step = 3;
-                int slts = 0;
+                int djnum = 0;
+                int yxnum = 0;
+                int gznum = 0;
+                int lxnum = 0;
+                int whnum = 0;
+                int xdnum = 0;
+                int slnum = 0;
                 if(wp.getId().endsWith("FDC") && InitialRunner.wp_wtmap.containsKey(wp.getId()))
                 {
+
+
                     List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wp.getId());
                     for (int i = 0; i < wtls.size(); i++) {
                         Windturbine wt = wtls.get(i);
@@ -263,9 +276,57 @@ public class MatrixPushService {
 
 
                         double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
-                        if (fjzt == 6) {
-                            slts++;
+
+
+                        switch (Double.valueOf(fjzt).intValue()) {
+                            case 0:
+                                fcdjnum++;
+                                djnum++;
+                                break;
+                            case 1:
+                                fcyxnum++;
+                                yxnum++;
+                                break;
+                            case 2:
+                                fcgznum++;
+                                gznum++;
+
+                                break;
+                            case 3:
+                                fclxnum++;
+                                lxnum++;
+                                break;
+                            case 4:
+                                fcwhnum++;
+                                whnum++;
+                                break;
+                            case 5:
+                                fcxdnum++;
+                                xdnum++;
+                                break;
+                            case 6:
+                                fcslnum++;
+                                slnum++;
+                                break;
+
+                            default:
+
+                                break;
                         }
+                        //待机台数
+                        jczbmap.put("djts", djnum);
+                        //运行台数
+                        jczbmap.put("yxts", yxnum);
+                        //故障台数
+                        jczbmap.put("gzts", gznum);
+                        //离线台数
+                        jczbmap.put("lxts", lxnum);
+                        //维护台数
+                        jczbmap.put("whts", whnum);
+                        //限电台数
+                        jczbmap.put("xdts", xdnum);
+                        //受累台数
+                        jczbmap.put("slts", slnum);
                         vo.setFjzt(fjzt);
                         vo.setFs(MathUtil.twoBit(fjzblist.get(i * step + 1).getPointValueInDouble()));
                         vo.setGl(MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble()));
@@ -291,9 +352,55 @@ public class MatrixPushService {
 
 
                         double fjzt = MathUtil.twoBit(fjzblist.get(i * step).getPointValueInDouble());
-                        if (fjzt == 6) {
-                            slts++;
+                        switch (Double.valueOf(fjzt).intValue()) {
+                            case 0:
+                                gfdjnum++;
+                                djnum++;
+                                break;
+                            case 1:
+                                gfyxnum++;
+                                yxnum++;
+                                break;
+                            case 2:
+                                gfgznum++;
+                                gznum++;
+                                break;
+                            case 3:
+                                gflxnum++;
+                                lxnum++;
+                                break;
+                            case 4:
+                                gfwhnum++;
+                                whnum++;
+                                break;
+                            case 5:
+                                gfxdnum++;
+                                xdnum++;
+                                break;
+                            case 6:
+                                gfslnum++;
+                                slnum++;
+                                break;
+
+                            default:
+
+                                break;
                         }
+
+                        //待机台数
+                        jczbmap.put("djts", djnum);
+                        //运行台数
+                        jczbmap.put("yxts", yxnum);
+                        //故障台数
+                        jczbmap.put("gzts", gznum);
+                        //离线台数
+                        jczbmap.put("lxts", lxnum);
+                        //维护台数
+                        jczbmap.put("whts", whnum);
+                        //限电台数
+                        jczbmap.put("xdts", xdnum);
+                        //受累台数
+                        jczbmap.put("slts", slnum);
                         vo.setFjzt(fjzt);
                         vo.setFs(MathUtil.twoBit(fjzblist.get(i * step + 1).getPointValueInDouble()));
                         vo.setGl(MathUtil.twoBit(fjzblist.get(i * step + 2).getPointValueInDouble()));
@@ -305,36 +412,23 @@ public class MatrixPushService {
                 }
 
 
-
-                jczbmap.put("slts", 0.0);
-
-                double djts=(Double)jczbmap.get("djts");
-                double yxts=(Double)jczbmap.get("yxts");
-                double gzts=(Double)jczbmap.get("gzts");
-                double lxts=(Double)jczbmap.get("lxts");
-                double whts=(Double)jczbmap.get("whts");
-                double xdts=(Double)jczbmap.get("xdts");
-                jczbmap.put("jrts", Double.valueOf(slts)+djts+yxts+gzts+lxts+whts+xdts);
-                if (wp.getId().endsWith("FDC")) {
-                    fcslnum = fcslnum + slts;
-                } else {
-                    gfslnum = gfslnum + slts;
-                }
-
             }
             if(!vos.isEmpty())
             {
                 fjvos.add(vos);
             }
 
+
 /*************************************************风机指标统计*************************************************************/
 
         }
         //风场待机台数
         map.put("fczbmap", fczbmap);
+
         //风机指标对象
         map.put("fjmap", fjvos);
 
+
 /*******************************************风场、光伏状态数量统计***********************************************************/
 
         //风场待机台数

+ 15 - 4
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/MatrixQfPushService.java

@@ -13,6 +13,7 @@ import com.gyee.frame.service.ProjectPlanService;
 import com.gyee.frame.service.WindPowerstationTestingPoint2Service;
 import com.gyee.frame.service.WindTurbineTestingPointAiService;
 import com.gyee.frame.service.WindpowerinfodayService;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.util.IRealTimeDataBaseUtil;
 import com.gyee.frame.util.MathUtil;
 import com.gyee.frame.util.RealTimeDataBaseFactory;
@@ -39,7 +40,8 @@ public class MatrixQfPushService {
     private ProjectPlanService projectPlanService;
     @Resource
     private WindTurbineTestingPointAiService windTurbineTestingPointAiService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
     private final String QS = "0";
     private final String FD = "-1";
     private final String GF = "-2";
@@ -221,11 +223,11 @@ public class MatrixQfPushService {
                 List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wp.getId());
                 for (Inverter wt : wtls) {
                     //风机状态
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.FJZT).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.FJZT).getCode());
                     //风速
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJSSFS).getCode());
                     //功率
-                    fjzbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
+                    fjzbls.add(photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(), Constant.TPOINT_WT_FJGL).getCode());
 
                 }
             }
@@ -267,6 +269,10 @@ public class MatrixQfPushService {
                                 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();
+                                if(lyl>100)
+                                {
+                                    lyl=100;
+                                }
                                 vo.setLyl(lyl);
                             } else {
                                 vo.setLyl(0.0);
@@ -284,6 +290,7 @@ public class MatrixQfPushService {
 
                         }
 
+
                         vo.setWpId(wt.getWindpowerstationid());
                         vos.add(vo);
                     }
@@ -316,6 +323,10 @@ public class MatrixQfPushService {
                                 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();
+                                if(lyl>100)
+                                {
+                                    lyl=100;
+                                }
                                 vo.setLyl(lyl);
                             } else {
                                 vo.setLyl(0.0);

+ 423 - 124
web/monitor-hb/src/main/java/com/gyee/frame/service/websocket/WtInfoPushService.java

@@ -5,9 +5,14 @@ import cn.hutool.core.date.DateUtil;
 import com.google.common.collect.Maps;
 import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.agc.AgcVo;
 import com.gyee.frame.model.auto.*;
+import com.gyee.frame.model.custom.InverterVo;
+import com.gyee.frame.model.custom.JunctionboxVo;
 import com.gyee.frame.model.custom.PointData;
 import com.gyee.frame.service.*;
+import com.gyee.frame.service.photovolatic.JunctionboxService;
+import com.gyee.frame.service.photovolatic.PhotovoltaicTestingPointNewService;
 import com.gyee.frame.util.*;
 import org.apache.commons.compress.utils.Lists;
 import org.springframework.stereotype.Service;
@@ -27,13 +32,17 @@ public class WtInfoPushService {
     private WindturbineinfodayService windturbineinfodayService;
     @Resource
     private WarningRecordsService warningRecordsService;
-
+    @Resource
+    private PhotovoltaicTestingPointNewService photovoltaicTestingPointNewService;
     @Resource
     private AlarmsnapService alarmsnapService;
+    @Resource
+    private JunctionboxService junctionboxService;
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
 
     String QS_FDC = "QS_FDC";
-
+    String JZ = "JZ";
+    String ZC="ZC";
     public Map<String, Object> genreSetMap() throws Exception {
 
         Map<String, Object> map = new HashMap<>();
@@ -107,7 +116,6 @@ public class WtInfoPushService {
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RSZSSDL).getCode());// 日场内受累故障
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RQFSSDL).getCode());// 日场外受累电网
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.RXDSSDL).getCode());// 日场外受累天气
-
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJSSFS).getCode());// 风速
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FJGL).getCode());// 风机功率
                 zbls.add(windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, Constant.TPOINT_WT_FDJZS).getCode());// 风机转数
@@ -557,28 +565,8 @@ public class WtInfoPushService {
                 msls=new ArrayList<>();
                 uids=new ArrayList<>();
 
-                if (wt.getWindpowerstationid().equals(QS_FDC)) {
-
-                    uids.add(Constant.TPOINT_WT_YPWZ1);
-                    uids.add(Constant.TPOINT_WT_YPWZ2);
-                    uids.add(Constant.TPOINT_WT_YPWZ3);
-                    uids.add(Constant.TPOINT_WT_FJSSFS);
-                    uids.add(Constant.TPOINT_WT_FJGL);
-                    uids.add(Constant.TPOINT_WT_GLYS);
-                    uids.add(Constant.QSTPOINT_WT_BJJD1);
-                    uids.add(Constant.TPOINT_WT_FJPL);
-                    uids.add(Constant.TPOINT_WT_WGGL);
-                    uids.add(Constant.TPOINT_WT_FJFX);
-                    uids.add(Constant.TPOINT_WT_YLZS);
-                    uids.add(Constant.TPOINT_WT_FDJZS);
-                    uids.add(Constant.TPOINT_WT_JCWWD);
-                    uids.add(Constant.TPOINT_WT_JCWD);
-                    uids.add(Constant.TPOINT_WT_TDGWD);
-                    uids.add(Constant.TPOINT_WT_JCGWD);
 
 
-                } else {
-
                     uids.add(Constant.TPOINT_WT_YPWZ1);
                     uids.add(Constant.TPOINT_WT_YPWZ2);
                     uids.add(Constant.TPOINT_WT_YPWZ3);
@@ -598,7 +586,7 @@ public class WtInfoPushService {
 
 
 
-                }
+
 
                 msls.add("YPWZ1");
                 msls.add("YPWZ2");
@@ -1001,6 +989,26 @@ public class WtInfoPushService {
 
 
     }
+
+
+    private void initialNbqpoint(String id, List<String> zbls, List<String> keyls, Map<String, Integer> bjnamemap,List<String> uids ,List<String> msls) {
+
+        if(msls.size()==uids.size())
+        {
+            for(int i=0;i<uids.size();i++)
+            {
+                PhotovoltaicTestingPointNew point= photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(id, uids.get(i));
+                if(null!=point && null!=point.getCode())
+                {
+                    zbls.add(point.getCode());//
+                    keyls.add(msls.get(i));//
+                    bjnamemap.put(msls.get(i),zbls.size()-1);
+                }
+            }
+        }
+
+
+    }
 //    private void initialpoint(String id, List<String> zbls, List<String> keyls, Map<String, Integer> bjnamemap,List<String> uids) {
 //
 //        for(String uid:uids)
@@ -1049,24 +1057,15 @@ public class WtInfoPushService {
                     msls.add("FJGL");//有功功率
                     msls.add("YYYW");//液压油温
                     msls.add("PCS_WD");//PSC温度
-                    if (wt.getWindpowerstationid().equals(QS_FDC)) {
-                        uids.add(Constant.QSTPOINT_WT_U1YZWD);//U1绕组温度
-                        uids.add(Constant.QSTPOINT_WT_V1YZWD);//V1绕组温度
-                        uids.add(Constant.QSTPOINT_WT_W1YZWD);//W1绕组温度
-
-                        msls.add("U1YZWD");//U1绕组温度
-                        msls.add("V1YZWD");//V1绕组温度
-                        msls.add("W1YZWD");//W1绕组温度
-                    }else
-                    {
-                        uids.add(Constant.TPOINT_WT_U1YZWD);//U1绕组温度
-                        uids.add(Constant.TPOINT_WT_V1YZWD);//V1绕组温度
-                        uids.add(Constant.TPOINT_WT_W1YZWD);//W1绕组温度
 
-                        msls.add("U1YZWD");//U1绕组温度
-                        msls.add("V1YZWD");//V1绕组温度
-                        msls.add("W1YZWD");//W1绕组温度
-                    }
+                    uids.add(Constant.TPOINT_WT_U1YZWD);//U1绕组温度
+                    uids.add(Constant.TPOINT_WT_V1YZWD);//V1绕组温度
+                    uids.add(Constant.TPOINT_WT_W1YZWD);//W1绕组温度
+
+                    msls.add("U1YZWD");//U1绕组温度
+                    msls.add("V1YZWD");//V1绕组温度
+                    msls.add("W1YZWD");//W1绕组温度
+
                     uids.add(Constant.TPOINT_WT_U2YZWD);//U2绕组温度
                     uids.add(Constant.TPOINT_WT_V2YZWD);//V2绕组温度
                     uids.add(Constant.TPOINT_WT_W2YZWD);//W2绕组温度
@@ -1094,7 +1093,7 @@ public class WtInfoPushService {
 
 
                     initialpoint(id, zbls, keyls, namemap,uids,msls);
-/*******************************************************************************************************************************************************/
+
 
                     Map<String, Object> zbmap = new HashMap<>();
 
@@ -1107,7 +1106,7 @@ public class WtInfoPushService {
 
 
                     if (!zblist.isEmpty() && zblist.size() == zbls.size() && keyls.size() == zbls.size()) {
-/**************************************************************基础指标***********************************************************************************/
+
 
 
 
@@ -1122,7 +1121,6 @@ public class WtInfoPushService {
                         }
 
 
-/**************************************************************基础指标***********************************************************************************/
 
 
                     } else {
@@ -1139,8 +1137,98 @@ public class WtInfoPushService {
                     vos.add(zbmap);
 
                 }
-            }
+            }else if (InitialRunner.gp_nbqmap.containsKey(wpId)) {
 
+                List<Inverter> wtls=InitialRunner.gp_nbqmap.get(wpId);
+
+                for(Inverter wt:wtls)
+                {
+                    String id=wt.getId();
+
+
+                    List<String> msls = new ArrayList<>();
+                    List<String> zbls = new ArrayList<>();
+                    List<String> keyls = new ArrayList<>();
+                    List<String> uids = new ArrayList<>();
+                    Map<String, Integer> namemap = new HashMap<>();
+
+                    uids.add(Constant.TPOINT_NBQ_AB_DY);//电网AB线电压
+                    uids.add(Constant.TPOINT_NBQ_BC_DY);//电网BC线电压
+                    uids.add(Constant.TPOINT_NBQ_CA_DY);//电网CA线电压
+                    uids.add(Constant.TPOINT_NBQ_A_DL);//电网A相电流
+                    uids.add(Constant.TPOINT_NBQ_B_DL);//电网B相电流
+                    uids.add(Constant.TPOINT_NBQ_C_DL);//电网C相电流
+                    uids.add(Constant.TPOINT_NBQ_DWPL);//电网频率
+                    uids.add(Constant.TPOINT_NBQ_GL);//功率
+                    uids.add(Constant.TPOINT_NBQ_WGGL);//无功功率
+                    uids.add(Constant.TPOINT_NBQ_GLYS);//功率因数
+                    uids.add(Constant.TPOINT_NBQ_WD);//机内温度
+                    uids.add(Constant.TPOINT_NBQ_ZLDY);//直流电压
+                    uids.add(Constant.TPOINT_NBQ_ZLDL);//直流电流
+                    uids.add(Constant.TPOINT_NBQ_RFDL);//日发电量
+                    uids.add(Constant.TPOINT_NBQ_ZFDL);//总发电量
+                    uids.add(Constant.TPOINT_NBQ_RBWFZ);//日并网分钟
+                    uids.add(Constant.TPOINT_NBQ_ZYXSJ);//总运行时间
+
+
+                    msls.add("AB_DY");//电网AB线电压
+                    msls.add("BC_DY");//电网BC线电压
+                    msls.add("CA_DY");//电网CA线电压
+                    msls.add("A_DL");//电网A相电流
+                    msls.add("B_DL");//电网B相电流
+                    msls.add("C_DL");//电网C相电流
+                    msls.add("DWPL");//电网频率
+                    msls.add("YGGL");//功率
+                    msls.add("WGGL");//无功功率
+                    msls.add("GLYS");//功率因数
+                    msls.add("JNWD");//机内温度
+                    msls.add("ZLDY");// 直流电压
+                    msls.add("ZLDL");//直流电流
+                    msls.add("RFDL");//日发电量
+                    msls.add("ZFDL");//总发电量
+                    msls.add("RBWFZ");//日并网分钟
+                    msls.add("ZYXSJ");//总运行时间
+
+                    initialNbqpoint(id, zbls, keyls, namemap,uids,msls);
+
+
+                    Map<String, Object> zbmap = new HashMap<>();
+
+                    zbmap.put("model", wt.getModelid());
+                    zbmap.put("wpid", wt.getWindpowerstationid());
+                    zbmap.put("pjid", wt.getProjectid());
+                    zbmap.put("lnid", wt.getLineid());
+                    zbmap.put("code", wt.getCode());
+                    zbmap.put("wtid", wt.getId());
+                    List<PointData> zblist = realApiUtil.getRealData(zbls);
+
+
+                    if (!zblist.isEmpty() && zblist.size() == zbls.size() && keyls.size() == zbls.size()) {
+
+
+                        for(int i=0;i<keyls.size();i++)
+                        {
+                            if(namemap.containsKey(keyls.get(i)))
+                            {
+                                int num=namemap.get(keyls.get(i));
+                                zbmap.put(keyls.get(i), MathUtil.twoBit(zblist.get(num).getPointValueInDouble()));//
+                            }
+
+                        }
+
+                    }
+
+                    for(String str:msls)
+                    {
+                        if(!zbmap.containsKey(str))
+                        {
+                            zbmap.put(str,null);
+                        }
+                    }
+                    vos.add(zbmap);
+
+                }
+            }
 
 
         }
@@ -1148,64 +1236,266 @@ public class WtInfoPushService {
         return vos;
     }
 
-    public List<Map<String, Object>> findInverterInfoList(String wpId) throws Exception {
-        List<Map<String, Object>> vos = new ArrayList<>();
-        if (StringUtils.notEmp(wpId) && InitialRunner.wp_wtmap.containsKey(wpId)) {
-            List<Windturbine> wtls = InitialRunner.wp_wtmap.get(wpId);
-            for (Windturbine wt : wtls) {
-                Map<String, Object> map = new HashMap<String, Object>();
-                map.put("model", wt.getModelid());
-                map.put("wpid", wt.getWindpowerstationid());
-                map.put("pjid", wt.getProjectid());
-                map.put("lnid", wt.getLineid());
-                map.put("code", wt.getCode());
-                map.put("wtId", wt.getId());
+    public List<JunctionboxVo> findInverterInfoList(String wpId) throws Exception {
+        List<JunctionboxVo> vos=new ArrayList<>();
+        if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
+            List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
+            for (Inverter wt : wtls) {
 
-                Line ln = InitialRunner.lnmap.get(wt.getLineid());
-                map.put("lnname", ln.getName());
-                List<String> zbls = new ArrayList<>();
+                if(StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid()))
+                {
+                    Square square=InitialRunner.sqmap.get(wt.getSquareid());
 
-                String[] codeName[] = {
-                        { "JSSSFS", "光照强度"},
-                        { "AI130", "有功功率"},
-                        { "AI067", "功率因数"},
-                        { "AIG071", "机内温度"},
-                        { "AIG072", "逆变效率" },
-                        { "AI130", "功率"},
-                        { "AI067", "功率因数" },
-                        { "RFDL", "日发电量" },
-                        { "YFDL", "月发电量" },
-                        { "NFDL", "年发电量" },
-                        { "AIG064", "累计发电量" }
-                };
-                // 遍历定义码,获取测点Id集合
-                Map<String, String> pointUniformMap = Maps.newHashMap();
-                for (String[] str1 : codeName) {
-                    String pointid = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(wt.getId(), str1[0]).getCode();
-                    zbls.add(pointid);
-                    pointUniformMap.put(pointid, str1[0]);
+                    if(square.getTypes().equals(ZC))
+                    {
+                        continue;
+                    }
                 }
-                // 获取测点值,与定义码绑定
-                List<PointData> zblist = realApiUtil.getRealData(zbls);
-//				Map<String, Object> uniformValueMap = Maps.newHashMap();
-//				uniformValueMap.put("定义码对照", codeName);
-                for (PointData p : zblist) {
-                    String ednaId = p.getEdnaId();
-                    Double val = MathUtil.twoBit(p.getPointValueInDouble());
-                    String uniformCode = pointUniformMap.get(ednaId);
-                    map.put(uniformCode, val);
+
+                List<Junctionbox> jbls=junctionboxService.selectByInverterId(wt.getId());
+
+                if(!jbls.isEmpty())
+                {
+                    List<String> pointcodes=new ArrayList<>();
+                    for(Junctionbox jb:jbls)
+                    {
+                        String[] strs=Constant.TPOINT_Inverter_Junctionbox;
+                        for(int i=0;i<strs.length;i++)
+                        {
+                            PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(jb.getId(),strs[i]);
+                            if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                            {
+                                pointcodes.add(pt.getCode());
+                            }
+                        }
+
+                        List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
+
+                        if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
+                        {
+                            JunctionboxVo vo=new JunctionboxVo();
+                            vo.setId(jb.getId());
+                            vo.setName(jb.getName());
+                            vo.setZdy(StringUtils.round(ptlist.get(0).getPointValueInDouble(),2));
+                            vo.setDl1(StringUtils.round(ptlist.get(1).getPointValueInDouble(),2));
+                            vo.setDl2(StringUtils.round(ptlist.get(2).getPointValueInDouble(),2));
+                            vo.setDl3(StringUtils.round(ptlist.get(3).getPointValueInDouble(),2));
+                            vo.setDl4(StringUtils.round(ptlist.get(4).getPointValueInDouble(),2));
+                            vo.setDl5(StringUtils.round(ptlist.get(5).getPointValueInDouble(),2));
+                            vo.setDl6(StringUtils.round(ptlist.get(6).getPointValueInDouble(),2));
+                            vo.setDl7(StringUtils.round(ptlist.get(7).getPointValueInDouble(),2));
+                            vo.setDl8(StringUtils.round(ptlist.get(8).getPointValueInDouble(),2));
+                            vo.setDl9(StringUtils.round(ptlist.get(9).getPointValueInDouble(),2));
+                            vo.setDl10(StringUtils.round(ptlist.get(10).getPointValueInDouble(),2));
+                            vo.setDl11(StringUtils.round(ptlist.get(11).getPointValueInDouble(),2));
+                            vo.setDl12(StringUtils.round(ptlist.get(12).getPointValueInDouble(),2));
+                            vo.setDl13(StringUtils.round(ptlist.get(13).getPointValueInDouble(),2));
+                            vo.setDl14(StringUtils.round(ptlist.get(14).getPointValueInDouble(),2));
+                            vo.setDl15(StringUtils.round(ptlist.get(15).getPointValueInDouble(),2));
+                            vo.setDl16(StringUtils.round(ptlist.get(16).getPointValueInDouble(),2));
+                            vos.add(vo);
+                        }
+
+                    }
+
+
                 }
-                vos.add(map);
+
             }
         }
         return vos;
     }
 
+
+
+    public Map<String,List<InverterVo>> findMatrixByWpId(String wpId) throws Exception {
+        Map<String,List<InverterVo>> map=new HashMap<>();
+
+
+        List<InverterVo> vos=new ArrayList<>();
+        if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
+            List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
+            for (Inverter wt : wtls) {
+                double gl=0.0;
+                double fdl=0.0;
+                int zt=0;
+
+                List<String> pointcodes=new ArrayList<>();
+
+                String[] strs=Constant.TPOINT_Inverter_Matrix;
+                for(int i=0;i<strs.length;i++)
+                {
+                    PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                    if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                    {
+                        pointcodes.add(pt.getCode());
+                    }
+                }
+
+                List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
+
+                if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
+                {
+                    zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
+                    gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
+                    fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                }
+                if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
+                    Square square = InitialRunner.sqmap.get(wt.getSquareid());
+
+                    if (square.getTypes().equals(ZC)) {
+
+                        if(map.containsKey(square.getId()))
+                        {
+                            List<InverterVo> ls=map.get(square.getId());;
+                            InverterVo vo=new InverterVo();
+                            vo.setId(wt.getId());
+                            vo.setName(wt.getName());
+                            vo.setFdl(fdl);
+                            vo.setGl(gl);
+                            vo.setZt(zt);
+                            vo.setSqname(square.getName());
+                            ls.add(vo);
+                            map.put(square.getId(),ls);
+                        }else
+                        {
+                            List<InverterVo> ls=new ArrayList<>();
+                            InverterVo vo=new InverterVo();
+                            vo.setId(wt.getId());
+                            vo.setName(wt.getName());
+                            vo.setFdl(fdl);
+                            vo.setGl(gl);
+                            vo.setZt(zt);
+                            vo.setSqname(square.getName());
+                            ls.add(vo);
+                            map.put(square.getId(),ls);
+
+                        }
+                    }else
+                    {
+                        InverterVo vo=new InverterVo();
+                        vo.setId(wt.getId());
+                        vo.setName(wt.getName());
+                        vo.setFdl(fdl);
+                        vo.setGl(gl);
+                        vo.setZt(zt);
+                        vo.setSqname(square.getName());
+                        vos.add(vo);
+                    }
+                }
+
+            }
+        }
+
+        map.put(JZ,vos);
+
+        return map;
+    }
+
+
+
+    public Map<String,Map<String,List<InverterVo>>> findMatrix() throws Exception {
+
+        Map<String,Map<String,List<InverterVo>>> matrixmap=new HashMap<>();
+
+
+        List<Windpowerstation> wpls=InitialRunner.wpallls;
+
+        if(!wpls.isEmpty())
+        {
+            for(Windpowerstation wp:wpls)
+            {
+                String wpId=wp.getId();
+                Map<String,List<InverterVo>> map=new HashMap<>();
+
+                List<InverterVo> vos=new ArrayList<>();
+                if (StringUtils.notEmp(wpId) && InitialRunner.gp_nbqmap.containsKey(wpId)) {
+                    List<Inverter> wtls = InitialRunner.gp_nbqmap.get(wpId);
+                    for (Inverter wt : wtls) {
+                        double gl=0.0;
+                        double fdl=0.0;
+                        int zt=0;
+
+                        List<String> pointcodes=new ArrayList<>();
+
+                        String[] strs=Constant.TPOINT_Inverter_Matrix;
+                        for(int i=0;i<strs.length;i++)
+                        {
+                            PhotovoltaicTestingPointNew pt=photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(wt.getId(),strs[i]);
+                            if(StringUtils.notEmp(pt) && StringUtils.notEmp(pt.getCode()))
+                            {
+                                pointcodes.add(pt.getCode());
+                            }
+                        }
+
+                        List<PointData> ptlist = realApiUtil.getRealData(pointcodes);
+
+                        if(!ptlist.isEmpty() && ptlist.size()==pointcodes.size())
+                        {
+                            zt=Double.valueOf(ptlist.get(0).getPointValueInDouble()).intValue();
+                            gl=StringUtils.round(ptlist.get(1).getPointValueInDouble(),2);
+                            fdl=StringUtils.round(ptlist.get(2).getPointValueInDouble(),2);
+                        }
+                        if (StringUtils.notEmp(wt.getSquareid()) && InitialRunner.sqmap.containsKey(wt.getSquareid())) {
+                            Square square = InitialRunner.sqmap.get(wt.getSquareid());
+
+                            if (square.getTypes().equals(ZC)) {
+
+                                if(map.containsKey(square.getId()))
+                                {
+                                    List<InverterVo> ls=map.get(square.getId());;
+                                    InverterVo vo=new InverterVo();
+                                    vo.setId(wt.getId());
+                                    vo.setName(wt.getName());
+                                    vo.setFdl(fdl);
+                                    vo.setGl(gl);
+                                    vo.setSqname(square.getName());
+                                    vo.setZt(zt);
+                                    ls.add(vo);
+                                    map.put(square.getId(),ls);
+                                }else
+                                {
+                                    List<InverterVo> ls=new ArrayList<>();
+                                    InverterVo vo=new InverterVo();
+                                    vo.setId(wt.getId());
+                                    vo.setName(wt.getName());
+                                    vo.setFdl(fdl);
+                                    vo.setGl(gl);
+                                    vo.setZt(zt);
+                                    vo.setSqname(square.getName());
+                                    ls.add(vo);
+                                    map.put(square.getId(),ls);
+
+                                }
+                            }else
+                            {
+                                InverterVo vo=new InverterVo();
+                                vo.setId(wt.getId());
+                                vo.setName(wt.getName());
+                                vo.setSqname(square.getName());
+                                vo.setFdl(fdl);
+                                vo.setGl(gl);
+                                vo.setZt(zt);
+                                vos.add(vo);
+                            }
+                        }
+
+                    }
+                    map.put(JZ,vos);
+                }
+
+                matrixmap.put(wpId,map);
+            }
+
+        }
+
+        return matrixmap;
+    }
     public Object findInverterDI(String id) throws Exception {
-        List<Windturbinetestingpointnew> pointList = windTurbineTestingPointDiService.getWindTurbineTestingPointDi2List(id);
+        List<PhotovoltaicTestingPointNew> pointList = photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNewDiList(id);
         Map<String, String> idName = Maps.newHashMap();
         List<String> pointids = Lists.newArrayList();
-        for (Windturbinetestingpointnew point : pointList) {
+        for (PhotovoltaicTestingPointNew point : pointList) {
             idName.put(point.getCode(), point.getName());
             pointids.add(point.getCode());
         }
@@ -1228,30 +1518,37 @@ public class WtInfoPushService {
         return map;
     }
 
-    public List<Object> findInverterPowerCurve(String id) throws Exception {
-        List<Object> list = Lists.newArrayList();
-        Date now = new Date();
-        Date date = DateUtil.beginOfDay(now);
-        String pointid = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, "AI130").getCode();
-        while (date.before(now)) {
-            Date begin = DateUtils.addMinutes(date, -30);
-            List<PointData> histStat = realApiUtil.getHistStat(pointid, begin.getTime() / 1000, date.getTime() / 1000, 1L, 30L * 60, 0);
-            Double val = 0D;
-            if (histStat != null && !histStat.isEmpty() && histStat.get(0) != null) {
-                val = histStat.get(0).getPointValueInDouble();
-                val = MathUtil.twoBit(val);
-            }
-            list.add(val);
-            date = DateUtils.addMinutes(date, 30);
+    public List<AgcVo> findInverterPowerCurve(String id) throws Exception {
+
+        Map<String,Object> map =new HashMap<>();
+        Date endDate = new Date();
+        Date beginDate = DateUtil.beginOfDay(endDate);
+
+        int length=DateUtils.hoursDiff(beginDate,endDate)*2;
+
+        List<AgcVo> vos = new ArrayList<>();
+        for (int i = 0; i < length; i++) {
+            AgcVo vo = new AgcVo();
+            vo.setSjgl(0.0);
+            vos.add(vo);
+        }
+        String pointid = photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(id, Constant.TPOINT_NBQ_GL).getCode();
+        List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(pointid, beginDate.getTime() / 1000,
+                endDate.getTime() / 1000, (long) length, 1800L);
+        double temp = 0;
+        for (int i = 0; i < vos.size(); i++) {
+            temp = sjglls.get(i).getPointValueInDouble();
+            vos.get(i).setTime(sjglls.get(i).getPointTime()*1000);
+            vos.get(i).setSjgl(StringUtils.round(temp, 2));// 实际功率
         }
-        return list;
+        return vos;
     }
 
     public List<Object> findInverterInfo(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);
+            if (InitialRunner.nbqmap.containsKey(id)) {
+                Inverter wt = InitialRunner.nbqmap.get(id);
                 map.put("model", wt.getModelid());
                 map.put("wpid", wt.getWindpowerstationid());
                 map.put("pjid", wt.getProjectid());
@@ -1260,26 +1557,28 @@ public class WtInfoPushService {
                 Line ln = InitialRunner.lnmap.get(wt.getLineid());
                 map.put("lnname", ln.getName());
                 List<String> zbls = new ArrayList<>();
+
+
                 String[] codeName[] = {
-                        {"AIG061", "交流电压","V"},
-                        {"AIG081", "直流电压","V"},
-                        {"AIG060", "交流电流","A"},
-                        {"AIG078", "直流电流","A"},
-                        {"AI068", "电网频率","Hz"},
-                        {"AI130", "功率","W"},
-                        {"AI067", "功率因数",""},
-                        {"RFDL", "日发电量","kwh"},//TODO 疑似 各厂发电量单位不統一
-                        {"YFDL", "月发电量","kwh"},
-                        {"NFDL", "年发电量","kwh"},
-                        {"AIG064", "累计发电量","kwh"},
-                        {"AIG071", "逆变器温度","℃"},
-                        {"AIG072", "效率",""},
-                        {"AI962", "累计二氧化碳减排量","kg"}
+                        {Constant.TPOINT_NBQ_JLDY, "交流电压","V"},
+                        {Constant.TPOINT_NBQ_ZLDY, "直流电压","V"},
+                        {Constant.TPOINT_NBQ_JLDL, "交流电流","A"},
+                        {Constant.TPOINT_NBQ_ZLDL, "直流电流","A"},
+                        {Constant.TPOINT_NBQ_DWPL, "电网频率","Hz"},
+                        {Constant.TPOINT_NBQ_GL, "功率","W"},
+                        {Constant.TPOINT_NBQ_GLYS, "功率因数",""},
+                        {Constant.TPOINT_NBQ_RFDL, "日发电量","kwh"},//TODO 疑似 各厂发电量单位不統一
+                        {Constant.TPOINT_NBQ_YFDL, "月发电量","kwh"},
+                        {Constant.TPOINT_NBQ_NFDL, "年发电量","kwh"},
+                        {Constant.TPOINT_NBQ_ZFDL, "累计发电量","kwh"},
+                        {Constant.TPOINT_NBQ_WD, "逆变器温度","℃"},
+                        {Constant.TPOINT_NBQ_XL, "效率",""},
+                        {Constant.TPOINT_NBQ_EYHT, "累计二氧化碳减排量","kg"}
                 };
                 // 遍历定义码,获取测点Id集合
                 Map<String, String> pointUniformMap = Maps.newHashMap();
                 for (String[] str1 : codeName) {
-                    String pointid = windTurbineTestingPointAiService.getWindTurbineTestingPointAi2(id, str1[0]).getCode();
+                    String pointid = photovoltaicTestingPointNewService.getPhotovoltaicTestingPointNew(id, str1[0]).getCode();
                     zbls.add(pointid);
                     pointUniformMap.put(pointid, str1[0]);
                 }