Browse Source

切入切出接口,月度单机分析接口

shilin 2 years ago
parent
commit
ca46345a99

+ 330 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/controller/goodness/WindturbineGoodnessDetailController.java

@@ -0,0 +1,330 @@
+//package com.gyee.runeconomy.controller.goodness;
+//
+//import com.gyee.common.util.DateUtils;
+//import com.gyee.frame.common.conf.AjaxStatus;
+//import com.gyee.frame.common.domain.AjaxResult;
+//import com.gyee.frame.model.custom.ValueVo;
+//import com.gyee.runeconomy.dto.DataVo;
+//import com.gyee.runeconomy.dto.R;
+//import com.gyee.runeconomy.dto.ResultMsg;
+//import com.gyee.runeconomy.dto.SawVo;
+//import com.gyee.runeconomy.init.CacheContext;
+//import com.gyee.runeconomy.model.auto.*;
+//import com.gyee.runeconomy.service.auto.IProEcoWindspecificInfoDayService;
+//import com.gyee.runeconomy.service.auto.IProEconWindturbineGoodnessService;
+//import com.gyee.runeconomy.service.auto.IProEconWtAlysisDayService;
+//import com.gyee.runeconomy.service.auto.IProEconWtCurveFittingMonthService;
+//import com.gyee.runeconomy.util.StringUtils;
+//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.PostMapping;
+//import org.springframework.web.bind.annotation.RequestMapping;
+//import org.springframework.web.bind.annotation.ResponseBody;
+//
+//import javax.annotation.Resource;
+//import java.util.*;
+//import java.util.stream.Collectors;
+//
+///**
+// * 风机明细信息页面
+// */
+//@Controller
+//@RequestMapping("/goodness")
+//@Api(value = "单机信息总览详细信息",tags =  "单机信息总览详细信息")
+//public class WindturbineGoodnessDetailController {
+//    @Resource
+//    private IProEconWindturbineGoodnessService proEconWindturbineGoodnessService;
+//    @Resource
+//    private IProEcoWindspecificInfoDayService proEcoWindspecificInfoDayService;
+//    @Resource
+//    private IProEconWtAlysisDayService proEconWtAlysisDayService;
+//
+//    @Resource
+//    private IProEconWtCurveFittingMonthService proEconWtCurveFittingMonthService;
+//
+//
+//    private String jfpl;
+//
+//
+//    /**
+//     * 获得明细页面显示信息
+//     *
+//     * @param wtId
+//     * @param recorddate
+//     * @return
+//     */
+//    @GetMapping("/wadAjax")
+//    @ResponseBody
+//    @ApiOperation(value = "查询明细页面显示信息", notes = "查询明细页面显示信息")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+//            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+//
+//    public R wadAjax(String wtId, String recorddate) {
+//
+//        ProEconWtAlysisDay wtday = new ProEconWtAlysisDay();
+//        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate)) {
+//
+//            Date date=DateUtils.parseDate(recorddate);
+//            List<ProEconWtAlysisDay>  wtadls=proEconWtAlysisDayService.list().stream().filter(i->i.getWindturbineId().equals(wtId )
+//           && i.getRecordDate().compareTo(date)==0
+//            ).collect(Collectors.toList());
+//
+//            if(!wtadls.isEmpty())
+//            {
+//                wtday=wtadls.get(0);
+//            }
+//        }
+//        if (null != wtday) {
+//            return R.data(ResultMsg.ok(wtday));
+//        } else {
+//            return R.data(ResultMsg.error());
+//        }
+//
+//    }
+//
+//
+//    /*
+//     * 单台风机当月报警排行
+//     */
+//    @PostMapping("/bjphlist")
+//    @ResponseBody
+//    @ApiOperation(value = "单台风机当月报警排行", notes = "单台风机当月报警排行")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "pageNum", value = "页码", required = true, dataType = "Integer", paramType = "query"),
+//            @ApiImplicitParam(name = "pageSize", value = "每页数量", required = true, dataType = "Integer", paramType = "query"),
+//            @ApiImplicitParam(name = "tablepar", value = "分页排序对象", required = true, dataType = "string", paramType = "query"),
+//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+//            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+//
+//    public R bjphlist( Integer pageNum, Integer pageSize, String wtId, String recorddate) {
+//        List<SawVo> resultList =new ArrayList<>();
+//        if(StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate))
+//        {
+//
+//            Calendar cal = Calendar.getInstance();
+//            cal.set(Calendar.HOUR_OF_DAY, 0);
+//            cal.set(Calendar.MINUTE, 0);
+//            cal.set(Calendar.SECOND, 0);
+//
+//            cal.setTime(DateUtils.parseDate(recorddate));
+//            Date beginDate = cal.getTime();
+//            cal.add(Calendar.DAY_OF_MONTH, 1);
+//            Date endDate = cal.getTime();
+////            resultList = alarmsnapService.getWarningRecordsTop(tablepar, wtId, beginDate, endDate);
+//
+//        }
+//        if (null != resultList) {
+//            return R.data(ResultMsg.ok(resultList));
+//        } else {
+//            return R.data(ResultMsg.error());
+//        }
+//    }
+//
+//    /*
+//     * 获取明细页面功率曲线
+//     */
+//    @GetMapping("/glchat")
+//    @ResponseBody
+//    @ApiOperation(value = "获取明细页面功率曲线", notes = "获取明细页面功率曲线")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+//            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+//
+//    public R glchat(String wtId, String recorddate) {
+//
+//        List<DataVo> datavos = new ArrayList<>();
+//        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate)) {
+//            Date date = DateUtils.parseDate(recorddate);
+//            Map<String, Map<Double, ProBasicModelPowerRd>> modelPowermap = CacheContext.theoreticalPowerMap;
+//            Map<String, ProBasicEquipment> wtmap = CacheContext.wtmap;
+//            Map<Double, ProBasicModelPowerRd> map = null;
+//
+//            Calendar cal=Calendar.getInstance();
+//            cal.setTime(date);
+//
+//            int year=cal.get(Calendar.YEAR);
+//            int month=cal.get(Calendar.MONTH)+1;
+//            List<ProEconWtCurveFittingMonth> wcls = proEconWtCurveFittingMonthService.list().stream().filter(i->
+//                    i.getWindturbineId().equals(wtId)
+//                    && i.getYear().equals(String.valueOf(year)) && i.getMonth().equals(String.valueOf(month))
+//            ).collect(Collectors.toList());
+//            if (!wcls.isEmpty()) {
+//                if (wtmap.containsKey(wtId)) {
+//                    ProBasicEquipment wt = wtmap.get(wtId);
+//                    if (modelPowermap.containsKey(wt.getModelId())) {
+//                        map = modelPowermap.get(wt.getModelId());
+//                    }
+//                }
+//                double temp = 0.0;
+//                for (ProEconWtCurveFittingMonth wc : wcls) {
+//                    DataVo vo = new DataVo();
+//
+//                    int c = (int) wc.getSpeed().intValue();
+//
+//                    if (c == wc.getSpeed()) {
+//                        vo.setValue1(wc.getSpeed());// 风速
+//                        vo.setValue2(wc.getActualPower());// 实际拟合功率
+//                        vo.setValue3(wc.getOptimalPower());// 最优拟合功率
+//
+//                        if (null != map && StringUtils.notEmp(wc.getSpeed()) && map.containsKey(String.valueOf(wc.getSpeed()))) {
+//                            ProBasicModelPowerRd mp = map.get(String.valueOf(wc.getSpeed()));
+//                            vo.setValue4(mp.getEnsurePower());// 保证功率曲线
+//                            temp = mp.getEnsurePower();
+//                        } else {
+//                            vo.setValue4(temp);// 保证功率曲线
+//                        }
+//
+//                        datavos.add(vo);
+//                    }
+//
+//                }
+//            }
+//        }
+//        if (null != datavos) {
+//            return R.data(ResultMsg.ok(datavos));
+//        } else {
+//            return R.data(ResultMsg.error());
+//        }
+//    }
+//
+//    /*
+//     * 获取风机风资源
+//     */
+//    @GetMapping("/fjfzy")
+//    @ResponseBody
+//    @ApiOperation(value = "获取风机风资源", notes = "获取风机风资源")
+//    @ApiImplicitParams({
+//            @ApiImplicitParam(name = "wtId", value = "风机编号", required = true, dataType = "string", paramType = "query"),
+//            @ApiImplicitParam(name = "recorddate", value = "日期", required = true, dataType = "string", paramType = "query")})
+//
+//    public R fjfzy(String wtId, String recorddate) {
+//        Map<String, Object> map = new HashMap<String, Object>();
+//        List<ValueVo> vos = new ArrayList<ValueVo>();
+//        if (StringUtils.notEmp(wtId) && StringUtils.notEmp(recorddate)) {
+//
+//            Date date = DateUtils.parseDate(recorddate);
+//            List<Windturbinethewindinfo> wtdls = windturbinethewindinfoService.fzy(wtId, date);
+//
+//
+//            if (!wtdls.isEmpty()) {
+//
+//                Windturbinethewindinfo winfo = wtdls.get(0);
+//                int c = (int) winfo.getCb().intValue();
+//
+//                jfpl = "静风频率为" + c;
+//                for (int i = 0; i < 16; i++) {
+//                    ValueVo vo = new ValueVo();
+//
+//                    switch (i) {
+//                        case 0:
+//                            // vo.setName("N("+winfo.getN4()+"/"+winfo.getN()+")");
+//                            vo.setName("N");
+//                            vo.setData1(winfo.getN2());
+//                            break;
+//                        case 1:
+//                            // vo.setName("NNE("+winfo.getNne4()+"/"+winfo.getNne()+")");
+//                            vo.setName("NNE");
+//                            vo.setData1(winfo.getNne2());
+//                            break;
+//                        case 2:
+//                            // vo.setName("NE("+winfo.getNe4()+"/"+winfo.getNe()+")");
+//                            vo.setName("NE");
+//                            vo.setData1(winfo.getNe2());
+//                            break;
+//                        case 3:
+//                            // vo.setName("ENE("+winfo.getEne4()+"/"+winfo.getEne()+")");
+//                            vo.setName("ENE");
+//                            vo.setData1(winfo.getEne2());
+//
+//                            break;
+//                        case 4:
+//                            // vo.setName("E("+winfo.getE4()+"/"+winfo.getE()+")");
+//                            vo.setName("E");
+//                            vo.setData1(winfo.getE2());
+//                            break;
+//                        case 5:
+//                            // vo.setName("ESE("+winfo.getEse()+"/"+winfo.getEse()+")");
+//                            vo.setName("ESE");
+//                            vo.setData1(winfo.getEse2());
+//                            break;
+//                        case 6:
+//                            // vo.setName("SE("+winfo.getSe4()+"/"+winfo.getSe()+")");
+//                            vo.setName("SE");
+//                            vo.setData1(winfo.getSe2());
+//                            break;
+//                        case 7:
+//                            // vo.setName("SSE("+winfo.getSse4()+"/"+winfo.getSse()+")");
+//                            vo.setName("SSE");
+//                            vo.setData1(winfo.getSse2());
+//                            break;
+//                        case 8:
+//                            // vo.setName("S("+winfo.getS4()+"/"+winfo.getS()+")");
+//                            vo.setName("S");
+//                            vo.setData1(winfo.getS2());
+//                            break;
+//                        case 9:
+//                            // vo.setName("SSW("+winfo.getSsw4()+"/"+winfo.getSsw()+")");
+//                            vo.setName("SSW");
+//                            vo.setData1(winfo.getSsw2());
+//                            break;
+//                        case 10:
+//                            // vo.setName("SW("+winfo.getSw4()+"/"+winfo.getSw()+")");
+//                            vo.setName("SW");
+//                            vo.setData1(winfo.getSw2());
+//                            break;
+//                        case 11:
+//                            // vo.setName("WSW("+winfo.getWsw4()+"/"+winfo.getWsw()+")");
+//                            vo.setName("WSW");
+//                            vo.setData1(winfo.getWsw2());
+//
+//                            break;
+//                        case 12:
+//                            // vo.setName("W("+winfo.getW4()+"/"+winfo.getW()+")");
+//                            vo.setName("W");
+//                            vo.setData1(winfo.getW2());
+//                            break;
+//                        case 13:
+//                            // vo.setName("WNW("+winfo.getWnw4()+"/"+winfo.getWnw()+")");
+//                            vo.setName("WNW");
+//                            vo.setData1(winfo.getWnw2());
+//                            break;
+//                        case 14:
+//                            // vo.setName("NW("+winfo.getNw4()+"/"+winfo.getNw()+")");
+//                            vo.setName("NW");
+//                            vo.setData1(winfo.getNw2());
+//                            break;
+//                        case 15:
+//                            // vo.setName("NNW("+winfo.getNnw4()+"/"+winfo.getNnw()+")");
+//                            vo.setName("NNW");
+//                            vo.setData1(winfo.getNnw2());
+//                            break;
+//
+//                        default:
+//                            break;
+//                    }
+//
+//                    vos.add(vo);
+//                }
+//
+//
+//                map.put("jfpl", jfpl);
+//                map.put("data", vos);
+//            }
+//
+//
+//        }
+//        if (map != null) {
+//            return AjaxResult.successData(AjaxStatus.success.code, map);
+//        } else {
+//            return AjaxResult.successData(AjaxStatus.success.code, map);
+//        }
+//    }
+//
+//
+//
+//}

+ 364 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/DataVo.java

@@ -0,0 +1,364 @@
+
+package com.gyee.runeconomy.dto;
+
+/**
+ * 
+ * 
+ * 项目名称:nxfd 类名称:DataVo 类描述: 创建人:石林 创建时间:2014-3-4 下午2:34:22 修改人:shilinno1
+ * 修改时间:2014-3-4 下午2:34:22 修改备注:
+ * 
+ * @version
+ * 
+ */
+
+public class DataVo {
+
+
+    private Long time;
+    private String timestr;
+    private Double value1;
+
+    private Double value2;
+
+    private Double value3;
+
+    private Double value4;
+
+    private Double value5;
+
+    private Double value6;
+
+    private Double value7;
+
+    private Double value8;
+
+    private Double value9;
+
+    private Double value10;
+
+    private Double value11;
+
+    private Double value12;
+
+    private Double value13;
+
+    private Double speed;
+
+    private String name;
+
+    private String url;
+
+    private String aName;
+
+    private String desc;
+
+    private String datefomat;
+
+    private Long minRange;
+    private Long pointInterval;
+    private Integer year;
+    private Integer month;
+    private Integer day;
+    private String id;
+    private Integer hours;
+    private Integer minutes;
+    private Integer seconds;
+
+    private Long beginDate;
+    private Long endDate;
+    private Long beginDateDay;
+    private Long endDateDay;
+
+    private String value;
+
+    private ValueObjVo valueObjVo;
+
+    public ValueObjVo getValueObjVo() {
+        return valueObjVo;
+    }
+
+    public void setValueObjVo(ValueObjVo valueObjVo) {
+        this.valueObjVo = valueObjVo;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+
+    public Long getMinRange() {
+        return minRange;
+    }
+
+    public void setMinRange(Long minRange) {
+        this.minRange = minRange;
+    }
+
+    public Long getPointInterval() {
+        return pointInterval;
+    }
+
+    public void setPointInterval(Long pointInterval) {
+        this.pointInterval = pointInterval;
+    }
+
+    public Integer getHours() {
+        return hours;
+    }
+
+    public void setHours(Integer hours) {
+        this.hours = hours;
+    }
+
+    public Integer getMinutes() {
+        return minutes;
+    }
+
+    public void setMinutes(Integer minutes) {
+        this.minutes = minutes;
+    }
+
+    public Integer getSeconds() {
+        return seconds;
+    }
+
+    public void setSeconds(Integer seconds) {
+        this.seconds = seconds;
+    }
+
+    public Long getTime() {
+        return time;
+    }
+
+    public void setTime(Long time) {
+        this.time = time;
+    }
+
+    public Double getSpeed() {
+        return speed;
+    }
+
+    public void setSpeed(Double speed) {
+        this.speed = speed;
+    }
+
+    public Double getValue1() {
+        return value1;
+    }
+
+    public void setValue1(Double value1) {
+        this.value1 = value1;
+    }
+
+    public Double getValue2() {
+        return value2;
+    }
+
+    public void setValue2(Double value2) {
+        this.value2 = value2;
+    }
+
+    public Double getValue3() {
+        return value3;
+    }
+
+    public void setValue3(Double value3) {
+        this.value3 = value3;
+    }
+
+    public Double getValue4() {
+        return value4;
+    }
+
+    public void setValue4(Double value4) {
+        this.value4 = value4;
+    }
+
+    public Double getValue5() {
+        return value5;
+    }
+
+    public void setValue5(Double value5) {
+        this.value5 = value5;
+    }
+
+    public Double getValue6() {
+        return value6;
+    }
+
+    public void setValue6(Double value6) {
+        this.value6 = value6;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getUrl() {
+        return url;
+    }
+
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    public String getaName() {
+        return aName;
+    }
+
+    public void setaName(String aName) {
+        this.aName = aName;
+    }
+
+    public String getDesc() {
+        return desc;
+    }
+
+    public void setDesc(String desc) {
+        this.desc = desc;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public Integer getYear() {
+        return year;
+    }
+
+    public void setYear(Integer year) {
+        this.year = year;
+    }
+
+    public Integer getMonth() {
+        return month;
+    }
+
+    public void setMonth(Integer month) {
+        this.month = month;
+    }
+
+    public Integer getDay() {
+        return day;
+    }
+
+    public void setDay(Integer day) {
+        this.day = day;
+    }
+
+    public Long getBeginDate() {
+        return beginDate;
+    }
+
+    public void setBeginDate(Long beginDate) {
+        this.beginDate = beginDate;
+    }
+
+    public Long getEndDate() {
+        return endDate;
+    }
+
+    public void setEndDate(Long endDate) {
+        this.endDate = endDate;
+    }
+
+    public String getDatefomat() {
+        return datefomat;
+    }
+
+    public void setDatefomat(String datefomat) {
+        this.datefomat = datefomat;
+    }
+
+    public Long getBeginDateDay() {
+        return beginDateDay;
+    }
+
+    public void setBeginDateDay(Long beginDateDay) {
+        this.beginDateDay = beginDateDay;
+    }
+
+    public Long getEndDateDay() {
+        return endDateDay;
+    }
+
+    public void setEndDateDay(Long endDateDay) {
+        this.endDateDay = endDateDay;
+    }
+
+    public String getTimestr() {
+        return timestr;
+    }
+
+    public void setTimestr(String timestr) {
+        this.timestr = timestr;
+    }
+
+    public Double getValue7() {
+        return value7;
+    }
+
+    public void setValue7(Double value7) {
+        this.value7 = value7;
+    }
+
+    public Double getValue8() {
+        return value8;
+    }
+
+    public void setValue8(Double value8) {
+        this.value8 = value8;
+    }
+
+    public Double getValue9() {
+        return value9;
+    }
+
+    public void setValue9(Double value9) {
+        this.value9 = value9;
+    }
+
+    public Double getValue10() {
+        return value10;
+    }
+
+    public void setValue10(Double value10) {
+        this.value10 = value10;
+    }
+
+    public Double getValue11() {
+        return value11;
+    }
+
+    public void setValue11(Double value11) {
+        this.value11 = value11;
+    }
+
+    public Double getValue12() {
+        return value12;
+    }
+
+    public void setValue12(Double value12) {
+        this.value12 = value12;
+    }
+
+    public Double getValue13() {
+        return value13;
+    }
+
+    public void setValue13(Double value13) {
+        this.value13 = value13;
+    }
+
+}

+ 49 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/SawVo.java

@@ -0,0 +1,49 @@
+package com.gyee.runeconomy.dto;
+
+public class SawVo implements java.io.Serializable {
+
+	// Fields
+
+	private static final long serialVersionUID = 1L;
+
+	private Integer num;
+	private String name;
+	private Integer frequency;
+	private Integer frequencyday;
+	private Double totalhours;
+	
+	
+	
+	public Integer getFrequencyday() {
+		return frequencyday;
+	}
+	public void setFrequencyday(Integer frequencyday) {
+		this.frequencyday = frequencyday;
+	}
+	public Integer getNum() {
+		return num;
+	}
+	public void setNum(Integer num) {
+		this.num = num;
+	}
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	public Integer getFrequency() {
+		return frequency;
+	}
+	public void setFrequency(Integer frequency) {
+		this.frequency = frequency;
+	}
+	public Double getTotalhours() {
+		return totalhours;
+	}
+	public void setTotalhours(Double totalhours) {
+		this.totalhours = totalhours;
+	}
+	
+	
+}

+ 62 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/ValueObjVo.java

@@ -0,0 +1,62 @@
+/** 
+ * Project Name:nxfd2 
+ * File Name:Value.java 
+ * Package Name:com.hcks.cmfds.vo 
+ * Date:2016-7-12下午04:16:42 
+ * Copyright (c) 2016, chenzhou1025@126.com All Rights Reserved. 
+ * 
+ */
+
+package com.gyee.runeconomy.dto;
+
+/**
+ * ClassName:Value <br/>
+ * Function: TODO ADD FUNCTION. <br/>
+ * Reason: TODO ADD REASON. <br/>
+ * Date: 2016-7-12 下午04:16:42 <br/>
+ * 
+ * @author 石林
+ * @version
+ * @since JDK 1.6
+ * @see
+ */
+public class ValueObjVo {
+
+    private Double value;
+    private String symbol;
+    private Integer symbolSize;
+    private Double symbolRotate;
+
+    public Double getValue() {
+        return value;
+    }
+
+    public void setValue(Double value) {
+        this.value = value;
+    }
+
+    public String getSymbol() {
+        return symbol;
+    }
+
+    public void setSymbol(String symbol) {
+        this.symbol = symbol;
+    }
+
+    public Integer getSymbolSize() {
+        return symbolSize;
+    }
+
+    public void setSymbolSize(Integer symbolSize) {
+        this.symbolSize = symbolSize;
+    }
+
+    public Double getSymbolRotate() {
+        return symbolRotate;
+    }
+
+    public void setSymbolRotate(Double symbolRotate) {
+        this.symbolRotate = symbolRotate;
+    }
+
+}

+ 3 - 1
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/model/auto/ProEconWindturbineGoodness.java

@@ -95,5 +95,7 @@ public class ProEconWindturbineGoodness extends Model {
 
     private String companyId;
     private String types;
-
+    private Double daySpeed;
+    private Double monthSpeed;
+    private Double yearSpeed;
 }

+ 5 - 5
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/singleanalysis/SingleAnalysisService.java

@@ -500,11 +500,11 @@ public class SingleAnalysisService {
                 vo.setYxxs(StringUtils.round(yxfss, 2));
                 vo.setGlyzxxs(StringUtils.round(glyzxxs, 2));
 
-                double gzss = vos.stream().mapToDouble(SingleAnalysisVo::getGzss).sum();//风机故障损失合计
-                double jxss = vos.stream().mapToDouble(SingleAnalysisVo::getJxss).sum();//风机检修损失合计
-                double xdss = vos.stream().mapToDouble(SingleAnalysisVo::getXdss).sum();//风机限电损失合计
-                double xnss = vos.stream().mapToDouble(SingleAnalysisVo::getXnss).sum();//风机性能损失时合计
-                double slss = vos.stream().mapToDouble(SingleAnalysisVo::getSlss).sum();//风机受累损失合计
+                double gzss = vos.stream().filter(i->i.getGzss() !=null).mapToDouble(SingleAnalysisVo::getGzss).sum();//风机故障损失合计
+                double jxss = vos.stream().filter(i->i.getJxss() !=null).mapToDouble(SingleAnalysisVo::getJxss).sum();//风机检修损失合计
+                double xdss = vos.stream().filter(i->i.getXdss() !=null).mapToDouble(SingleAnalysisVo::getXdss).sum();//风机限电损失合计
+                double xnss = vos.stream().filter(i->i.getXnss() !=null).mapToDouble(SingleAnalysisVo::getXnss).sum();//风机性能损失时合计
+                double slss = vos.stream().filter(i->i.getSlss() !=null).mapToDouble(SingleAnalysisVo::getSlss).sum();//风机受累损失合计
                 double llfdl = fdl + gzss + jxss + xdss + xnss + slss;
 
                 vo.setGzss(StringUtils.round(gzss, 2));

+ 2 - 2
web/runeconomy-xk/src/main/resources/application-yun.yml

@@ -106,8 +106,8 @@ logging:
     com.example: debug
 initialcode: INITIAL
 db:
-  #url: http://127.0.0.1:8011/ts
-  url: http://192.168.11.250:8011/ts
+  url: http://127.0.0.1:8011/ts
+  #url: http://192.168.11.250:8011/ts
 runWindpowerstation: SD_GDDL_RZLX_FDC_STA,SD_GDDL_QDJN_FDC_STA,SD_GDDL_WHWD_FDC_STA,SD_GDDL_WHXQ_FDC_STA,SD_GDDL_RZWL_FDC_STA,SD_GDDL_WFZC_FDC_STA,SD_GDDL_DZXJ_FDC_STA,SD_GDDL_XTTA_FDC_STA,SD_GDDL_BH1_FDC_STA,SD_GDDL_BH2_FDC_STA,SD_GDDL_CG_FDC_STA,SD_GDDL_FJ_FDC_STA,SD_GDDL_YS_FDC_STA,SD_GDDL_FXFC_FDC_STA,SD_GDDL_JNSS_FDC_STA,SD_GDDL_WFBH_FDC_STA,SD_GDDL_PLHS_FDC_STA,SD_GDDL_JNCQ_FDC_STA,SD_GDDL_LXLN_FDC_STA,SD_GDDL_LQJS_FDC_STA,SD_GDDL_ZYXD_FDC_STA,SD_GDDL_ZYFS_FDC_STA