From 1038656e61d0988e619c7e1ab000024b57c2de30 Mon Sep 17 00:00:00 2001 From: bin Date: Fri, 15 Jan 2021 12:15:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=96=E6=B6=88=E4=BC=91=E7=9C=A0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/GZPlatformSettingService.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/ssjl/zhaobiao/guizhou/service/impl/GZPlatformSettingService.java b/src/main/java/com/ssjl/zhaobiao/guizhou/service/impl/GZPlatformSettingService.java index a56da3a..913a1d0 100644 --- a/src/main/java/com/ssjl/zhaobiao/guizhou/service/impl/GZPlatformSettingService.java +++ b/src/main/java/com/ssjl/zhaobiao/guizhou/service/impl/GZPlatformSettingService.java @@ -76,8 +76,8 @@ public class GZPlatformSettingService implements IGZPlatformSettingService { // 休眠免打扰时间 if(dbConfig.getSleepTime() == null || !dbConfig.getSleepTime().equals(config.getSleepTime())){ // if(true){ - IotApiSleepTime sleepTime = new IotApiSleepTime(); - sleepTime.setSerialNo(imei); + //IotApiSleepTime sleepTime = new IotApiSleepTime(); + //sleepTime.setSerialNo(imei); IotApiNotDisturb notDisturb = new IotApiNotDisturb(); notDisturb.setSerialNo(imei); String[] strs = config.getSleepTime().split(","); @@ -91,19 +91,20 @@ public class GZPlatformSettingService implements IGZPlatformSettingService { String timeSet = times[1]; String startTime = timeSet.substring(0, 2) +":" + timeSet.substring(2, 4); String endTime = timeSet.substring(4, 6) +":" + timeSet.substring(6, 8); - sleepTime.addTime(startTime, endTime, times[0]); + //sleepTime.addTime(startTime, endTime, times[0]); notDisturb.addItem(startTime, endTime, 0, 1, times[0]); // for (int j = 0; j < times[0].length(); j++) { // char day = times[0].charAt(j); // sleepTime.addTime(startTime, endTime, String.valueOf(day)); // } } - System.out.println(JSON.toJSONString(sleepTime)); - IotApiResponse rs = iotApiUtil.setSleepTime(sleepTime); - System.out.println(JSON.toJSONString(rs)); - if(checkOffline(rs.getMessage())){ - allSuccess = false; - } + //System.out.println(JSON.toJSONString(sleepTime)); + // 不能设置休眠时间 + // IotApiResponse rs = iotApiUtil.setSleepTime(sleepTime); + // System.out.println(JSON.toJSONString(rs)); +// if(checkOffline(rs.getMessage())){ +// allSuccess = false; +// } IotApiResponse rs1 = iotApiUtil.setNotDisturb(notDisturb); System.out.println(JSON.toJSONString(rs1)); if(checkOffline(rs1.getMessage())){