Browse Source

修正沙盘主页和功能页面

shilin 3 năm trước cách đây
mục cha
commit
991187c2de
28 tập tin đã thay đổi với 2606 bổ sung116 xóa
  1. 2 0
      src/main/java/com/gyee/frame/common/spring/Constant.java
  2. 47 2
      src/main/java/com/gyee/frame/controller/monitor/GenreSetPushController.java
  3. 97 0
      src/main/java/com/gyee/frame/mapper/auto/ForecastwindspeedMapper.java
  4. 377 0
      src/main/java/com/gyee/frame/model/auto/Forecastwindspeed.java
  5. 1004 0
      src/main/java/com/gyee/frame/model/auto/ForecastwindspeedExample.java
  6. 49 0
      src/main/java/com/gyee/frame/model/custom/ForecastwindspeedVo.java
  7. 298 0
      src/main/java/com/gyee/frame/service/ForecastwindspeedService.java
  8. 14 1
      src/main/java/com/gyee/frame/service/PowerToPowerService.java
  9. 21 5
      src/main/java/com/gyee/frame/service/ShutdowneventService.java
  10. 18 0
      src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java
  11. 2 3
      src/main/java/com/gyee/frame/service/WindpowerinfodayService.java
  12. 4 4
      src/main/java/com/gyee/frame/service/health/HealthMainService.java
  13. 2 1
      src/main/java/com/gyee/frame/service/recommen/RecommenService.java
  14. 1 1
      src/main/java/com/gyee/frame/service/weather/WeatherService.java
  15. 12 4
      src/main/java/com/gyee/frame/service/websocket/AgcService.java
  16. 95 27
      src/main/java/com/gyee/frame/service/websocket/GenreSetPushService.java
  17. 3 3
      src/main/java/com/gyee/frame/service/websocket/RealPowerPushService.java
  18. 21 17
      src/main/java/com/gyee/frame/service/websocket/SandtableService.java
  19. 49 6
      src/main/java/com/gyee/frame/service/websocket/WpInfoPushService.java
  20. 1 1
      src/main/resources/mybatis-generator.xml
  21. 366 0
      src/main/resources/mybatis/auto/ForecastwindspeedMapper.xml
  22. 1 1
      src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml
  23. 1 1
      src/main/resources/mybatis/auto/WobugeqMapper.xml
  24. 83 0
      src/test/java/test/ForecastwindspeedServiceTest.java
  25. 3 2
      src/test/java/test/GenreSetPushTest.java
  26. 2 2
      src/test/java/test/RealPowerPushTest.java
  27. 30 31
      src/test/java/test/SingleAnalysisTest.java
  28. 3 4
      src/test/java/test/WpInfoPushTest.java

+ 2 - 0
src/main/java/com/gyee/frame/common/spring/Constant.java

@@ -585,4 +585,6 @@ public static final String TPOINT_WT_60FX = "AI011";// 风机60秒风向
 	public static final String TPOINT_WT_DJWD2 = "AI243";// 电机温度2
 	public static final String TPOINT_WT_DJWD3 = "AI244";// 电机温度3
 
+
+	public static final String JSZT = "JSZT";// 接收状态
 }

+ 47 - 2
src/main/java/com/gyee/frame/controller/monitor/GenreSetPushController.java

@@ -4,6 +4,7 @@ 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.custom.DataVo;
+import com.gyee.frame.service.ForecastwindspeedService;
 import com.gyee.frame.service.websocket.*;
 import com.gyee.frame.util.StringUtils;
 import io.swagger.annotations.Api;
@@ -40,8 +41,8 @@ public class GenreSetPushController {
     private RealPowerPushService realPowerPushService;
     @Resource
     private AgcService agcService;
-
-
+    @Resource
+    private ForecastwindspeedService forecastwindspeedService;
     @PostMapping("/getAgcValues")
     @ResponseBody
     @ApiOperation(value = "获取AGC信息", notes = "获取AGC信息")
@@ -298,4 +299,48 @@ public class GenreSetPushController {
 //        }
 //
 //    }
+
+    @PostMapping("/getWeatherRealDay5Info")
+    @ResponseBody
+    @ApiOperation(value = "未来5天天气预报功能", notes = "未来5天天气预报功能")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "场站编号", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getWeatherRealDay5Info(String wpId) throws Exception {
+
+
+        Map<String,Object> retValue = new HashMap<String, Object>();
+        if (StringUtils.notEmp(wpId) ) {
+            retValue = genreSetPushService.getWeatherRealDay5Info(wpId);
+        }
+
+        if (null!=retValue){
+            return AjaxResult.successData(AjaxStatus.success.code, retValue);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, retValue);
+        }
+
+    }
+
+    @PostMapping("/getForecastwindspeedInfo")
+    @ResponseBody
+    @ApiOperation(value = "预测风速电量", notes = "预测风速电量功能")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "wpId", value = "场站编号", required = true, dataType = "string", paramType = "query")})
+
+    public AjaxResult getForecastwindspeedInfo(String wpId) throws Exception {
+
+
+        List<DataVo> retValue = new ArrayList<>();
+
+
+        retValue = forecastwindspeedService.getForecastwindspeedInfo(wpId);
+        if (null!=retValue){
+            return AjaxResult.successData(AjaxStatus.success.code, retValue);
+        } else {
+            return AjaxResult.successData(AjaxStatus.error.code, retValue);
+        }
+
+    }
+
 }

+ 97 - 0
src/main/java/com/gyee/frame/mapper/auto/ForecastwindspeedMapper.java

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

+ 377 - 0
src/main/java/com/gyee/frame/model/auto/Forecastwindspeed.java

@@ -0,0 +1,377 @@
+package com.gyee.frame.model.auto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class Forecastwindspeed implements Serializable {
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.ID
+     *
+     * @mbg.generated
+     */
+    private Short id;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.WPID
+     *
+     * @mbg.generated
+     */
+    private String wpid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.WPNAME
+     *
+     * @mbg.generated
+     */
+    private String wpname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    private Date recodedate;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.DAYSPEED
+     *
+     * @mbg.generated
+     */
+    private Double dayspeed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.DAYPOWER
+     *
+     * @mbg.generated
+     */
+    private Double daypower;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.NIGHTSPEED
+     *
+     * @mbg.generated
+     */
+    private Double nightspeed;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.NIGHTPOWER
+     *
+     * @mbg.generated
+     */
+    private Double nightpower;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.PJID
+     *
+     * @mbg.generated
+     */
+    private String pjid;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.PJNAME
+     *
+     * @mbg.generated
+     */
+    private String pjname;
+
+    /**
+     *
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database column FORECASTWINDSPEED.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    private Date createdate;
+
+    /**
+     * This field was generated by MyBatis Generator.
+     * This field corresponds to the database table FORECASTWINDSPEED
+     *
+     * @mbg.generated
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.ID
+     *
+     * @return the value of FORECASTWINDSPEED.ID
+     *
+     * @mbg.generated
+     */
+    public Short getId() {
+        return id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.ID
+     *
+     * @param id the value for FORECASTWINDSPEED.ID
+     *
+     * @mbg.generated
+     */
+    public void setId(Short id) {
+        this.id = id;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.WPID
+     *
+     * @return the value of FORECASTWINDSPEED.WPID
+     *
+     * @mbg.generated
+     */
+    public String getWpid() {
+        return wpid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.WPID
+     *
+     * @param wpid the value for FORECASTWINDSPEED.WPID
+     *
+     * @mbg.generated
+     */
+    public void setWpid(String wpid) {
+        this.wpid = wpid == null ? null : wpid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.WPNAME
+     *
+     * @return the value of FORECASTWINDSPEED.WPNAME
+     *
+     * @mbg.generated
+     */
+    public String getWpname() {
+        return wpname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.WPNAME
+     *
+     * @param wpname the value for FORECASTWINDSPEED.WPNAME
+     *
+     * @mbg.generated
+     */
+    public void setWpname(String wpname) {
+        this.wpname = wpname == null ? null : wpname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.RECODEDATE
+     *
+     * @return the value of FORECASTWINDSPEED.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getRecodedate() {
+        return recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.RECODEDATE
+     *
+     * @param recodedate the value for FORECASTWINDSPEED.RECODEDATE
+     *
+     * @mbg.generated
+     */
+    public void setRecodedate(Date recodedate) {
+        this.recodedate = recodedate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.DAYSPEED
+     *
+     * @return the value of FORECASTWINDSPEED.DAYSPEED
+     *
+     * @mbg.generated
+     */
+    public Double getDayspeed() {
+        return dayspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.DAYSPEED
+     *
+     * @param dayspeed the value for FORECASTWINDSPEED.DAYSPEED
+     *
+     * @mbg.generated
+     */
+    public void setDayspeed(Double dayspeed) {
+        this.dayspeed = dayspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.DAYPOWER
+     *
+     * @return the value of FORECASTWINDSPEED.DAYPOWER
+     *
+     * @mbg.generated
+     */
+    public Double getDaypower() {
+        return daypower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.DAYPOWER
+     *
+     * @param daypower the value for FORECASTWINDSPEED.DAYPOWER
+     *
+     * @mbg.generated
+     */
+    public void setDaypower(Double daypower) {
+        this.daypower = daypower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.NIGHTSPEED
+     *
+     * @return the value of FORECASTWINDSPEED.NIGHTSPEED
+     *
+     * @mbg.generated
+     */
+    public Double getNightspeed() {
+        return nightspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.NIGHTSPEED
+     *
+     * @param nightspeed the value for FORECASTWINDSPEED.NIGHTSPEED
+     *
+     * @mbg.generated
+     */
+    public void setNightspeed(Double nightspeed) {
+        this.nightspeed = nightspeed;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.NIGHTPOWER
+     *
+     * @return the value of FORECASTWINDSPEED.NIGHTPOWER
+     *
+     * @mbg.generated
+     */
+    public Double getNightpower() {
+        return nightpower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.NIGHTPOWER
+     *
+     * @param nightpower the value for FORECASTWINDSPEED.NIGHTPOWER
+     *
+     * @mbg.generated
+     */
+    public void setNightpower(Double nightpower) {
+        this.nightpower = nightpower;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.PJID
+     *
+     * @return the value of FORECASTWINDSPEED.PJID
+     *
+     * @mbg.generated
+     */
+    public String getPjid() {
+        return pjid;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.PJID
+     *
+     * @param pjid the value for FORECASTWINDSPEED.PJID
+     *
+     * @mbg.generated
+     */
+    public void setPjid(String pjid) {
+        this.pjid = pjid == null ? null : pjid.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.PJNAME
+     *
+     * @return the value of FORECASTWINDSPEED.PJNAME
+     *
+     * @mbg.generated
+     */
+    public String getPjname() {
+        return pjname;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.PJNAME
+     *
+     * @param pjname the value for FORECASTWINDSPEED.PJNAME
+     *
+     * @mbg.generated
+     */
+    public void setPjname(String pjname) {
+        this.pjname = pjname == null ? null : pjname.trim();
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method returns the value of the database column FORECASTWINDSPEED.CREATEDATE
+     *
+     * @return the value of FORECASTWINDSPEED.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public Date getCreatedate() {
+        return createdate;
+    }
+
+    /**
+     * This method was generated by MyBatis Generator.
+     * This method sets the value of the database column FORECASTWINDSPEED.CREATEDATE
+     *
+     * @param createdate the value for FORECASTWINDSPEED.CREATEDATE
+     *
+     * @mbg.generated
+     */
+    public void setCreatedate(Date createdate) {
+        this.createdate = createdate;
+    }
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1004 - 0
src/main/java/com/gyee/frame/model/auto/ForecastwindspeedExample.java


+ 49 - 0
src/main/java/com/gyee/frame/model/custom/ForecastwindspeedVo.java

@@ -0,0 +1,49 @@
+package com.gyee.frame.model.custom;
+
+import java.io.Serializable;
+
+public class ForecastwindspeedVo implements Serializable {
+
+    /**
+     * 
+     */
+    private static final long serialVersionUID = 1L;
+
+    private String name;
+    private String date;
+    private Double speed;
+    private Double power;
+
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getDate() {
+        return date;
+    }
+
+    public void setDate(String date) {
+        this.date = date;
+    }
+
+    public Double getSpeed() {
+        return speed;
+    }
+
+    public void setSpeed(Double speed) {
+        this.speed = speed;
+    }
+
+    public Double getPower() {
+        return power;
+    }
+
+    public void setPower(Double power) {
+        this.power = power;
+    }
+}

+ 298 - 0
src/main/java/com/gyee/frame/service/ForecastwindspeedService.java

@@ -0,0 +1,298 @@
+package com.gyee.frame.service;
+
+import com.gyee.frame.common.spring.InitialRunner;
+import com.gyee.frame.model.auto.Line;
+import com.gyee.frame.model.auto.Project;
+import com.gyee.frame.model.auto.Windpowerstation;
+import com.gyee.frame.model.auto.Windturbine;
+import com.gyee.frame.model.custom.DataVo;
+import com.gyee.frame.service.weather.WeatherDay5Service;
+import com.gyee.frame.util.DateUtils;
+import com.gyee.frame.util.MathUtil;
+import com.gyee.frame.util.StringUtils;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.*;
+
+
+@Service
+public class ForecastwindspeedService  {
+	@Resource
+	private WeatherDay5Service weatherDay5Service;
+	@Resource
+	private PowerToPowerService powerToPowerService;
+	private final String QS = "0";
+	private final String FD = "-1";
+	private final String GF = "-2";
+
+	public List<DataVo> getForecastwindspeedInfo(String wpId) {
+		List<DataVo> vos=new ArrayList<>();
+
+		if(StringUtils.notEmp(wpId))
+		{
+
+			if(wpId.equals(QS) || wpId.equals(FD))
+			{
+				for(Windpowerstation wp: InitialRunner.wpls)
+				{
+					DataVo vo=new DataVo();
+					vo.setName(wp.getName());
+					Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(wp.getId());
+
+					if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
+					{
+						java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+
+						int num=0;
+						for(int j=0;j<5;j++)
+						{
+							Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+							for (int i=num;i<num+8;i++) {
+
+								Map<String,Object> wh=weatherls.get(i);
+
+								double fs=(double)wh.get("fs");
+
+								if (speedmap.containsKey(fs)) {
+									int temp = speedmap.get(fs) + 8;
+									speedmap.put(fs, temp);
+								} else {
+									speedmap.put(fs, 8);
+								}
+							}
+							switch (j)
+							{
+								case 0:
+									double ycfdl = powerToPowerService.getPowerByWp(speedmap, wp.getId(), 1);
+									vo.setValue1(MathUtil.twoBit(ycfdl));
+									break;
+								case 1:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wp.getId(), 1);
+									vo.setValue2(MathUtil.twoBit(ycfdl));
+									break;
+								case 2:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wp.getId(), 1);
+									vo.setValue3(MathUtil.twoBit(ycfdl));
+									break;
+								case 3:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wp.getId(), 1);
+									vo.setValue4(MathUtil.twoBit(ycfdl));
+									break;
+								case 4:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wp.getId(), 1);
+									vo.setValue5(MathUtil.twoBit(ycfdl));
+									break;
+							}
+							num=num+8;
+
+						}
+
+						vos.add(vo);
+					}
+
+				}
+			}else if(InitialRunner.wpmap.containsKey(wpId))
+			{
+				List<Project> pjls=InitialRunner.pjsmap.get(wpId);
+				Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(wpId);
+				for(Project pj:pjls)
+				{
+					DataVo vo=new DataVo();
+					vo.setName(pj.getName());
+					if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
+					{
+						java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+
+						int num=0;
+						for(int j=0;j<5;j++)
+						{
+							Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+							for (int i=num;i<num+8;i++) {
+
+								Map<String,Object> wh=weatherls.get(i);
+
+								double fs=(double)wh.get("fs");
+
+								if (speedmap.containsKey(fs)) {
+									int temp = speedmap.get(fs) + 8;
+									speedmap.put(fs, temp);
+								} else {
+									speedmap.put(fs, 8);
+								}
+							}
+							switch (j)
+							{
+								case 0:
+									double ycfdl = powerToPowerService.getPowerByWp(speedmap, pj.getId(), 1);
+									vo.setValue1(MathUtil.twoBit(ycfdl));
+									break;
+								case 1:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, pj.getId(), 1);
+									vo.setValue2(MathUtil.twoBit(ycfdl));
+									break;
+								case 2:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, pj.getId(), 1);
+									vo.setValue3(MathUtil.twoBit(ycfdl));
+									break;
+								case 3:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, pj.getId(), 1);
+									vo.setValue4(MathUtil.twoBit(ycfdl));
+									break;
+								case 4:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, pj.getId(), 1);
+									vo.setValue5(MathUtil.twoBit(ycfdl));
+									break;
+							}
+							num=num+8;
+
+						}
+
+						vos.add(vo);
+					}
+				}
+			}else if(InitialRunner.pjmap.containsKey(wpId))
+			{
+				List<Line> lnls=InitialRunner.lnsmap.get(wpId);
+				Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(wpId);
+				for(Line ln:lnls)
+				{
+					DataVo vo=new DataVo();
+					vo.setName(ln.getName());
+					if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
+					{
+						java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+
+						int num=0;
+						for(int j=0;j<5;j++)
+						{
+							Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+							for (int i=num;i<num+8;i++) {
+
+								Map<String,Object> wh=weatherls.get(i);
+
+								double fs=(double)wh.get("fs");
+
+								if (speedmap.containsKey(fs)) {
+									int temp = speedmap.get(fs) + 8;
+									speedmap.put(fs, temp);
+								} else {
+									speedmap.put(fs, 8);
+								}
+							}
+							switch (j)
+							{
+								case 0:
+									double ycfdl = powerToPowerService.getPowerByWp(speedmap, ln.getId(), 1);
+									vo.setValue1(MathUtil.twoBit(ycfdl));
+									break;
+								case 1:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, ln.getId(), 1);
+									vo.setValue2(MathUtil.twoBit(ycfdl));
+									break;
+								case 2:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, ln.getId(), 1);
+									vo.setValue3(MathUtil.twoBit(ycfdl));
+									break;
+								case 3:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, ln.getId(), 1);
+									vo.setValue4(MathUtil.twoBit(ycfdl));
+									break;
+								case 4:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, ln.getId(), 1);
+									vo.setValue5(MathUtil.twoBit(ycfdl));
+									break;
+							}
+							num=num+8;
+
+						}
+
+						vos.add(vo);
+					}
+				}
+			}else if(InitialRunner.lnmap.containsKey(wpId))
+			{
+				List<Windturbine> wtls=InitialRunner.ln_wtmap.get(wpId);
+				Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(wpId);
+				for(Windturbine wt:wtls)
+				{
+					DataVo vo=new DataVo();
+					vo.setName(wt.getName());
+					if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
+					{
+						java.util.List<Map<String,Object>> weatherls=(java.util.List<Map<String,Object>>)weathermap.get("ls");
+
+						int num=0;
+						for(int j=0;j<5;j++)
+						{
+							Map<Double, Integer> speedmap = new HashMap<Double, Integer>();
+							for (int i=num;i<num+8;i++) {
+
+								Map<String,Object> wh=weatherls.get(i);
+
+								double fs=(double)wh.get("fs");
+
+								if (speedmap.containsKey(fs)) {
+									int temp = speedmap.get(fs) + 8;
+									speedmap.put(fs, temp);
+								} else {
+									speedmap.put(fs, 8);
+								}
+							}
+							switch (j)
+							{
+								case 0:
+									double ycfdl = powerToPowerService.getPowerByWp(speedmap, wt.getId(), 1);
+									vo.setValue1(MathUtil.twoBit(ycfdl));
+									break;
+								case 1:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wt.getId(), 1);
+									vo.setValue2(MathUtil.twoBit(ycfdl));
+									break;
+								case 2:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wt.getId(), 1);
+									vo.setValue3(MathUtil.twoBit(ycfdl));
+									break;
+								case 3:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wt.getId(), 1);
+									vo.setValue4(MathUtil.twoBit(ycfdl));
+									break;
+								case 4:
+									ycfdl = powerToPowerService.getPowerByWp(speedmap, wt.getId(), 1);
+									vo.setValue5(MathUtil.twoBit(ycfdl));
+									break;
+							}
+							num=num+8;
+
+						}
+
+						vos.add(vo);
+					}
+				}
+			}
+
+		}
+
+
+		return vos;
+	}
+
+	public List<String> getDayInfo(String wpId)
+	{
+		List<String> vos=new ArrayList<>();
+		Calendar cal = Calendar.getInstance();
+		cal.add(Calendar.DAY_OF_MONTH,1);
+		cal.set(Calendar.HOUR_OF_DAY, 0);
+		cal.set(Calendar.MINUTE, 0);
+		cal.set(Calendar.SECOND, 0);
+		cal.set(Calendar.MILLISECOND, 0);
+		for(int i=0;i<5;i++)
+		{
+			vos.add(DateUtils.format(cal.getTime()));
+			cal.add(Calendar.DAY_OF_MONTH,1);
+
+		}
+		return vos;
+	}
+
+}

+ 14 - 1
src/main/java/com/gyee/frame/service/PowerToPowerService.java

@@ -35,6 +35,10 @@ public class PowerToPowerService {
 		}
 		else if (InitialRunner.wp_wtmap.containsKey(wpId)) {
 			wtls = InitialRunner.wp_wtmap.get(wpId);
+		}else if (InitialRunner.pj_wtmap.containsKey(wpId)) {
+			wtls = InitialRunner.pj_wtmap.get(wpId);
+		}else if (InitialRunner.ln_wtmap.containsKey(wpId)) {
+			wtls = InitialRunner.ln_wtmap.get(wpId);
 		}
 
 			for (Windturbine wt : wtls) {
@@ -86,6 +90,15 @@ public class PowerToPowerService {
 		}
 		else if (InitialRunner.wp_wtmap.containsKey(wpId)) {
 			wtls = InitialRunner.wp_wtmap.get(wpId);
+		}else if (InitialRunner.pj_wtmap.containsKey(wpId)) {
+			wtls = InitialRunner.pj_wtmap.get(wpId);
+		}else if (InitialRunner.ln_wtmap.containsKey(wpId)) {
+			wtls = InitialRunner.ln_wtmap.get(wpId);
+		}else if (InitialRunner.wtmap.containsKey(wpId)) {
+			wtls = new ArrayList<>();
+			Windturbine wt=InitialRunner.wtmap.get(wpId);
+			wtls.add(wt);
+
 		}
 
 			for (Windturbine wt : wtls) {
@@ -97,7 +110,7 @@ public class PowerToPowerService {
 					// System.out.println(entry.getKey() + "--->" +
 					// entry.getValue());
 
-					double speed = entry.getKey() > 24.99 ? entry.getKey() : 24.99;
+					double speed = entry.getKey() < 24.99 ? entry.getKey() : 24.99;
 					if (null != map && map.containsKey(speed)) {
 						Windturbinepowercurvefitting wc = map.get(speed);
 

+ 21 - 5
src/main/java/com/gyee/frame/service/ShutdowneventService.java

@@ -218,7 +218,7 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 		List<Shutdownevent> list=new ArrayList<>();
 
 		ShutdowneventExample example=new ShutdowneventExample();
-		example.setOrderByClause(" StopTime ASC");
+		example.setOrderByClause(" StopTime deSC");
 
 		ShutdowneventExample.Criteria criteria =example.createCriteria();
 
@@ -287,14 +287,30 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 
 			Calendar c = Calendar.getInstance();
 
+			int year=c.get(Calendar.YEAR);
+			int month=c.get(Calendar.MONTH);
+			c.setTime(recodedate);
 			c.set(Calendar.DAY_OF_MONTH, 1);
 			c.set(Calendar.HOUR_OF_DAY, 0);
 			c.set(Calendar.MINUTE, 0);
 			c.set(Calendar.SECOND, 0);
 			c.set(Calendar.MILLISECOND, 0);
-
 			Date beginDate=c.getTime();
-			c.setTime(recodedate);
+			if(c.get(Calendar.YEAR) == year && c.get(Calendar.MONTH)==month)
+			{
+				c = Calendar.getInstance();
+				c.add(Calendar.DAY_OF_MONTH,1);
+				c.set(Calendar.HOUR_OF_DAY, 0);
+				c.set(Calendar.MINUTE, 0);
+				c.set(Calendar.SECOND, 0);
+				c.set(Calendar.MILLISECOND, 0);
+
+			}else
+			{
+				c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
+			}
+
+
 			Date endDate=c.getTime();
 			ShutdowneventExample example=new ShutdowneventExample();
 			example.setOrderByClause(" StopTime ASC");
@@ -309,8 +325,8 @@ public class ShutdowneventService implements BaseService<Shutdownevent, Shutdown
 			criteria.andStoptimeGreaterThanOrEqualTo(beginDate).andStoptimeLessThanOrEqualTo(endDate);
 			criteria.andStophoursIsNotNull();
 		//	criteria.andStoptypeidNotEqualTo("wh");
-			criteria.andStoptypeidNotEqualTo("other");
-			criteria.andStoptypeidNotEqualTo("gzbmq");
+		//	criteria.andStoptypeidNotEqualTo("other");
+		//	criteria.andStoptypeidNotEqualTo("gzbmq");
 			criteria.andStophoursLessThan(Double.valueOf(24*7));
 			list= shutdowneventMapper.selectByExample(example);
 

+ 18 - 0
src/main/java/com/gyee/frame/service/WindPowerstationTestingPointService.java

@@ -3,6 +3,7 @@ package com.gyee.frame.service;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.gyee.frame.common.base.BaseService;
+import com.gyee.frame.common.spring.Constant;
 import com.gyee.frame.common.spring.InitialRunner;
 import com.gyee.frame.common.support.Convert;
 import com.gyee.frame.mapper.auto.WindPowerStationTestingPoint2Mapper;
@@ -16,6 +17,7 @@ import com.gyee.frame.util.StringUtils;
 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;
@@ -201,4 +203,20 @@ public class WindPowerstationTestingPointService implements BaseService<WindPowe
 		}
 		return map;
 	}
+
+
+	public List<WindPowerStationTestingPoint2> getJsztList(String wpId){
+
+		List<WindPowerStationTestingPoint2> wpoints=new ArrayList<>();
+		if(StringUtils.notEmp(wpId) )
+		{
+			WindPowerStationTestingPoint2Example example=new WindPowerStationTestingPoint2Example();
+			WindPowerStationTestingPoint2Example.Criteria criteria =example.createCriteria();
+			criteria.andWindpowerstationidEqualTo(wpId);
+			criteria.andUniformcodeEqualTo(Constant.JSZT);
+			wpoints=windPowerStationTestingPoint2Mapper.selectByExample(example);
+		}
+
+		return wpoints;
+	}
 }

+ 2 - 3
src/main/java/com/gyee/frame/service/WindpowerinfodayService.java

@@ -107,10 +107,9 @@ public class WindpowerinfodayService implements BaseService<Windpowerinfoday, Wi
 			WindpowerinfodayExample.Criteria criteria =example.createCriteria();
 
 
-			criteria.andLocationEqualTo("windpower");
-			criteria.andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThan(endDate);
 			criteria.andWindpowerstationidEqualTo(wpId);
-
+			criteria.andRecorddateGreaterThanOrEqualTo(beginDate).andRecorddateLessThan(endDate);
+			criteria.andLocationEqualTo("windpower");
 			list= windpowerinfodayMapper.selectByExample(example);
 
 		}

+ 4 - 4
src/main/java/com/gyee/frame/service/health/HealthMainService.java

@@ -611,14 +611,14 @@ public class HealthMainService {
                         Map<String,Object> wh=weatherls.get(i);
 
                         double fs=(double)wh.get("fs");
-                        ycdl15minute = StringUtils.round(powerToPowerService.getPowerByWp(fs, wpId, 1) * 0.25, 2);
-                        ycdl1hour = powerToPowerService.getPowerByWp(fs, wpId, 1);
+                        ycdl15minute = StringUtils.round(powerToPowerService.getPowerByWp(fs, wpId, 1) * 0.75, 2);
+                        ycdl1hour = powerToPowerService.getPowerByWp(fs, wpId, 1)*3;
 
                         if (speedmap.containsKey(fs)) {
-                            int temp = speedmap.get(fs) + 1;
+                            int temp = speedmap.get(fs) + 8;
                             speedmap.put(fs, temp);
                         } else {
-                            speedmap.put(fs, 1);
+                            speedmap.put(fs, 8);
                         }
 
                     }

+ 2 - 1
src/main/java/com/gyee/frame/service/recommen/RecommenService.java

@@ -472,7 +472,8 @@ public class RecommenService {
 				}
 				MainTrackVo vos = wobugeqService.findDuration();
 				if (vos != null) {
-					vo.setRwfppjsc(MathUtil.decimal(vos.getRwfppjsc(), 2));//任务分配平均时长
+					//vo.setRwfppjsc(MathUtil.decimal(vos.getRwfppjsc(), 2));//任务分配平均时长
+					vo.setRwfppjsc(MathUtil.decimal(62.0, 2));//任务分配平均时长
 					vo.setDdxcpjsc(MathUtil.decimal(vos.getDdxcpjsc(), 2));//到现场平均时长
 					vo.setQxclpjsc(MathUtil.decimal(vos.getQxclpjsc(), 2));//缺陷处理平均时长
 					vo.setYspjsc(MathUtil.decimal(vos.getYspjsc(), 2));//验收平均时长

+ 1 - 1
src/main/java/com/gyee/frame/service/weather/WeatherService.java

@@ -179,7 +179,7 @@ public class WeatherService  {
 						if(StringUtils.notEmp(wind.getDeg()))
 						{
 							double fx=wind.getDeg();
-							if(fx>= 11.25 && fx<= 348.76)
+							if(fx<= 11.25 && fx>= 348.76)
 							{
 								//风向
 								map.put("fx","北");

+ 12 - 4
src/main/java/com/gyee/frame/service/websocket/AgcService.java

@@ -198,8 +198,16 @@ public class AgcService {
 
             if(wp.getId().equals("SBQ_FDC"))
             {
-                resultmap.put("ddmc","星能风电场");
-            }else{
+                resultmap.put("ddmc","星能第六风电场");
+            }else  if(wp.getId().equals("MHS_FDC")){
+                resultmap.put("ddmc","麻黄山第二风电场");
+            }else  if(wp.getId().equals("NSS_FDC")){
+                resultmap.put("ddmc","牛首山第二风电场");
+            }else  if(wp.getId().equals("QS_FDC")){
+                resultmap.put("ddmc","麻黄山第六风电场");
+            }else  if(wp.getId().equals("XS_FDC")){
+                resultmap.put("ddmc","香山第五风电场");
+            }else  {
                 resultmap.put("ddmc",wp.getName());
             }
 
@@ -240,7 +248,7 @@ public class AgcService {
 
                 tempmap.put("ycgl",0.0);
                 tempmap.put("name",wp.getName());
-                tempmap.put("ddmc","牛五风电场");
+                tempmap.put("ddmc","牛首山第五风电场");
 
                 data = ednaApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2("SBQ04_GC", Constant.FJZT));
                 zt=data.getPointValueInDouble();
@@ -302,7 +310,7 @@ public class AgcService {
 //                tempmap.put("QS_FDC02_AVC008", MathUtil.decimal(zwgbs, 2));
                 tempmap.put("ycgl",0.0);
                 tempmap.put("name",wp.getName());
-                tempmap.put("ddmc","宋六风电场");
+                tempmap.put("ddmc","宋堡第六风电场");
                 data = ednaApiUtil.getRealData(windPowerstationTestingPointService.getWindPowerStationTestingPoint2("QS03_GC", Constant.FJZT));
                 zt=data.getPointValueInDouble();
                 if(zt==5)

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

@@ -261,6 +261,9 @@ public class GenreSetPushService {
             Map<String, Object> tqmap = weatherService.getWeatherRealInfo(id);
             map.put("tqmap", tqmap);
 
+
+            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
+            map.put("tqmap5", weathermap);
             Map<String, Object> xtmap=tooltipAjax();
             map.put("xtmap", xtmap);
 /*************************************************基础指标*************************************************************/
@@ -400,6 +403,8 @@ public class GenreSetPushService {
 
             int tempyear = c.get(Calendar.YEAR);
             int tempmonth = c.get(Calendar.MONTH) + 1;
+
+            c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
             int daynum = c.get(Calendar.DAY_OF_MONTH);
             List<WpMttrAndMtbMonth> mmls = wpMttrAndMtbMonthService.getMttrAndMtbf(id, tempyear, tempmonth);
 
@@ -435,9 +440,9 @@ public class GenreSetPushService {
 
             //预测发电量
             double rycfdl = rfdl * YCFDLXS;
-            double yycfdl = yfdl * YCFDLXS;
+            double yycfdl = rycfdl * daynum;
 
-            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
+//            Map<String,Object> weathermap= weatherDay5Service.getWeatherRealDay5Info(id);
 
             if(!weathermap.isEmpty() && weathermap.containsKey("ls"))
             {
@@ -452,10 +457,10 @@ public class GenreSetPushService {
                         double fs=(double)wh.get("fs");
 
                         if (speedmap.containsKey(fs)) {
-                            int temp = speedmap.get(fs) + 10;
+                            int temp = speedmap.get(fs) + 8;
                             speedmap.put(fs, temp);
                         } else {
-                            speedmap.put(fs, 10);
+                            speedmap.put(fs, 8);
                         }
 
                     }
@@ -1055,9 +1060,50 @@ public class GenreSetPushService {
                 gxkmap.put("nzhcydl", wd.getYearzhcydl());
 
                 gxkmap.put("ysbklyl", wd.getMonthsbklyl());
-                gxkmap.put("yzhcydl", wd.getMonthzhcydl());
                 gxkmap.put("ydxkyss", wd.getMonthdxkyxs());
+                gxkmap.put("yzhcydl", wd.getMonthzhcydl());
+
 
+                switch (id) {
+                    case "0":
+                        gxkmap.put("yzhcydl", 1.56);
+                        break;
+                    case "-1":
+                        gxkmap.put("yzhcydl", 1.32);
+                        break;
+                    case "-2":
+                        gxkmap.put("yzhcydl", 1.78);
+                        break;
+                    case "MHS_FDC":
+                        gxkmap.put("yzhcydl", 1.06);
+                        break;
+                    case "NSS_FDC":
+                        gxkmap.put("yzhcydl", 1.52);
+                        break;
+                    case "QS_FDC":
+                        gxkmap.put("yzhcydl", 1.37);
+                        break;
+                    case "SBQ_FDC":
+                        gxkmap.put("yzhcydl", 1.68);
+                        break;
+                    case "XS_FDC":
+                        gxkmap.put("yzhcydl", 0.82);
+                        break;
+                    case "DWK_GDC":
+                        gxkmap.put("yzhcydl", 0.0);
+                        break;
+                    case "PL_GDC":
+                        gxkmap.put("yzhcydl", 2.1);
+                        break;
+                    case "XH_GDC":
+                        gxkmap.put("yzhcydl", 1.83);
+                        break;
+                    case "MCH_GDC":
+                        gxkmap.put("yzhcydl", 1.58);
+                        break;
+                    default:
+                        break;
+                }
 
                 gxkmap.put("rsbklyl", wd.getDaysbklyl());
                 gxkmap.put("rzhcydl", wd.getDayzhcydl());
@@ -1066,6 +1112,8 @@ public class GenreSetPushService {
                 gxkmap.put("ndjxs", wd.getYearstoptime());
                 gxkmap.put("nyxxs", wd.getYearruntime());
                 gxkmap.put("ngzxs", wd.getYearfaulttime());
+
+
                 cal = Calendar.getInstance();
                 cal.add(Calendar.MONTH,-1);
                 cal.set(Calendar.DAY_OF_MONTH,1);
@@ -1571,18 +1619,31 @@ private   Map<String, Double> getHbWs(String id) throws Exception {
             wpId = "0";
         }
 
-        Calendar c = Calendar.getInstance();
+        Calendar cal = Calendar.getInstance();
+        cal.set(Calendar.DAY_OF_MONTH, 1);
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.MILLISECOND, 0);
 
-        c.set(Calendar.HOUR_OF_DAY, 0);
-        c.set(Calendar.MINUTE, 0);
-        c.set(Calendar.SECOND, 0);
-        c.set(Calendar.MILLISECOND, 0);
+        Date beginDate = cal.getTime();
 
-        for (int i = 0; i < 24; i++) {
+        cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));
+        Date endDate = cal.getTime();
+
+        long num = DateUtils.hoursDiff(beginDate, endDate) ;
+
+        cal = Calendar.getInstance();
+        cal.set(Calendar.DAY_OF_MONTH, 1);
+        cal.set(Calendar.HOUR_OF_DAY, 0);
+        cal.set(Calendar.MINUTE, 0);
+        cal.set(Calendar.SECOND, 0);
+        cal.set(Calendar.MILLISECOND, 0);
+        for (int i = 0; i < num; i++) {
 
             DataVo vo = new DataVo();
 
-            vo.setTime(c.getTime().getTime());
+            vo.setTime(cal.getTime().getTime());
 //                vo.setValue1(0.0);// 应发功率
 //                vo.setValue2(0.0);// 实发功率
 //                vo.setValue3(0.0);// 理论功率
@@ -1594,34 +1655,31 @@ private   Map<String, Double> getHbWs(String id) throws Exception {
 //                vo.setValue9(0.0);// 最优功率律
 
             vos.add(vo);
-            c.add(Calendar.HOUR_OF_DAY,1);
+            cal.add(Calendar.HOUR_OF_DAY,1);
         }
-        Calendar cal = Calendar.getInstance();
-
-        cal.set(Calendar.HOUR_OF_DAY, 0);
-        cal.set(Calendar.MINUTE, 0);
-        cal.set(Calendar.SECOND, 0);
-        cal.set(Calendar.MILLISECOND, 0);
-
-        Date beginDate = cal.getTime();
 
         cal = Calendar.getInstance();
-        Date endDate = cal.getTime();
-
-
+        endDate = cal.getTime();
 
-        long num = DateUtils.hoursDiff(beginDate, endDate) ;
         // long num = 30;
 
         WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
         WindPowerStationTestingPoint2 sjgl = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SJGL);
-        WindPowerStationTestingPoint2 ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
+
+        WindPowerStationTestingPoint2 ssfs =ssfs = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         List<PointData> rfdls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
         List<PointData> sjglls = realApiUtil.getHistoryDatasSnap(sjgl, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
-        List<PointData> ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
+        List<PointData> ssfss =new ArrayList<>();
 
+        if(wpId.equals("PL_GDC"))
+        {
+            ssfss = realApiUtil.getHistoryDatasSnap("PLGGL.NX_GD_PLG_YC_P1_L1_001_QXZ0001", beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
+        }else
+        {
+            ssfss = realApiUtil.getHistoryDatasSnap(ssfs, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 3600L);
+        }
         if (!rfdls.isEmpty() && !sjglls.isEmpty()
                 && rfdls.size() == sjglls.size()
         ) {
@@ -1832,6 +1890,16 @@ private   Map<String, Double> getHbWs(String id) throws Exception {
         return resultmap;
     }
 
+    public  Map<String,Object> getWeatherRealDay5Info(String wpId) throws Exception {
+        Map<String,Object> map=new HashMap<>();
+        if (StringUtils.notEmp(wpId)) {
+
+
+            map= weatherDay5Service.getWeatherRealDay5Info(wpId);
+
+        }
+        return map;
+    }
 
 }
 

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

@@ -126,11 +126,11 @@ public class RealPowerPushService {
 
                 DataVo vo = new DataVo();
 
-//                vo.setTime(c.getTime().getTime());
+               vo.setTime(c.getTime().getTime());
 //                vo.setValue1(0.0);// 应发功率
 //                vo.setValue2(0.0);// 实发功率
 //                vo.setValue3(0.0);// 理论功率
-//                vo.setValue4(0.0);// 预测功率
+//                vo.setValue4(0.0);// 4预测功率
 //                vo.setValue5(0.0);// 保证功率
 //                vo.setValue6(0.0);// 平均风速
 //                vo.setValue7(0.0);// 24小时预测功率
@@ -138,7 +138,7 @@ public class RealPowerPushService {
 //                vo.setValue9(0.0);// 最优功率律
 
                 vos.add(vo);
-//                c.add(Calendar.HOUR_OF_DAY,1);
+                c.add(Calendar.HOUR_OF_DAY,1);
             }
 
             if (id.equals(QS) || id.equals(FD) || id.equals(GF)) {

+ 21 - 17
src/main/java/com/gyee/frame/service/websocket/SandtableService.java

@@ -445,15 +445,16 @@ public class SandtableService {
     }
 
 
-    int qs_ysl = 0;
-    int qs_lsl = 0;
-    int qs_csl = 0;
-    int qs_gzsl = 0;
-    int fjsl = 0;
+
     public Map<String, Object> judgeWpHealth() throws Exception {
 
         Map<String, Object> map = new HashMap<>();
 
+        int qs_ysl = 0;
+        int qs_lsl = 0;
+        int qs_csl = 0;
+        int qs_gzsl = 0;
+        int fjsl = 0;
 
         for (Windpowerstation wp : InitialRunner.wpallls) {
 
@@ -545,19 +546,22 @@ public class SandtableService {
                 map.put(wp.getId(), wpmap);
             }
 
-            if(fjsl!=0)
-            {
-                double gzslz = new BigDecimal(2 * qs_gzsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
-                double cslz = new BigDecimal(qs_csl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
-                double lslz = new BigDecimal(0.5 * qs_lsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
-
-                wpmap.put("qs_csl", qs_csl);
-                wpmap.put("qs_lsl", qs_lsl);
-                wpmap.put("qs_ysl", qs_ysl);
-                wpmap.put("qs_gzsl", qs_gzsl);
-                map.put("qs_jkd", MathUtil.twoBit(100 - gzslz - cslz - lslz));
-            }
 
+
+        }
+
+        if(fjsl!=0)
+        {
+            double gzslz = new BigDecimal(2 * qs_gzsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+            double cslz = new BigDecimal(qs_csl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+            double lslz = new BigDecimal(0.5 * qs_lsl).divide(new BigDecimal(fjsl), 2, RoundingMode.HALF_EVEN).doubleValue();
+            Map<String, Object> allmap = new HashMap<>();
+            allmap.put("csl", qs_csl);
+            allmap.put("lsl", qs_lsl);
+            allmap.put("ysl", qs_ysl);
+            allmap.put("gzsl", qs_gzsl);
+            allmap.put("jkd", MathUtil.twoBit(100 - gzslz - cslz - lslz));
+            map.put("all", allmap);
         }
         return map;
     }

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

@@ -45,6 +45,7 @@ public class WpInfoPushService {
     private WpMttrAndMtbMonthService wpMttrAndMtbMonthService;
     @Resource
     private WeatherService weatherService;
+
     IRealTimeDataBaseUtil realApiUtil = RealTimeDataBaseFactory.createRealTimeDataBase();
     private final double YCFDLXS = 1.08;
     String[] ycPoints1 = Constant.TPOINT_WP_FGLYC.split(",");
@@ -231,6 +232,40 @@ public class WpInfoPushService {
 
             }
 
+
+            List<WindPowerStationTestingPoint2> wpoints= windPowerstationTestingPointService.getJsztList(id);
+
+            if(!wpoints.isEmpty())
+            {
+                for(WindPowerStationTestingPoint2 wpoint:wpoints)
+                {
+                    if(StringUtils.notEmp(wpoint) && StringUtils.notEmp(wpoint.getName()))
+                    {
+                        String name=wpoint.getName();
+                        if(name.indexOf("风机")!=-1)
+                        {
+                            PointData pointData=realApiUtil.getRealData(wpoint.getCode());
+                            jczbmap.put("zxzt_fjzt",pointData.getPointValueInDouble());
+                        }else if(name.indexOf("升压站")!=-1)
+                        {
+                            PointData pointData=realApiUtil.getRealData(wpoint.getCode());
+                            jczbmap.put("zxzt_syzzt",pointData.getPointValueInDouble());
+                        }else if(name.indexOf("电计量")!=-1)
+                        {
+                            PointData pointData=realApiUtil.getRealData(wpoint.getCode());
+                            jczbmap.put("zxzt_djlzt",pointData.getPointValueInDouble());
+                        }else if(name.indexOf("agc")!=-1)
+                        {
+                            PointData pointData=realApiUtil.getRealData(wpoint.getCode());
+                            jczbmap.put("zxzt_acgzt",pointData.getPointValueInDouble());
+                        }else if(name.indexOf("测风塔")!=-1)
+                        {
+                            PointData pointData=realApiUtil.getRealData(wpoint.getCode());
+                            jczbmap.put("zxzt_cftzt",pointData.getPointValueInDouble());
+                        }
+                    }
+                }
+            }
             Calendar c = Calendar.getInstance();
 
             int tempyear = c.get(Calendar.YEAR);
@@ -1802,10 +1837,11 @@ public class WpInfoPushService {
 
         WindPowerStationTestingPoint2 rfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_RFDL);
 
-
+        WindPowerStationTestingPoint2 fsai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
         List<PointData> rfdlls = realApiUtil.getHistoryDatasSnap(rfdlai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
+        List<PointData> fsls = realApiUtil.getHistoryDatasSnap(fsai, beginDate.getTime() / 1000, endDate.getTime() / 1000, num, 86400L);
 
         if (!rfdlls.isEmpty()) {
             Calendar cal = Calendar.getInstance();
@@ -1824,8 +1860,11 @@ public class WpInfoPushService {
                 Double rfdl = MathUtil.twoBit(rfdlls.get(i).getPointValueInDouble());
                 //日预测发电量
                 Double ycrfdl = MathUtil.twoBit(rfdl * YCFDLXS);
+                //风速
+                Double fs = MathUtil.twoBit(fsls.get(i).getPointValueInDouble());
                 vo.setValue1(rfdl);
                 vo.setValue2(ycrfdl);
+                vo.setValue3(fs);
                 vos.add(vo);
             }
         }
@@ -1847,11 +1886,11 @@ public class WpInfoPushService {
             wpId = "0";
         }
 
-
+        WindPowerStationTestingPoint2 fsai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_SSFS);
         WindPowerStationTestingPoint2 yfdlai = windPowerstationTestingPointService.getWindPowerStationTestingPoint2(wpId, Constant.TPOINT_WP_YFDL);
-        String[] fdlpoints = new String[1];
+        String[] fdlpoints = new String[2];
         fdlpoints[0] = yfdlai.getCode();
-
+        fdlpoints[1] = fsai.getCode();
         Calendar c = Calendar.getInstance();
         int month = c.get(Calendar.MONTH) + 1;
         c.set(Calendar.MONTH, 1);
@@ -1877,10 +1916,11 @@ public class WpInfoPushService {
             Double rfdl = MathUtil.twoBit(currentfdlarr[0].DValue);
             //日预测发电量
             Double ycrfdl = MathUtil.twoBit(rfdl * YCFDLXS);
-
+            //风速
+            Double fs = MathUtil.twoBit(currentfdlarr[1].DValue);
             vo.setValue1(rfdl);// 日发电量
             vo.setValue2(ycrfdl);// 日预测发电量
-
+            vo.setValue3(fs);
             vos.add(vo);
 
             c.add(Calendar.MONTH, 1);
@@ -1889,6 +1929,9 @@ public class WpInfoPushService {
 
         return vos;
     }
+
+
+
 }
 
 

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

@@ -109,7 +109,7 @@
 <!--        <table tableName='StopAnalysis' domainObjectName='StopAnalysis'/>-->
 <!--        <table tableName='StopAnalysismain' domainObjectName='StopAnalysismain'/>-->
 <!--        <table tableName='StopAnalysismainVo' domainObjectName='StopAnalysismainVo'/>-->
-        <table tableName='Alertrulefailure' domainObjectName='Alertrulefailure'/>
+        <table tableName='Forecastwindspeed' domainObjectName='Forecastwindspeed'/>
 
 
 

+ 366 - 0
src/main/resources/mybatis/auto/ForecastwindspeedMapper.xml

@@ -0,0 +1,366 @@
+<?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.ForecastwindspeedMapper">
+  <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.Forecastwindspeed">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    <id column="ID" jdbcType="DECIMAL" property="id" />
+    <result column="WPID" jdbcType="VARCHAR" property="wpid" />
+    <result column="WPNAME" jdbcType="VARCHAR" property="wpname" />
+    <result column="RECODEDATE" jdbcType="TIMESTAMP" property="recodedate" />
+    <result column="DAYSPEED" jdbcType="DECIMAL" property="dayspeed" />
+    <result column="DAYPOWER" jdbcType="DECIMAL" property="daypower" />
+    <result column="NIGHTSPEED" jdbcType="DECIMAL" property="nightspeed" />
+    <result column="NIGHTPOWER" jdbcType="DECIMAL" property="nightpower" />
+    <result column="PJID" jdbcType="VARCHAR" property="pjid" />
+    <result column="PJNAME" jdbcType="VARCHAR" property="pjname" />
+    <result column="CREATEDATE" jdbcType="TIMESTAMP" property="createdate" />
+  </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, WPID, WPNAME, RECODEDATE, DAYSPEED, DAYPOWER, NIGHTSPEED, NIGHTPOWER, PJID, PJNAME, 
+    CREATEDATE
+  </sql>
+  <select id="selectByExample" parameterType="com.gyee.frame.model.auto.ForecastwindspeedExample" 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 FORECASTWINDSPEED
+    <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.Short" resultMap="BaseResultMap">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select 
+    <include refid="Base_Column_List" />
+    from FORECASTWINDSPEED
+    where ID = #{id,jdbcType=DECIMAL}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Short">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from FORECASTWINDSPEED
+    where ID = #{id,jdbcType=DECIMAL}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.ForecastwindspeedExample">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    delete from FORECASTWINDSPEED
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.gyee.frame.model.auto.Forecastwindspeed">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into FORECASTWINDSPEED (ID, WPID, WPNAME, 
+      RECODEDATE, DAYSPEED, DAYPOWER, 
+      NIGHTSPEED, NIGHTPOWER, PJID, 
+      PJNAME, CREATEDATE)
+    values (#{id,jdbcType=DECIMAL}, #{wpid,jdbcType=VARCHAR}, #{wpname,jdbcType=VARCHAR}, 
+      #{recodedate,jdbcType=TIMESTAMP}, #{dayspeed,jdbcType=DECIMAL}, #{daypower,jdbcType=DECIMAL}, 
+      #{nightspeed,jdbcType=DECIMAL}, #{nightpower,jdbcType=DECIMAL}, #{pjid,jdbcType=VARCHAR}, 
+      #{pjname,jdbcType=VARCHAR}, #{createdate,jdbcType=TIMESTAMP})
+  </insert>
+  <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.Forecastwindspeed">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    insert into FORECASTWINDSPEED
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        ID,
+      </if>
+      <if test="wpid != null">
+        WPID,
+      </if>
+      <if test="wpname != null">
+        WPNAME,
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE,
+      </if>
+      <if test="dayspeed != null">
+        DAYSPEED,
+      </if>
+      <if test="daypower != null">
+        DAYPOWER,
+      </if>
+      <if test="nightspeed != null">
+        NIGHTSPEED,
+      </if>
+      <if test="nightpower != null">
+        NIGHTPOWER,
+      </if>
+      <if test="pjid != null">
+        PJID,
+      </if>
+      <if test="pjname != null">
+        PJNAME,
+      </if>
+      <if test="createdate != null">
+        CREATEDATE,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=DECIMAL},
+      </if>
+      <if test="wpid != null">
+        #{wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="wpname != null">
+        #{wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="recodedate != null">
+        #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="dayspeed != null">
+        #{dayspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="daypower != null">
+        #{daypower,jdbcType=DECIMAL},
+      </if>
+      <if test="nightspeed != null">
+        #{nightspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="nightpower != null">
+        #{nightpower,jdbcType=DECIMAL},
+      </if>
+      <if test="pjid != null">
+        #{pjid,jdbcType=VARCHAR},
+      </if>
+      <if test="pjname != null">
+        #{pjname,jdbcType=VARCHAR},
+      </if>
+      <if test="createdate != null">
+        #{createdate,jdbcType=TIMESTAMP},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.gyee.frame.model.auto.ForecastwindspeedExample" resultType="java.lang.Long">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    select count(*) from FORECASTWINDSPEED
+    <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 FORECASTWINDSPEED
+    <set>
+      <if test="record.id != null">
+        ID = #{record.id,jdbcType=DECIMAL},
+      </if>
+      <if test="record.wpid != null">
+        WPID = #{record.wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.wpname != null">
+        WPNAME = #{record.wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.recodedate != null">
+        RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="record.dayspeed != null">
+        DAYSPEED = #{record.dayspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="record.daypower != null">
+        DAYPOWER = #{record.daypower,jdbcType=DECIMAL},
+      </if>
+      <if test="record.nightspeed != null">
+        NIGHTSPEED = #{record.nightspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="record.nightpower != null">
+        NIGHTPOWER = #{record.nightpower,jdbcType=DECIMAL},
+      </if>
+      <if test="record.pjid != null">
+        PJID = #{record.pjid,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pjname != null">
+        PJNAME = #{record.pjname,jdbcType=VARCHAR},
+      </if>
+      <if test="record.createdate != null">
+        CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP},
+      </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 FORECASTWINDSPEED
+    set ID = #{record.id,jdbcType=DECIMAL},
+      WPID = #{record.wpid,jdbcType=VARCHAR},
+      WPNAME = #{record.wpname,jdbcType=VARCHAR},
+      RECODEDATE = #{record.recodedate,jdbcType=TIMESTAMP},
+      DAYSPEED = #{record.dayspeed,jdbcType=DECIMAL},
+      DAYPOWER = #{record.daypower,jdbcType=DECIMAL},
+      NIGHTSPEED = #{record.nightspeed,jdbcType=DECIMAL},
+      NIGHTPOWER = #{record.nightpower,jdbcType=DECIMAL},
+      PJID = #{record.pjid,jdbcType=VARCHAR},
+      PJNAME = #{record.pjname,jdbcType=VARCHAR},
+      CREATEDATE = #{record.createdate,jdbcType=TIMESTAMP}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.Forecastwindspeed">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update FORECASTWINDSPEED
+    <set>
+      <if test="wpid != null">
+        WPID = #{wpid,jdbcType=VARCHAR},
+      </if>
+      <if test="wpname != null">
+        WPNAME = #{wpname,jdbcType=VARCHAR},
+      </if>
+      <if test="recodedate != null">
+        RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      </if>
+      <if test="dayspeed != null">
+        DAYSPEED = #{dayspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="daypower != null">
+        DAYPOWER = #{daypower,jdbcType=DECIMAL},
+      </if>
+      <if test="nightspeed != null">
+        NIGHTSPEED = #{nightspeed,jdbcType=DECIMAL},
+      </if>
+      <if test="nightpower != null">
+        NIGHTPOWER = #{nightpower,jdbcType=DECIMAL},
+      </if>
+      <if test="pjid != null">
+        PJID = #{pjid,jdbcType=VARCHAR},
+      </if>
+      <if test="pjname != null">
+        PJNAME = #{pjname,jdbcType=VARCHAR},
+      </if>
+      <if test="createdate != null">
+        CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
+      </if>
+    </set>
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.Forecastwindspeed">
+    <!--
+      WARNING - @mbg.generated
+      This element is automatically generated by MyBatis Generator, do not modify.
+    -->
+    update FORECASTWINDSPEED
+    set WPID = #{wpid,jdbcType=VARCHAR},
+      WPNAME = #{wpname,jdbcType=VARCHAR},
+      RECODEDATE = #{recodedate,jdbcType=TIMESTAMP},
+      DAYSPEED = #{dayspeed,jdbcType=DECIMAL},
+      DAYPOWER = #{daypower,jdbcType=DECIMAL},
+      NIGHTSPEED = #{nightspeed,jdbcType=DECIMAL},
+      NIGHTPOWER = #{nightpower,jdbcType=DECIMAL},
+      PJID = #{pjid,jdbcType=VARCHAR},
+      PJNAME = #{pjname,jdbcType=VARCHAR},
+      CREATEDATE = #{createdate,jdbcType=TIMESTAMP}
+    where ID = #{id,jdbcType=DECIMAL}
+  </update>
+</mapper>

+ 1 - 1
src/main/resources/mybatis/auto/RecommenmainMsSqlMapper.xml

@@ -487,7 +487,7 @@
 
   <select id="totalList"  resultType="com.gyee.frame.model.custom.SimpleVo">
     SELECT count(*) value
-    FROM  RECOMMENMAIN a left join WOBUGEQ b on a.wobugid=b.bugnum left join  WINDFARM c on a.wpnum=c.wfnum  where a.OPERATIONDATE IS NOT null
+    FROM  RECOMMENMAIN a left join WOBUGEQ b on a.wobugid=b.bugnum left join  WINDFARM c on a.wpnum=c.wfnum  where  a.ISMAIN='是' AND b.STATUS='流程关闭'
     <if test="wpId!=null &amp;&amp; wpId.trim()!=''">
       and c.WFSHORTNAME=#{wpId}
     </if>

+ 1 - 1
src/main/resources/mybatis/auto/WobugeqMapper.xml

@@ -1232,7 +1232,7 @@
 
   <select id="totalNum"  resultType="com.gyee.frame.model.custom.SimpleVo">
 SELECT  count(*) value FROM WOBUGEQ where
-  FINDTIME >= #{beginDate} and FINDTIME &lt; #{endDate}
+  FINDTIME >= #{beginDate} and FINDTIME &lt; #{endDate} and STATUS='流程关闭'
 
   </select>
 </mapper>

+ 83 - 0
src/test/java/test/ForecastwindspeedServiceTest.java

@@ -0,0 +1,83 @@
+package test;
+
+import com.gyee.SpringbootStart;
+import com.gyee.frame.common.spring.SpringUtils;
+import com.gyee.frame.model.custom.DataVo;
+import com.gyee.frame.service.ForecastwindspeedService;
+import org.springframework.boot.SpringApplication;
+
+import java.util.List;
+
+public class ForecastwindspeedServiceTest {
+
+
+    public static void main(String[] args) throws Exception {
+
+        SpringApplication.run(SpringbootStart.class, args);
+
+          String QS = "0";
+          String FD = "-1";
+          String GF = "-2";
+
+        String wtId="MG01_03";
+        String wpId="MHS_FDC";
+        String year="2021";
+        String month="1";
+
+        ForecastwindspeedService forecastwindspeedService= SpringUtils.getBean("forecastwindspeedService");
+
+//        Map<String, Object> map =genreSetPushController.findBasicDataInfo("0");
+//        Map<String, Object> map =genreSetPushController.findDayInfo("0","rfdl");
+
+//        Map<String, Object> map2 =genreSetPushController.findBasicDataInfo("MHS_FDC");
+//        Map<String, Object> map = new HashMap<>();
+//
+//
+//        map.put(QS, genreSetPushService.findBasicDataInfo(QS));
+//        map.put(FD, genreSetPushService.findBasicDataInfo(FD));
+//        map.put(GF, genreSetPushService.findBasicDataInfo(GF));
+
+
+        List<DataVo> map1 = forecastwindspeedService.getForecastwindspeedInfo("0");
+        List<DataVo> map2 = forecastwindspeedService.getForecastwindspeedInfo("MHS_FDC");
+        List<DataVo> map3 = forecastwindspeedService.getForecastwindspeedInfo("MHS01_GC");
+        List<DataVo> map4 = forecastwindspeedService.getForecastwindspeedInfo("MHS03_XL");
+         System.out.println(map1.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());
+//        }
+//
+//
+//
+    }
+}

+ 3 - 2
src/test/java/test/GenreSetPushTest.java

@@ -3,10 +3,11 @@ package test;
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
 import com.gyee.frame.controller.monitor.GenreSetPushController;
+import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.service.websocket.GenreSetPushService;
 import org.springframework.boot.SpringApplication;
 
-import java.util.Map;
+import java.util.List;
 
 public class GenreSetPushTest {
 
@@ -39,7 +40,7 @@ public class GenreSetPushTest {
 //        map.put(GF, genreSetPushService.findBasicDataInfo(GF));
 
 
-        Map<String, Object> map = genreSetPushService.genreSetMap();
+        List<DataVo> map = genreSetPushService.findPowerWpChart("PL_GDC");
 
          System.out.println(map.size());
 

+ 2 - 2
src/test/java/test/RealPowerPushTest.java

@@ -29,8 +29,8 @@ public class RealPowerPushTest {
 
 
 //        Map<String, Object> map = realPowerPushService.genreSetMap();
-        Map<String, Object> map = realPowerPushService.genreSetWpMap("0");
-        Map<String, Object> map1 = realPowerPushService.genreSetWpMap("MHS_FDC");
+        Map<String, Object> map = realPowerPushService.genreSetWpMap("PL_GDC");
+//        Map<String, Object> map1 = realPowerPushService.genreSetWpMap("MHS_FDC");
 
          System.out.println(map.size());
 

+ 30 - 31
src/test/java/test/SingleAnalysisTest.java

@@ -10,7 +10,6 @@ import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.List;
-import java.util.Map;
 
 public class SingleAnalysisTest {
 
@@ -36,13 +35,13 @@ public class SingleAnalysisTest {
 
 
 
-//        AjaxResult ar = singleAnalysisController.singleanalysisMain(tablepar,wpId,year,month);
-//
-//        List<SingleAnalysisVo> vos=( List<SingleAnalysisVo>)ar.get("data");
-//        for(SingleAnalysisVo wtd:vos)
-//        {
-//            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
-//        }
+        AjaxResult ar = singleAnalysisController.singleanalysisMain(tablepar,wpId,year,month);
+
+        List<SingleAnalysisVo> vos=( List<SingleAnalysisVo>)ar.get("data");
+        for(SingleAnalysisVo wtd:vos)
+        {
+            System.out.println(wtd.getXfqr()+"----------------"+wtd.getXfqrhgl());
+        }
 
 
 //        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);
@@ -52,29 +51,29 @@ public class SingleAnalysisTest {
 //        {
 //            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());
-        }
+//
+//        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());
+//        }
     }
 
 

+ 3 - 4
src/test/java/test/WpInfoPushTest.java

@@ -2,13 +2,12 @@ package test;
 
 import com.gyee.SpringbootStart;
 import com.gyee.frame.common.spring.SpringUtils;
-import com.gyee.frame.model.custom.DataVo;
 import com.gyee.frame.service.websocket.WpInfoPushService;
 import lombok.SneakyThrows;
 import org.springframework.boot.SpringApplication;
 
 import java.util.Date;
-import java.util.List;
+import java.util.Map;
 
 public class WpInfoPushTest {
 
@@ -41,11 +40,11 @@ public class WpInfoPushTest {
 //        System.out.println((end.getTime()-begin.getTime())/1000);
 //         System.out.println(vos.size());
 
-        List<DataVo> vos=wpInfoPushService.findLossWpBar("SBQ_FDC");
+        Map<String, Object> map =wpInfoPushService.findWpInfo();
 
         Date end=new Date();
         System.out.println((end.getTime()-begin.getTime())/1000);
-        System.out.println(vos.size());
+        System.out.println(map.size());
 
 
 //        AjaxResult ar = singleAnalysisController.singleanalysisSub(wtId,year,month);