فهرست منبع

修正拟合曲线统计损失电量

shilin 1 سال پیش
والد
کامیت
496a5d451d

+ 4 - 3
realtime/generationXK-service/src/main/java/com/gyee/generation/config/XxlJobConfig.java

@@ -21,7 +21,7 @@ import org.springframework.core.env.Environment;
 //@PropertySource("classpath:xxl-job-executor.properties")
 //@PropertySource("classpath:xxl-job-executor2.properties")
 //@PropertySource("classpath:xxl-job-executor3.properties")
-@PropertySource("classpath:xxl-job-executor4.properties")
+//@PropertySource("classpath:xxl-job-executor4.properties")
 //@PropertySource("classpath:xxl-job-executor5.properties")
 //@PropertySource("classpath:xxl-job-executorWPLY.properties")
 //@PropertySource("classpath:xxl-job-executorRG.properties")
@@ -30,7 +30,7 @@ import org.springframework.core.env.Environment;
 //@PropertySource("classpath:xxl-job-accuracy.properties")
 //@PropertySource("classpath:xxl-job-7001.properties")
 //@PropertySource("classpath:xxl-job-7002.properties")
-//@PropertySource("classpath:xxl-job-7003.properties")
+@PropertySource("classpath:xxl-job-7003.properties")
 //@PropertySource("classpath:xxl-job-executorGF000.properties")
 //@PropertySource("classpath:xxl-job-executorGF001.properties")
 //@PropertySource("classpath:xxl-job-executorGF002.properties")
@@ -38,7 +38,8 @@ import org.springframework.core.env.Environment;
 //@PropertySource("classpath:xxl-job-executorGF004.properties")
 //@PropertySource("classpath:xxl-job-executorGF005.properties")
 //@PropertySource("classpath:xxl-job-executorGF006.properties")
-
+//@PropertySource("classpath:xxl-job-executorGF007.properties")
+//@PropertySource("classpath:xxl-job-executorGF008.properties")
 //@PropertySource("classpath:xxl-job-region.properties")
 public class XxlJobConfig implements EnvironmentAware {
     private Environment env;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 4555 - 0
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationAllService.java


+ 42 - 1
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java

@@ -549,6 +549,21 @@ public class CycleCalculationService {
                             rdwsl = DoubleUtils.sum(lsdwsl, dwsl);
                             double lshjsl = edosUtil.getSectionData(rhjslPoint, currentDate.getTime()).getPointValueInDouble();
                             rhjsl = DoubleUtils.sum(lshjsl, hjsl);
+
+//                            if (currentDate.getTime() < samedayZeroAdd15.getTime()) {
+//                                rgzss = gzss;
+//                                rgzsl = gzsl;
+//                                rjxss = jxss;
+//                                rjxsl = jxsl;
+//                                rdjss = djss;
+//                                rsdtj = sdtj;
+//                                rxnss = xnss;
+//                                rfdjcl = fdjcl;
+//                                rxdjcl = xdjcl;
+//                                rxdtj = xdtj;
+//                                rdwsl = dwsl;
+//                                rhjsl = hjsl;
+//                            }
                             double temp = rgzss + rgzsl + rjxss + rjxsl + rdjss + rsdtj + rxnss + rfdjcl + rxdjcl + rxdtj + rdwsl + rhjsl;
                             if (temp >= 0) {
                                 rqfdl = temp;
@@ -4472,6 +4487,22 @@ public class CycleCalculationService {
                                     }
                                 }
 
+                            }else if (CacheContext.theoreticalPowerMap.containsKey(wt.getModelId()))
+                            {
+                                Map<Double,ProBasicModelPowerRd> valuemap=CacheContext.theoreticalPowerMap.get(wt.getModelId());
+                                if(valuemap.containsKey(pjfs))
+                                {
+                                    double bzgl=  valuemap.get(pjfs).getTheoryPower();
+
+                                    if (power > 0) {
+                                        double temp1 = bzgl - power;
+                                        if (temp1 > 0) {
+//                                            zsss += temp1;
+                                            powerData.put(time,temp1);
+                                            time++;
+                                        }
+                                    }
+                                }
                             }
                         }
                     }
@@ -4493,8 +4524,18 @@ public class CycleCalculationService {
                                 powerData.put(time,bzgl);
                                 time++;
 
-                            }
+                            }else if (CacheContext.theoreticalPowerMap.containsKey(wt.getModelId()))
+                            {
+                                Map<Double,ProBasicModelPowerRd> valuemap=CacheContext.theoreticalPowerMap.get(wt.getModelId());
+                                if(valuemap.containsKey(pjfs))
+                                {
+                                    double bzgl=  valuemap.get(pjfs).getTheoryPower();
 
+                                    powerData.put(time,bzgl);
+                                    time++;
+
+                                }
+                            }
                         }
                     }
                 }

+ 457 - 242
realtime/generationXK-service/src/main/java/com/gyee/generation/util/math/LightToTheoreticalPower.java

@@ -59,7 +59,7 @@ public class LightToTheoreticalPower {
 
 
     // 计算光伏理论发电量
-    public PowerVo calculateEnergy(List<PointData> powerData, List<PointData> lightData, List<PointData> status, String pointid, double power) throws Exception{
+    public PowerVo calculateEnergy(List<PointData> powerData, List<PointData> lightData, List<PointData> status, String pointid, double power) throws Exception {
 
         double lastState = -1;//上一分钟状态
         Date stateBegin;
@@ -105,255 +105,474 @@ public class LightToTheoreticalPower {
             llfdl = calculateEnergy(lightData, power);
             rfdl = powerData.get(powerData.size() - 1).getPointValueInDouble();
             stateBegin = new Date(status.get(0).getPointTime());
-            stateEnd= new Date(status.get(status.size()-1).getPointTime());
+            stateEnd = new Date(status.get(status.size() - 1).getPointTime());
             for (PointData po : powerData) {
                 pmap.put(po.getPointTime(), po);
             }
             for (PointData po : status) {
 
+                Date temp = null;
+                Calendar c = null;
+                double lldl = 0.0;
+
+                if (lastState != po.getPointValueInDouble()) {
+
+
+                    switch ((int) po.getPointValueInDouble()) {
+                        case 0:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rdjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rdjssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 1:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 3:
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 4:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            lldl = getLldl(pointid, stateBegin, stateEnd);
+                            rgzssdl = rgzssdl + lldl;
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 5:
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 6:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            lldl = getLldl(pointid, stateBegin, stateEnd);
+                            rjxssdl = rjxssdl + lldl;
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 7:
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 8:
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 9:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            lldl = getLldl(pointid, stateBegin, stateEnd);
+                            rxdtjssdl = rxdtjssdl + lldl;
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 10:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            lldl = getLldl(pointid, stateBegin, stateEnd);
+                            rcwsldwssdl = rcwsldwssdl + lldl;
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 11:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+                            lldl = getLldl(pointid, stateBegin, stateEnd);
+                            rcwsltqssdl = rcwsltqssdl + lldl;
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 12:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                        case 13:
+                            //将当前状态保存到上一分钟状态
+                            lastState = po.getPointValueInDouble();
+                            stateEnd = new Date(po.getPointTime());
+
+
+                            temp = new Date(po.getPointTime());
+                            c = Calendar.getInstance();
+                            c.setTime(temp);
+                            c.add(Calendar.MINUTE, 1);
+                            stateBegin = c.getTime();
+                            break;
+                    }
 
-                if (po.getPointValueInDouble() == 0) {
+                }
+//                if (po.getPointValueInDouble() == 0) {
+//
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        rdjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rdjssdl);
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//                } else if (po.getPointValueInDouble() == 1) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 3) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 4) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                        rgzssdl = rgzssdl + lldl;
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 5) {
+//                    lastState = po.getPointValueInDouble();
+//                    stateEnd = new Date(po.getPointTime());
+//
+//                    rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
+//
+//                    Date temp = new Date(po.getPointTime());
+//                    Calendar c = Calendar.getInstance();
+//                    c.setTime(temp);
+//                    c.add(Calendar.MINUTE, 1);
+//                    stateBegin = c.getTime();
+//
+//                } else if (po.getPointValueInDouble() == 6) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                        rjxssdl = rjxssdl + lldl;
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 7) {
+//                    lastState = po.getPointValueInDouble();
+//                    stateEnd = new Date(po.getPointTime());
+//
+//                    rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
+//
+//                    Date temp = new Date(po.getPointTime());
+//                    Calendar c = Calendar.getInstance();
+//                    c.setTime(temp);
+//                    c.add(Calendar.MINUTE, 1);
+//                    stateBegin = c.getTime();
+//
+//                } else if (po.getPointValueInDouble() == 8) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 9) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                        rxdtjssdl = rxdtjssdl + lldl;
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 10) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                        rcwsldwssdl = rcwsldwssdl + lldl;
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 11) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                        rcwsltqssdl = rcwsltqssdl + lldl;
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                } else if (po.getPointValueInDouble() == 12) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                }else if (po.getPointValueInDouble() == 13) {
+//                    if (lastState != po.getPointValueInDouble()) {
+//                        //将当前状态保存到上一分钟状态
+//                        lastState = po.getPointValueInDouble();
+//                        stateEnd = new Date(po.getPointTime());
+//
+//
+//                        Date temp = new Date(po.getPointTime());
+//                        Calendar c = Calendar.getInstance();
+//                        c.setTime(temp);
+//                        c.add(Calendar.MINUTE, 1);
+//                        stateBegin = c.getTime();
+//                    }
+//
+//                }
 
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
+            }
 
+            if (stateBegin.getTime() != stateEnd.getTime() && DateUtils.minutesDiff(stateBegin, stateEnd) >= 1) {
+                double lldl = 0.0;
+                switch ((int) lastState) {
+                    case 0:
                         rdjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rdjssdl);
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-                } else if (po.getPointValueInDouble() == 1) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
+                        break;
+                    case 1:
                         rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 3) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
+                        break;
+                    case 3:
                         rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 4) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+                        break;
+                    case 4:
+                        lldl = getLldl(pointid, stateBegin, stateEnd);
                         rgzssdl = rgzssdl + lldl;
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 5) {
-                    lastState = po.getPointValueInDouble();
-                    stateEnd = new Date(po.getPointTime());
-
-                    rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
-
-                    Date temp = new Date(po.getPointTime());
-                    Calendar c = Calendar.getInstance();
-                    c.setTime(temp);
-                    c.add(Calendar.MINUTE, 1);
-                    stateBegin = c.getTime();
-
-                } else if (po.getPointValueInDouble() == 6) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+                        break;
+                    case 5:
+                        rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
+                        break;
+                    case 6:
+                        lldl = getLldl(pointid, stateBegin, stateEnd);
                         rjxssdl = rjxssdl + lldl;
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 7) {
-                    lastState = po.getPointValueInDouble();
-                    stateEnd = new Date(po.getPointTime());
-
-                    rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
-
-                    Date temp = new Date(po.getPointTime());
-                    Calendar c = Calendar.getInstance();
-                    c.setTime(temp);
-                    c.add(Calendar.MINUTE, 1);
-                    stateBegin = c.getTime();
-
-                } else if (po.getPointValueInDouble() == 8) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
+                        break;
+                    case 7:
+                        rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
+                        break;
+                    case 8:
                         rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 9) {
-                    if (lastState != po.getPointValueInDouble()) {
-
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+                        break;
+                    case 9:
+                        lldl = getLldl(pointid, stateBegin, stateEnd);
                         rxdtjssdl = rxdtjssdl + lldl;
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 10) {
-                    if (lastState != po.getPointValueInDouble()) {
-
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+                        break;
+                    case 10:
+                        lldl = getLldl(pointid, stateBegin, stateEnd);
                         rcwsldwssdl = rcwsldwssdl + lldl;
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 11) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-                        double lldl = getLldl(pointid, stateBegin, stateEnd);
+                        break;
+                    case 11:
+                        lldl = getLldl(pointid, stateBegin, stateEnd);
                         rcwsltqssdl = rcwsltqssdl + lldl;
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                } else if (po.getPointValueInDouble() == 12) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                }else if (po.getPointValueInDouble() == 13) {
-                    if (lastState != po.getPointValueInDouble()) {
-                        //将当前状态保存到上一分钟状态
-                        lastState = po.getPointValueInDouble();
-                        stateEnd = new Date(po.getPointTime());
-
-
-                        Date temp = new Date(po.getPointTime());
-                        Calendar c = Calendar.getInstance();
-                        c.setTime(temp);
-                        c.add(Calendar.MINUTE, 1);
-                        stateBegin = c.getTime();
-                    }
-
-                }
-
-            }
-
-            if(stateBegin.getTime()!=stateEnd.getTime() && DateUtils.minutesDiff(stateBegin,stateEnd)>=1)
-            {
-                if (lastState== 0) {
-                    rdjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rdjssdl);
-
-                } else if (lastState == 1) {
-                    rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
-
-
-                } else if (lastState == 3) {
-                    rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
-
-
-                } else if (lastState == 4) {
-                    double lldl = getLldl(pointid, stateBegin, stateEnd);
-                    rgzssdl = rgzssdl + lldl;
-
-                } else if (lastState == 5) {
-                    rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
-
-                } else if (lastState == 6) {
-                    double lldl = getLldl(pointid, stateBegin, stateEnd);
-                    rjxssdl = rjxssdl + lldl;
-
-                } else if (lastState == 7) {
-
-                    rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
-
-                } else if (lastState == 8) {
-
-                    rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
-
-                } else if (lastState == 9) {
-
-                    double lldl = getLldl(pointid, stateBegin, stateEnd);
-                    rxdtjssdl = rxdtjssdl + lldl;
-                } else if (lastState == 10) {
-
-                    double lldl = getLldl(pointid, stateBegin, stateEnd);
-                    rcwsldwssdl = rcwsldwssdl + lldl;
-
-                } else if (lastState == 11) {
-                    double lldl = getLldl(pointid, stateBegin, stateEnd);
-                    rcwsltqssdl = rcwsltqssdl + lldl;
+                        break;
 
                 }
+//                if (lastState== 0) {
+//
+//
+//                } else if (lastState == 1) {
+//                    rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
+//
+//
+//                } else if (lastState == 3) {
+//                    rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
+//
+//
+//                } else if (lastState == 4) {
+//                    double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                    rgzssdl = rgzssdl + lldl;
+//
+//                } else if (lastState == 5) {
+//                    rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
+//
+//                } else if (lastState == 6) {
+//                    double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                    rjxssdl = rjxssdl + lldl;
+//
+//                } else if (lastState == 7) {
+//
+//                    rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
+//
+//                } else if (lastState == 8) {
+//
+//                    rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
+//
+//                } else if (lastState == 9) {
+//
+//                    double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                    rxdtjssdl = rxdtjssdl + lldl;
+//                } else if (lastState == 10) {
+//
+//                    double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                    rcwsldwssdl = rcwsldwssdl + lldl;
+//
+//                } else if (lastState == 11) {
+//                    double lldl = getLldl(pointid, stateBegin, stateEnd);
+//                    rcwsltqssdl = rcwsltqssdl + lldl;
+//
+//                }
             }
 
 
@@ -374,14 +593,12 @@ public class LightToTheoreticalPower {
         vo.setRcwsldwssdl(rcwsldwssdl);
         vo.setRcwsltqssdl(rcwsltqssdl);
 
-        rxnssdl=llfdl-rfdl-rgzssdl-rcnslgzssdl-rjxssdl-rcnsljxssdl-rdjssdl-rqxjclssdl-rsdtjssdl-rxdtjssdl-rxdjclssdl-rcwsldwssdl-rcwsltqssdl;
-        if(rxnssdl>0)
-        {
+        rxnssdl = llfdl - rfdl - rgzssdl - rcnslgzssdl - rjxssdl - rcnsljxssdl - rdjssdl - rqxjclssdl - rsdtjssdl - rxdtjssdl - rxdjclssdl - rcwsldwssdl - rcwsltqssdl;
+        if (rxnssdl > 0) {
 
-            vo.setRxnssdl(StringUtils.round(rxnssdl,2));
-        }else
-        {
-            vo.setRxnssdl(StringUtils.round(0,2));
+            vo.setRxnssdl(StringUtils.round(rxnssdl, 2));
+        } else {
+            vo.setRxnssdl(StringUtils.round(0, 2));
         }
 
 
@@ -405,8 +622,7 @@ public class LightToTheoreticalPower {
 
         double lldl = getLldl(pointid, stateBegin, stateEnd);
 
-        if(end >begin)
-        {
+        if (end > begin) {
             ssdl = ssdl + (lldl - (end - begin));
         }
 
@@ -420,8 +636,7 @@ public class LightToTheoreticalPower {
     private double getLldl(String pointid, Date stateBegin, Date stateEnd) throws Exception {
 
         double result = 0.0;
-        if(stateBegin.getTime()!=stateEnd.getTime() && DateUtils.secondsDiff(stateBegin,stateEnd)>=60)
-        {
+        if (stateBegin.getTime() != stateEnd.getTime() && DateUtils.secondsDiff(stateBegin, stateEnd) >= 60) {
 
             List<PointData> pointls = edosUtil.getHistoryDatasSnap(pointid, stateBegin.getTime() / 1000, stateEnd.getTime() / 1000);
             if (!pointls.isEmpty()) {

+ 25 - 0
realtime/generationXK-service/src/main/resources/xxl-job-executorGF007.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=generationGF007-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=9317
+
+### xxl-job executor log-path
+xxl.job.executor.logpath=E:\gyee\log\GF07log
+### xxl-job executor log-retention-days
+xxl.job.executor.logretentiondays=30
+

+ 25 - 0
realtime/generationXK-service/src/main/resources/xxl-job-executorGF008.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=generationGF008-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=9318
+
+### xxl-job executor log-path
+xxl.job.executor.logpath=E:\gyee\log\GF08log
+### xxl-job executor log-retention-days
+xxl.job.executor.logretentiondays=30
+

+ 2 - 2
realtime/generationXK-service/src/test/java/com/gyee/generation/RealTest.java

@@ -45,8 +45,8 @@ public class RealTest {
 //        cycleCalculationRebuildService.saveCyle(c.getTime());
 //        for(int i=0;i<19;i++)
 //        {
-        realtimeService.savaRealtimeTargetWp();
-//        statusService.middleStatusReal();
+//        realtimeService.savaRealtimeTargetWp();
+        statusService.middleStatusReal();
 //       statusService.startStatusReal();
 //        calculationService.calWp();
 //        cycleCalculationService.saveCyle();