瀏覽代碼

修改电量计算方法

shilin 1 年之前
父節點
當前提交
8f1af981dc

+ 6 - 69
realtime/generationXK-service/src/main/java/com/gyee/generation/GenerationMain.java

@@ -35,80 +35,17 @@ public class GenerationMain {
 ////////
 //        begin = new Date();
 //        System.out.println("设备指标记录调度程序执行开始!。。。。。。");
-//        for (int i = 0; i < 15; i++) {
+//        for (int i = 0; i < 9; i++) {
 //
-//            SimpleDateFormat  df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 //           System.out.println(df.format(c.getTime()).toString());
-//            EquipmentInfo1Service equipmentInfo1Service = SpringUtils.getBean("equipmentInfo1Service");
-//            EquipmentInfo2Service equipmentInfo2Service = SpringUtils.getBean("equipmentInfo2Service");
-//            EquipmentInfo3Service equipmentInfo3Service = SpringUtils.getBean("equipmentInfo3Service");
-////            EquipmentInfo4Service equipmentInfo4Service = SpringUtils.getBean("equipmentInfo4Service");
-////            EquipmentInfo5Service equipmentInfo5Service = SpringUtils.getBean("equipmentInfo5Service");
-//            EquipmentInfoDayTopService equipmentInfoDayTopService = SpringUtils.getBean("equipmentInfoDayTopService");
-////            WtAlysisDayService wtAlysisDayService = SpringUtils.getBean("wtAlysisDayService");
-//            WindPowerInfo1Service windPowerInfo1Service = SpringUtils.getBean("windPowerInfo1Service");
-//            WindPowerInfo2Service windPowerInfo2Service = SpringUtils.getBean("windPowerInfo2Service");
-//            WindPowerInfo3Service windPowerInfo3Service = SpringUtils.getBean("windPowerInfo3Service");
-////            WindPowerInfo4Service windPowerInfo4Service = SpringUtils.getBean("windPowerInfo4Service");
-////            WindPowerInfo5Service windPowerInfo5Service = SpringUtils.getBean("windPowerInfo5Service");
-////            WindPowerInfo6Service windPowerInfo6Service = SpringUtils.getBean("windPowerInfo6Service");
-////////
-////////            PowerCurveFittingByTimeService powerCurveFittingByTimeService = SpringUtils.getBean("powerCurveFittingByTimeService");
-////////             System.out.println("日序执行开始!........");
-////////            powerCurveFittingByTimeService.cureFittingDay(c.getTime(), "SXJ_KGDL_XWT_FDC_STA");
-////////             System.out.println("日处理完成!........");
-////////
-////////             System.out.println("月序执行开始!........");
-////////            powerCurveFittingByTimeService.cureFittingMonth(c.getTime(), "0", "SXJ_KGDL_XWT_FDC_STA");
-////////             System.out.println("月处理完成!........");
-////////
-////////             System.out.println("年序执行开始!........");
-////////            powerCurveFittingByTimeService.cureFittingYear(c.getTime(), "SXJ_KGDL_XWT_FDC_STA");
-////////             System.out.println("年处理完成!........");
-////////
-//////////            CycleCalculationRebuildService cycleCalculationRebuildService = SpringUtils.getBean("cycleCalculationRebuildService");
-//////////
-//////////            cycleCalculationRebuildService.saveCyle(c.getTime());
-//////////
-////            CycleCalculationService cycleCalculationService = SpringUtils.getBean("cycleCalculationService");
-////
-////            cycleCalculationService.saveCyle();
-////            equipmentInfo1Service.calEquipmentInfoDay(c.getTime());
-////            equipmentInfo2Service.calEquipmentInfoDay(c.getTime());
-////            equipmentInfo3Service.calEquipmentInfoDay(c.getTime());
-////////////
-////            windPowerInfo1Service.calLineInfoDay(c.getTime());
-////            windPowerInfo1Service.calProjectInfoDay(c.getTime());
-////            windPowerInfo1Service.calWindpowerInfoDay(c.getTime());
-//////            windPowerInfo1Service.calCompanyInfoDay(c.getTime());
-//////            windPowerInfo1Service.calRegionInfoDay(c.getTime());
-////
-////            windPowerInfo2Service.calLineInfoDay(c.getTime());
-////            windPowerInfo2Service.calProjectInfoDay(c.getTime());
-////            windPowerInfo2Service.calWindpowerInfoDay(c.getTime());
-//////            windPowerInfo2Service.calCompanyInfoDay(c.getTime());
-//////            windPowerInfo2Service.calRegionInfoDay(c.getTime());
-////
-////
-////            windPowerInfo3Service.calLineInfoDay(c.getTime());
-////            windPowerInfo3Service.calProjectInfoDay(c.getTime());
-////            windPowerInfo3Service.calWindpowerInfoDay(c.getTime());
-////            windPowerInfo3Service.calCompanyInfoDay(c.getTime());
-////            windPowerInfo3Service.calRegionInfoDay(c.getTime());
-////////
-////////
-//////        ShutdownnewService shutdownnewService = SpringUtils.getBean("shutdownnewService");
-//////         shutdownnewService.execShutdown(c.getTime());
-//////
-//////
-////        WindturbineGoodnessService windturbineGoodnessService= SpringUtils.getBean("windturbineGoodnessService");
-////        windturbineGoodnessService.calWindturbineGoodness(c.getTime());
 //
-////            equipmentInfoDayTopService.calEquipmentInfoDayTop(c.getTime());
-//            equipmentInfoDayTopService.calEquipmentInfoMonthTop(c.getTime());
-////            equipmentInfoDayTopService.calEquipmentInfoYearTop(c.getTime());
+//            CycleCalculationRebuildService cycleCalculationRebuildService = SpringUtils.getBean("cycleCalculationRebuildService");
+//
+//            cycleCalculationRebuildService.saveCyle(c.getTime());
 //
 //            c.add(Calendar.DAY_OF_MONTH, 1);
+//            end = new Date();
 //            System.out.println(end);
 //            System.out.println("完成一次!。。。。。。");
 //        }

+ 2 - 2
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")

File diff suppressed because it is too large
+ 752 - 729
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationRebuildService.java


File diff suppressed because it is too large
+ 682 - 675
realtime/generationXK-service/src/main/java/com/gyee/generation/service/realtimelibrary/CycleCalculationService.java


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

@@ -126,11 +126,13 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 1:
                             //将当前状态保存到上一分钟状态
@@ -139,11 +141,13 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 3:
                             lastState = po.getPointValueInDouble();
@@ -151,11 +155,13 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 4:
                             //将当前状态保存到上一分钟状态
@@ -165,11 +171,13 @@ public class LightToTheoreticalPower {
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 5:
                             lastState = po.getPointValueInDouble();
@@ -177,11 +185,12 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 6:
                             //将当前状态保存到上一分钟状态
@@ -191,11 +200,12 @@ public class LightToTheoreticalPower {
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 7:
                             lastState = po.getPointValueInDouble();
@@ -203,11 +213,12 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 8:
                             lastState = po.getPointValueInDouble();
@@ -215,11 +226,12 @@ public class LightToTheoreticalPower {
 
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 9:
                             //将当前状态保存到上一分钟状态
@@ -229,11 +241,13 @@ public class LightToTheoreticalPower {
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 10:
                             //将当前状态保存到上一分钟状态
@@ -243,11 +257,12 @@ public class LightToTheoreticalPower {
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                         case 11:
                             //将当前状态保存到上一分钟状态
@@ -257,322 +272,31 @@ public class LightToTheoreticalPower {
                             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();
+//                            temp = new Date(po.getPointTime());
+//                            c = Calendar.getInstance();
+//                            c.setTime(temp);
+//                            c.add(Calendar.MINUTE, 1);
+//                            stateBegin = c.getTime();
+
+                            stateBegin = new Date(po.getPointTime());
                             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();
+                            stateBegin = new Date(po.getPointTime());
                             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();
+                            stateBegin = new Date(po.getPointTime());
                             break;
                     }
 
                 }
-//                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 (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);
-                        break;
-                    case 1:
-                        rsdtjssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rsdtjssdl);
-                        break;
-                    case 3:
-                        rqxjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rqxjclssdl);
-                        break;
-                    case 4:
-                        lldl = getLldl(pointid, stateBegin, stateEnd);
-                        rgzssdl = rgzssdl + lldl;
-                        break;
-                    case 5:
-                        rcnslgzssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnslgzssdl);
-                        break;
-                    case 6:
-                        lldl = getLldl(pointid, stateBegin, stateEnd);
-                        rjxssdl = rjxssdl + lldl;
-                        break;
-                    case 7:
-                        rcnsljxssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rcnsljxssdl);
-                        break;
-                    case 8:
-                        rxdjclssdl = getSsdl(pointid, stateBegin, stateEnd, pmap, rxdjclssdl);
-                        break;
-                    case 9:
-                        lldl = getLldl(pointid, stateBegin, stateEnd);
-                        rxdtjssdl = rxdtjssdl + lldl;
-                        break;
-                    case 10:
-                        lldl = getLldl(pointid, stateBegin, stateEnd);
-                        rcwsldwssdl = rcwsldwssdl + lldl;
-                        break;
-                    case 11:
-                        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;
-//
-//                }
             }
 
 
@@ -636,7 +360,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()) {