|
@@ -160,7 +160,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
}
|
|
|
|
|
|
//判断上报数据设备是否已注册(要判断注册过的设备是不是属于本产品的),未注册自动注册
|
|
|
- Map<String,DeviceMapVO> deviceMapList = dmpProductService.getDeviceMap();
|
|
|
+ Map<String,DeviceMapVO> deviceMapList = dmpProductService.getDeviceMap(productCode);
|
|
|
if(!deviceMapList.containsKey(deviceId)){
|
|
|
DmpDevice dmpDeviceInfo = new DmpDevice();
|
|
|
ProductMapVO productMapVO = productMapList.get(productCode);
|
|
@@ -175,7 +175,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
dmpDeviceInfo.setServiceStatus(1);
|
|
|
dmpDeviceInfo.setDeviceUuid(UUIDUtils.uuid());
|
|
|
dmpDeviceService.save(dmpDeviceInfo);
|
|
|
- dmpProductService.deleteDeviceCache();
|
|
|
+ dmpProductService.deleteDeviceCache(productCode);
|
|
|
|
|
|
deviceUUId = dmpDeviceInfo.getDeviceUuid();
|
|
|
|
|
@@ -187,7 +187,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
dmpDeviceStatus.setProductCode(dmpDeviceInfo.getProductCode());
|
|
|
dmpDeviceStatusService.save(dmpDeviceStatus);
|
|
|
|
|
|
- deviceMapList = dmpProductService.getDeviceMap();
|
|
|
+ deviceMapList = dmpProductService.getDeviceMap(productCode);
|
|
|
}else if(deviceMapList.containsKey(deviceId)){
|
|
|
LambdaQueryWrapper<DmpDevice> queryWrapper = Wrappers.lambdaQuery();
|
|
|
queryWrapper.eq(DmpDevice::getDeleteFlag,0)
|
|
@@ -208,7 +208,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
dmpDeviceInfo.setServiceStatus(1);
|
|
|
dmpDeviceInfo.setDeviceUuid(UUIDUtils.uuid());
|
|
|
dmpDeviceService.save(dmpDeviceInfo);
|
|
|
- dmpProductService.deleteDeviceCache();
|
|
|
+ dmpProductService.deleteDeviceCache(productCode);
|
|
|
|
|
|
deviceUUId = dmpDeviceInfo.getDeviceUuid();
|
|
|
|
|
@@ -220,7 +220,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
dmpDeviceStatus.setProductCode(dmpDeviceInfo.getProductCode());
|
|
|
dmpDeviceStatusService.save(dmpDeviceStatus);
|
|
|
|
|
|
- deviceMapList = dmpProductService.getDeviceMap();
|
|
|
+ deviceMapList = dmpProductService.getDeviceMap(productCode);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -230,6 +230,7 @@ public class QueryInfluxdbDataServiceImpl extends AbstractCrudService<QueryInflu
|
|
|
String deviceId1 = map.getKey();
|
|
|
if((productCode.equals(productCode1)) && (deviceId.equals(deviceId1))){
|
|
|
deviceUUId = map.getValue().getDeviceUuid();
|
|
|
+ break;
|
|
|
}
|
|
|
}
|
|
|
}
|