2021与蓝度共同重构项目,服务端
liuhaonan
2022-11-21 2e25dbb794bde83ebca485178b3447e8be0271e4
ximon-admin/src/main/java/com/sandu/ximon/admin/service/LightService.java
@@ -1013,9 +1013,7 @@
        A5Frame a5Frame = new A5Frame(A5OrderEnum.REQUEST_LIGHT_DATA.getCode(), setCalendarReqInnerFrame);
        System.out.println(a5Frame + "            -----a5Frame");
        CommonFrame commonFrame;
        commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(one.getDeviceCode(), a5Frame);
        CommonFrame commonFrame = MainBoardInvokeSyncService.getInstance().sendRRPC(one.getDeviceCode(), a5Frame);
        StoreOperationRecordsUtils.storeInnerFrameData(one.getDeviceCode(), "单灯帧-设置日历", a5Frame, commonFrame);
        System.out.println(commonFrame + "            -----commonFrame");
@@ -1096,14 +1094,15 @@
                        count++;
                    }
                    if (haveTime) {
                        try {
                            long longTime = cal.getTimeInMillis() - System.currentTimeMillis();
                            log.error("睡眠时间(毫秒):" + longTime);
                            Thread.sleep(longTime);
                            SetCalendar(light.getLightId(), lightAddress);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        log.error("存在定时任务:" + light.getLightId()+","+light.getDeviceCode());
//                        try {
//                            long longTime = cal.getTimeInMillis() - System.currentTimeMillis();
//                            log.error("睡眠时间(毫秒):" + longTime);
//                            Thread.sleep(longTime);
//                            SetCalendar(light.getLightId(), lightAddress);
//                        } catch (InterruptedException e) {
//                            e.printStackTrace();
//                        }
                    } else {
                        log.error("灯杆ID为:" + light.getLightId() + ",灯头地址为:" + lightAddress + "没有找到可同步的时间,请检查任务!");
                    }