Browse Source

日照强度计算表

Koishi 1 year atrás
parent
commit
cf5a374ec9

+ 14 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/init/CacheContext.java

@@ -66,7 +66,6 @@ public class CacheContext implements CommandLineRunner {
     private IProBasicRegionService proBasicRegionService;
     @Resource
     private TheoreticalPowerService theoreticalPowerService;
-
     @Resource
     private IProBasicModelPowerRdService proBasicModelPowerRdService;
     @Resource
@@ -106,6 +105,9 @@ public class CacheContext implements CommandLineRunner {
     public static Map<String,ProBasicRegion> rgmap = new HashMap<>();
     public static Map<String,ProBasicEnergyGroup> egmap = new HashMap<>();
     public static Map<String,ProBasicCompany> cpmap = new HashMap<>();
+    public static List<ProBasicPowerstation> stations = new ArrayList<>();
+    public static Map<String,ProBasicPowerstation> wpmaps = new HashMap<>();
+    public static Map<String,String> wppmap = new HashMap<>();
 
     public static Map<String,List<ProBasicPowerstation>> cpwpmap = new HashMap<>();
 
@@ -341,6 +343,12 @@ public class CacheContext implements CommandLineRunner {
             }
         }
 
+        stations = proBasicWindpowerstationService.list();
+        for (ProBasicPowerstation station : stations) {
+            wppmap.put(station.getId(),station.getName());
+            wpmaps.put(station.getId(),station);
+        }
+
         wsls.stream().forEach(p->{
 
 
@@ -569,8 +577,9 @@ public class CacheContext implements CommandLineRunner {
             meterpointMap.put(meterpoint.getNemCode(),meterpoint);
         });
 
+
         for (ProBasicMeterPoint meterpoint2 : proBasicMeterPointService.list()) {
-            if (wpmap.containsKey(meterpoint2.getWindpowerstationId())){
+            if (wpmaps.containsKey(meterpoint2.getWindpowerstationId())){
                 meterMap.put(meterpoint2.getNemCode(),meterpoint2);
                 if (wpmeterMap.containsKey(meterpoint2.getWindpowerstationId())){
                     wpmeterMap.get(meterpoint2.getWindpowerstationId()).add(meterpoint2);
@@ -584,7 +593,7 @@ public class CacheContext implements CommandLineRunner {
         }
 
         for (ProBasicMeterPoint meterpoint2 : proBasicMeterPointService.list()) {
-            if (wpmap.containsKey(meterpoint2.getWindpowerstationId())){
+            if (wpmaps.containsKey(meterpoint2.getWindpowerstationId())){
                 meterMap.put(meterpoint2.getId(),meterpoint2);
                 if (wpmeterMap.containsKey(meterpoint2.getWindpowerstationId())){
                     wpmeterMap.get(meterpoint2.getWindpowerstationId()).add(meterpoint2);
@@ -596,6 +605,8 @@ public class CacheContext implements CommandLineRunner {
             }
 
         }
+
+
         wpls.stream().forEach(wp->{
 
             wpmap.put(wp.getId(),wp);

+ 197 - 196
realtime/generationXK-service/src/main/java/com/gyee/generation/service/AnalysisNewService.java

@@ -110,7 +110,7 @@ public class AnalysisNewService {
                     vo.setId(StringUtils.getUUID());
                     vo.setRecordDate(beginDate);
                     vo.setWpid(wp.getId());
-                    vo.setMeterId(begin.getPointName());
+                    vo.setMeterId(begin.getEdnaId());
                     vo.setMeterName(name);
                     vo.setStopCode(temp2);
                     vo.setStopCodeModify(temp2);
@@ -153,239 +153,240 @@ public class AnalysisNewService {
             ProEconAnalysisSubprojectWindcannotService.removeByMap(deleteparam);
             ProEconAnalysisSubprojectWindcanService.removeByMap(deleteparam);
             for (ProBasicProject project : CacheContext.pjls) {
+                if (project.getWindpowerstationId().equals("SXJ_KGDL_ZK_FDC_STA")) {
 
-                if (project.getWindpowerstationId().endsWith("GDC_STA")) {
-                    continue;
-                }
-                List<ProEconAnalysisSubtableBottom> currentDay = currentDayBdz.stream().filter(i -> i.getWpid().equals(project.getWindpowerstationId())).collect(Collectors.toList());
-                if(StringUtils.isEmpty(currentDay)){
-                    continue;
-                }
-                //算出工程发电量
-                List<String> fdls = wpmeterMap.get(project.getWindpowerstationId()).stream()
-                        .filter(i -> (
-                                i.getProjectId().equals(project.getId()) && i.getMeterSort().equals("主") && i.getMeterType().equals("进线") && i.getUniformCode().equals("ZXYG")
-                        )).map(i -> i.getNemCode()).collect(Collectors.toList());
-
-                double generatingcapacity = 0;
-                for (String meterid : fdls) {
-                    generatingcapacity += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
-                }
+                    if (project.getWindpowerstationId().endsWith("GDC_STA")) {
+                        continue;
+                    }
+                    List<ProEconAnalysisSubtableBottom> currentDay = currentDayBdz.stream().filter(i -> i.getWpid().equals(project.getWindpowerstationId())).collect(Collectors.toList());
+                    if (StringUtils.isEmpty(currentDay)) {
+                        continue;
+                    }
+                    //算出工程发电量
+                    List<String> fdls = wpmeterMap.get(project.getWindpowerstationId()).stream()
+                            .filter(i -> (
+                                    i.getProjectId().equals(project.getId()) && i.getMeterSort().equals("主") && i.getMeterType().equals("进线") && i.getUniformCode().equals("ZXYG")
+                            )).map(i -> i.getNemCode()).collect(Collectors.toList());
+
+                    double generatingcapacity = 0;
+                    for (String meterid : fdls) {
+                        generatingcapacity += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
+                    }
 
-                //总发电量
-                List<String> zfdls = wpmeterMap.get(project.getWindpowerstationId()).stream()
-                        .filter(i -> (
-                                i.getMeterSort().contains("主") && i.getMeterType().contains("进线") && i.getUniformCode().contains("ZXYG")
-                        )).map(i->i.getNemCode()).collect(Collectors.toList());
+                    //总发电量
+                    List<String> zfdls = wpmeterMap.get(project.getWindpowerstationId()).stream()
+                            .filter(i -> (
+                                    i.getMeterSort().contains("主") && i.getMeterType().contains("进线") && i.getUniformCode().contains("ZXYG")
+                            )).map(i -> i.getNemCode()).collect(Collectors.toList());
 
-                double zfdl = 0;
-                for (String meterid : zfdls) {
-                    zfdl += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
-                }
-                //算上网电量和购网电量
-                double swdl = 0;
-                double gwdl = 0;
-                double fcfdl = 0;
-                List<ProBasicMeterPoint> fcswmeter = wpmeterMap.get(project.getWindpowerstationId()).stream()
-                        .filter(i -> (
-                                i.getMeterSort().equals("主") && i.getMeterType().equals("出线") && i.getUniformCode().equals("ZXYG") && i.getProjectId().contains(project.getId())
-                        )).collect(Collectors.toList());
-                List<ProBasicMeterPoint> fcgwmeter = wpmeterMap.get(project.getWindpowerstationId()).stream()
-                        .filter(i -> (
-                                i.getMeterSort().equals("主") && i.getMeterType().equals("出线") && i.getUniformCode().equals("FXYG") && i.getProjectId().contains(project.getId())
-                        )).collect(Collectors.toList());
-                if (fcswmeter!=null &&fcswmeter.size()>1){
-                    String[] lineids = fcswmeter.get(0).getLineId().split("\\|");
-
-                    fcfdl = Arrays.stream(lineids).map(lineid ->
-                                    wpmeterMap.get(project.getWindpowerstationId())
-                                            .stream().filter(j -> j.getMeterSort().equals("主") && j.getMeterType().equals("进线") && j.getUniformCode().equals("ZXYG") && j.getLineId().equals(lineid)).findFirst().get())
-                            .mapToDouble(linemeterpoint2 -> currentDay.stream()
-                                    .filter(currentBdz -> currentBdz.getMeterId().equals(linemeterpoint2.getNemCode()))
-                                    .findFirst().get().getDayValueModify()).sum();
+                    double zfdl = 0;
+                    for (String meterid : zfdls) {
+                        zfdl += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
+                    }
+                    //算上网电量和购网电量
+                    double swdl = 0;
+                    double gwdl = 0;
+                    double fcfdl = 0;
+                    List<ProBasicMeterPoint> fcswmeter = wpmeterMap.get(project.getWindpowerstationId()).stream()
+                            .filter(i -> (
+                                    i.getMeterSort().equals("主") && i.getMeterType().equals("出线") && i.getUniformCode().equals("ZXYG") && i.getProjectId().contains(project.getId())
+                            )).collect(Collectors.toList());
+                    List<ProBasicMeterPoint> fcgwmeter = wpmeterMap.get(project.getWindpowerstationId()).stream()
+                            .filter(i -> (
+                                    i.getMeterSort().equals("主") && i.getMeterType().equals("出线") && i.getUniformCode().equals("FXYG") && i.getProjectId().contains(project.getId())
+                            )).collect(Collectors.toList());
+                    if (fcswmeter != null && fcswmeter.size() > 1) {
+                        String[] lineids = fcswmeter.get(0).getLineId().split("\\|");
+
+                        fcfdl = Arrays.stream(lineids).map(lineid ->
+                                        wpmeterMap.get(project.getWindpowerstationId())
+                                                .stream().filter(j -> j.getMeterSort().equals("主") && j.getMeterType().equals("进线") && j.getUniformCode().equals("ZXYG") && j.getLineId().equals(lineid)).findFirst().get())
+                                .mapToDouble(linemeterpoint2 -> currentDay.stream()
+                                        .filter(currentBdz -> currentBdz.getMeterId().equals(linemeterpoint2.getNemCode()))
+                                        .findFirst().get().getDayValueModify()).sum();
 
 
-                }
-                //算出
-                Double dayvaluesw = currentDay.stream().filter(currentBdz -> fcswmeter.contains(meterMap.get(currentBdz.getMeterId()))).mapToDouble(ProEconAnalysisSubtableBottom::getDayValueModify).sum();
-                Double dayvaluegw = currentDay.stream().filter(currentBdz -> fcgwmeter.contains(meterMap.get(currentBdz.getMeterId()))).mapToDouble(ProEconAnalysisSubtableBottom::getDayValueModify).sum();
-                swdl = fcfdl!=0?generatingcapacity/fcfdl*dayvaluesw:0;
-                gwdl = fcfdl!=0?generatingcapacity/fcfdl*dayvaluegw:0;
-
-                double fczyb = 0;
-                List<String> fczybmeterids = wpmeterMap.get(project.getWindpowerstationId()).stream()
-                        .filter(i -> (
-                                i.getMeterSort().equals("主") && i.getMeterType().equals("站用变") && i.getUniformCode().equals("ZXYG")
-                        )).map(i -> i.getNemCode()).collect(Collectors.toList());
-                for (String meterid : fczybmeterids) {
-                    fczyb += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
-                }
-
+                    }
+                    //算出
+                    Double dayvaluesw = currentDay.stream().filter(currentBdz -> fcswmeter.contains(meterMap.get(currentBdz.getMeterId()))).mapToDouble(ProEconAnalysisSubtableBottom::getDayValueModify).sum();
+                    Double dayvaluegw = currentDay.stream().filter(currentBdz -> fcgwmeter.contains(meterMap.get(currentBdz.getMeterId()))).mapToDouble(ProEconAnalysisSubtableBottom::getDayValueModify).sum();
+                    swdl = fcfdl != 0 ? generatingcapacity / fcfdl * dayvaluesw : 0;
+                    gwdl = fcfdl != 0 ? generatingcapacity / fcfdl * dayvaluegw : 0;
+
+                    double fczyb = 0;
+                    List<String> fczybmeterids = wpmeterMap.get(project.getWindpowerstationId()).stream()
+                            .filter(i -> (
+                                    i.getMeterSort().equals("主") && i.getMeterType().equals("站用变") && i.getUniformCode().equals("ZXYG")
+                            )).map(i -> i.getNemCode()).collect(Collectors.toList());
+                    for (String meterid : fczybmeterids) {
+                        fczyb += currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().isPresent() ? currentDay.stream().filter(i -> i.getMeterId().equals(meterid)).findFirst().get().getDayValueModify().doubleValue() : 0.0;
+                    }
 
 
-                ProEconAnalysisSubprojectWindcan can = new ProEconAnalysisSubprojectWindcan();
-                ProEconAnalysisSubprojectWindcannot cannot = new ProEconAnalysisSubprojectWindcannot();
+                    ProEconAnalysisSubprojectWindcan can = new ProEconAnalysisSubprojectWindcan();
+                    ProEconAnalysisSubprojectWindcannot cannot = new ProEconAnalysisSubprojectWindcannot();
 //                ProEconAnalysisMain mainValues = getMainValues(day, project.getWindpowerstationId());
 //                can.setTid(mainValues.getId());
-                can.setProjectId(project.getId());
-                can.setWpid(project.getWindpowerstationId());
-                can.setRecordDate(DateUtils.parseDate(day));
-                can.setZjrl(project.getCapacity() / 10);
+                    can.setProjectId(project.getId());
+                    can.setWpid(project.getWindpowerstationId());
+                    can.setRecordDate(DateUtils.parseDate(day));
+                    can.setZjrl(project.getCapacity() / 10);
 
 
 //                can.setFdl(generatingcapacity / 10000);
-                can.setFdl(generatingcapacity);
-                if (project.getId().equals("SBQ04_GC")){
+                    can.setFdl(generatingcapacity);
+                    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().getFdl();
 //                    Double wgejx = currentDayBdz.stream().filter(i -> i.getMeterId().equals(WGEJX)).findFirst().get().getDayValueModify();
 //                    can.setSwdl((swdl-wgejx)/10000-hzj_swdl);
-                }else {
-                    can.setSwdl(swdl);
+                    } else {
+                        can.setSwdl(swdl);
 //                    can.setSwdl(swdl / 10000);
-                }
+                    }
 //                can.setGwdl(gwdl/ 10000);
-                can.setGwdl(gwdl);
+                    can.setGwdl(gwdl);
 //                can.setCydl(fcfdl != 0.0 ? (generatingcapacity / zfdl * fczyb) / 10000 : 0.0);
-                can.setCydl(fcfdl != 0.0 ? (generatingcapacity / zfdl * fczyb) : 0.0);
-
-                QueryWrapper<ProEconPowerstationInfoDay1> queryWrapper = new QueryWrapper<>();
-                queryWrapper.eq("record_date", DateUtils.parseDate(day));
-                queryWrapper.eq("foreign_key_id", project.getId());
-                ProEconPowerstationInfoDay1 w = proEconPowerstationInfoDay1Service.getOne(queryWrapper);
-                QueryWrapper<ProEconPowerstationInfoDay3> wWrapper = new QueryWrapper<>();
-                wWrapper.eq("record_date", DateUtils.parseDate(day));
-                wWrapper.eq("foreign_key_id", project.getId());
-                ProEconPowerstationInfoDay3 one = windpowerinfoday3Service.getOne(wWrapper);
-                QueryWrapper<ProEconShutdownEvent2> shutparams = new QueryWrapper<>();
-                shutparams.eq("stop_time", DateUtils.parseDate(day));
-                shutparams.eq("project_id", project.getId());
-                //shutparams.put("statuscode",4);
-                List<ProEconShutdownEvent2> shut = shutdownevent2Service.list(shutparams);
-
-                Map<String, Object> inputparam = new HashMap<>();
-                inputparam.put("record_date", DateUtils.parseDate(day));
-                inputparam.put("project_id", project.getId());
-                List<ProEconInOrOutSpeedTotal> inputoroutputspeedtotals = inputoroutputspeedtotalService.listByMap(inputparam);
-                if (StringUtils.isNotEmpty(inputoroutputspeedtotals)) {
-                    OptionalDouble average = inputoroutputspeedtotals.stream().filter(i -> i.getDayInputSmall() != null).mapToDouble(ProEconInOrOutSpeedTotal::getDayInputSmall).average();
-                    if (average.isPresent()) {
-                        can.setPjqrfs(average.getAsDouble());
+                    can.setCydl(fcfdl != 0.0 ? (generatingcapacity / zfdl * fczyb) : 0.0);
+
+                    QueryWrapper<ProEconPowerstationInfoDay1> queryWrapper = new QueryWrapper<>();
+                    queryWrapper.eq("record_date", DateUtils.parseDate(day));
+                    queryWrapper.eq("foreign_key_id", project.getId());
+                    ProEconPowerstationInfoDay1 w = proEconPowerstationInfoDay1Service.getOne(queryWrapper);
+                    QueryWrapper<ProEconPowerstationInfoDay3> wWrapper = new QueryWrapper<>();
+                    wWrapper.eq("record_date", DateUtils.parseDate(day));
+                    wWrapper.eq("foreign_key_id", project.getId());
+                    ProEconPowerstationInfoDay3 one = windpowerinfoday3Service.getOne(wWrapper);
+                    QueryWrapper<ProEconShutdownEvent2> shutparams = new QueryWrapper<>();
+                    shutparams.eq("stop_time", DateUtils.parseDate(day));
+                    shutparams.eq("project_id", project.getId());
+                    //shutparams.put("statuscode",4);
+                    List<ProEconShutdownEvent2> shut = shutdownevent2Service.list(shutparams);
+
+                    Map<String, Object> inputparam = new HashMap<>();
+                    inputparam.put("record_date", DateUtils.parseDate(day));
+                    inputparam.put("project_id", project.getId());
+                    List<ProEconInOrOutSpeedTotal> inputoroutputspeedtotals = inputoroutputspeedtotalService.listByMap(inputparam);
+                    if (StringUtils.isNotEmpty(inputoroutputspeedtotals)) {
+                        OptionalDouble average = inputoroutputspeedtotals.stream().filter(i -> i.getDayInputSmall() != null).mapToDouble(ProEconInOrOutSpeedTotal::getDayInputSmall).average();
+                        if (average.isPresent()) {
+                            can.setPjqrfs(average.getAsDouble());
+                        } else {
+                            can.setPjqrfs(0.0);
+                        }
                     } else {
                         can.setPjqrfs(0.0);
                     }
-                }else {
-                    can.setPjqrfs(0.0);
-                }
-                if (StringUtils.isNotNull(w)) {
-                    //性能不好降风速
-                    Double speed = w.getRpjfs().doubleValue();
-                    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);
-                    }
+                    if (StringUtils.isNotNull(w)) {
+                        //性能不好降风速
+                        Double speed = w.getRpjfs().doubleValue();
+                        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());
 //                    can.setZxcl(w.getMinPower());
-                } else {
+                    } else {
 
-                    can.setQpjfx(0.0);
-                    can.setFjgzsj(0.0);
-                    can.setFjjxsj(0.0);
-                    can.setZdcl(0.0);
-                    can.setZxcl(0.0);
-                }
+                        can.setQpjfx(0.0);
+                        can.setFjgzsj(0.0);
+                        can.setFjjxsj(0.0);
+                        can.setZdcl(0.0);
+                        can.setZxcl(0.0);
+                    }
 
-                if (StringUtils.isNotNull(one)) {
+                    if (StringUtils.isNotNull(one)) {
 //                    can.setFjgzdl(one.getDaynhgzssdl() / 10000);
 //                    can.setXddl(one.getDaynhxdssdl() / 10000);
 //                    can.setXnssdl(one.getDaynhqfdl() / 10000);
 //                    can.setFjjxdl(one.getDaynhwhssdl() / 10000);
-                } else {
-                    can.setFjgzdl(0.0);
-                    can.setXddl(0.0);
-                    can.setXnssdl(0.0);
-                    can.setFjjxdl(0.0);
-                }
-                if (StringUtils.isNotEmpty(shut)) {
-                    can.setGzcs(Double.valueOf(shut.stream().filter(i -> i.getStatusCode() == 2).collect(Collectors.toList()).size()));
-                } else {
-                    can.setGzcs(0.0);
-                }
-                can.setFdlscada(can.getFdl() * 1.005);
-                can.setZhcydl(can.getFdl() + can.getGwdl() - can.getSwdl());
-                can.setZhcydll(can.getFdl() != 0 ? can.getZhcydl() / can.getFdl() * 100 : 0.0);
-                can.setZhcydlscada(can.getFdlscada() + can.getGwdl() - can.getSwdl());
-                can.setZhcydllscada(can.getFdlscada() != 0 ? can.getZhcydlscada() / can.getFdlscada() * 100 : 0.0);
-                can.setCydll(can.getFdl() != 0 ? can.getCydl() / can.getFdl() : 0.0);
-                can.setLyxs(can.getFdl() / can.getZjrl());
-                can.setLyxsscada(can.getFdlscada() / can.getZjrl());
-                if (can != null) {
-                    Double xddl = can.getXddl();
-                    Double fdl = can.getFdl();
-                    if (xddl != null && fdl != null) {
-                        can.setQfl(xddl + fdl != 0 ? xddl / (xddl + fdl) * 100 : 0.0);
                     } else {
-                        can.setQfl(0.0);
+                        can.setFjgzdl(0.0);
+                        can.setXddl(0.0);
+                        can.setXnssdl(0.0);
+                        can.setFjjxdl(0.0);
+                    }
+                    if (StringUtils.isNotEmpty(shut)) {
+                        can.setGzcs(Double.valueOf(shut.stream().filter(i -> i.getStatusCode() == 2).collect(Collectors.toList()).size()));
+                    } else {
+                        can.setGzcs(0.0);
+                    }
+                    can.setFdlscada(can.getFdl() * 1.005);
+                    can.setZhcydl(can.getFdl() + can.getGwdl() - can.getSwdl());
+                    can.setZhcydll(can.getFdl() != 0 ? can.getZhcydl() / can.getFdl() * 100 : 0.0);
+                    can.setZhcydlscada(can.getFdlscada() + can.getGwdl() - can.getSwdl());
+                    can.setZhcydllscada(can.getFdlscada() != 0 ? can.getZhcydlscada() / can.getFdlscada() * 100 : 0.0);
+                    can.setCydll(can.getFdl() != 0 ? can.getCydl() / can.getFdl() : 0.0);
+                    can.setLyxs(can.getFdl() / can.getZjrl());
+                    can.setLyxsscada(can.getFdlscada() / can.getZjrl());
+                    if (can != null) {
+                        Double xddl = can.getXddl();
+                        Double fdl = can.getFdl();
+                        if (xddl != null && fdl != null) {
+                            can.setQfl(xddl + fdl != 0 ? xddl / (xddl + fdl) * 100 : 0.0);
+                        } else {
+                            can.setQfl(0.0);
+                        }
                     }
-                }
 
-                if (can.getFdl() != null && can.getFjgzdl() != null && can.getFjjxdl() != null && can.getXddl() != null) {
-                    can.setLlfdl(can.getFdl() + can.getFjgzdl() + can.getFjjxdl() + can.getXddl());  //+can.getXnssdl()
-                } else {
-                    can.setLlfdl(0.0);
-                }
+                    if (can.getFdl() != null && can.getFjgzdl() != null && can.getFjjxdl() != null && can.getXddl() != null) {
+                        can.setLlfdl(can.getFdl() + can.getFjgzdl() + can.getFjjxdl() + can.getXddl());  //+can.getXnssdl()
+                    } else {
+                        can.setLlfdl(0.0);
+                    }
 
-                if (can.getFdlscada() != null && can.getFjgzdl() != null && can.getFjjxdl() != null && can.getXddl() != null) {
-                    can.setLlfdlscada(can.getFdlscada() + can.getFjgzdl() + can.getFjjxdl() + can.getXddl());//+can.getXnssdl()
-                } else {
-                    can.setLlfdl(0.0);
-                }
+                    if (can.getFdlscada() != null && can.getFjgzdl() != null && can.getFjjxdl() != null && can.getXddl() != null) {
+                        can.setLlfdlscada(can.getFdlscada() + can.getFjgzdl() + can.getFjjxdl() + can.getXddl());//+can.getXnssdl()
+                    } else {
+                        can.setLlfdl(0.0);
+                    }
 
-                can.setYjhfdl(getYjhfdl(project.getId(), day));
-                can.setDnaqts(getDnljts(day));
-                can.setCnsldwdl(0.0);
-                can.setCnsldwsj(0.0);
-                can.setCnsljxdl(0.0);
-                can.setCnsljxsj(0.0);
-                can.setCwsldwdl(0.0);
-                can.setCwsldwsj(0.0);
-                can.setCwsljxdl(0.0);
-                can.setCwsljxsj(0.0);
-                can.setZrzhdl(0.0);
-                can.setZrzhsj(0.0);
-                can.setXdsj(0.0);
-                can.setSyzgzdl(0.0);
-                can.setSyzgzsj(0.0);
-                can.setJdxlgzdl(0.0);
-                can.setJdxlgzsj(0.0);
-                can.setSyzjxdl(0.0);
-                can.setSyzjxsj(0.0);
-                can.setJdxljx(0.0);
-                can.setJdxljxsj(0.0);
-                can.setLjaqts(0.0);
-                can.setQw(0.0);
-                can.setTq("");
-                can.setFx("");
-                can.setEdpjfs(0.0);
-                can.setYpjkqmd(0.0);
-
-                CopyUtils.copy(can, cannot);
-                ProEconAnalysisSubprojectWindcanService.save(can);
-                ProEconAnalysisSubprojectWindcannotService.save(cannot);
+                    can.setYjhfdl(getYjhfdl(project.getId(), day));
+                    can.setDnaqts(getDnljts(day));
+                    can.setCnsldwdl(0.0);
+                    can.setCnsldwsj(0.0);
+                    can.setCnsljxdl(0.0);
+                    can.setCnsljxsj(0.0);
+                    can.setCwsldwdl(0.0);
+                    can.setCwsldwsj(0.0);
+                    can.setCwsljxdl(0.0);
+                    can.setCwsljxsj(0.0);
+                    can.setZrzhdl(0.0);
+                    can.setZrzhsj(0.0);
+                    can.setXdsj(0.0);
+                    can.setSyzgzdl(0.0);
+                    can.setSyzgzsj(0.0);
+                    can.setJdxlgzdl(0.0);
+                    can.setJdxlgzsj(0.0);
+                    can.setSyzjxdl(0.0);
+                    can.setSyzjxsj(0.0);
+                    can.setJdxljx(0.0);
+                    can.setJdxljxsj(0.0);
+                    can.setLjaqts(0.0);
+                    can.setQw(0.0);
+                    can.setTq("");
+                    can.setFx("");
+                    can.setEdpjfs(0.0);
+                    can.setYpjkqmd(0.0);
+
+                    CopyUtils.copy(can, cannot);
+                    ProEconAnalysisSubprojectWindcanService.save(can);
+                    ProEconAnalysisSubprojectWindcannotService.save(cannot);
+                }
             }
         }
     }

+ 75 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticScheduleCALTask.java

@@ -1,6 +1,10 @@
 package com.gyee.generation.task;
 
 
+import com.gyee.generation.service.AnalysisNewService;
+import com.gyee.generation.service.Irradiationinput.IrradiationinputService;
+import com.gyee.generation.service.PVSystemEfficiencyCalculator;
+import com.gyee.generation.service.StationPower.StationPowerService;
 import com.gyee.generation.service.realtimelibrary.*;
 import com.xxl.job.core.context.XxlJobHelper;
 import com.xxl.job.core.handler.annotation.XxlJob;
@@ -41,7 +45,15 @@ public class SaticScheduleCALTask {
     private RegionCalService regionCalService;
     @Resource
     private SafetyDayService safetyDayService;
+    @Resource
+    private StationPowerService powerService;
 
+    @Resource
+    private AnalysisNewService analysisNewService;
+    @Resource
+    private PVSystemEfficiencyCalculator calculator;
+    @Resource
+    private IrradiationinputService irradiationinputService;
 
 
     /**
@@ -325,7 +337,70 @@ public class SaticScheduleCALTask {
     }
 
 
+    @XxlJob("PredictedPowerccuracy")
+    public void Powerccuracy() {
+
+
+        XxlJobHelper.log("预测功率准确率计算执行开始!........");
+        try {
+            powerService.predictedPower();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("预测功率准确率计算执行开始!........");
+    }
+
+
+    @XxlJob("planvaluejs")
+    public void planvalue() {
+
+        XxlJobHelper.log("系统效率计算执行开始!........");
+        try {
+            calculator.planvalue();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("系统效率计算执行开始!........");
+    }
+
+    @XxlJob("companysjs")
+    public void companysjs() {
+
 
+        XxlJobHelper.log("底码计算执行开始!........");
+        try {
+            analysisNewService.companys();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("底码计算计算执行开始!........");
+    }
+
+    @XxlJob("saveWindProjectjs")
+    public void saveWindProjectjs() {
+
+
+        XxlJobHelper.log("底码电量计算执行开始!........");
+        try {
+            analysisNewService.saveWindProject();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("底码电量计算执行开始!........");
+    }
+
+    @XxlJob("irradiationjs")
+    public void irradiation() {
+
+
+        XxlJobHelper.log("日照强度替换计算执行开始!........");
+        try {
+            irradiationinputService.getcockpit();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        XxlJobHelper.log("日照强度替换计算执行开始!........");
+    }
 
 
 

+ 56 - 39
realtime/generationXK-service/src/main/java/com/gyee/generation/task/SaticSchedulePgTask.java

@@ -3,6 +3,7 @@ package com.gyee.generation.task;
 
 import com.gyee.common.util.DateUtils;
 import com.gyee.generation.service.*;
+import com.gyee.generation.service.Irradiationinput.IrradiationinputService;
 import com.gyee.generation.service.StationPower.StationPowerService;
 import com.gyee.generation.util.math.AvailablePowerAccuracyCalculator;
 import com.gyee.generation.util.math.PowerPredictionErrorCalculator;
@@ -97,6 +98,9 @@ public class SaticSchedulePgTask {
     @Resource
     private AnalysisNewService analysisNewService;
 
+    @Resource
+    private IrradiationinputService irradiationinputService;
+
     /**
      * 缓存Redis散点图数据
      * 每天执行一次
@@ -1564,43 +1568,56 @@ public class SaticSchedulePgTask {
         XxlJobHelper.log("可用功率精度计算调度程序处理完成!........");
     }
 
-    @XxlJob("PredictedPowerccuracy")
-    public void Powerccuracy() {
-
-
-        XxlJobHelper.log("系统效率计算执行开始!........");
-        try {
-            powerService.predictedPower();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        XxlJobHelper.log("系统效率计算执行开始!........");
-    }
-
-
-    @XxlJob("companysjs")
-    public void companysjs() {
-
-
-        XxlJobHelper.log("底码计算执行开始!........");
-        try {
-            analysisNewService.companys();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        XxlJobHelper.log("底码计算计算执行开始!........");
-    }
-
-    @XxlJob("saveWindProjectjs")
-    public void saveWindProjectjs() {
-
-
-        XxlJobHelper.log("底码电量计算执行开始!........");
-        try {
-            analysisNewService.saveWindProject();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        XxlJobHelper.log("底码电量计算执行开始!........");
-    }
+//    @XxlJob("PredictedPowerccuracy")
+//    public void Powerccuracy() {
+//
+//
+//        XxlJobHelper.log("预测功率准确率计算执行开始!........");
+//        try {
+//            powerService.predictedPower();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        XxlJobHelper.log("预测功率准确率计算执行开始!........");
+//    }
+//
+//
+//    @XxlJob("companysjs")
+//    public void companysjs() {
+//
+//
+//        XxlJobHelper.log("底码计算执行开始!........");
+//        try {
+//            analysisNewService.companys();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        XxlJobHelper.log("底码计算计算执行开始!........");
+//    }
+//
+//    @XxlJob("saveWindProjectjs")
+//    public void saveWindProjectjs() {
+//
+//
+//        XxlJobHelper.log("底码电量计算执行开始!........");
+//        try {
+//            analysisNewService.saveWindProject();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        XxlJobHelper.log("底码电量计算执行开始!........");
+//    }
+//
+//    @XxlJob("irradiationjs")
+//    public void irradiation() {
+//
+//
+//        XxlJobHelper.log("日照强度替换计算执行开始!........");
+//        try {
+//            irradiationinputService.getcockpit();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        XxlJobHelper.log("日照强度替换计算执行开始!........");
+//    }
 }

+ 25 - 0
realtime/generationXK-service/src/main/resources/xxl-job-irradiation.properties

@@ -0,0 +1,25 @@
+### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
+xxl.job.admin.addresses=http://10.81.3.152:8179/xxl-job-admin
+
+### xxl-job, access token
+xxl.job.accessToken=
+
+### xxl-job executor appname
+### 场站计算
+#xxl.job.executor.appname=generationWP-job
+### 区域公司计算
+xxl.job.executor.appname=irradiation-job
+### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
+xxl.job.executor.address=
+### xxl-job executor server-info
+xxl.job.executor.ip=
+#场站端口
+#xxl.job.executor.port=9201
+#区域端口
+xxl.job.executor.port=9381
+
+### xxl-job executor log-path
+xxl.job.executor.logpath=E:\gyee\log\irradiation
+### xxl-job executor log-retention-days
+xxl.job.executor.logretentiondays=30
+