浏览代码

ws-ua协议修改

ws 11 月之前
父节点
当前提交
ba4f9078f7

+ 2 - 1
industry-system/industry-da/src/main/resources/mapper/CollectorDao.xml

@@ -103,7 +103,8 @@
             tmp.dataSourceId,
             ti.modbus_config modbusConfig,
             ti.node_index nodeIndex,
-            ti.data_type dataType
+            ti.data_type dataType,
+            ti.identifier
         FROM (
             SELECT
                 ti.item_group_id itemGroupId,

二进制
industry-system/industry-da/src/main/resources/static/cy-collector.7z


+ 2 - 2
新采集器/fast-api/src/main/java/com/ws/fastapi/util/ConfUtil.java

@@ -155,7 +155,7 @@ public class ConfUtil {
                 type = "i";
             }
             builder.append("{name=\"").append(obj.getStr("itemName")).append("\", namespace=\"").append(obj.getStr("nodeIndex"))
-                    .append("\", identifier_type=\"").append(type).append("\", identifier=\"").append(obj.getStr("itemName"))
+                    .append("\", identifier_type=\"").append(type).append("\", identifier=\"").append(obj.getStr("identifier"))
                     .append("\", tags = [[\"DataSource\", \"").append(item.getStr("datasource")).append("\"], [\"ItemGroup\", \"")
                     .append(item.getStr("itemGroupId")).append("\"]]},\n");
         }
@@ -199,7 +199,7 @@ public class ConfUtil {
                 type = "i";
             }
             builder.append("{name=\"").append(obj.getStr("itemName")).append("\", namespace=\"").append(obj.getStr("nodeIndex"))
-                    .append("\", identifier_type=\"").append(type).append("\", identifier=\"").append(obj.getStr("itemName"))
+                    .append("\", identifier_type=\"").append(type).append("\", identifier=\"").append(obj.getStr("identifier"))
                     .append("\", tags = [[\"DataSource\", \"").append(item.getStr("datasource")).append("\"], [\"ItemGroup\", \"")
                     .append(item.getStr("itemGroupId")).append("\"]]},\n");