|
@@ -73,9 +73,6 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
String meter = splits[i + 1];
|
|
|
String funcid = splits[i + 2];
|
|
|
String value = splits[i + 3];
|
|
|
- if (value.endsWith(".0")) {
|
|
|
- value = value.substring(0, value.length() - ".0".length());
|
|
|
- }
|
|
|
try {
|
|
|
SceneDataValue sdvInner = new SceneDataValue(null, null, null, null);
|
|
|
sdvInner.finish = true;
|
|
@@ -87,6 +84,9 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
}
|
|
|
SceneDataValue data = RepositoryContainer.RepositoryBase.point2sdv.get(meter + "-" + funcid);
|
|
|
if (type.equals("iot")) {
|
|
|
+ if (value.endsWith(".0")) {
|
|
|
+ value = value.substring(0, value.length() - ".0".length());
|
|
|
+ }
|
|
|
try {
|
|
|
data.value_prim.value = Long.parseLong(value);
|
|
|
} catch (Exception e1) {
|
|
@@ -113,9 +113,6 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
String meter = splits[i + 1];
|
|
|
String funcid = splits[i + 2];
|
|
|
String value = splits[i + 3];
|
|
|
- if (value.endsWith(".0")) {
|
|
|
- value = value.substring(0, value.length() - ".0".length());
|
|
|
- }
|
|
|
try {
|
|
|
SceneDataValue sdvInner = new SceneDataValue(null, null, null, null);
|
|
|
SceneDataValue exist_sdv = RepositoryContainer.RepositoryBase.set2sdv.putIfAbsent(meter + "-" + funcid, sdvInner);
|
|
@@ -123,6 +120,9 @@ public class IOTWebSocketClient extends WebSocketClient {
|
|
|
RepositoryContainer.RepositoryBase.sdv2set.putIfAbsent(sdvInner, meter + "-" + funcid);
|
|
|
}
|
|
|
SceneDataValue data = RepositoryContainer.RepositoryBase.set2sdv.get(meter + "-" + funcid);
|
|
|
+ if (value.endsWith(".0")) {
|
|
|
+ value = value.substring(0, value.length() - ".0".length());
|
|
|
+ }
|
|
|
try {
|
|
|
data.value_prim.value = Long.parseLong(value);
|
|
|
} catch (Exception e1) {
|