|
@@ -39,6 +39,8 @@ public class AnalysisNewService {
|
|
|
@Resource
|
|
|
private IAnalysissubtablebottomService analysissubtablebottomService;
|
|
|
@Resource
|
|
|
+ private IAnalysissubtablebottom1Service analysissubtablebottom1Service;
|
|
|
+ @Resource
|
|
|
private IMeterpointvalueService meterpointvalueService;
|
|
|
@Resource
|
|
|
private IAnalysissubprojectwindcannotService analysissubprojectwindcannotService;
|
|
@@ -176,6 +178,55 @@ public class AnalysisNewService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 保存风电表底1
|
|
|
+ *
|
|
|
+ * @param beginDate
|
|
|
+ * @param endDate
|
|
|
+ */
|
|
|
+ public void saveAnalysisTableBottom1(String beginDate, String endDate) {
|
|
|
+ Map<String, Meterpoint2> meterMap = CacheContext.meterMap;
|
|
|
+ List<String> days = getDays(beginDate, endDate);
|
|
|
+ for (String day : days) {
|
|
|
+ // Map<String, Object> deleteparam = new HashMap<>();
|
|
|
+// deleteparam.put("recorddate", DateUtils.parseDate(day));
|
|
|
+// analysissubtablebottomService.removeByMap(deleteparam);
|
|
|
+
|
|
|
+ QueryWrapper<Analysissubtablebottom1> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("recorddate", DateUtils.parseDate(day)).like("wpid","FDC");
|
|
|
+ analysissubtablebottom1Service.remove(queryWrapper);
|
|
|
+
|
|
|
+ Map<String, Object> deleteparam = new HashMap<>();
|
|
|
+ Date selDate = DateUtils.parseDate(day);
|
|
|
+ deleteparam.put("recorddate", DateUtils.addDays(selDate,1));
|
|
|
+
|
|
|
+ List<Meterpointvalue> meterpointvalues = meterpointvalueService.listByMap(deleteparam);
|
|
|
+
|
|
|
+
|
|
|
+ List<Meterpointvalue> collect = meterpointvalues.stream().filter(i -> meterMap.get(i.getMeterid()) != null).filter(i -> meterMap.get(i.getMeterid()).getDescription() != null).collect(Collectors.toList());
|
|
|
+ for (Windpowerstation station : CacheContext.stations) {
|
|
|
+ if (station.getId().endsWith("GDC")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Analysismain mainValues = getMainValues(day, station.getId());
|
|
|
+ collect.stream().filter(i -> meterMap.get(i.getMeterid()).getWindpowerstationid().equals(station.getId())).forEach(m -> {
|
|
|
+ Analysissubtablebottom1 analysissubtablebottom = new Analysissubtablebottom1();
|
|
|
+ analysissubtablebottom.setTid(mainValues.getId());
|
|
|
+ analysissubtablebottom.setWpid(station.getId());
|
|
|
+ analysissubtablebottom.setMeterid(m.getMeterid());
|
|
|
+ analysissubtablebottom.setMetername(meterMap.get(m.getMeterid()).getDescription());
|
|
|
+ analysissubtablebottom.setRecorddate(DateUtils.parseDate(day));
|
|
|
+ analysissubtablebottom.setStopcode(m.getNow());
|
|
|
+ analysissubtablebottom.setStopcodemodify(m.getNow());
|
|
|
+ double dayvalue = DoubleUtils.GetResult(DoubleUtils.GetResult(m.getNow(),m.getDay(),"-"),meterMap.get(m.getMeterid()).getMagnification(),"*");
|
|
|
+ analysissubtablebottom.setDayvalue(dayvalue);
|
|
|
+ analysissubtablebottom.setDayvaluemodify(dayvalue);
|
|
|
+ analysissubtablebottom1Service.save(analysissubtablebottom);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 保存光伏表底
|
|
@@ -552,7 +603,7 @@ public class AnalysisNewService {
|
|
|
can.setFdl(generatingcapacity / 10000);
|
|
|
if (project.getId().equals("SBQ04_GC")){
|
|
|
List<Analysissubstationpv> analysissubstationpvs = analysissubstationpvService.listByMap(bdzmap);
|
|
|
- Double hzj_swdl = analysissubstationpvs.stream().filter(i -> i.getWpid().equals("HZJ_GDC")).findFirst().get().getSwdl();
|
|
|
+ Double hzj_swdl = analysissubstationpvs.stream().filter(i -> i.getWpid().equals("HZJ_GDC")).findFirst().get().getFdl();
|
|
|
Double wgejx = currentDayBdz.stream().filter(i -> i.getMeterid().equals(WGEJX)).findFirst().get().getDayvaluemodify();
|
|
|
can.setSwdl((swdl-wgejx)/10000-hzj_swdl);
|
|
|
}else {
|
|
@@ -588,8 +639,24 @@ public class AnalysisNewService {
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNotNull(w)) {
|
|
|
-
|
|
|
- can.setQpjfx(w.getSpeed());
|
|
|
+ //性能不好降风速
|
|
|
+ Double speed = w.getSpeed();
|
|
|
+ if (speed<5){
|
|
|
+ can.setQpjfx(speed);
|
|
|
+ }else if(speed<6){
|
|
|
+ can.setQpjfx(speed-0.2);
|
|
|
+ }else if(speed<7){
|
|
|
+ can.setQpjfx(speed-0.3);
|
|
|
+ }else if(speed<8){
|
|
|
+ can.setQpjfx(speed-0.4);
|
|
|
+ }else if(speed<9){
|
|
|
+ can.setQpjfx(speed-0.5);
|
|
|
+ }else if(speed<10){
|
|
|
+ can.setQpjfx(speed-0.6);
|
|
|
+ }else {
|
|
|
+ can.setQpjfx(speed-0.8);
|
|
|
+ }
|
|
|
+// can.setQpjfx(w.getSpeed());
|
|
|
can.setFjgzsj(w.getFaulttime());
|
|
|
can.setFjjxsj(w.getMaintaintime());
|
|
|
can.setZdcl(w.getMaxpower());
|
|
@@ -679,7 +746,7 @@ public class AnalysisNewService {
|
|
|
for (String day : days) {
|
|
|
Map<String, Object> bdzmap = new HashMap<>();
|
|
|
bdzmap.put("recorddate", DateUtils.parseDate(day));
|
|
|
- List<Analysissubtablebottom> currentDayBdz = analysissubtablebottomService.listByMap(bdzmap);
|
|
|
+ List<Analysissubtablebottom1> currentDayBdz = analysissubtablebottom1Service.listByMap(bdzmap);
|
|
|
|
|
|
|
|
|
Map<String, Object> deleteparam = new HashMap<>();
|
|
@@ -690,7 +757,7 @@ public class AnalysisNewService {
|
|
|
if (project.getWindpowerstationid().endsWith("FDC") || project.getWindpowerstationid().equals("MCH_GDC")) {
|
|
|
continue;
|
|
|
}
|
|
|
- List<Analysissubtablebottom> currentDay = currentDayBdz.stream().filter(i -> i.getWpid().equals(project.getWindpowerstationid())).collect(Collectors.toList());
|
|
|
+ List<Analysissubtablebottom1> currentDay = currentDayBdz.stream().filter(i -> i.getWpid().equals(project.getWindpowerstationid())).collect(Collectors.toList());
|
|
|
List<String> fcfdlmeterids = wpmeterMap.get(project.getWindpowerstationid()).stream()
|
|
|
.filter(i -> (
|
|
|
i.getMetersort().equals("主") && i.getMetertype().equals("进线") && i.getDisplaytype().equals("正向有功")
|