|
|
@@ -506,8 +506,9 @@ public class IotDataTransferService {
|
|
|
transferList.add(transferVO);
|
|
|
});
|
|
|
|
|
|
- // 按产品代码分组,构建ProductCode到uuid列表的映射
|
|
|
+ // 按产品代码分组,构建ProductCode到uuid列表的映射,过滤掉产品代码为null的设备
|
|
|
Map<String, List<String>> codeDeviceUuidsMap = deviceList.stream()
|
|
|
+ .filter(device -> device.getProductCode() != null)
|
|
|
.collect(Collectors.groupingBy(DmpDevice::getProductCode,
|
|
|
Collectors.mapping(DmpDevice::getDeviceUuid, Collectors.toList())));
|
|
|
|
|
|
@@ -590,7 +591,7 @@ public class IotDataTransferService {
|
|
|
*/
|
|
|
private List<DmpDevice> getDeviceListByType(List<String> productCodeList, Integer tenantId) {
|
|
|
LambdaQueryWrapper<DmpDevice> queryWrapper = new LambdaQueryWrapper<>();
|
|
|
- queryWrapper.select(DmpDevice::getDeviceUuid, DmpDevice::getDeviceType, DmpDevice::getDeviceId)
|
|
|
+ queryWrapper.select(DmpDevice::getDeviceUuid, DmpDevice::getDeviceType, DmpDevice::getDeviceId, DmpDevice::getProductCode)
|
|
|
.in(DmpDevice::getProductCode, productCodeList)
|
|
|
.eq(DmpDevice::getDeleteFlag, 0)
|
|
|
.notIn(DmpDevice::getServiceStatus, 3)
|