Skip to content

Commit a2af62e

Browse files
committed
add print telecom nb-iot device reported data i18n messages
1 parent bccdd7e commit a2af62e

File tree

11 files changed

+79
-2
lines changed

11 files changed

+79
-2
lines changed

toolkit-app/src/main/resources/i18n/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ nb.operation.del.desc=delete nb-iot device
163163
nb.operation.get.desc=display detail information of nb-iot device
164164
nb.operation.list.desc=display all NB-IoT list
165165
nb.operation.update.desc=update nb-iot device name
166+
nb.operation.log.desc=print telecom nb-iot device reported data
166167
nb.settings.desc=nb-iot settings information management
167168
nb.desc.desc=introduction and description of NB-IoT protocol
168169
nbSettings.prompt=settings processing...

toolkit-app/src/main/resources/i18n/messages_de.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ nb.operation.del.desc=delete nb-iot device
161161
nb.operation.get.desc=display detail information of nb-iot device
162162
nb.operation.list.desc=display all NB-IoT list
163163
nb.operation.update.desc=update nb-iot device name
164+
nb.operation.log.desc=print telecom nb-iot device reported data
164165
nb.settings.desc=nb-iot settings information management
165166
nb.desc.desc=introduction and description of NB-IoT protocol
166167
nbSettings.prompt=settings processing...

toolkit-app/src/main/resources/i18n/messages_fr.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ nb.operation.del.desc=delete nb-iot device
162162
nb.operation.get.desc=display detail information of nb-iot device
163163
nb.operation.list.desc=display all NB-IoT list
164164
nb.operation.update.desc=update nb-iot device name
165+
nb.operation.log.desc=print telecom nb-iot device reported data
165166
nb.settings.desc=nb-iot settings information management
166167
nb.desc.desc=introduction and description of NB-IoT protocol
167168
nbSettings.prompt=settings processing...

toolkit-app/src/main/resources/i18n/messages_zh.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ nb.operation.del.desc=\u5220\u9664 NB-IoT \u8bbe\u5907
158158
nb.operation.get.desc=\u663e\u793a NB-IoT \u8be6\u7ec6\u4fe1\u606f
159159
nb.operation.list.desc=\u663e\u793a\u6240\u6709 NB-IoT \u8bbe\u5907\u5217\u8868
160160
nb.operation.update.desc=\u66f4\u65b0 NB-IoT \u8bbe\u5907\u540d\u79f0
161+
nb.operation.log.desc=\u6253\u5370\u8bbe\u5907\u4e0a\u62a5\u6570\u636e
161162
nb.settings.desc=nb-iot \u914d\u7f6e\u4fe1\u606f\u7ba1\u7406
162163
nb.desc.desc=nb-iot \u4ecb\u7ecd\u548c\u63cf\u8ff0
163164
nbSettings.prompt=\u914d\u7f6e\u5904\u7406\u4e2d...

toolkit-common/src/main/java/iot/technology/client/toolkit/common/utils/DateUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ public static String getCurrentDayEndTimeForTel() {
6363
* @return unixTime
6464
*/
6565
public static String covertNbTimeFormatToUnixTime(String nbTime) {
66-
DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME;
67-
Instant instant = Instant.from(formatter.parse(nbTime));
66+
DateTimeFormatter nbFormatter = DateTimeFormatter.ISO_DATE_TIME;
67+
LocalDateTime dateTime = LocalDateTime.parse(nbTime, nbFormatter);
68+
Instant instant = dateTime.atZone(ZoneId.systemDefault()).toInstant();
6869
return instant.toEpochMilli() + "";
6970

7071
}

toolkit-nbiot/src/main/java/iot/technology/client/toolkit/nb/service/processor/mobile/MobHelpProcessor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,11 @@ public void handle(ProcessContext context) {
6767
.append(StringUtils.lineSeparator());
6868
sb.append(" usage: update imei name").append(StringUtils.lineSeparator());
6969
System.out.format(sb.toString());
70+
71+
// print mobile nb-iot device reported data
72+
sb.append(ColorUtils.cyanAnnotation("log: " + bundle.getString("nb.operation.log.desc")))
73+
.append(StringUtils.lineSeparator());
74+
sb.append(" usage: log imei startTime endTime pageSize").append(StringUtils.lineSeparator());
75+
System.out.format(sb.toString());
7076
}
7177
}

toolkit-nbiot/src/main/java/iot/technology/client/toolkit/nb/service/processor/telecom/TelHelpProcessor.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,11 @@ public void handle(ProcessContext context) {
6767
.append(StringUtils.lineSeparator());
6868
sb.append(" usage: update imei name").append(StringUtils.lineSeparator());
6969
System.out.format(sb.toString());
70+
71+
// print telecom nb-iot device reported data
72+
sb.append(ColorUtils.cyanAnnotation("log: " + bundle.getString("nb.operation.log.desc")))
73+
.append(StringUtils.lineSeparator());
74+
sb.append(" usage: log imei startTime endTime pageSize").append(StringUtils.lineSeparator());
75+
System.out.format(sb.toString());
7076
}
7177
}

toolkit-nbiot/src/main/java/iot/technology/client/toolkit/nb/service/processor/telecom/TelLogDeviceDataProcessor.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright © 2019-2023 The Toolkit Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package iot.technology.client.toolkit.nb.service.processor.telecom;
217

318
import com.fasterxml.jackson.databind.JsonNode;

toolkit-nbiot/src/main/java/iot/technology/client/toolkit/nb/service/telecom/TelecomDeviceDataService.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright © 2019-2023 The Toolkit Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package iot.technology.client.toolkit.nb.service.telecom;
217

318
import iot.technology.client.toolkit.common.constants.NBTypeEnum;

toolkit-nbiot/src/main/java/iot/technology/client/toolkit/nb/service/telecom/domain/action/data/TelQueryDeviceDataListResponse.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/*
2+
* Copyright © 2019-2023 The Toolkit Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package iot.technology.client.toolkit.nb.service.telecom.domain.action.data;
217

318
import com.fasterxml.jackson.annotation.JsonProperty;

0 commit comments

Comments
 (0)