|
@@ -25,15 +25,16 @@ public class ElementFactorUtil {
|
|
|
public static Map<String, IotDevicefactor> getDevicefactorMap(List<IotDevicefactor> factorList){
|
|
public static Map<String, IotDevicefactor> getDevicefactorMap(List<IotDevicefactor> factorList){
|
|
|
Map<String, IotDevicefactor> devicefactorMap = new HashMap<>();
|
|
Map<String, IotDevicefactor> devicefactorMap = new HashMap<>();
|
|
|
for (IotDevicefactor iotDevicefactor : factorList) {
|
|
for (IotDevicefactor iotDevicefactor : factorList) {
|
|
|
- String dfCode = iotDevicefactor.getDfCode();
|
|
|
|
|
- String dfName = iotDevicefactor.getDfName();
|
|
|
|
|
- String key = "";
|
|
|
|
|
- if (StringUtils.isNotEmpty(dfCode)) {
|
|
|
|
|
- key += dfCode;
|
|
|
|
|
- }
|
|
|
|
|
- if (StringUtils.isNotEmpty(dfName)) {
|
|
|
|
|
- key += dfName;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// String dfCode = iotDevicefactor.getDfCode();
|
|
|
|
|
+// String dfName = iotDevicefactor.getDfName();
|
|
|
|
|
+// String key = "";
|
|
|
|
|
+// if (StringUtils.isNotEmpty(dfCode)) {
|
|
|
|
|
+// key += dfCode;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (StringUtils.isNotEmpty(dfName)) {
|
|
|
|
|
+// key += dfName;
|
|
|
|
|
+// }
|
|
|
|
|
+ String key = iotDevicefactor.getDfAddress();
|
|
|
devicefactorMap.put(key, iotDevicefactor);
|
|
devicefactorMap.put(key, iotDevicefactor);
|
|
|
}
|
|
}
|
|
|
return devicefactorMap;
|
|
return devicefactorMap;
|
|
@@ -103,15 +104,16 @@ public class ElementFactorUtil {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 设置自定义要素名称 */
|
|
/* 设置自定义要素名称 */
|
|
|
- String dfCode = resVo.getFactorCode();
|
|
|
|
|
- String dfName = resVo.getAddress();
|
|
|
|
|
- String key = "";
|
|
|
|
|
- if (StringUtils.isNotEmpty(dfCode)) {
|
|
|
|
|
- key += dfCode;
|
|
|
|
|
- }
|
|
|
|
|
- if (StringUtils.isNotEmpty(dfName)) {
|
|
|
|
|
- key += dfName;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// String dfCode = resVo.getFactorCode();
|
|
|
|
|
+// String dfName = resVo.getAddress();
|
|
|
|
|
+// String key = "";
|
|
|
|
|
+// if (StringUtils.isNotEmpty(dfCode)) {
|
|
|
|
|
+// key += dfCode;
|
|
|
|
|
+// }
|
|
|
|
|
+// if (StringUtils.isNotEmpty(dfName)) {
|
|
|
|
|
+// key += dfName;
|
|
|
|
|
+// }
|
|
|
|
|
+ String key = resVo.getAddress();
|
|
|
if (devicefactorMap.containsKey(key)) {
|
|
if (devicefactorMap.containsKey(key)) {
|
|
|
iotDevicefactor = devicefactorMap.get(key);
|
|
iotDevicefactor = devicefactorMap.get(key);
|
|
|
resVo.setFactorDisplayname(iotDevicefactor.getDfDisplayname());
|
|
resVo.setFactorDisplayname(iotDevicefactor.getDfDisplayname());
|