wangb@gyee-china.com пре 1 година
родитељ
комит
eaeb45b38e

+ 26 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/dto/CoulometricVo.java

@@ -13,6 +13,11 @@ public class CoulometricVo {
     private Double sjdl;
 
     /**
+     * 可研电量
+     */
+    private Double kydl;
+
+    /**
      * 小时
      */
 
@@ -24,6 +29,11 @@ public class CoulometricVo {
     private Double wcqk;
 
     /**
+     * 可研完成情况
+     */
+    private Double kywcqk;
+
+    /**
      * 日照强度
      */
     private Double rzqd;
@@ -49,6 +59,14 @@ public class CoulometricVo {
         this.sjdl = sjdl;
     }
 
+    public Double getKydl() {
+        return kydl;
+    }
+
+    public void setKydl(Double kydl) {
+        this.kydl = kydl;
+    }
+
     public Integer getHours() {
         return hours;
     }
@@ -80,4 +98,12 @@ public class CoulometricVo {
     public void setDxfdxs(Double dxfdxs) {
         this.dxfdxs = dxfdxs;
     }
+
+    public Double getKywcqk() {
+        return kywcqk;
+    }
+
+    public void setKywcqk(Double kywcqk) {
+        this.kywcqk = kywcqk;
+    }
 }

+ 22 - 3
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/Electricity/Electricityservice.java

@@ -40,8 +40,12 @@ public class Electricityservice {
 
     @Resource
     private IEdosUtil edosUtil;
+
     @Resource
     private IProBasicProjectPlanService proBasicProjectPlanService;
+
+    @Resource
+    private IProBasicFeasibilityStudyService proBasicFeasibilityStudyService;
     private final String QS = "0";
     private final String FD = "-1";
     private final String GF = "-2";
@@ -317,6 +321,7 @@ public class Electricityservice {
 
         //年电量
         double yeardlsum = 0.0;
+        double kyyeardlsum = 0.0;
 
         double bnsjdlhjsum = 0.0;
 
@@ -334,6 +339,8 @@ public class Electricityservice {
             double dxxss = 0.0;
             //本月日照强度合计
             double byrzqdhjsum = 0.0;
+            //本月可研电量合计
+            double bykydlhjsum = 0.0;
 
             if (calFirstMonth == currentMonth) {
                 Calendar calendar5 = Calendar.getInstance();
@@ -353,6 +360,12 @@ public class Electricityservice {
                 List<ProBasicProjectPlan> currentjh = currentls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
                 byjhdlsum = currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum(); //本月计划电量合
 
+                //可研电量-循环所有场站当前月集合
+                List<ProBasicFeasibilityStudy> currentkyls = proBasicFeasibilityStudyService.getmonthList(String.valueOf(day));
+
+                //当前场站循环当前月
+                List<ProBasicFeasibilityStudy> currentky = currentkyls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
+                bykydlhjsum = currentky.stream().mapToDouble(ProBasicFeasibilityStudy::getGeneratingCapacity).sum(); //本月可研电量合
 
                 //当前场站循环月实际电量
                 List<ProEconPowerstationInfoDay5> sjdlls = proEconPowerstationInfoDay5Service.getmax(wpls.getId(), firstDayZeroHour);
@@ -378,11 +391,11 @@ public class Electricityservice {
             vo.setHours(i);
             //添加实际电量
             vo.setSjdl(StringUtils.round(bysjdlhjsum / 10000, 2));
-
-
+            vo.setKydl(StringUtils.round(bykydlhjsum,2));
             //添加完成情况
             vo.setWcqk(StringUtils.round(((bysjdlhjsum / 10000) / byjhdlsum) * 100, 0));
-
+            //添加完成情况
+            vo.setKywcqk(StringUtils.round(((bysjdlhjsum / 10000) / bykydlhjsum) * 100, 0));
             //等效小时数
             vo.setDxfdxs(StringUtils.round(dxxss,0));
 
@@ -403,7 +416,11 @@ public class Electricityservice {
         List<ProBasicProjectPlan> yearls = proBasicProjectPlanService.getList(String.valueOf(currentyear));
         List<ProBasicProjectPlan> yearjh = yearls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpId)).collect(Collectors.toList());
 
+        List<ProBasicFeasibilityStudy> kyyearls = proBasicFeasibilityStudyService.getList(String.valueOf(currentyear));
+        List<ProBasicFeasibilityStudy> kyyearjh = kyyearls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpId)).collect(Collectors.toList());
+
         yeardlsum = yearjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum();
+        kyyeardlsum = kyyearjh.stream().mapToDouble(ProBasicFeasibilityStudy::getGeneratingCapacity).sum();
 
         List<ProEconPowerstationInfoDay5> sjdlls = proEconPowerstationInfoDay5Service.getmax(wpId, yearHour);
         bnsjdlhjsum += sjdlls.get(0).getNfdldb().doubleValue();
@@ -412,8 +429,10 @@ public class Electricityservice {
         bnrzqdhjsum += rzqddlls.get(0).getNpjfs().doubleValue();
 
         map.put("jhdlhj",yeardlsum);
+        map.put("kydlhj",kyyeardlsum);
         map.put("sjdlhj",StringUtils.round((bnsjdlhjsum / 10000),2));
         map.put("wcqkhj",StringUtils.round(((bnsjdlhjsum / 10000) / yeardlsum) * 100,0));
+        map.put("kywcqkhj",StringUtils.round(((bnsjdlhjsum / 10000) / kyyeardlsum) * 100,0));
         map.put("rzqdhj",StringUtils.round(bnrzqdhjsum,2));
         map.put("dxxsshj",StringUtils.round(dxxsssum,0));
 

+ 2 - 2
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/StudyElectricity/StudyElectricityService.java

@@ -70,12 +70,12 @@ public class StudyElectricityService {
                 List<ProBasicProjectPlan> currentjh = currentjhls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
                 byjhdlsum = currentjh.stream().mapToDouble(ProBasicProjectPlan::getGeneratingCapacity).sum(); //本月计划电量合
 
-                //计划电量-循环所有场站当前月集合
+                //可研电量-循环所有场站当前月集合
                 List<ProBasicFeasibilityStudy> currentkyls = proBasicFeasibilityStudyService.getmonthList(String.valueOf(day));
 
                 //当前场站循环当前月
                 List<ProBasicFeasibilityStudy> currentky = currentkyls.stream().filter(wp -> wp.getWindpowerstationId().equals(wpls.getId())).collect(Collectors.toList());
-                bykydlhjsum = currentky.stream().mapToDouble(ProBasicFeasibilityStudy::getGeneratingCapacity).sum(); //本月计划电量合
+                bykydlhjsum = currentky.stream().mapToDouble(ProBasicFeasibilityStudy::getGeneratingCapacity).sum(); //本月可研电量合
 
 
                 //当前场站循环月实际电量

+ 2 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/IProBasicFeasibilityStudyService.java

@@ -17,4 +17,6 @@ public interface IProBasicFeasibilityStudyService extends IService<ProBasicFeasi
 
     List<ProBasicFeasibilityStudy> getmonthList(String month);
 
+    List<ProBasicFeasibilityStudy> getList(String year);
+
 }

+ 10 - 0
web/runeconomy-xk/src/main/java/com/gyee/runeconomy/service/auto/impl/ProBasicFeasibilityStudyServiceImpl.java

@@ -34,4 +34,14 @@ public class ProBasicFeasibilityStudyServiceImpl extends ServiceImpl<ProBasicFea
         List<ProBasicFeasibilityStudy> list = baseMapper.selectList(qw);
         return list;
     }
+
+    @Override
+    public List<ProBasicFeasibilityStudy> getList(String year) {
+        QueryWrapper<ProBasicFeasibilityStudy> qw = new QueryWrapper<>();
+        if (StringUtils.isNotEmpty(year)) {
+            qw.like("year", year);
+        }
+        List<ProBasicFeasibilityStudy> list = baseMapper.selectList(qw);
+        return list;
+    }
 }