|
@@ -11,6 +11,7 @@ import com.gyee.generation.service.auto.IProEconInputOrOutputSpeedService;
|
|
|
import com.gyee.generation.util.DateUtils;
|
|
|
import com.gyee.generation.util.StringUtils;
|
|
|
import com.gyee.generation.util.realtimesource.IEdosUtil;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -31,99 +32,119 @@ public class InputOrOutPutService {
|
|
|
@Resource
|
|
|
private IProEconInputOrOutputSpeedService proEconInputOrOutputSpeedService;
|
|
|
|
|
|
+ @Value("${frequency.cutinandout}")
|
|
|
+ private Integer frequency;
|
|
|
|
|
|
- private Map<String,Double> lastStatusMap=new HashMap<>();
|
|
|
+ private static Map<String,Double> wtLastStatusMap=new HashMap<>();
|
|
|
|
|
|
- public void inputOrOutputSpeed() throws Exception {
|
|
|
-
|
|
|
+ private static Map<String,ProEconInputOrOutputSpeed> wtTimeStatusMap=new HashMap<>();
|
|
|
+
|
|
|
+ public void inputOrOutputSpeed(Date recordDate) throws Exception {
|
|
|
+
|
|
|
+ Date begin = DateUtils.addMinutes(recordDate, -frequency);
|
|
|
+ Date daybegin = DateUtils.addMinutes(recordDate, -frequency*2);
|
|
|
+
|
|
|
+ Date end = recordDate;
|
|
|
for(ProBasicEquipment wt:CacheContext.wtls)
|
|
|
{
|
|
|
|
|
|
Map<String, ProBasicEquipmentPoint> pointmap= CacheContext.wtpAimap.get(wt.getNemCode());
|
|
|
|
|
|
- double lastStatus=-1;
|
|
|
- if(lastStatusMap.containsKey(wt.getId()))
|
|
|
- {
|
|
|
- lastStatus=lastStatusMap.get(wt.getId());
|
|
|
- }else
|
|
|
+ List<ProEconInputOrOutputSpeed> recordList = proEconInputOrOutputSpeedService.list().stream()
|
|
|
+ .filter(i -> i.getWindturbineId().equals(wt.getId())
|
|
|
+ && (i.getRecordDate().compareTo(daybegin) == 0 || i.getRecordDate().after(daybegin))
|
|
|
+ && (i.getRecordDate().compareTo(end) == 0 || i.getRecordDate().before(end))
|
|
|
+ ).collect(Collectors.toList());
|
|
|
+
|
|
|
+ if(!recordList.isEmpty())
|
|
|
{
|
|
|
- lastStatus = getLastStatus(pointmap);
|
|
|
+ for(ProEconInputOrOutputSpeed po:recordList)
|
|
|
+ {
|
|
|
+ wtTimeStatusMap.put(String.valueOf(po.getRecordDate().getTime()),po);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ double lastStatus=-1;
|
|
|
+
|
|
|
|
|
|
ProBasicEquipmentPoint mxzt= pointmap.get(ContantXk.MXZT);
|
|
|
|
|
|
- PointData mxztData= edosUtil.getRealData(mxzt.getNemCode());
|
|
|
|
|
|
- double status=mxztData.getPointValueInDouble();
|
|
|
- if (!Objects.equals(lastStatus, status))
|
|
|
- {
|
|
|
+ //获取5分钟没个间隔1秒钟,保证状态与时序库保持一致
|
|
|
+ List<PointData> statusls = edosUtil.getHistoryDatasSnap(mxzt.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000,null,1L);
|
|
|
+ List<PointData> ssfsls = edosUtil.getHistoryDatasSnap(mxzt.getNemCode(), begin.getTime() / 1000, end.getTime() / 1000,null,1L);
|
|
|
|
|
|
- // #region 切入切出风速
|
|
|
- if (lastStatus == 0 && status == 2)
|
|
|
+ if(!statusls.isEmpty() && !ssfsls.isEmpty() && ssfsls.size()==statusls.size())
|
|
|
+ {
|
|
|
+ for(int i=0;i<statusls.size();i++)
|
|
|
{
|
|
|
- ProEconInputOrOutputSpeed input = new ProEconInputOrOutputSpeed();
|
|
|
- input.setWindturbineId(wt.getId());
|
|
|
- input.setWindpowerstationId(wt.getWindpowerstationId());
|
|
|
- input.setProjectId(wt.getProjectId());
|
|
|
- input.setLineId(wt.getLineId());
|
|
|
- input.setRecordDate(new Date());
|
|
|
- input.setInputOrOutput(1);
|
|
|
-
|
|
|
- ProBasicEquipmentPoint ssfs= pointmap.get(ContantXk.CJ_SSFS);
|
|
|
- double value =edosUtil.getRealData(ssfs.getNemCode()).getPointValueInDouble();
|
|
|
- input.setSpeed(value);
|
|
|
-
|
|
|
- proEconInputOrOutputSpeedService.save(input);
|
|
|
|
|
|
+ if(wtLastStatusMap.containsKey(wt.getId()))
|
|
|
+ {
|
|
|
+ lastStatus=wtLastStatusMap.get(wt.getId());
|
|
|
+ }
|
|
|
|
|
|
+ PointData statuspo=statusls.get(i);
|
|
|
+ PointData ssfspo=ssfsls.get(i);
|
|
|
+ double status=StringUtils.round(statuspo.getPointValueInDouble(),0);
|
|
|
+
|
|
|
+ if (!Objects.equals(lastStatus, status))
|
|
|
+ {
|
|
|
+
|
|
|
+ // #region 切入切出风速
|
|
|
+ if (lastStatus == 0 && status == 2)
|
|
|
+ {
|
|
|
+ ProEconInputOrOutputSpeed input = new ProEconInputOrOutputSpeed();
|
|
|
+ input.setWindturbineId(wt.getId());
|
|
|
+ input.setWindpowerstationId(wt.getWindpowerstationId());
|
|
|
+ input.setProjectId(wt.getProjectId());
|
|
|
+ input.setLineId(wt.getLineId());
|
|
|
+ input.setRecordDate(DateUtils.truncate(new Date(statuspo.getPointTime())));
|
|
|
+ input.setInputOrOutput(1);
|
|
|
+
|
|
|
+
|
|
|
+ input.setSpeed(StringUtils.round(ssfspo.getPointValueInDouble(),2));
|
|
|
+
|
|
|
+ if(!wtTimeStatusMap.containsKey(String.valueOf(statuspo.getPointTime())))
|
|
|
+ {
|
|
|
+ proEconInputOrOutputSpeedService.save(input);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ else if (lastStatus == 2 && status== 0)
|
|
|
+ {
|
|
|
+ ProEconInputOrOutputSpeed input = new ProEconInputOrOutputSpeed();
|
|
|
+ input.setWindturbineId(wt.getId());
|
|
|
+ input.setWindpowerstationId(wt.getWindpowerstationId());
|
|
|
+ input.setProjectId(wt.getProjectId());
|
|
|
+ input.setLineId(wt.getLineId());
|
|
|
+ input.setRecordDate(DateUtils.truncate(new Date(statuspo.getPointTime())));
|
|
|
+ input.setInputOrOutput(0);
|
|
|
+
|
|
|
+ input.setSpeed(StringUtils.round(ssfspo.getPointValueInDouble(),2));
|
|
|
+
|
|
|
+ if(!wtTimeStatusMap.containsKey(String.valueOf(statuspo.getPointTime())))
|
|
|
+ {
|
|
|
+ proEconInputOrOutputSpeedService.save(input);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ wtLastStatusMap.put(wt.getId(), status);
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
- else if (lastStatus == 2 && status== 0)
|
|
|
- {
|
|
|
- ProEconInputOrOutputSpeed input = new ProEconInputOrOutputSpeed();
|
|
|
- input.setWindturbineId(wt.getId());
|
|
|
- input.setWindpowerstationId(wt.getWindpowerstationId());
|
|
|
- input.setProjectId(wt.getProjectId());
|
|
|
- input.setLineId(wt.getLineId());
|
|
|
- input.setRecordDate(new Date());
|
|
|
- input.setInputOrOutput(0);
|
|
|
-
|
|
|
- ProBasicEquipmentPoint ssfs= pointmap.get(ContantXk.CJ_SSFS);
|
|
|
- double value =edosUtil.getRealData(ssfs.getNemCode()).getPointValueInDouble();
|
|
|
- input.setSpeed(value);
|
|
|
- proEconInputOrOutputSpeedService.save(input);
|
|
|
- }
|
|
|
-
|
|
|
- lastStatusMap.put(wt.getId(), getLastStatus(pointmap));
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
- private double getLastStatus(Map<String, ProBasicEquipmentPoint> pointmap) throws Exception {
|
|
|
- double lastStatus;
|
|
|
- ProBasicEquipmentPoint power= pointmap.get(ContantXk.CJ_SSGL);
|
|
|
- double powerdata =edosUtil.getRealData(power.getNemCode()).getPointValueInDouble();
|
|
|
- if (powerdata > 1)
|
|
|
- {
|
|
|
- lastStatus=powerdata == 9 ? 2 : powerdata;
|
|
|
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- lastStatus=powerdata == 9 ? 0 : powerdata;
|
|
|
-
|
|
|
- }
|
|
|
- return lastStatus;
|
|
|
- }
|
|
|
|
|
|
public void inputOrOutput(Date currentDate) {
|
|
|
- currentDate = DateUtils.truncDay(currentDate);
|
|
|
+ currentDate = DateUtils.truncate(currentDate);
|
|
|
+// Date end = DateUtils.addDays(currentDate, 1);
|
|
|
+// Date daybegin =DateUtils.truncate(currentDate);
|
|
|
Date end = currentDate;
|
|
|
Date daybegin = DateUtils.addDays(currentDate, -1);
|
|
|
|
|
@@ -191,6 +212,7 @@ public class InputOrOutPutService {
|
|
|
|
|
|
|
|
|
newMethod(end, daybegin, monthbegin, yearbegin, wt.getId(), total1, total2);
|
|
|
+ verify(total1);
|
|
|
|
|
|
proEconInOrOutSpeedTotalService.save(total1);
|
|
|
proEconInOrOutSpeedTotal2Service.save(total2);
|
|
@@ -202,6 +224,548 @@ public class InputOrOutPutService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void verify(ProEconInOrOutSpeedTotal total1) {
|
|
|
+ //日小风切入
|
|
|
+ if (Double.isInfinite(total1.getDayInputSmall()) || Double.isNaN(total1.getDayInputSmall()))
|
|
|
+ {
|
|
|
+ total1.setDayInputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputSmall(StringUtils.round(total1.getDayInputSmall(),2));
|
|
|
+ }
|
|
|
+ //日小风切入最小值
|
|
|
+ if (Double.isInfinite(total1.getDayInputSmallMin()) || Double.isNaN(total1.getDayInputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallMin(StringUtils.round(total1.getDayInputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //日小风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getDayInputSmallMax()) || Double.isNaN(total1.getDayInputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallMax(StringUtils.round(total1.getDayInputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //日大风切入
|
|
|
+ if (Double.isInfinite(total1.getDayInputBig()) || Double.isNaN(total1.getDayInputBig()))
|
|
|
+ {
|
|
|
+ total1.setDayInputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputBig(StringUtils.round(total1.getDayInputBig(),2));
|
|
|
+ }
|
|
|
+ //日大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getDayInputBigMin()) || Double.isNaN(total1.getDayInputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setDayInputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputBigMin(StringUtils.round(total1.getDayInputBigMin(),2));
|
|
|
+ }
|
|
|
+ //日大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getDayInputBigMax()) || Double.isNaN(total1.getDayInputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setDayInputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputBigMax(StringUtils.round(total1.getDayInputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //日小风切出
|
|
|
+ if (Double.isInfinite(total1.getDayOutputSmall()) || Double.isNaN(total1.getDayOutputSmall()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmall(StringUtils.round(total1.getDayOutputSmall(),2));
|
|
|
+ }
|
|
|
+ //日小风切出最小值
|
|
|
+ if (Double.isInfinite(total1.getDayOutputSmallMin()) || Double.isNaN(total1.getDayOutputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallMin(StringUtils.round(total1.getDayOutputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //日小风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getDayOutputSmallMax()) || Double.isNaN(total1.getDayOutputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallMax(StringUtils.round(total1.getDayOutputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //日大风切出
|
|
|
+ if (Double.isInfinite(total1.getDayOutputBig()) || Double.isNaN(total1.getDayOutputBig()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputBig(StringUtils.round(total1.getDayOutputBig(),2));
|
|
|
+ }
|
|
|
+ //日大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getDayOutputBigMin()) || Double.isNaN(total1.getDayOutputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigMin(StringUtils.round(total1.getDayOutputBigMin(),2));
|
|
|
+ }
|
|
|
+ //日大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getDayOutputBigMax()) || Double.isNaN(total1.getDayOutputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigMax(StringUtils.round(total1.getDayOutputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月小风切入
|
|
|
+ if (Double.isInfinite(total1.getMonthInputSmall()) || Double.isNaN(total1.getMonthInputSmall()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmall(StringUtils.round(total1.getMonthInputSmall(),2));
|
|
|
+ }
|
|
|
+ //月小风切入最小值
|
|
|
+ if (Double.isInfinite(total1.getMonthInputSmallMin()) || Double.isNaN(total1.getMonthInputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallMin(StringUtils.round(total1.getMonthInputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //月小风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthInputSmallMax()) || Double.isNaN(total1.getMonthInputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallMax(StringUtils.round(total1.getMonthInputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月大风切入
|
|
|
+ if (Double.isInfinite(total1.getMonthInputBig()) || Double.isNaN(total1.getMonthInputBig()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputBig(StringUtils.round(total1.getMonthInputBig(),2));
|
|
|
+ }
|
|
|
+ //月大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthInputBigMin()) || Double.isNaN(total1.getMonthInputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigMin(StringUtils.round(total1.getMonthInputBigMin(),2));
|
|
|
+ }
|
|
|
+ //月大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthInputBigMax()) || Double.isNaN(total1.getMonthInputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigMax(StringUtils.round(total1.getMonthInputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月小风切出
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputSmall()) || Double.isNaN(total1.getMonthOutputSmall()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmall(StringUtils.round(total1.getMonthOutputSmall(),2));
|
|
|
+ }
|
|
|
+ //月小风切出最小值
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputSmallMin()) || Double.isNaN(total1.getMonthOutputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallMin(StringUtils.round(total1.getMonthOutputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //月小风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputSmallMax()) || Double.isNaN(total1.getMonthOutputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallMax(StringUtils.round(total1.getMonthOutputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月大风切出
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputBig()) || Double.isNaN(total1.getMonthOutputBig()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBig(StringUtils.round(total1.getMonthOutputBig(),2));
|
|
|
+ }
|
|
|
+ //月大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputBigMin()) || Double.isNaN(total1.getMonthOutputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigMin(StringUtils.round(total1.getMonthOutputBigMin(),2));
|
|
|
+ }
|
|
|
+ //月大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputBigMax()) || Double.isNaN(total1.getMonthOutputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigMax(StringUtils.round(total1.getMonthOutputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年小风切入
|
|
|
+ if (Double.isInfinite(total1.getYearInputSmall()) || Double.isNaN(total1.getYearInputSmall()))
|
|
|
+ {
|
|
|
+ total1.setYearInputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputSmall(StringUtils.round(total1.getYearInputSmall(),2));
|
|
|
+ }
|
|
|
+ //年小风切入最小值
|
|
|
+ if (Double.isInfinite(total1.getYearInputSmallMin()) || Double.isNaN(total1.getYearInputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallMin(StringUtils.round(total1.getYearInputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //年小风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getYearInputSmallMax()) || Double.isNaN(total1.getYearInputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallMax(StringUtils.round(total1.getYearInputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年大风切入
|
|
|
+ if (Double.isInfinite(total1.getYearInputBig()) || Double.isNaN(total1.getYearInputBig()))
|
|
|
+ {
|
|
|
+ total1.setYearInputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputBig(StringUtils.round(total1.getYearInputBig(),2));
|
|
|
+ }
|
|
|
+ //年大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getYearInputBigMin()) || Double.isNaN(total1.getYearInputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setYearInputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputBigMin(StringUtils.round(total1.getYearInputBigMin(),2));
|
|
|
+ }
|
|
|
+ //年大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getYearInputBigMax()) || Double.isNaN(total1.getYearInputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setYearInputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputBigMax(StringUtils.round(total1.getYearInputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年小风切出
|
|
|
+ if (Double.isInfinite(total1.getYearOutputSmall()) || Double.isNaN(total1.getYearOutputSmall()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmall(StringUtils.round(total1.getYearOutputSmall(),2));
|
|
|
+ }
|
|
|
+ //年小风切出最小值
|
|
|
+ if (Double.isInfinite(total1.getYearOutputSmallMin()) || Double.isNaN(total1.getYearOutputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallMin(StringUtils.round(total1.getYearOutputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //年小风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getYearOutputSmallMax()) || Double.isNaN(total1.getYearOutputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallMax(StringUtils.round(total1.getYearOutputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年大风切出
|
|
|
+ if (Double.isInfinite(total1.getYearOutputBig()) || Double.isNaN(total1.getYearOutputBig()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputBig(StringUtils.round(total1.getYearOutputBig(),2));
|
|
|
+ }
|
|
|
+ //年大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getYearOutputBigMin()) || Double.isNaN(total1.getYearOutputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigMin(StringUtils.round(total1.getYearOutputBigMin(),2));
|
|
|
+ }
|
|
|
+ //年大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getYearOutputBigMax()) || Double.isNaN(total1.getYearOutputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigMax(StringUtils.round(total1.getYearOutputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //小风切入
|
|
|
+ if (Double.isInfinite(total1.getInputSmall()) || Double.isNaN(total1.getInputSmall()))
|
|
|
+ {
|
|
|
+ total1.setInputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputSmall(StringUtils.round(total1.getInputSmall(),2));
|
|
|
+ }
|
|
|
+ //小风切入最小值
|
|
|
+ if (Double.isInfinite(total1.getInputSmallMin()) || Double.isNaN(total1.getInputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setInputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputSmallMin(StringUtils.round(total1.getInputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //小风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getInputSmallMax()) || Double.isNaN(total1.getInputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setInputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputSmallMax(StringUtils.round(total1.getInputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //大风切入
|
|
|
+ if (Double.isInfinite(total1.getInputBig()) || Double.isNaN(total1.getInputBig()))
|
|
|
+ {
|
|
|
+ total1.setInputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputBig(StringUtils.round(total1.getInputBig(),2));
|
|
|
+ }
|
|
|
+ //大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getInputBigMin()) || Double.isNaN(total1.getInputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setInputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputBigMin(StringUtils.round(total1.getInputBigMin(),2));
|
|
|
+ }
|
|
|
+ //大风切入最大值
|
|
|
+ if (Double.isInfinite(total1.getInputBigMax()) || Double.isNaN(total1.getInputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setInputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputBigMax(StringUtils.round(total1.getInputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //小风切出
|
|
|
+ if (Double.isInfinite(total1.getOutputSmall()) || Double.isNaN(total1.getOutputSmall()))
|
|
|
+ {
|
|
|
+ total1.setOutputSmall(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputSmall(StringUtils.round(total1.getOutputSmall(),2));
|
|
|
+ }
|
|
|
+ //小风切出最小值
|
|
|
+ if (Double.isInfinite(total1.getOutputSmallMin()) || Double.isNaN(total1.getOutputSmallMin()))
|
|
|
+ {
|
|
|
+ total1.setOutputSmallMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputSmallMin(StringUtils.round(total1.getOutputSmallMin(),2));
|
|
|
+ }
|
|
|
+ //小风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getOutputSmallMax()) || Double.isNaN(total1.getOutputSmallMax()))
|
|
|
+ {
|
|
|
+ total1.setOutputSmallMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputSmallMax(StringUtils.round(total1.getOutputSmallMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //大风切出
|
|
|
+ if (Double.isInfinite(total1.getOutputBig()) || Double.isNaN(total1.getOutputBig()))
|
|
|
+ {
|
|
|
+ total1.setOutputBig(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputBig(StringUtils.round(total1.getOutputBig(),2));
|
|
|
+ }
|
|
|
+ //大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getOutputBigMin()) || Double.isNaN(total1.getOutputBigMin()))
|
|
|
+ {
|
|
|
+ total1.setOutputBigMin(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputBigMin(StringUtils.round(total1.getOutputBigMin(),2));
|
|
|
+ }
|
|
|
+ //大风切出最大值
|
|
|
+ if (Double.isInfinite(total1.getOutputBigMax()) || Double.isNaN(total1.getOutputBigMax()))
|
|
|
+ {
|
|
|
+ total1.setOutputBigMax(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputBigMax(StringUtils.round(total1.getOutputBigMax(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //日小风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getDayInputSmallRatio()) || Double.isNaN(total1.getDayInputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputSmallRatio(StringUtils.round(total1.getDayInputSmallRatio(),2));
|
|
|
+ }
|
|
|
+ //日小风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getDayOutputSmallRatio()) || Double.isNaN(total1.getDayOutputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputSmallRatio(StringUtils.round(total1.getDayOutputSmallRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //日大风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getDayInputBigRatio()) || Double.isNaN(total1.getDayInputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setDayInputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayInputBigRatio(StringUtils.round(total1.getDayInputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //日大风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getDayOutputBigRatio()) || Double.isNaN(total1.getDayOutputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setDayOutputBigRatio(StringUtils.round(total1.getDayOutputBigRatio(),2));
|
|
|
+ }
|
|
|
+ //月小风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getMonthInputSmallRatio()) || Double.isNaN(total1.getMonthInputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputSmallRatio(StringUtils.round(total1.getMonthInputSmallRatio(),2));
|
|
|
+ }
|
|
|
+ //月小风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputSmallRatio()) || Double.isNaN(total1.getMonthOutputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputSmallRatio(StringUtils.round(total1.getMonthOutputSmallRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月大风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getMonthInputBigRatio()) || Double.isNaN(total1.getMonthInputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthInputBigRatio(StringUtils.round(total1.getMonthInputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //月大风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getMonthOutputBigRatio()) || Double.isNaN(total1.getMonthOutputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setMonthOutputBigRatio(StringUtils.round(total1.getMonthOutputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年小风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getYearInputSmallRatio()) || Double.isNaN(total1.getYearInputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputSmallRatio(StringUtils.round(total1.getYearInputSmallRatio(),2));
|
|
|
+ }
|
|
|
+ //年小风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getYearOutputSmallRatio()) || Double.isNaN(total1.getYearOutputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputSmallRatio(StringUtils.round(total1.getYearOutputSmallRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年大风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getYearInputBigRatio()) || Double.isNaN(total1.getYearInputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setYearInputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearInputBigRatio(StringUtils.round(total1.getYearInputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //年大风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getYearOutputBigRatio()) || Double.isNaN(total1.getYearOutputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setYearOutputBigRatio(StringUtils.round(total1.getYearOutputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //总小风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getInputSmallRatio()) || Double.isNaN(total1.getInputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setInputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputSmallRatio(StringUtils.round(total1.getInputSmallRatio(),2));
|
|
|
+ }
|
|
|
+ //总小风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getOutputSmallRatio()) || Double.isNaN(total1.getOutputSmallRatio()))
|
|
|
+ {
|
|
|
+ total1.setOutputSmallRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputSmallRatio(StringUtils.round(total1.getOutputSmallRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //总大风切入合格率
|
|
|
+ if (Double.isInfinite(total1.getInputBigRatio()) || Double.isNaN(total1.getInputBigRatio()))
|
|
|
+ {
|
|
|
+ total1.setInputBigRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setInputBigRatio(StringUtils.round(total1.getInputBigRatio(),2));
|
|
|
+ }
|
|
|
+
|
|
|
+ //总大风切出合格率
|
|
|
+ if (Double.isInfinite(total1.getOutputBigMaxRatio()) || Double.isNaN(total1.getOutputBigMaxRatio()))
|
|
|
+ {
|
|
|
+ total1.setOutputBigMaxRatio(0.0);
|
|
|
+ }else
|
|
|
+ {
|
|
|
+ total1.setOutputBigMaxRatio(StringUtils.round(total1.getOutputBigMaxRatio(),2));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void newMethod(Date end, Date daybegin, Date monthbegin, Date yearbegin, String windturbineId, ProEconInOrOutSpeedTotal total1, ProEconInOrOutSpeedTotal2 total2) {
|
|
|
buildDay(end, daybegin, windturbineId, total1, total2);
|
|
|
buildMonth(end, monthbegin, windturbineId, total1, total2);
|